Skip to content

Commit d871146

Browse files
authored
feat: Drop support for Ruby 2.4 and add support for Ruby 3.0
1 parent 46d4d95 commit d871146

File tree

7 files changed

+28
-26
lines changed

7 files changed

+28
-26
lines changed

Rakefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ namespace :kokoro do
5454
end
5555

5656
task :run_tests do
57-
gem_directories = ["google-apis-core", "google-apis-generator", "google-api-client"]
57+
gem_directories = ["google-apis-core", "google-apis-generator"]
58+
gem_directories << "google-api-client" unless RUBY_VERSION.start_with? "3."
5859
gem_directories.each do |dir|
5960
next unless File.file?(File.join(dir, "Gemfile"))
6061
cd dir do

google-apis-core/OVERVIEW.md

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1-
# Generator for Google REST Clients
1+
# Core classes for Google REST Clients
22

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

9-
## Usage
7+
## Documentation
108

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

13-
$ generate-api gen <outdir> --file=<path>
11+
* 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.
12+
* 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.
1413

15-
A URL can also be specified:
16-
17-
$ generate-api gen <outdir> --url=<url>
14+
For reference information on specific calls in the clients, see the {Google::Apis class reference docs}.
1815

1916
## License
2017

google-apis-core/google-apis-core.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
1818
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
1919
gem.require_paths = ["lib"]
2020

21-
gem.required_ruby_version = '>= 2.4'
21+
gem.required_ruby_version = '>= 2.5'
2222
gem.add_runtime_dependency "representable", "~> 3.0"
2323
gem.add_runtime_dependency "retriable", ">= 2.0", "< 4.0"
2424
gem.add_runtime_dependency "addressable", "~> 2.5", ">= 2.5.1"

google-apis-generator/OVERVIEW.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
# Core classes for Google REST Clients
1+
# Generator for Google REST Clients
22

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

7-
## Documentation
9+
## Usage
810

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

11-
* 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.
12-
* 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.
13+
$ generate-api gen <outdir> --file=<path>
1314

14-
For reference information on specific calls in the clients, see the {Google::Apis class reference docs}.
15+
A URL can also be specified:
16+
17+
$ generate-api gen <outdir> --url=<url>
1518

1619
## License
1720

google-apis-generator/google-apis-generator.gemspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ Gem::Specification.new do |gem|
1515
"source_code_uri" => "https://github.com/googleapis/google-api-ruby-client/tree/master/google-apis-generator"
1616
}
1717

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

22-
gem.required_ruby_version = ">= 2.4"
22+
gem.required_ruby_version = ">= 2.5"
2323
gem.add_runtime_dependency "activesupport", ">= 5.0"
2424
gem.add_runtime_dependency "gems", "~> 1.2"
2525
gem.add_runtime_dependency "google-apis-core", "~> 0.1"

google-apis-generator/lib/google/apis/generator/templates/gemspec.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ Gem::Specification.new do |gem|
2727
gem.files = Dir.glob("lib/**/*.rb") + Dir.glob("*.md") + [".yardopts"]
2828
gem.require_paths = ["lib"]
2929

30-
gem.required_ruby_version = '>= 2.4'
30+
gem.required_ruby_version = '>= 2.5'
3131
gem.add_runtime_dependency "google-apis-core", "~> 0.1"
3232
end

samples/web/Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ gem 'redis', '~> 3.2'
88
gem 'dotenv'
99
gem 'sinatra'
1010
gem 'mime-types-data'
11+
gem 'webrick'

0 commit comments

Comments
 (0)