Google Spreadsheets accessor with ActiveResource
http://webos-goodies.jp/archives/active_resource_google_spreadsheets_data_api.html
Add this line to your application's Gemfile:
gem 'activeresource-google_spreadsheets'
And then execute:
$ bundle
Or install it yourself as:
$ gem install activeresource-google_spreadsheets
http://webos-goodies.jp/archives/active_resource_google_spreadsheets_data_api.html
in config/initializers/google_spreadsheet.rb
GoogleSpreadsheets::Base.auth_type = :bearer
GoogleSpreadsheets::Base.access_token =
GoogleSpreadsheets::Auth::ServiceAccountsAccessToken.new(
json_key_io: File.open('/path/to/service_account_json_key.json')
)
in config/initializers/google_spreadsheet.rb
GoogleSpreadsheets::Base.auth_type = :bearer
GoogleSpreadsheets::Base.access_token =
GoogleSpreadsheets::Auth::ServiceAccountsAccessToken.new
and set the values to ENV['GOOGLE_CLIENT_EMAIL']
& ENV['GOOGLE_PRIVATE_KEY']
http://qiita.com/tkawa/items/04fc6f0574122d4a3fd2
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request