diff --git a/src/main/java/com/google/api/codegen/transformer/ruby/RubyPackageMetadataTransformer.java b/src/main/java/com/google/api/codegen/transformer/ruby/RubyPackageMetadataTransformer.java index 94ccf9cfa3..dc44880fda 100644 --- a/src/main/java/com/google/api/codegen/transformer/ruby/RubyPackageMetadataTransformer.java +++ b/src/main/java/com/google/api/codegen/transformer/ruby/RubyPackageMetadataTransformer.java @@ -27,6 +27,7 @@ import com.google.api.codegen.transformer.ModelToViewTransformer; import com.google.api.codegen.transformer.ModelTypeTable; import com.google.api.codegen.transformer.PackageMetadataTransformer; +import com.google.api.codegen.transformer.SurfaceNamer; import com.google.api.codegen.transformer.TestCaseTransformer; import com.google.api.codegen.util.ruby.RubyTypeTable; import com.google.api.codegen.util.testing.StandardValueProducer; @@ -39,6 +40,7 @@ import com.google.api.tools.framework.model.Interface; import com.google.api.tools.framework.model.Method; import com.google.api.tools.framework.model.Model; +import com.google.common.base.Strings; import com.google.common.collect.ImmutableList; import java.util.List; @@ -49,6 +51,8 @@ public class RubyPackageMetadataTransformer implements ModelToViewTransformer { private static final String README_OUTPUT_FILE = "README.md"; private static final List TOP_LEVEL_FILES = ImmutableList.of("ruby/Gemfile.snip", "ruby/Rakefile.snip", "LICENSE.snip"); + private static final List TOP_LEVEL_DOT_FILES = + ImmutableList.of("ruby/gitignore.snip", "ruby/rubocop.yml.snip", "ruby/yardopts.snip"); private static final String GITHUB_DOC_HOST = "https://googlecloudplatform.github.io/google-cloud-ruby"; @@ -78,6 +82,7 @@ public List getTemplateFileNames() { .add(GEMSPEC_FILE) .add(README_FILE) .addAll(TOP_LEVEL_FILES) + .addAll(TOP_LEVEL_DOT_FILES) .build(); } @@ -87,7 +92,8 @@ public List transform(Model model, GapicProductConfig productConfig) return ImmutableList.builder() .add(generateGemspecView(model, namer)) .add(generateReadmeView(model, productConfig, namer)) - .addAll(generateMetadataViews(model, productConfig, namer)) + .addAll(generateMetadataViews(model, productConfig, namer, TOP_LEVEL_FILES)) + .addAll(generateMetadataViews(model, productConfig, namer, TOP_LEVEL_DOT_FILES, ".")) .build(); } @@ -163,10 +169,22 @@ private OptionalArrayMethodView createExampleApiMethodView(GapicMethodContext co } private List generateMetadataViews( - Model model, GapicProductConfig productConfig, RubyPackageMetadataNamer namer) { + Model model, + GapicProductConfig productConfig, + RubyPackageMetadataNamer namer, + List snippets) { + return generateMetadataViews(model, productConfig, namer, snippets, null); + } + + private List generateMetadataViews( + Model model, + GapicProductConfig productConfig, + RubyPackageMetadataNamer namer, + List snippets, + String filePrefix) { ImmutableList.Builder views = ImmutableList.builder(); - for (String template : TOP_LEVEL_FILES) { - views.add(generateMetadataView(model, productConfig, template, namer)); + for (String template : snippets) { + views.add(generateMetadataView(model, productConfig, template, namer, filePrefix)); } return views.build(); } @@ -175,9 +193,13 @@ private ViewModel generateMetadataView( Model model, GapicProductConfig productConfig, String template, - RubyPackageMetadataNamer namer) { + RubyPackageMetadataNamer namer, + String filePrefix) { String noLeadingRubyDir = template.startsWith(RUBY_PREFIX) ? template.substring(RUBY_PREFIX.length()) : template; + if (!Strings.isNullOrEmpty(filePrefix)) { + noLeadingRubyDir = filePrefix + noLeadingRubyDir; + } int extensionIndex = noLeadingRubyDir.lastIndexOf("."); String outputPath = noLeadingRubyDir.substring(0, extensionIndex); @@ -190,15 +212,16 @@ private ViewModel generateMetadataView( } } + SurfaceNamer surfaceNamer = new RubySurfaceNamer(productConfig.getPackageName()); + return metadataTransformer .generateMetadataView(packageConfig, model, template, outputPath, TargetLanguage.RUBY) .identifier(namer.getMetadataIdentifier()) .fileHeader( fileHeaderTransformer.generateFileHeader( - productConfig, - ImportSectionView.newBuilder().build(), - new RubySurfaceNamer(productConfig.getPackageName()))) + productConfig, ImportSectionView.newBuilder().build(), surfaceNamer)) .hasSmokeTests(hasSmokeTests) + .versionPath(surfaceNamer.getVersionIndexFileImportName()) .build(); } diff --git a/src/main/java/com/google/api/codegen/viewmodel/metadata/PackageMetadataView.java b/src/main/java/com/google/api/codegen/viewmodel/metadata/PackageMetadataView.java index 001231eaaf..d5fc2e4154 100644 --- a/src/main/java/com/google/api/codegen/viewmodel/metadata/PackageMetadataView.java +++ b/src/main/java/com/google/api/codegen/viewmodel/metadata/PackageMetadataView.java @@ -85,6 +85,9 @@ public String resourceRoot() { public abstract String protoPath(); + @Nullable + public abstract String versionPath(); + public abstract String author(); public abstract String email(); @@ -191,6 +194,8 @@ public abstract static class Builder { /** The path to the API protos in the googleapis repo. */ public abstract Builder protoPath(String val); + public abstract Builder versionPath(String val); + /** The author of the package. */ public abstract Builder author(String val); diff --git a/src/main/resources/com/google/api/codegen/ruby/Gemfile.snip b/src/main/resources/com/google/api/codegen/ruby/Gemfile.snip index 65f58d3b90..ae773ad40d 100644 --- a/src/main/resources/com/google/api/codegen/ruby/Gemfile.snip +++ b/src/main/resources/com/google/api/codegen/ruby/Gemfile.snip @@ -3,4 +3,12 @@ gemspec + gem "rake", "~> 11.0" + gem "gcloud-jsondoc", + git: "https://github.com/GoogleCloudPlatform/google-cloud-ruby.git", + branch: "gcloud-jsondoc" + + @# TEMP: rainbow (a dependency of rubocop) version 2.2 seems to have a problem, + @# so pinning to 2.1 for now. + gem "rainbow", "~> 2.1.0" @end diff --git a/src/main/resources/com/google/api/codegen/ruby/gemspec.snip b/src/main/resources/com/google/api/codegen/ruby/gemspec.snip index 905e108342..4e1fcd220c 100644 --- a/src/main/resources/com/google/api/codegen/ruby/gemspec.snip +++ b/src/main/resources/com/google/api/codegen/ruby/gemspec.snip @@ -2,36 +2,33 @@ @# -*- ruby -*- @# encoding: utf-8 - Gem::Specification.new do |s| - s.name = "{@metadata.identifier}" - s.version = "{@metadata.packageVersionBound.lower}" - - s.authors = ["{@metadata.author}"] - s.description = "{@metadata.fullName} client for Ruby." - s.email = "{@metadata.email}" - s.files = Dir.glob(File.join("lib", "**", "*.rb")) - s.files += Dir.glob(File.join('lib', '**', '*.json')) - s.files += %w(Rakefile README.md LICENSE) - s.homepage = "{@metadata.homepage}" - s.license = "{@metadata.licenseName}" - s.platform = Gem::Platform::RUBY - s.require_paths = ["lib"] - s.required_ruby_version = ">= 2.0.0" - s.requirements << "libgrpc ~> 1.0 needs to be installed" - s.summary = "GRPC library for {@metadata.fullName}" - - s.add_dependency "grpc", "~> {@metadata.grpcVersionBound.lower}" - s.add_dependency "googleauth", "~> {@metadata.authVersionBound.lower}" - s.add_dependency "google-gax", "~> {@metadata.gaxVersionBound.lower}" + Gem::Specification.new do |gem| + gem.name = "{@metadata.identifier}" + gem.version = "{@metadata.packageVersionBound.lower}" + + gem.authors = ["{@metadata.author}"] + gem.email = "{@metadata.email}" + gem.description = "{@metadata.identifier} is the official library for {@metadata.fullName}." + gem.summary = "API Client library for {@metadata.fullName}" + gem.homepage = "{@metadata.homepage}" + gem.license = "{@metadata.licenseName}" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "LICENSE", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.0.0" + + gem.add_dependency "google-gax", "~> {@metadata.gaxVersionBound.lower}" @join packageDep : metadata.protoPackageDependencies - s.add_dependency "{@packageDep.name}", "~> {@packageDep.versionBound.lower}" + gem.add_dependency "{@packageDep.name}", "~> {@packageDep.versionBound.lower}" @end - s.add_development_dependency "bundler", "~> 1.9" - s.add_development_dependency "rake", "~> 10.4" - s.add_development_dependency "rubocop", "~> 0.32" - s.add_development_dependency "simplecov", "~> 0.9" - s.add_development_dependency "minitest", "~> 5.10" + gem.add_development_dependency "minitest", "~> 5.10" + gem.add_development_dependency "rubocop", "<= 0.35.1" + gem.add_development_dependency "simplecov", "~> 0.9" end @end diff --git a/src/main/resources/com/google/api/codegen/ruby/gitignore.snip b/src/main/resources/com/google/api/codegen/ruby/gitignore.snip new file mode 100644 index 0000000000..2ef918366c --- /dev/null +++ b/src/main/resources/com/google/api/codegen/ruby/gitignore.snip @@ -0,0 +1,15 @@ +@snippet generate(metadata) + Gemfile.lock + coverage/* + doc/* + pkg/* + html/* + jsondoc/* + + @# Ignore YARD stuffs + .yardoc + + @# IDE settings + .idea + *.iml +@end diff --git a/src/main/resources/com/google/api/codegen/ruby/rubocop.yml.snip b/src/main/resources/com/google/api/codegen/ruby/rubocop.yml.snip new file mode 100644 index 0000000000..f463a8acf4 --- /dev/null +++ b/src/main/resources/com/google/api/codegen/ruby/rubocop.yml.snip @@ -0,0 +1,56 @@ +@snippet generate(metadata) + AllCops: + Exclude: + - "{@metadata.identifier}.gemspec" + - "lib/{@metadata.protoPath}/**/*" + # This should be removed in the future after we are sanitizing client files. + - "lib/{@metadata.versionPath}/**/*" + - "Rakefile" + - "test/**/*" + + Documentation: + Enabled: false + + Style/StringLiterals: + EnforcedStyle: double_quotes + Style/MethodDefParentheses: + EnforcedStyle: require_no_parentheses + Style/NumericLiterals: + Enabled: false + Style/SpaceAroundOperators: + Enabled: false + Metrics/ClassLength: + Enabled: false + Style/EmptyLines: + Enabled: false + Style/EmptyElse: + Enabled: false + Style/HashSyntax: + Exclude: + - "lib/{@metadata.versionPath}/**/*" + Metrics/LineLength: + Exclude: + - "lib/{@metadata.versionPath}/**/*" + Metrics/CyclomaticComplexity: + Max: 10 + Metrics/PerceivedComplexity: + Max: 10 + Metrics/AbcSize: + Max: 25 + Exclude: + - "lib/{@metadata.versionPath}/**/*" + Metrics/MethodLength: + Max: 20 + Exclude: + - "lib/{@metadata.versionPath}/**/*" + Metrics/ParameterLists: + Enabled: false + Style/RescueModifier: + Enabled: false + Style/ClassVars: + Enabled: false + Style/TrivialAccessors: + Enabled: false + Style/FileName: + Enabled: false +@end diff --git a/src/main/resources/com/google/api/codegen/ruby/yardopts.snip b/src/main/resources/com/google/api/codegen/ruby/yardopts.snip new file mode 100644 index 0000000000..32e1110be1 --- /dev/null +++ b/src/main/resources/com/google/api/codegen/ruby/yardopts.snip @@ -0,0 +1,10 @@ +@snippet generate(metadata) + --no-private + --title={@metadata.fullName} + --exclude lib/{@metadata.versionPath} + --markup markdown + + ./lib/**/*.rb + - + README.md +@end diff --git a/src/test/java/com/google/api/codegen/testdata/ruby_Gemfile_library.baseline b/src/test/java/com/google/api/codegen/testdata/ruby_Gemfile_library.baseline index d7289bd560..45ef455faa 100644 --- a/src/test/java/com/google/api/codegen/testdata/ruby_Gemfile_library.baseline +++ b/src/test/java/com/google/api/codegen/testdata/ruby_Gemfile_library.baseline @@ -2,3 +2,12 @@ source 'https://rubygems.org' gemspec + +gem "rake", "~> 11.0" +gem "gcloud-jsondoc", + git: "https://github.com/GoogleCloudPlatform/google-cloud-ruby.git", + branch: "gcloud-jsondoc" + +# TEMP: rainbow (a dependency of rubocop) version 2.2 seems to have a problem, +# so pinning to 2.1 for now. +gem "rainbow", "~> 2.1.0" diff --git a/src/test/java/com/google/api/codegen/testdata/ruby_doc_Gemfile_library.baseline b/src/test/java/com/google/api/codegen/testdata/ruby_doc_Gemfile_library.baseline index d7289bd560..45ef455faa 100644 --- a/src/test/java/com/google/api/codegen/testdata/ruby_doc_Gemfile_library.baseline +++ b/src/test/java/com/google/api/codegen/testdata/ruby_doc_Gemfile_library.baseline @@ -2,3 +2,12 @@ source 'https://rubygems.org' gemspec + +gem "rake", "~> 11.0" +gem "gcloud-jsondoc", + git: "https://github.com/GoogleCloudPlatform/google-cloud-ruby.git", + branch: "gcloud-jsondoc" + +# TEMP: rainbow (a dependency of rubocop) version 2.2 seems to have a problem, +# so pinning to 2.1 for now. +gem "rainbow", "~> 2.1.0" diff --git a/src/test/java/com/google/api/codegen/testdata/ruby_doc_gemspec_library.baseline b/src/test/java/com/google/api/codegen/testdata/ruby_doc_gemspec_library.baseline index b79e4c585c..861a86ec80 100644 --- a/src/test/java/com/google/api/codegen/testdata/ruby_doc_gemspec_library.baseline +++ b/src/test/java/com/google/api/codegen/testdata/ruby_doc_gemspec_library.baseline @@ -2,34 +2,31 @@ # -*- ruby -*- # encoding: utf-8 -Gem::Specification.new do |s| - s.name = "library" - s.version = "0.6.8" - - s.authors = ["Google, Inc."] - s.description = "Google Example Library API client for Ruby." - s.email = "googleapis-packages@google.com" - s.files = Dir.glob(File.join("lib", "**", "*.rb")) - s.files += Dir.glob(File.join('lib', '**', '*.json')) - s.files += %w(Rakefile README.md LICENSE) - s.homepage = "https://github.com/googleapis/googleapis" - s.license = "Apache-2.0" - s.platform = Gem::Platform::RUBY - s.require_paths = ["lib"] - s.required_ruby_version = ">= 2.0.0" - s.requirements << "libgrpc ~> 1.0 needs to be installed" - s.summary = "GRPC library for Google Example Library API" - - s.add_dependency "grpc", "~> 1.0" - s.add_dependency "googleauth", "~> 0.5.1" - s.add_dependency "google-gax", "~> 0.8.0" - s.add_dependency "google-common-protos", "~> 1.3.1" - s.add_dependency "google-some-other-package-v1", "~> 0.2.1" - - s.add_development_dependency "bundler", "~> 1.9" - s.add_development_dependency "rake", "~> 10.4" - s.add_development_dependency "rubocop", "~> 0.32" - s.add_development_dependency "simplecov", "~> 0.9" - s.add_development_dependency "minitest", "~> 5.10" +Gem::Specification.new do |gem| + gem.name = "library" + gem.version = "0.6.8" + + gem.authors = ["Google, Inc."] + gem.email = "googleapis-packages@google.com" + gem.description = "library is the official library for Google Example Library API." + gem.summary = "API Client library for Google Example Library API" + gem.homepage = "https://github.com/googleapis/googleapis" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "LICENSE", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.0.0" + + gem.add_dependency "google-gax", "~> 0.8.0" + gem.add_dependency "google-common-protos", "~> 1.3.1" + gem.add_dependency "google-some-other-package-v1", "~> 0.2.1" + + gem.add_development_dependency "minitest", "~> 5.10" + gem.add_development_dependency "rubocop", "<= 0.35.1" + gem.add_development_dependency "simplecov", "~> 0.9" end diff --git a/src/test/java/com/google/api/codegen/testdata/ruby_doc_gitignore_library.baseline b/src/test/java/com/google/api/codegen/testdata/ruby_doc_gitignore_library.baseline new file mode 100644 index 0000000000..9b3326aaac --- /dev/null +++ b/src/test/java/com/google/api/codegen/testdata/ruby_doc_gitignore_library.baseline @@ -0,0 +1,14 @@ +============== file: .gitignore ============== +Gemfile.lock +coverage/* +doc/* +pkg/* +html/* +jsondoc/* + +# Ignore YARD stuffs +.yardoc + +# IDE settings +.idea +*.iml diff --git a/src/test/java/com/google/api/codegen/testdata/ruby_doc_rubocop_library.baseline b/src/test/java/com/google/api/codegen/testdata/ruby_doc_rubocop_library.baseline new file mode 100644 index 0000000000..3113cd4443 --- /dev/null +++ b/src/test/java/com/google/api/codegen/testdata/ruby_doc_rubocop_library.baseline @@ -0,0 +1,54 @@ +============== file: .rubocop.yml ============== +AllCops: + Exclude: + - "library.gemspec" + - "lib/google/library/**/*" + - "lib/library/v1/**/*" + - "Rakefile" + - "test/**/*" + +Documentation: + Enabled: false + +Style/StringLiterals: + EnforcedStyle: double_quotes +Style/MethodDefParentheses: + EnforcedStyle: require_no_parentheses +Style/NumericLiterals: + Enabled: false +Style/SpaceAroundOperators: + Enabled: false +Metrics/ClassLength: + Enabled: false +Style/EmptyLines: + Enabled: false +Style/EmptyElse: + Enabled: false +Style/HashSyntax: + Exclude: + - "lib/library/v1/**/*" +Metrics/LineLength: + Exclude: + - "lib/library/v1/**/*" +Metrics/CyclomaticComplexity: + Max: 10 +Metrics/PerceivedComplexity: + Max: 10 +Metrics/AbcSize: + Max: 25 + Exclude: + - "lib/library/v1/**/*" +Metrics/MethodLength: + Max: 20 + Exclude: + - "lib/library/v1/**/*" +Metrics/ParameterLists: + Enabled: false +Style/RescueModifier: + Enabled: false +Style/ClassVars: + Enabled: false +Style/TrivialAccessors: + Enabled: false +Style/FileName: + Enabled: false diff --git a/src/test/java/com/google/api/codegen/testdata/ruby_doc_yardopts_library.baseline b/src/test/java/com/google/api/codegen/testdata/ruby_doc_yardopts_library.baseline new file mode 100644 index 0000000000..e355f5ca70 --- /dev/null +++ b/src/test/java/com/google/api/codegen/testdata/ruby_doc_yardopts_library.baseline @@ -0,0 +1,9 @@ +============== file: .yardopts ============== +--no-private +--title=Google Example Library API +--exclude lib/library/v1 +--markup markdown + +./lib/**/*.rb +- +README.md diff --git a/src/test/java/com/google/api/codegen/testdata/ruby_gemspec_library.baseline b/src/test/java/com/google/api/codegen/testdata/ruby_gemspec_library.baseline index b79e4c585c..861a86ec80 100644 --- a/src/test/java/com/google/api/codegen/testdata/ruby_gemspec_library.baseline +++ b/src/test/java/com/google/api/codegen/testdata/ruby_gemspec_library.baseline @@ -2,34 +2,31 @@ # -*- ruby -*- # encoding: utf-8 -Gem::Specification.new do |s| - s.name = "library" - s.version = "0.6.8" - - s.authors = ["Google, Inc."] - s.description = "Google Example Library API client for Ruby." - s.email = "googleapis-packages@google.com" - s.files = Dir.glob(File.join("lib", "**", "*.rb")) - s.files += Dir.glob(File.join('lib', '**', '*.json')) - s.files += %w(Rakefile README.md LICENSE) - s.homepage = "https://github.com/googleapis/googleapis" - s.license = "Apache-2.0" - s.platform = Gem::Platform::RUBY - s.require_paths = ["lib"] - s.required_ruby_version = ">= 2.0.0" - s.requirements << "libgrpc ~> 1.0 needs to be installed" - s.summary = "GRPC library for Google Example Library API" - - s.add_dependency "grpc", "~> 1.0" - s.add_dependency "googleauth", "~> 0.5.1" - s.add_dependency "google-gax", "~> 0.8.0" - s.add_dependency "google-common-protos", "~> 1.3.1" - s.add_dependency "google-some-other-package-v1", "~> 0.2.1" - - s.add_development_dependency "bundler", "~> 1.9" - s.add_development_dependency "rake", "~> 10.4" - s.add_development_dependency "rubocop", "~> 0.32" - s.add_development_dependency "simplecov", "~> 0.9" - s.add_development_dependency "minitest", "~> 5.10" +Gem::Specification.new do |gem| + gem.name = "library" + gem.version = "0.6.8" + + gem.authors = ["Google, Inc."] + gem.email = "googleapis-packages@google.com" + gem.description = "library is the official library for Google Example Library API." + gem.summary = "API Client library for Google Example Library API" + gem.homepage = "https://github.com/googleapis/googleapis" + gem.license = "Apache-2.0" + + gem.platform = Gem::Platform::RUBY + + gem.files = `git ls-files -- lib/*`.split("\n") + + ["README.md", "LICENSE", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 2.0.0" + + gem.add_dependency "google-gax", "~> 0.8.0" + gem.add_dependency "google-common-protos", "~> 1.3.1" + gem.add_dependency "google-some-other-package-v1", "~> 0.2.1" + + gem.add_development_dependency "minitest", "~> 5.10" + gem.add_development_dependency "rubocop", "<= 0.35.1" + gem.add_development_dependency "simplecov", "~> 0.9" end diff --git a/src/test/java/com/google/api/codegen/testdata/ruby_gitignore_library.baseline b/src/test/java/com/google/api/codegen/testdata/ruby_gitignore_library.baseline new file mode 100644 index 0000000000..1d760dcffc --- /dev/null +++ b/src/test/java/com/google/api/codegen/testdata/ruby_gitignore_library.baseline @@ -0,0 +1,14 @@ +============== file: .gitignore ============== +Gemfile.lock +coverage/* +doc/* +pkg/* +html/* +jsondoc/* + +# Ignore YARD stuffs +.yardoc + +# IDE settings +.idea +*.iml \ No newline at end of file diff --git a/src/test/java/com/google/api/codegen/testdata/ruby_rubocop_library.baseline b/src/test/java/com/google/api/codegen/testdata/ruby_rubocop_library.baseline new file mode 100644 index 0000000000..3113cd4443 --- /dev/null +++ b/src/test/java/com/google/api/codegen/testdata/ruby_rubocop_library.baseline @@ -0,0 +1,54 @@ +============== file: .rubocop.yml ============== +AllCops: + Exclude: + - "library.gemspec" + - "lib/google/library/**/*" + - "lib/library/v1/**/*" + - "Rakefile" + - "test/**/*" + +Documentation: + Enabled: false + +Style/StringLiterals: + EnforcedStyle: double_quotes +Style/MethodDefParentheses: + EnforcedStyle: require_no_parentheses +Style/NumericLiterals: + Enabled: false +Style/SpaceAroundOperators: + Enabled: false +Metrics/ClassLength: + Enabled: false +Style/EmptyLines: + Enabled: false +Style/EmptyElse: + Enabled: false +Style/HashSyntax: + Exclude: + - "lib/library/v1/**/*" +Metrics/LineLength: + Exclude: + - "lib/library/v1/**/*" +Metrics/CyclomaticComplexity: + Max: 10 +Metrics/PerceivedComplexity: + Max: 10 +Metrics/AbcSize: + Max: 25 + Exclude: + - "lib/library/v1/**/*" +Metrics/MethodLength: + Max: 20 + Exclude: + - "lib/library/v1/**/*" +Metrics/ParameterLists: + Enabled: false +Style/RescueModifier: + Enabled: false +Style/ClassVars: + Enabled: false +Style/TrivialAccessors: + Enabled: false +Style/FileName: + Enabled: false diff --git a/src/test/java/com/google/api/codegen/testdata/ruby_yardopts_library.baseline b/src/test/java/com/google/api/codegen/testdata/ruby_yardopts_library.baseline new file mode 100644 index 0000000000..e355f5ca70 --- /dev/null +++ b/src/test/java/com/google/api/codegen/testdata/ruby_yardopts_library.baseline @@ -0,0 +1,9 @@ +============== file: .yardopts ============== +--no-private +--title=Google Example Library API +--exclude lib/library/v1 +--markup markdown + +./lib/**/*.rb +- +README.md