diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md index c3cd707dd0b1..59a8a701ef19 100644 --- a/docs/generators/ruby.md +++ b/docs/generators/ruby.md @@ -29,7 +29,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl |gemLicense|gem license. | |unlicense| |gemMetadata|gem metadata.| |{}| |gemName|gem name (convention: underscore_case).| |openapi_client| -|gemRequiredRubyVersion|gem required Ruby version. | |>= 2.4| +|gemRequiredRubyVersion|gem required Ruby version. | |>= 2.7| |gemSummary|gem summary. | |A ruby wrapper for the REST APIs| |gemVersion|gem version.| |1.0.0| |hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java index 6a3481fad6f4..d4b5e3a8b8a3 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/RubyClientCodegen.java @@ -69,7 +69,7 @@ public class RubyClientCodegen extends AbstractRubyCodegen { protected String specFolder = "spec"; protected String libFolder = "lib"; @Setter protected String gemLicense = "unlicense"; - @Setter protected String gemRequiredRubyVersion = ">= 1.9"; + @Setter protected String gemRequiredRubyVersion = ">= 2.7"; @Setter protected String gemHomepage = "https://openapitools.org"; @Setter protected String gemSummary = "A Ruby SDK for the REST API"; @Setter protected String gemDescription = "This gem maps to a REST API"; @@ -164,7 +164,7 @@ public RubyClientCodegen() { defaultValue("unlicense")); cliOptions.add(new CliOption(GEM_REQUIRED_RUBY_VERSION, "gem required Ruby version. "). - defaultValue(">= 2.4")); + defaultValue(">= 2.7")); cliOptions.add(new CliOption(GEM_HOMEPAGE, "gem homepage. "). defaultValue("https://openapi-generator.tech")); diff --git a/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache b/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache index d32b2b1cdab5..3401cf2d0de2 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/rubocop.mustache @@ -1,7 +1,7 @@ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) # Automatically generated by OpenAPI Generator (https://openapi-generator.tech) AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/samples/client/echo_api/ruby-faraday/.rubocop.yml b/samples/client/echo_api/ruby-faraday/.rubocop.yml index d32b2b1cdab5..3401cf2d0de2 100644 --- a/samples/client/echo_api/ruby-faraday/.rubocop.yml +++ b/samples/client/echo_api/ruby-faraday/.rubocop.yml @@ -1,7 +1,7 @@ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) # Automatically generated by OpenAPI Generator (https://openapi-generator.tech) AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/samples/client/echo_api/ruby-httpx/.rubocop.yml b/samples/client/echo_api/ruby-httpx/.rubocop.yml index d32b2b1cdab5..3401cf2d0de2 100644 --- a/samples/client/echo_api/ruby-httpx/.rubocop.yml +++ b/samples/client/echo_api/ruby-httpx/.rubocop.yml @@ -1,7 +1,7 @@ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) # Automatically generated by OpenAPI Generator (https://openapi-generator.tech) AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/samples/client/echo_api/ruby-typhoeus/.rubocop.yml b/samples/client/echo_api/ruby-typhoeus/.rubocop.yml index d32b2b1cdab5..3401cf2d0de2 100644 --- a/samples/client/echo_api/ruby-typhoeus/.rubocop.yml +++ b/samples/client/echo_api/ruby-typhoeus/.rubocop.yml @@ -1,7 +1,7 @@ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) # Automatically generated by OpenAPI Generator (https://openapi-generator.tech) AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/samples/client/petstore/ruby-autoload/.rubocop.yml b/samples/client/petstore/ruby-autoload/.rubocop.yml index d32b2b1cdab5..3401cf2d0de2 100644 --- a/samples/client/petstore/ruby-autoload/.rubocop.yml +++ b/samples/client/petstore/ruby-autoload/.rubocop.yml @@ -1,7 +1,7 @@ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) # Automatically generated by OpenAPI Generator (https://openapi-generator.tech) AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/samples/client/petstore/ruby-faraday/.rubocop.yml b/samples/client/petstore/ruby-faraday/.rubocop.yml index d32b2b1cdab5..3401cf2d0de2 100644 --- a/samples/client/petstore/ruby-faraday/.rubocop.yml +++ b/samples/client/petstore/ruby-faraday/.rubocop.yml @@ -1,7 +1,7 @@ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) # Automatically generated by OpenAPI Generator (https://openapi-generator.tech) AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/samples/client/petstore/ruby-httpx/.rubocop.yml b/samples/client/petstore/ruby-httpx/.rubocop.yml index d32b2b1cdab5..3401cf2d0de2 100644 --- a/samples/client/petstore/ruby-httpx/.rubocop.yml +++ b/samples/client/petstore/ruby-httpx/.rubocop.yml @@ -1,7 +1,7 @@ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) # Automatically generated by OpenAPI Generator (https://openapi-generator.tech) AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/samples/client/petstore/ruby/.rubocop.yml b/samples/client/petstore/ruby/.rubocop.yml index d32b2b1cdab5..3401cf2d0de2 100644 --- a/samples/client/petstore/ruby/.rubocop.yml +++ b/samples/client/petstore/ruby/.rubocop.yml @@ -1,7 +1,7 @@ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) # Automatically generated by OpenAPI Generator (https://openapi-generator.tech) AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.rubocop.yml b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.rubocop.yml index d32b2b1cdab5..3401cf2d0de2 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.rubocop.yml +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.rubocop.yml @@ -1,7 +1,7 @@ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) # Automatically generated by OpenAPI Generator (https://openapi-generator.tech) AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/.rubocop.yml b/samples/openapi3/client/features/dynamic-servers/ruby/.rubocop.yml index d32b2b1cdab5..3401cf2d0de2 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/.rubocop.yml +++ b/samples/openapi3/client/features/dynamic-servers/ruby/.rubocop.yml @@ -1,7 +1,7 @@ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) # Automatically generated by OpenAPI Generator (https://openapi-generator.tech) AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.rubocop.yml b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.rubocop.yml index d32b2b1cdab5..3401cf2d0de2 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.rubocop.yml +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.rubocop.yml @@ -1,7 +1,7 @@ # This file is based on https://github.com/rails/rails/blob/master/.rubocop.yml (MIT license) # Automatically generated by OpenAPI Generator (https://openapi-generator.tech) AllCops: - TargetRubyVersion: 2.4 + TargetRubyVersion: 2.7 # RuboCop has a bunch of cops enabled by default. This setting tells RuboCop # to ignore them, so only the ones explicitly set in this file are enabled. DisabledByDefault: true