Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions bazel_example/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
1. Make sure you are using Bazel 6.*
2. Or using Bazelisk and `export USE_BAZEL_VERSION=6.*`

An example of the gapic-generator-ruby bazel rules usage.
Contains separate examples for vanilla gapic-generator usage building a small example library
and a gapic-generator-cloud usage building one of the cloud libraries
11 changes: 7 additions & 4 deletions gapic-generator-ads/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PATH
actionpack (~> 8.0)
bigdecimal (~> 3.0)
google-cloud-common (~> 1.2)
google-protobuf (~> 3.25, >= 3.25.1)
google-protobuf (~> 4.30)
google-style (~> 1.31.0)
googleapis-common-protos-types (~> 1.8)

Expand Down Expand Up @@ -58,10 +58,12 @@ GEM
crass (1.0.6)
drb (2.2.1)
erubi (1.13.1)
google-cloud-common (1.8.0)
google-cloud-common (1.9.0)
google-protobuf (>= 3.18, < 5.a)
googleapis-common-protos-types (~> 1.7)
google-protobuf (3.25.7)
googleapis-common-protos-types (~> 1.20)
google-protobuf (4.30.2-x86_64-linux)
bigdecimal
rake (>= 13)
google-style (1.31.0)
rubocop (~> 1.75)
googleapis-common-protos-types (1.20.0)
Expand Down Expand Up @@ -112,6 +114,7 @@ GEM
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rainbow (3.1.1)
rake (13.2.1)
redcarpet (3.6.1)
regexp_parser (2.10.0)
rubocop (1.75.4)
Expand Down
11 changes: 7 additions & 4 deletions gapic-generator-cloud/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PATH
actionpack (~> 8.0)
bigdecimal (~> 3.0)
google-cloud-common (~> 1.2)
google-protobuf (~> 3.25, >= 3.25.1)
google-protobuf (~> 4.30)
google-style (~> 1.31.0)
googleapis-common-protos-types (~> 1.8)

Expand Down Expand Up @@ -58,10 +58,12 @@ GEM
crass (1.0.6)
drb (2.2.1)
erubi (1.13.1)
google-cloud-common (1.8.0)
google-cloud-common (1.9.0)
google-protobuf (>= 3.18, < 5.a)
googleapis-common-protos-types (~> 1.7)
google-protobuf (3.25.7)
googleapis-common-protos-types (~> 1.20)
google-protobuf (4.30.2-x86_64-linux)
bigdecimal
rake (>= 13)
google-style (1.31.0)
rubocop (~> 1.75)
googleapis-common-protos-types (1.20.0)
Expand Down Expand Up @@ -112,6 +114,7 @@ GEM
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rainbow (3.1.1)
rake (13.2.1)
redcarpet (3.6.1)
regexp_parser (2.10.0)
rubocop (1.75.4)
Expand Down
13 changes: 8 additions & 5 deletions gapic-generator/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ PATH
actionpack (~> 8.0)
bigdecimal (~> 3.0)
google-cloud-common (~> 1.2)
google-protobuf (~> 3.25, >= 3.25.1)
google-protobuf (~> 4.30)
google-style (~> 1.31.0)
googleapis-common-protos-types (~> 1.8)

Expand Down Expand Up @@ -52,10 +52,12 @@ GEM
crass (1.0.6)
drb (2.2.1)
erubi (1.13.1)
google-cloud-common (1.8.0)
google-cloud-common (1.9.0)
google-protobuf (>= 3.18, < 5.a)
googleapis-common-protos-types (~> 1.7)
google-protobuf (3.25.7)
googleapis-common-protos-types (~> 1.20)
google-protobuf (4.30.2-x86_64-linux)
bigdecimal
rake (>= 13)
google-style (1.31.0)
rubocop (~> 1.75)
googleapis-common-protos-types (1.20.0)
Expand Down Expand Up @@ -106,6 +108,7 @@ GEM
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
rainbow (3.1.1)
rake (13.2.1)
redcarpet (3.6.1)
regexp_parser (2.10.0)
rubocop (1.75.4)
Expand Down Expand Up @@ -147,4 +150,4 @@ DEPENDENCIES
yard (~> 0.9)

BUNDLED WITH
2.6.7
2.6.8
2 changes: 1 addition & 1 deletion gapic-generator/gapic-generator.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@ Gem::Specification.new do |spec|
spec.add_dependency "bigdecimal", "~> 3.0"
spec.add_dependency "googleapis-common-protos-types", "~> 1.8"
spec.add_dependency "google-cloud-common", "~> 1.2"
spec.add_dependency "google-protobuf", "~> 3.25", ">= 3.25.1"
spec.add_dependency "google-protobuf", "~> 4.30"
spec.add_dependency "google-style", "~> 1.31.0"
end
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def test_complex
presenter = build_expression_presenter json
expected = [
"{",
" age: 21,",
" id: my_id,",
" age: 21,",
' name: "Jane Doe"',
"}"
]
Expand Down Expand Up @@ -133,8 +133,8 @@ def test_complex_nested
"{",
" id: my_id,",
" stats: {",
' hair: "black",',
' eyes: "brown"',
' eyes: "brown",',
' hair: "black"',
" },",
' name: "Jane Doe"',
"}"
Expand Down
6 changes: 3 additions & 3 deletions rules_ruby_gapic/gapic-generator-ads/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def gapic_generator_ads_repositories():
# Create the ruby runtime
ruby_runtime(
name = "gapic_generator_ads_ruby_runtime",
urls = ["https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.8.tar.gz"],
strip_prefix = "ruby-3.2.8",
urls = ["https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.3.tar.gz"],
strip_prefix = "ruby-3.4.3",
prebuilt_rubys = [
"@gapic_generator_ruby//rules_ruby_gapic:prebuilt/ruby-3.2.8_glinux_x86_64.tar.gz",
"@gapic_generator_ruby//rules_ruby_gapic:prebuilt/ruby-3.4.3_glinux_x86_64.tar.gz",
],
gemfile_lock = "@gapic_generator_ruby//:gapic-generator-ads/Gemfile.lock",
gems_to_install = {},
Expand Down
6 changes: 3 additions & 3 deletions rules_ruby_gapic/gapic-generator-cloud/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def gapic_generator_cloud_repositories():
# Create the ruby runtime
ruby_runtime(
name = "gapic_generator_cloud_ruby_runtime",
urls = ["https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.8.tar.gz"],
strip_prefix = "ruby-3.2.8",
urls = ["https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.3.tar.gz"],
strip_prefix = "ruby-3.4.3",
prebuilt_rubys = [
"@gapic_generator_ruby//rules_ruby_gapic:prebuilt/ruby-3.2.8_glinux_x86_64.tar.gz",
"@gapic_generator_ruby//rules_ruby_gapic:prebuilt/ruby-3.4.3_glinux_x86_64.tar.gz",
],
gemfile_lock = "@gapic_generator_ruby//:gapic-generator-cloud/Gemfile.lock",
gems_to_install = {},
Expand Down
6 changes: 3 additions & 3 deletions rules_ruby_gapic/gapic-generator/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def gapic_generator_repositories():
# Create the ruby runtime
ruby_runtime(
name = "gapic_generator_ruby_runtime",
urls = ["https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.8.tar.gz"],
strip_prefix = "ruby-3.2.8",
urls = ["https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.3.tar.gz"],
strip_prefix = "ruby-3.4.3",
prebuilt_rubys = [
"@gapic_generator_ruby//rules_ruby_gapic:prebuilt/ruby-3.2.8_glinux_x86_64.tar.gz",
"@gapic_generator_ruby//rules_ruby_gapic:prebuilt/ruby-3.4.3_glinux_x86_64.tar.gz",
],
gemfile_lock = "@gapic_generator_ruby//:gapic-generator/Gemfile.lock",
gems_to_install = {},
Expand Down
2 changes: 1 addition & 1 deletion rules_ruby_gapic/prebuilt/pack_prebuilt_ruby.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.

# A script demonstrating how to pack a ruby_runtime prebuild
VERSION="3.2.8"
VERSION="3.4.3"

mkdir -p /tmp/pack_prebuilt_ruby/ruby-${VERSION}
rm -rf /tmp/pack_prebuilt_ruby/ruby-${VERSION}/*
Expand Down
Binary file not shown.
Binary file not shown.
6 changes: 3 additions & 3 deletions rules_ruby_gapic/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ def gapic_generator_ruby_customgems(list_of_gems):
# Create the common ruby runtime used for checks
ruby_runtime(
name = "ruby_runtime",
urls = ["https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.8.tar.gz"],
strip_prefix = "ruby-3.2.8",
urls = ["https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.3.tar.gz"],
strip_prefix = "ruby-3.4.3",
prebuilt_rubys = [
"@gapic_generator_ruby//rules_ruby_gapic:prebuilt/ruby-3.2.8_glinux_x86_64.tar.gz",
"@gapic_generator_ruby//rules_ruby_gapic:prebuilt/ruby-3.4.3_glinux_x86_64.tar.gz",
],
bundler_version_to_install = "2.6.8",
gems_to_install = list_of_gems,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -735,14 +735,14 @@ def delete_phrase_set request, options = nil
# end
#
# create_custom_class_request = {
# parent: parent,
# custom_class_id: custom_class_id,
# custom_class: {
# items: [
# "Titanic",
# "RMS Queen Mary"
# ]
# }
# },
# parent: parent
# }
#
# puts("Calling the CreateCustomClass operation.")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ def create_custom_class_basic parent:, custom_class_id:
end

create_custom_class_request = {
parent: parent,
custom_class_id: custom_class_id,
custom_class: {
items: [
"Titanic",
"RMS Queen Mary"
]
}
},
parent: parent
}

puts "Calling the CreateCustomClass operation."
Expand Down