1
0
Fork 0
forked from OpenNeo/impress
Commit graph

1431 commits

Author SHA1 Message Date
4091ce2a5b 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-10-23 19:05:05 -07:00
aa001f1e32 Uninstall passenger_monit
I'm not exactly sure what it was doing, whatever bye
2023-10-23 19:05:05 -07:00
acb99c3a02 Clean up the Gemfile + add explanations
Grouping stuff a bit more sensibly and with explanations! I just finished deleting a bunch of gems we're not really using, and this helped me audit that the ones we still have here we generally actually want.
2023-10-23 19:05:05 -07:00
375753ef89 Version the http_accept_languages gem
idk why we were pulling from git before, probably to get a feature that wasn't pushed to rubygems yet? But now the latest rubygems version matches the latest repo commit (both back in 2017 lol), so let's do that for greater stability and clarity!
2023-10-23 19:05:05 -07:00
98cbaa0c96 Delete character_encodings gem used only in 1.8
We're not on Ruby 1.8 anymore, so this never happens anyway!
2023-10-23 19:05:05 -07:00
c4f3a472ff 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-10-23 19:05:05 -07:00
Matchu
d0616b6dfd 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-10-23 19:05:05 -07:00
Matchu
fd263ea82f 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-10-23 19:05:05 -07:00
Matchu
b0cceb8ce7 Uninstall Airbrake
Haven't checked it in forever, if we want an error reporting solution we'll create it fresh!
2023-10-23 19:05:05 -07:00
Matchu
fde8ec0c3b Uninstall mini_magick
I think this was probably part of the swf converters or something? Seems unused now though!
2023-10-23 19:05:05 -07:00
Matchu
31ebf7d4eb 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-10-23 19:05:05 -07:00
Matchu
38f3c9894c Delete WardrobeTip model
lmao I have zero recollection of this, I've been generally trying to avoid too-far-off-the-path cleanup, but this one just seems silly, goodbye
2023-10-23 19:05:05 -07:00
Matchu
93c596007d Clarify image path methods for SwfAsset
Using `s3_path` and stuff made it sound like we were still referencing the original Amazon S3 images - but actually our new asset proxy just uses the same path structure, and we didn't change anything about it.

Oh also I deleted an after_conversion method that isn't used anymore, forgot about that!
2023-10-23 19:05:05 -07:00
Matchu
1195a6190b 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-10-23 19:05:04 -07:00
Matchu
8ea74b737e Remove outfit image saving
This has already been moved to Impress 2020 too, so we can delete all the image generation and saving!
2023-10-23 19:05:04 -07:00
Matchu
e121d8bba2 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-10-23 19:05:04 -07:00
Matchu
298404208f Remove rails-observers
We deleted all the observers, so now we can delete this too!
2023-10-23 19:05:04 -07:00
Matchu
a4a0188b1b 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-10-23 19:05:04 -07:00
Matchu
44341ba731 Stop caching pet type images on item page
That's easy queries and easy templates!
2023-10-23 19:05:04 -07:00
Matchu
b87492d4ee Stop caching item page contributors
This lets us remove the contribution observer too!
2023-10-23 19:05:04 -07:00
Matchu
0eea2c9652 Oops, remove item_observer from config 2023-10-23 19:05:04 -07:00
Matchu
cf2f78703b Stop caching latest contribution
That's another tiny query that I'm okay with just removing the cache overhead complexity for right now!
2023-10-23 19:05:04 -07:00
Matchu
1bf84b5106 Remove unused "outfits#new newest_items" cache
Huh! This cache key seemed to only be referenced in checks and expirations, but was never actually used! So I guess we've been loading the modeling predictions every time for a while huh??

We'll get smarter about that someday, but anyway, that lets us delete our Item resque tasks and ItemObserver!
2023-10-23 19:05:04 -07:00
Matchu
41fdcb5abc Remove newest_items caching from items page
Yeah I'm very unconvinced of the merit of saving us one items/translations query lmao
2023-10-23 19:05:04 -07:00
Matchu
db74dd1e29 Remove as_json item caching
Again I'm just not convinced of the perf on this, and it enables us to delete some whole infra over it, we can improve it another time if it's useful to!
2023-10-23 19:05:04 -07:00
Matchu
ffa73b6b03 Simplify item page rendering
Just removing some caching and the expiration of it! There's still more superfluous(?) caching on the item page to audit, but these seem a bit more sensible about avoiding loading extra data.
2023-10-23 19:05:04 -07:00
Matchu
02abd4e07f Simplify item_link rendering
In the interest of clearing out Resque, I'm just gonna remove a lot of our more complex caching stuff, and we can do a perf pass for things like big item list pages once everything's upgraded. (I'm hopeful that the upgrades themselves improve perf; and if not, that some improved sensibilities 10 years later can find simpler approaches.)
2023-10-23 19:05:04 -07:00
Matchu
44a00146aa Oops, remove some remaining references to Flex
We uninstalled Flex, our Elasticsearch gem, to replace item search with direct DB queries; but I forgot these calls, oops!

I also kinda want to see about deleting the resque tasks altogether, since I'm not sure how to get Resque installed on latest rails bc there seems to be a conflict over the version of Rack? And it'd be nice to get rid of the complexity if we can.
2023-10-23 19:05:04 -07:00
Matchu
5d1cce293b Reimplement Advanced Search
Oh I uhhh flat out forgot about this LMAO

well it's back now!! and was pleasantly easy to build, following the `from_text` example & abstractions
2023-10-23 19:05:04 -07:00
Matchu
3e728a8e56 Oops, fix ambiguous zones_restrict column
When combining occupies and restricts filters, this wouldn't be sure whether to apply to the items or the swf assets.
2023-10-23 19:05:04 -07:00
Matchu
fd87b41c17 Oops, add unowned & unwanted support to search!
Uhhh idk how I messed this up, but right, wanting is not the opposite of owning, LOL!
2023-10-23 19:05:04 -07:00
Matchu
8ba07800d9 Fix item data not loading
Oops, finder options were removed! That's fine, the `:select` on here isn't useful anyway, and I'd rather just load everything and be simpler lol
2023-10-23 19:05:04 -07:00
Matchu
52d4ec8443 Convert has_many conditions to where block
Looks like `conditions` was removed in this version! This broke outfit saving. Now it's fixed!
2023-10-23 19:05:04 -07:00
Matchu
2dd9cfb3d5 Use all instead of scoped
Back in the day, `all` would immediately load up a query into an array, but now I think it's an alias for what `scoped` used to be: a relation that contains everything.
2023-10-23 19:05:04 -07:00
Matchu
5da4006053 Set up development database in Vagrant
Just a lil bit of extra provisioning and config! We also added some more to the `seeds.rb` task, to set up records that the app expects to exist.
2023-10-23 19:05:04 -07:00
Matchu
7edfda6d19 Rename ClosetList.public -> publicly_visible
This removes a conflict with a new Rails method `.public` on the model!
2023-10-23 19:05:04 -07:00
Matchu
97bf520674 Update gems to Rails 4.1 (crashes!)
Lookin' good on this end, but the server isn't starting up yet, got some fixes to make!
2023-10-23 19:05:04 -07:00
Matchu
d9ff19a7a2 Remove protected_attributes gem
We cleaned up all the `attr_accessible` calls, hooray! This was blocking us from upgrading to Rails 5, so now we can!
2023-10-23 19:05:04 -07:00
Matchu
09c9e3f346 Use strong parameters for ClosetHanger 2023-10-23 19:05:04 -07:00
Matchu
0810f6c34b Use strong parameters for ClosetList 2023-10-23 19:05:04 -07:00
Matchu
8aa4aa6e30 Drop NewsPosts model
We never ended up really using this lol, and it has an attr_accessible I want to be rid of so let's just fully trash it while we're at it!
2023-10-23 19:05:04 -07:00
Matchu
248e710fcb Use strong parameters for User 2023-10-23 19:05:04 -07:00
Matchu
523137253c Use strong parameters for Outfit 2023-10-23 19:05:04 -07:00
Matchu
cff393f014 Auto log in as test user in development mode
I want to test some logged-in stuff, but the whole openneo_id app is a mess to integrate with (and I want to eliminate it down the line anyway), so here's a simple hacky thing that just gets you into a test user for development!
2023-10-23 19:05:04 -07:00
Matchu
23b84cba26 Use strong parameters for Donation 2023-10-23 19:05:04 -07:00
Matchu
f9cd563c82 Delete attr_accessible from Campaign
idk what these were even doing here, I never built a UI to edit campaigns?
2023-10-23 19:05:04 -07:00
Matchu
209c9d7ffd 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-10-23 19:05:04 -07:00
Matchu
75602b949c 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-10-23 19:05:04 -07:00
Matchu
740645a38b 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-10-23 19:05:04 -07:00
Matchu
5f887dc8a1 Backfill globalize's find_by_name method
This method was removed in globalize 4, which we upgraded to for compatibility with Rails 4! Let's add back in a similar thing for now!
2023-10-23 19:05:04 -07:00