Here is a little update on what we have been doing so far:
- we looked at the drop-box plugin and learned that it overwrites the after_create_hook method inside the backup.rb model with a Backup.class_eval
- we used the same method to hook into the backup in discourse
- we realized that the GoogleDrive OAuth uses a complex way to get the access_token for a certain user with his account, so
- we decided to use another way of authorization: the GoogleDrive Service Account (google-drive-ruby/doc/authorization.md at master · gimite/google-drive-ruby · GitHub look at the 3rd option here)
- we successfully sent our backup files to our service account in the development mode
- we pushed our changes to a repository (GitHub - berlindiamonds/discourse-sync-to-googledrive: discourse backups in google drive · GitHub)
- we started writing tests with Rspec
It’s kind of working, but still needs a lot of improvement. Please feel free to comment, criticize, suggest and ask ![]()