Skip to content

Commit

Permalink
feat: Drop support for Ruby 2.4 and add support for Ruby 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma committed Mar 4, 2021
1 parent 46d4d95 commit d871146
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 26 deletions.
3 changes: 2 additions & 1 deletion Rakefile
Expand Up @@ -54,7 +54,8 @@ namespace :kokoro do
end

task :run_tests do
gem_directories = ["google-apis-core", "google-apis-generator", "google-api-client"]
gem_directories = ["google-apis-core", "google-apis-generator"]
gem_directories << "google-api-client" unless RUBY_VERSION.start_with? "3."
gem_directories.each do |dir|
next unless File.file?(File.join(dir, "Gemfile"))
cd dir do
Expand Down
21 changes: 9 additions & 12 deletions google-apis-core/OVERVIEW.md
@@ -1,20 +1,17 @@
# Generator for Google REST Clients
# Core classes for Google REST Clients

This library implements the code generator used by legacy REST clients for
Google APIs. It automatically generates client gems given discovery documents.
Google-managed clients for publicly-available APIs are maintained using this
tool, and users may also use it to generate clients for private or early-access
APIs.
This library includes common base classes and dependencies used by legacy REST
clients for Google APIs. It is used by client libraries, but you should not
need to install it by itself.

## Usage
## Documentation

To generate from a local discovery file:
More detailed descriptions of the Google legacy REST clients are available in two documents.

$ generate-api gen <outdir> --file=<path>
* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.

A URL can also be specified:

$ generate-api gen <outdir> --url=<url>
For reference information on specific calls in the clients, see the {Google::Apis class reference docs}.

## License

Expand Down
2 changes: 1 addition & 1 deletion google-apis-core/google-apis-core.gemspec
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
gem.require_paths = ["lib"]

gem.required_ruby_version = '>= 2.4'
gem.required_ruby_version = '>= 2.5'
gem.add_runtime_dependency "representable", "~> 3.0"
gem.add_runtime_dependency "retriable", ">= 2.0", "< 4.0"
gem.add_runtime_dependency "addressable", "~> 2.5", ">= 2.5.1"
Expand Down
21 changes: 12 additions & 9 deletions google-apis-generator/OVERVIEW.md
@@ -1,17 +1,20 @@
# Core classes for Google REST Clients
# Generator for Google REST Clients

This library includes common base classes and dependencies used by legacy REST
clients for Google APIs. It is used by client libraries, but you should not
need to install it by itself.
This library implements the code generator used by legacy REST clients for
Google APIs. It automatically generates client gems given discovery documents.
Google-managed clients for publicly-available APIs are maintained using this
tool, and users may also use it to generate clients for private or early-access
APIs.

## Documentation
## Usage

More detailed descriptions of the Google legacy REST clients are available in two documents.
To generate from a local discovery file:

* The [Usage Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/usage-guide.md) discusses how to make API calls, how to use the provided data structures, and how to work the various features of the client library, including media upload and download, error handling, retries, pagination, and logging.
* The [Auth Guide](https://github.com/googleapis/google-api-ruby-client/blob/master/docs/auth-guide.md) discusses authentication in the client libraries, including API keys, OAuth 2.0, service accounts, and environment variables.
$ generate-api gen <outdir> --file=<path>

For reference information on specific calls in the clients, see the {Google::Apis class reference docs}.
A URL can also be specified:

$ generate-api gen <outdir> --url=<url>

## License

Expand Down
4 changes: 2 additions & 2 deletions google-apis-generator/google-apis-generator.gemspec
Expand Up @@ -15,11 +15,11 @@ Gem::Specification.new do |gem|
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/google-apis-generator"
}

gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("bin/*") + Dir.glob("*.md") + [".yardopts"]
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("lib/**/*.tmpl") + Dir.glob("bin/*") + Dir.glob("*.md") + [".yardopts"]
gem.executables = ["generate-api"]
gem.require_paths = ["lib"]

gem.required_ruby_version = ">= 2.4"
gem.required_ruby_version = ">= 2.5"
gem.add_runtime_dependency "activesupport", ">= 5.0"
gem.add_runtime_dependency "gems", "~> 1.2"
gem.add_runtime_dependency "google-apis-core", "~> 0.1"
Expand Down
Expand Up @@ -27,6 +27,6 @@ Gem::Specification.new do |gem|
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
gem.require_paths = ["lib"]

gem.required_ruby_version = '>= 2.4'
gem.required_ruby_version = '>= 2.5'
gem.add_runtime_dependency "google-apis-core", "~> 0.1"
end
1 change: 1 addition & 0 deletions samples/web/Gemfile
Expand Up @@ -8,3 +8,4 @@ gem 'redis', '~> 3.2'
gem 'dotenv'
gem 'sinatra'
gem 'mime-types-data'
gem 'webrick'

0 comments on commit d871146

Please sign in to comment.