-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from google-api-client 0.8.x to 0.9.x.
Switch from Google Drive API V2 to V3.
- Loading branch information
Showing
14 changed files
with
394 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Migrating from version 1.x.x to 2.x.x | ||
|
||
google-drive-ruby 1.x.x depends on google-api-client 0.8.x and Google Drive API V2. | ||
|
||
google-drive-ruby 2.x.x depends on google-api-client 0.9.x and Google Drive API V3. | ||
|
||
Each of them involves incompatible API changes. The users of google-drive-ruby may be affected by these changes. | ||
|
||
Here are some changes likely affecting google-drive-ruby users: | ||
|
||
If you pass an instance of Google::APIClient to GoogleDrive.login_with_oauth, it will no longer work, because Google::APIClient.new was removed. You need to pass credentials generated by [googleauth](https://github.com/google/google-auth-library-ruby) library instead. | ||
|
||
The field "title" in search queries was renamed to "name". e.g., | ||
|
||
```ruby | ||
session.files(q: "title = 'hoge'") | ||
``` | ||
|
||
must be rewritten to: | ||
|
||
```ruby | ||
session.files(q: "name = 'hoge'") | ||
``` | ||
|
||
# Migrating from version 0.x.x to 1.x.x | ||
|
||
Ver. 0.x.x no longer works, because the API used was deprecated and shut down. You need to migrate to ver. 1.x.x or later. | ||
|
||
Ver. 1.x.x is not 100% backward compatible with 0.x.x. Some methods have been removed. Especially, GoogleDrive.login has been removed, and you must use GoogleDrive.saved_session or GoogleDrive.login_with_oauth instead, as in the example code in README.rdoc. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,27 @@ | ||
Gem::Specification.new do |s| | ||
s.name = 'google_drive' | ||
s.version = '1.0.6' | ||
s.version = '2.0.0.pre1' | ||
s.authors = ['Hiroshi Ichikawa'] | ||
s.email = ['gimite+github@gmail.com'] | ||
s.summary = 'A library to read/write files/spreadsheets in Google Drive/Docs.' | ||
s.description = 'A library to read/write files/spreadsheets in Google Drive/Docs.' | ||
s.homepage = 'https://github.com/gimite/google-drive-ruby' | ||
s.rubygems_version = '1.2.0' | ||
s.license = 'New BSD' | ||
s.required_ruby_version = '>= 2.0.0' | ||
|
||
s.files = ['README.rdoc'] + Dir['lib/**/*'] | ||
s.require_paths = ['lib'] | ||
s.has_rdoc = true | ||
s.extra_rdoc_files = ['README.rdoc'] + Dir['doc_src/**/*'] | ||
s.rdoc_options = ['--main', 'README.rdoc'] | ||
|
||
s.add_dependency('nokogiri', ['>= 1.4.4', '!= 1.5.1', '!= 1.5.2']) | ||
s.add_dependency('oauth', ['>= 0.3.6']) | ||
s.add_dependency('oauth2', ['>= 0.5.0']) | ||
# TODO: Switch to 0.9 API once it is released: | ||
# https://github.com/google/google-api-ruby-client/blob/master/MIGRATING.md | ||
s.add_dependency('google-api-client', ['>= 0.7.0', '< 0.9']) | ||
s.add_development_dependency('test-unit', ['>= 3.0.0']) | ||
s.add_dependency('nokogiri', ['>= 1.5.3', '< 2.0.0']) | ||
s.add_dependency('oauth', ['>= 0.3.6', '< 1.0.0']) | ||
s.add_dependency('oauth2', ['>= 0.5.0', '< 2.0.0']) | ||
s.add_dependency('google-api-client', ['>= 0.9.0', '< 1.0.0']) | ||
s.add_dependency('googleauth', ['>= 0.5.0', '< 1.0.0']) | ||
s.add_development_dependency('test-unit', ['>= 3.0.0', '< 4.0.0']) | ||
s.add_development_dependency('rake', ['>= 0.8.0']) | ||
s.add_development_dependency('rspec-mocks', ['>= 3.4.0']) | ||
s.add_development_dependency('rspec-mocks', ['>= 3.4.0', '< 4.0.0']) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.