Skip to content

Commit

Permalink
chore(grafeas): wrapper Ruby client Gemfiles fall back to released GA…
Browse files Browse the repository at this point in the history
…PICs when a major version bump has occurred at HEAD (#28928)
  • Loading branch information
gcf-owl-bot[bot] authored Feb 5, 2025
1 parent bd99ab4 commit a69dd88
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion grafeas/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,22 @@ source "https://rubygems.org"

gemspec

gem "grafeas-v1", path: "../grafeas-v1"
local_dependencies = ["grafeas-v1"]

main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "grafeas.gemspec"))
local_dependencies.each do |name|
spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__
unless File.file? spec_path
warn "WARNING: Disabled local dependency for #{name} because gemspec not found."
next
end
version = Bundler.load_gemspec(spec_path).version
if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) }
warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}."
next
end
gem name, path: "../#{name}"
end

gem "google-style", "~> 1.30.1"
gem "minitest", "~> 5.22"
Expand Down

0 comments on commit a69dd88

Please sign in to comment.