Commit graph

349 commits

Author SHA1 Message Date
b7293f74f9 Upgrade to Rails 6.1.7.4
This one was pretty straightforward yaay! Main thing was the change from `render file` to `render template` in a couple places, oh and a thing with complex `order()` clauses.
2023-08-02 17:55:32 -07:00
9ad464a7f7 Invalidate old session cookies
The session format changed, so we change the session cookie name rather than have things crash about it! (I hope the actual prod behavior is to ignore bad cookies rather than crash? But I figure this is more reliable anyway.)
2023-08-02 17:37:09 -07:00
5b738f5930 Add web console support for Vagrant users 2023-08-02 17:36:32 -07:00
24e59c6258 Upgrade to Rails 6.0.6.1
Another pretty easy one! We have the `rails app:update` changes in here too.
2023-08-02 17:27:11 -07:00
2c6fd36455 Run rails app:update
We accepted some changes as-is, but for development.rb and production.rb we read the diff and manually edited them!
2023-08-02 16:18:54 -07:00
4f564db785 Upgrade to Rails 5.2.8.1
Some important little upgrades but mostly straightforward!

Note that there's still a known issue where item searches crash, I was hoping that this was a bug in Rails 4.2 that would be fixed on upgading to 5, but nope, oh well!

Also uhh I just got a bit silly and didn't actually mean to go all the way to 5.2 in one go, I had meant to start at 5.0… but tbh the 5.1 and 5.2 changes seem small, and this seems to be working, so. Yeah ok let's roll!
2023-08-02 16:05:09 -07:00
b4d6fbc147 Make 4.1 -> 4.2 changes
Just following the recommended stuff in the upgrade guide!
2023-08-02 15:41:22 -07:00
a6cc37eac7 Delete ~empty initializer files
Idk I guess these are the default place to put certain settings, but idk if they're still canonical, and I'd rather just not have files that don't mean anything rn!
2023-08-02 14:42:17 -07:00
65019042f9 Delete unused Pledgie files
This was back when we used a third-party campaign tool! Haven't run this code in ages!
2023-08-02 14:40:48 -07:00
6b192cef09 Delete unused bullet.rb config file 2023-08-02 14:40:13 -07:00
a4314d61d5 Remove unused species/color/zone config files
This is all in the database now! Has been for a long time!
2023-08-02 14:38:49 -07:00
4aeea86e08 Delete empty file item_zone_sets.yml
Huh.
2023-08-02 14:37:01 -07:00
e94c03b01f Remove dotenv-deployment, upgrade dotenv-rails
Idk exactly what's going on with dotenv-deployment, if it turns out it was critical to our deploy process then we'll change the deploy process! It's deprecated and conflicts with gem deps for `dotenv-rails`.
2023-08-02 13:41:37 -07:00
89b3282d4d Remove RightAWS gem
We're not connecting to AWS directly anymore, now that we deleted the SWF conversion stuff, so we can finally clear this out!
2023-08-02 13:20:22 -07:00
Matchu
c44daea318 Delete Camo references & Addressable gem
At one point we piloted a "Camo" service to proxy HTTPS image urls for us, but it doesn't exist anymore.

We already have proxies and stuff for this, so I left `Image` as a placeholder for this, but it's not working yet!

This also deletes our final reference to the Addressable gem, so we can remove it!
2023-08-02 13:16:22 -07:00
Matchu
7e3658d329 Remove mall spider cron jobs
I don't think these work anymore, and our volunteers get new items into the db fast anyway, Impress 2020 is doing better spidering these days. And then we get to remove the cron job `whenever` gem!
2023-08-02 13:11:51 -07:00
Matchu
5ff10673d5 Uninstall Airbrake
Haven't checked it in forever, if we want an error reporting solution we'll create it fresh!
2023-08-02 13:08:58 -07:00
Matchu
e11cfbf016 Remove OutfitImageUploader and Carrierwave
Ok right, missed this in the outfit image stuff deletion, get rid of the code and library we were using to push those images up to S3!
2023-08-02 13:07:29 -07:00
Matchu
8a20c9be02 Uninstall resque
Yay, we've deleted all our background tasks!

We'll probably want to replace some of the basic functionality like certain caching? But we can deal with that as we run into it.

The direct motivation here was a seeming version conflict between Rails 4.2's rack dependency and latest Resque's rack dependency... but this is just nice complexity elimination regardless, we want this anyway :3
2023-08-02 12:53:56 -07:00
Matchu
9de50deb3c Remove SWF conversion
We've already swapped out the backend for this stuff to Impress 2020, so the resque task and the broken image report UI aren't actually relevant anymore. Delete them!

This helps us delete Resque soon too.
2023-08-02 12:43:45 -07:00
Matchu
2de9e9f45a Stop caching trade users on item page
Idk this one might actually be a bit of a pain to load? But I'd want to optimize it differently anyway, and there's overhauls we're already planning to do here.
2023-08-02 12:29:34 -07:00
Matchu
caa0859a2d Stop caching pet type images on item page
That's easy queries and easy templates!
2023-08-02 12:22:39 -07:00
Matchu
99910aff6a Stop caching item page contributors
This lets us remove the contribution observer too!
2023-08-02 12:10:38 -07:00
Matchu
f277ad9ffd Oops, remove item_observer from config 2023-08-02 12:08:48 -07:00
Matchu
2816ca52dc Fix file reloading in a Vagrant environment
During this upgrade process, `rails server` hasn't been updating its logic when files changed, so every change had to be accompanied by a restart.

This turned out to be because Vagrant's networked filesystem to share between the host and guest systems doesn't support the filesystem update events Rails is listening for. So, we switch to a simpler file watcher that does more work but doesn't depend on the filesystem events!
2023-07-29 10:14:58 -07:00
Matchu
fc84266523 Remove the development_async environment
It's unused, and I'm just double-checking that it's not somehow causing the issues with the rails dev server not reloading classes. (The `threadsafe!` option would do that, but I don't thiiiink this is the env we're running? But I'm wondering if the loader is getting confused by the prefixiness of the name or something. Unlikely!)
2023-07-29 10:05:36 -07:00
Matchu
ca280e55ac Update the cache namespace
This is recommended by the Rails 4.0 upgrade guide:

> The caching method changed between Rails 3.x and 4.0. You should change the cache namespace and roll out with a cold cache.

I noticed too that old cache entries with old character encodings were a real problem, so yeah making sure we're working with a cold cache is smart!!
2023-07-28 15:49:24 -07:00
Matchu
ced8f3f924 match router syntax -> get/post
I hope I got these right lol!!
2023-07-22 12:29:29 -07:00
Matchu
7d20204940 Remove flex from the app (breaks search!)
We'll need to replace the item search query stuff with direct MySQL queries, but that's not ready yet bc the app still isn't booting, so we're committing this in a known broken state for now!
2023-07-22 12:18:53 -07:00
Matchu
0ee6881918 Remove newrelic gem
I haven't logged into newrelic in a billion years, let's just stop sending them stuff

(This is a precursor to an attempt to delete flex stuff too and replace our elasticsearch stuff with direct mysql queries like Impress 2020 does, but that'll be more work!)
2023-07-22 12:11:18 -07:00
Matchu
ca99459a43 Remove unused Devise initializer settings
I guess the APIs changed here, but these were placeholder settings we weren't actually using anyway (cuz we use the OpenNeo ID integration), so I just commented them out and it seems fine for now!
2023-07-22 11:00:21 -07:00
Matchu
8b6be4d522 Upgrade to Ruby 2.2.4, Rails 4.0.13
NOTE: This doesn't boot yet! There's something changed in the `devise` API that we'll need to fix!

```
/vagrant/config/initializers/devise.rb:46:in `block in <top (required)>': undefined method `encryptor=' for Devise:Module (NoMethodError)
```

But yeah, we navigated the gem upgrades, and also I ran `rake rails:update` and hand-processed the suggestions it had for our config files.
2023-07-21 19:39:32 -07:00
Matchu
7f8f7e624d Remove references to the Stripe gem
Rather than figure out how to upgrade the Stripe gem to be compatible with future Rails, I'd rather just delete the references, since it's currently unused.

I'm not so bold as to go in and fully trash all our donation code; I just want to ensure we're not sending people down broken codepaths, and that if they reach them, the error messages are clear enough.
2023-07-21 18:54:15 -07:00
Emi Dunn-Rankin
515b089b3b
Update terms link to point to DTI 2020
There's a new terms page over there! Use that instead, and update the lil footer to change the date it was last modified (8 years wow!)
2022-09-25 06:11:34 -07:00
3ae8a265b2
Use Fastly to cache our PNG assets from S3
We've been serving images directly from `impress-asset-images.s3.amazonaws.com` for a long time. While they serve with long-lasting HTTP cache headers, and the app requests them with the `updated_at` timestamp in the query string; each GET request still executes a full S3 ReadObject operation to get the latest version.

In the past, this was only relevant to users on Image Mode, not Flash Mode. But now that everyone's on Image Mode, this matters a lot more!

Now, we've configured a Fastly host at `impress-asset-images.openneo.net`, to sit in front of our S3 bucket. This should dramatically reduce the GET requests to S3 itself, as our cache warms up and gains copies of the most common asset PNGs.

That said, I'm not sure how much actual cost impact this change will have. Our AWS console isn't configured to differentiate cost by bucket yet—I've started this process, but it might take a few days to propagate. All I know is that our current costs are $35/mo data transfer + $20/mo storage, and that outfit images are responsible for most of the storage cost. I hypothesize that `impress-asset-images` is responsible for most of the reads and data transfers, but I'm not sure!

In the future, I think we'll be able to bring our AWS costs to near-zero, by:
- Obsolete `impress-asset-images`, by using the official Neopets PNGs instead, after the HTML5 conversion completes.
- Obsolete `impress-outfit-images`, by using a Node endpoint to generate the images, fronted by a CDN cache. (Transfer the actual data to a long-term storage backup, and replace the S3 objects with redirects, so that old S3 URLs will still work.)

I hope this will be a big slice of the costs though! 🤞

(Note: I'll be deploying this on a bit of a delay, because I want to see the DNS propagate across the globe before flipping to a new domain!)
2021-05-12 22:50:05 -07:00
Matt Dunn-Rankin
822efede84 undo accidental commit
These credentials were never used, and are now revoked. Awkward!
2017-01-06 19:54:17 -08:00
Matchu
e6a2b978f1 oh huh. looks like remove/move are ready. 2015-09-26 19:55:09 -07:00
Matchu
621c768921 Select All + visual feedback 2015-09-26 14:22:11 -07:00
Matchu
4ae43f61ea good-enough zeroclipboard implementation 2015-09-24 20:50:27 -07:00
Matchu
4a539f32db hope I did this swfimages fix right xD 2015-08-05 20:22:23 -04:00
Matchu
4a18f22571 camo the emotes on the campaign show page 2015-08-05 19:41:42 -04:00
Matchu
5d2c226357 yum, new campaigns 2015-08-05 19:26:12 -04:00
Matchu
b9a9ce3890 import from gallery
some of the stuff to support single-pageiness feels a bit hacky. ah, well :P
2015-07-28 15:05:40 -04:00
Matchu
deb0aa90f0 refactor importing 2015-07-27 13:25:24 -04:00
Matchu
dcf254a78d finally let people remove all items from the list at once.
I've been doing this manually via email for a long time,
since building new stuff in the logged-in world was a pain in the old env.

But now here we are! Finally, finally :)
2015-07-19 12:35:49 -04:00
Matchu
625f1ee8b4 mount the resque app regardless of admin status if in development 2015-07-18 01:05:10 -04:00
Matchu
f6a95ddac5 oooops, carrierwave wants s3 config in prod, too 2015-07-17 18:26:43 -04:00
Matchu
a29fbbbd40 move some deploy stuff from files into env 2015-07-17 17:47:58 -04:00
Matchu
7c2600af9f the dev version of neopia has a hostname now :D 2015-07-16 22:37:32 -04:00
Matchu
647c767c31 latest i18n gem cares is stricter about locales, so configure better. this works, right? :x 2015-07-16 18:59:45 -04:00