Week 3 - Day 12
We have ready the first version of our Discourse backups to Google Drive plugin, yay! The instructions for its usage are in the readme of the repository:
Discourse googledrive backups plugin
- Learnt how to use opendiff to solve conflicts in github (git mergetool)
- We discovered that the 'google_drive gem' was reading the full json hash with the credentials as if it was a (veeeery long) path. It raised the error "Errno::ENAMETOOLONG".
We didn't want to include a path to a file (this would mean forcing the user to put the json file into the Plugin structure manually). The idea was to let the user copy&paste its json-formatted credentials provided by google into the UI of the plugin settings and connect like that to Drive.
Luckily, this gem also gives the option to pass an IO object to create a session. We converted the json-alike string into one and connected to Drive successfully: session = GoogleDrive::Session.fromserviceaccountkey(StringIO.new(SiteSetting.discoursebackupstodriveapikey))
- this IO object retrieves the JSON content from the textfield in the frontend Settings of our Plugin.
- updated the README.md of our plugin repo with further instructions
- added a new blog post (http://berlindiamonds.blogspot.de/2017/07/creating-plugin-for-discourse.html)
- talked to our mentor about further tasks
You must be logged in to add a comment.