rikai / Showbot

🤖 An omnipresent multi-platform bot who's goal in life is become Skynet 🤖
MIT License
40 stars 18 forks source link

Feature/update gapi client #82

Open s0ph0s-2 opened 7 years ago

s0ph0s-2 commented 7 years ago

Resolves #73, as long as someone tests it with JBot's API key first to make sure I didn't accidentally break something I can't test…

rikai commented 7 years ago

Going to wait to merge this until i can find a chance to test it

s0ph0s-2 commented 7 years ago

I should also note that I was only able to upgrade to 0.10.x because 0.11.x depends on mime-types version 3-something, but mail depends on version 1.16. That might become an issue at some point in the future.

It seems as though a newer version of mail also supports version 3-something of mime-types, but I don't know what Showbot/JBot uses the mail package for, so I didn't update the gem.

rikai commented 7 years ago

Mail is used in the backup scripts, which is actually code that has never been touched, and currently not actively used, at least by me. It's defined in the Gemfile & you can look at the gemfile.lock to see what is requiring something. 👍

TL;DR if it's not defined in the gemfile explicitly, it's pulled in as a dependency. If you're wanting to/up for doing an update of the gemfile dependencies (and perhaps removing some of the hard versions defined as a bonus), i would certainly not object, it's just a bit time-consuming to update and figure out if anything breaks. :)

s0ph0s-2 commented 7 years ago

That's something I'll definitely consider doing, but I agree that it will be time consuming and somewhat tedious. It might also be worthwhile to go through the entire project to delete code and dependencies that are unused. Less code, fewer bugs!

This seems like something that deserves it's own issue.

rikai commented 7 years ago

Honestly, the back of stuff is the only code that is completely unused as far as I remember, and that's mostly just unused because I haven't gotten around to using it rather than because it is useless but I agree, definitely is a separate issue

rikai commented 6 years ago

Hm, how would you feel about updating this to 0.11 regardless, making a note for later testing/a FIXME in the backup code/the commit message? Since it's code that's not actively used, i don't mind breaking it for the sake of updating code that is actively used and fixing it later when we actually have the time and need it. 👍

s0ph0s-2 commented 6 years ago

I'll hunt down the backup code and see how it uses mail. If updating doesn't actually break anything, I'll just go ahead and update all the way to 0.11. If it does, I'll disable the rake trigger and leave a FIXME comment.

s0ph0s-2 commented 6 years ago

I just started digging into how the backup feature is supposed to work. It actually looks pretty useful! (For reference, here is the documentation). Is having backups of Showbot's database useful to JB, or are you backing the Showbot droplet up in a different way?

Currently, the backup code you said that you don't use is configured to back up the MySQL database to Amazon S3, provided that it has all of the information required to access the database and upload to an S3 bucket.

I don't see any issues that would prevent me from simply removing the version restriction and updating the backup and mail gems to the current versions. That should unblock updating the Google APIs to the most recent version. However, if the backups aren't a feature that we want to keep around, we should probably just axe the code right now and eliminate a small portion of future maintenance headaches.

s0ph0s-2 commented 6 years ago

I rebased on devel since some new dependencies have been added (Discord). It's now up to google-api-client v13.