Skip to content

Commit

Permalink
feat: Update Ruby dependency to minimum of 2.4 (#4206)
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored Oct 18, 2019
1 parent e8526dc commit 2ad4e22
Show file tree
Hide file tree
Showing 217 changed files with 1,058 additions and 1,243 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ In order to use the google-cloud-ruby console and run the project's tests, there
small amount of setup:

1. Install Ruby.
google-cloud-ruby requires Ruby 2.3+. You may choose to manage your Ruby and gem installations with [RVM](https://rvm.io/), [rbenv](https://github.com/rbenv/rbenv), or [chruby](https://github.com/postmodern/chruby).
google-cloud-ruby requires Ruby 2.4+. You may choose to manage your Ruby and gem installations with [RVM](https://rvm.io/), [rbenv](https://github.com/rbenv/rbenv), or [chruby](https://github.com/postmodern/chruby).

2. Install [Bundler](http://bundler.io/).

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1185,11 +1185,11 @@ $ gem install google-cloud-video_intelligence

## Supported Ruby Versions

These libraries are currently supported on Ruby 2.3+.
These libraries are currently supported on Ruby 2.4+.

Google provides official support for Ruby versions that are actively supported
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
in security maintenance, and not end of life. Currently, this means Ruby 2.3
in security maintenance, and not end of life. Currently, this means Ruby 2.4
and later. Older versions of Ruby _may_ still work, but are unsupported and not
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
about the Ruby support schedule.
Expand Down
8 changes: 3 additions & 5 deletions gcloud/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
inherit_gem:
google-style: google-style.yml

AllCops:
Exclude:
- "gcloud.gemspec"
- "Rakefile"
- "test/**/*"
TargetRubyVersion: 2.2

Documentation:
Enabled: false
Expand All @@ -13,7 +15,3 @@ Layout/EmptyLines: # for the extra line between copyright and code
Metrics/LineLength:
Exclude:
- "Gemfile"
Style/StringLiterals:
EnforcedStyle: double_quotes
Style/MethodDefParentheses:
EnforcedStyle: require_no_parentheses
2 changes: 1 addition & 1 deletion gcloud/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ be able to accept your pull requests.
In order to use the google-cloud console and run the project's tests,
there is a small amount of setup:

1. Install Ruby. google-cloud requires Ruby 2.3+. You may choose to
1. Install Ruby. google-cloud requires Ruby 2.4+. You may choose to
manage your Ruby and gem installations with [RVM](https://rvm.io/),
[rbenv](https://github.com/rbenv/rbenv), or
[chruby](https://github.com/postmodern/chruby).
Expand Down
4 changes: 2 additions & 2 deletions gcloud/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ end

## Supported Ruby Versions

This library is supported on Ruby 2.3+.
This library is supported on Ruby 2.4+.

Google provides official support for Ruby versions that are actively supported
by Ruby Core—that is, Ruby versions that are either in normal maintenance or in
security maintenance, and not end of life. Currently, this means Ruby 2.3 and
security maintenance, and not end of life. Currently, this means Ruby 2.4 and
later. Older versions of Ruby _may_ still work, but are unsupported and not
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
about the Ruby support schedule.
Expand Down
4 changes: 2 additions & 2 deletions gcloud/gcloud.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ Gem::Specification.new do |gem|
["README.md", "AUTHENTICATION.md", "CONTRIBUTING.md", "CODE_OF_CONDUCT.md", "LICENSE", ".yardopts"]
gem.require_paths = ["lib"]

gem.required_ruby_version = ">= 2.0.0"
gem.required_ruby_version = ">= 2.4"

gem.add_dependency "google-cloud", "~> 0.23"

gem.add_development_dependency "google-style", "~> 1.24.0"
gem.add_development_dependency "minitest", "~> 5.10"
gem.add_development_dependency "minitest-autotest", "~> 1.0"
gem.add_development_dependency "minitest-focus", "~> 1.1"
gem.add_development_dependency "minitest-rg", "~> 5.2"
gem.add_development_dependency "autotest-suffix", "~> 1.1"
gem.add_development_dependency "redcarpet", "~> 3.0"
gem.add_development_dependency "rubocop", "~> 0.64.0"
gem.add_development_dependency "simplecov", "~> 0.9"
gem.add_development_dependency "yard", "~> 0.9"
gem.add_development_dependency "yard-doctest", "~> 0.1.13"
Expand Down
9 changes: 3 additions & 6 deletions google-cloud-asset/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
inherit_gem:
google-style: google-style.yml

AllCops:
Exclude:
- "google-cloud-asset.gemspec"
- "lib/google/**/*"
- "Rakefile"
- "test/**/*"
- "acceptance/**/*"
TargetRubyVersion: 2.2

Documentation:
Enabled: false

Style/StringLiterals:
EnforcedStyle: double_quotes
Style/MethodDefParentheses:
EnforcedStyle: require_no_parentheses
4 changes: 2 additions & 2 deletions google-cloud-asset/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ end

## Supported Ruby Versions

This library is supported on Ruby 2.3+.
This library is supported on Ruby 2.4+.

Google provides official support for Ruby versions that are actively supported
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
in security maintenance, and not end of life. Currently, this means Ruby 2.3
in security maintenance, and not end of life. Currently, this means Ruby 2.4
and later. Older versions of Ruby _may_ still work, but are unsupported and not
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
about the Ruby support schedule.
6 changes: 3 additions & 3 deletions google-cloud-asset/google-cloud-asset.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ Gem::Specification.new do |gem|
["README.md", "AUTHENTICATION.md", "LICENSE", ".yardopts"]
gem.require_paths = ["lib"]

gem.required_ruby_version = ">= 2.0.0"
gem.required_ruby_version = ">= 2.4"

gem.add_dependency "google-gax", "~> 1.7"
gem.add_dependency "google-gax", "~> 1.8"
gem.add_dependency "grpc-google-iam-v1", "~> 0.6.9"

gem.add_development_dependency "minitest", "~> 5.10"
gem.add_development_dependency "redcarpet", "~> 3.0"
gem.add_development_dependency "rubocop", "~> 0.64.0"
gem.add_development_dependency "google-style", "~> 1.24.0"
gem.add_development_dependency "simplecov", "~> 0.9"
gem.add_development_dependency "yard", "~> 0.9"
end
10 changes: 5 additions & 5 deletions google-cloud-asset/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-10-12T10:40:43.989266Z",
"updateTime": "2019-10-18T20:52:57.030484Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.39.0",
"dockerImage": "googleapis/artman@sha256:72554d0b3bdc0b4ac7d6726a6a606c00c14b454339037ed86be94574fb05d9f3"
"version": "0.40.0",
"dockerImage": "googleapis/artman@sha256:fd2b49cce3d652929cc80157ec2d91bebe993f7cd4e89afaad80f9c785f8bf36"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "af8dd2c1750558b538eaa6bdaa3bc899079533ee",
"internalRef": "274260771"
"sha": "906335b5a958557e1070fc6f275171dc8a42b1ec",
"internalRef": "275374583"
}
},
{
Expand Down
19 changes: 11 additions & 8 deletions google-cloud-asset/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,16 @@
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-asset.gemspec')

# Update README to reflect Ruby 2.4
s.replace(
'README.md',
'Ruby 2.3',
'Ruby 2.4'
)

# Support for service_address
s.replace(
[
Expand Down Expand Up @@ -96,7 +106,7 @@
s.replace(
'google-cloud-asset.gemspec',
'\n gem\\.add_dependency "google-gax", "~> 1\\.[\\d\\.]+"\n\n',
'\n gem.add_dependency "google-gax", "~> 1.7"\n gem.add_dependency "grpc-google-iam-v1", "~> 0.6.9"\n\n')
'\n gem.add_dependency "google-gax", "~> 1.8"\n gem.add_dependency "grpc-google-iam-v1", "~> 0.6.9"\n\n')

# https://github.com/googleapis/gapic-generator/issues/2232
s.replace(
Expand Down Expand Up @@ -156,13 +166,6 @@ def escape_braces(match):
'# Ruby Client for Cloud Asset API ([Beta](https://github.com/googleapis/google-cloud-ruby#versioning))'
)

# https://github.com/googleapis/gapic-generator/issues/2393
s.replace(
'google-cloud-asset.gemspec',
'gem.add_development_dependency "rubocop".*$',
'gem.add_development_dependency "rubocop", "~> 0.64.0"'
)

for version in ['v1', 'v1beta1']:
# Require the helpers file
s.replace(
Expand Down
8 changes: 3 additions & 5 deletions google-cloud-automl/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
inherit_gem:
google-style: google-style.yml

AllCops:
TargetRubyVersion: 2.2
Exclude:
- "google-cloud-automl.gemspec"
- "lib/google/**/*"
Expand All @@ -10,10 +12,6 @@ AllCops:
Documentation:
Enabled: false

Style/StringLiterals:
EnforcedStyle: double_quotes
Style/MethodDefParentheses:
EnforcedStyle: require_no_parentheses
Naming/FileName:
Exclude:
- "lib/google-cloud-automl.rb"
4 changes: 2 additions & 2 deletions google-cloud-automl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ end

## Supported Ruby Versions

This library is supported on Ruby 2.3+.
This library is supported on Ruby 2.4+.

Google provides official support for Ruby versions that are actively supported
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
in security maintenance, and not end of life. Currently, this means Ruby 2.3
in security maintenance, and not end of life. Currently, this means Ruby 2.4
and later. Older versions of Ruby _may_ still work, but are unsupported and not
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
about the Ruby support schedule.
6 changes: 3 additions & 3 deletions google-cloud-automl/google-cloud-automl.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ Gem::Specification.new do |gem|
["README.md", "AUTHENTICATION.md", "LICENSE", ".yardopts"]
gem.require_paths = ["lib"]

gem.required_ruby_version = ">= 2.0.0"
gem.required_ruby_version = ">= 2.4"

gem.add_dependency "google-gax", "~> 1.7"
gem.add_dependency "google-gax", "~> 1.8"

gem.add_development_dependency "minitest", "~> 5.10"
gem.add_development_dependency "redcarpet", "~> 3.0"
gem.add_development_dependency "rubocop", "~> 0.64.0"
gem.add_development_dependency "google-style", "~> 1.24.0"
gem.add_development_dependency "simplecov", "~> 0.9"
gem.add_development_dependency "yard", "~> 0.9"
end
10 changes: 5 additions & 5 deletions google-cloud-automl/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-09-24T10:37:10.713896Z",
"updateTime": "2019-10-18T20:53:21.254639Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.37.0",
"dockerImage": "googleapis/artman@sha256:0f66008f69061ea6d41499e2a34da3fc64fc7c9798077e3a37158653a135d801"
"version": "0.40.0",
"dockerImage": "googleapis/artman@sha256:fd2b49cce3d652929cc80157ec2d91bebe993f7cd4e89afaad80f9c785f8bf36"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "cc332bd19c2dd9640b025e5693e83a1b428d5dff",
"internalRef": "270834186"
"sha": "906335b5a958557e1070fc6f275171dc8a42b1ec",
"internalRef": "275374583"
}
},
{
Expand Down
19 changes: 11 additions & 8 deletions google-cloud-automl/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@
templates = gcp.CommonTemplates().ruby_library()
s.copy(templates)

# Update gemspec to reflect Ruby 2.4
ruby.update_gemspec('google-cloud-automl.gemspec')

# Update README to reflect Ruby 2.4
s.replace(
'README.md',
'Ruby 2.3',
'Ruby 2.4'
)

# Update file paths in generated files
s.replace(
[
Expand Down Expand Up @@ -143,7 +153,7 @@
s.replace(
'google-cloud-automl.gemspec',
'\n gem\\.add_dependency "google-gax", "~> 1\\.[\\d\\.]+"\n',
'\n gem.add_dependency "google-gax", "~> 1.7"\n')
'\n gem.add_dependency "google-gax", "~> 1.8"\n')

# https://github.com/googleapis/gapic-generator/issues/2242
def escape_braces(match):
Expand Down Expand Up @@ -188,13 +198,6 @@ def escape_braces(match):
'https://googleapis.github.io/google-cloud-ruby'
)

# https://github.com/googleapis/gapic-generator/issues/2393
s.replace(
'google-cloud-automl.gemspec',
'gem.add_development_dependency "rubocop".*$',
'gem.add_development_dependency "rubocop", "~> 0.64.0"'
)

s.replace(
'google-cloud-automl.gemspec',
'"README.md", "LICENSE"',
Expand Down
9 changes: 3 additions & 6 deletions google-cloud-bigquery-data_transfer/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
inherit_gem:
google-style: google-style.yml

AllCops:
Exclude:
- "google-cloud-bigquery-data_transfer.gemspec"
- "lib/google/**/*"
- "Rakefile"
- "test/**/*"
- "acceptance/**/*"
TargetRubyVersion: 2.2

Documentation:
Enabled: false

Style/StringLiterals:
EnforcedStyle: double_quotes
Style/MethodDefParentheses:
EnforcedStyle: require_no_parentheses
4 changes: 2 additions & 2 deletions google-cloud-bigquery-data_transfer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ end

## Supported Ruby Versions

This library is supported on Ruby 2.3+.
This library is supported on Ruby 2.4+.

Google provides official support for Ruby versions that are actively supported
by Ruby Core—that is, Ruby versions that are either in normal maintenance or
in security maintenance, and not end of life. Currently, this means Ruby 2.3
in security maintenance, and not end of life. Currently, this means Ruby 2.4
and later. Older versions of Ruby _may_ still work, but are unsupported and not
recommended. See https://www.ruby-lang.org/en/downloads/branches/ for details
about the Ruby support schedule.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ Gem::Specification.new do |gem|
["README.md", "AUTHENTICATION.md", "LICENSE", ".yardopts"]
gem.require_paths = ["lib"]

gem.required_ruby_version = ">= 2.0.0"
gem.required_ruby_version = ">= 2.4"

gem.add_dependency "google-gax", "~> 1.7"
gem.add_dependency "google-gax", "~> 1.8"

gem.add_development_dependency "minitest", "~> 5.10"
gem.add_development_dependency "redcarpet", "~> 3.0"
gem.add_development_dependency "rubocop", "~> 0.64.0"
gem.add_development_dependency "google-style", "~> 1.24.0"
gem.add_development_dependency "simplecov", "~> 0.9"
gem.add_development_dependency "yard", "~> 0.9"
end
10 changes: 5 additions & 5 deletions google-cloud-bigquery-data_transfer/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2019-09-27T10:41:08.525106Z",
"updateTime": "2019-10-18T20:53:55.505780Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.37.1",
"dockerImage": "googleapis/artman@sha256:6068f67900a3f0bdece596b97bda8fc70406ca0e137a941f4c81d3217c994a80"
"version": "0.40.0",
"dockerImage": "googleapis/artman@sha256:fd2b49cce3d652929cc80157ec2d91bebe993f7cd4e89afaad80f9c785f8bf36"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "cd112d8d255e0099df053643d4bd12c228ef7b1b",
"internalRef": "271468707"
"sha": "906335b5a958557e1070fc6f275171dc8a42b1ec",
"internalRef": "275374583"
}
},
{
Expand Down
Loading

0 comments on commit 2ad4e22

Please sign in to comment.