From 5e921a54e530153c6d7906a70ac575c3cb8f6d22 Mon Sep 17 00:00:00 2001 From: aram price Date: Fri, 6 Sep 2024 11:26:00 -0700 Subject: [PATCH] Add `ostruct` as an explicit dependency The `ostruct` gem historicially was shipped as part of Ruby. This is going to change in Ruby 3.5.0, and currently not specifiying it causues warning errors which are breaking tests. This commit adds `ostruct` as a dependency in the bosh gems where it is used. Example error: ``` 1) bin/bosh-template correctly renders a realistic nats config template Failure/Error: expect(output[:stderr]).to eq('') expected: "" got: "/tmp/build/a94a8fe5/bosh-src/src/bosh-template/lib/bosh/template/renderer.rb:3: warning: ostruct was...tarting from Ruby 3.5.0.\nYou can add ostruct to your Gemfile or gemspec to silence this warning.\n" ``` --- src/Gemfile.lock | 4 ++++ src/bosh-director/bosh-director.gemspec | 1 + src/bosh-monitor/bosh-monitor.gemspec | 1 + src/bosh-template/bosh-template.gemspec | 1 + src/vendor/cache/ostruct-0.6.0.gem | 3 +++ 5 files changed, 10 insertions(+) create mode 100644 src/vendor/cache/ostruct-0.6.0.gem diff --git a/src/Gemfile.lock b/src/Gemfile.lock index 89734238e9..ea4955bf01 100644 --- a/src/Gemfile.lock +++ b/src/Gemfile.lock @@ -39,6 +39,7 @@ PATH membrane (~> 1.1.0) nats-pure openssl + ostruct prometheus-client (~> 2.1.0) puma rack-test @@ -66,6 +67,7 @@ PATH nats-pure net-smtp openssl + ostruct puma riemann-client sinatra (~> 2.2.0) @@ -86,6 +88,7 @@ PATH bosh-template (0.0.0) activesupport openssl + ostruct semi_semantic (~> 1.2.0) PATH @@ -225,6 +228,7 @@ GEM netrc (0.11.0) nio4r (2.7.3) openssl (3.2.0) + ostruct (0.6.0) parallel (1.26.3) parallel_tests (2.32.0) parallel diff --git a/src/bosh-director/bosh-director.gemspec b/src/bosh-director/bosh-director.gemspec index 5d19158f31..3c6ec0fa5f 100644 --- a/src/bosh-director/bosh-director.gemspec +++ b/src/bosh-director/bosh-director.gemspec @@ -48,6 +48,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'membrane', '~>1.1.0' spec.add_dependency 'nats-pure' spec.add_dependency 'openssl' + spec.add_dependency 'ostruct' spec.add_dependency 'prometheus-client','~>2.1.0' spec.add_dependency 'puma' spec.add_dependency 'rack-test' diff --git a/src/bosh-monitor/bosh-monitor.gemspec b/src/bosh-monitor/bosh-monitor.gemspec index b30ba69d97..1b531f40ab 100644 --- a/src/bosh-monitor/bosh-monitor.gemspec +++ b/src/bosh-monitor/bosh-monitor.gemspec @@ -26,6 +26,7 @@ Gem::Specification.new do |spec| spec.add_dependency 'nats-pure' spec.add_dependency 'net-smtp' spec.add_dependency 'openssl' + spec.add_dependency 'ostruct' spec.add_dependency 'puma' spec.add_dependency 'sinatra', '~>2.2.0' spec.add_dependency 'dogapi', '~> 1.45.0' diff --git a/src/bosh-template/bosh-template.gemspec b/src/bosh-template/bosh-template.gemspec index 723f733b2f..a3ea1c2fb6 100644 --- a/src/bosh-template/bosh-template.gemspec +++ b/src/bosh-template/bosh-template.gemspec @@ -23,4 +23,5 @@ Gem::Specification.new do |spec| spec.add_dependency 'semi_semantic', '~>1.2.0' spec.add_dependency 'activesupport' spec.add_dependency 'openssl' + spec.add_dependency 'ostruct' end diff --git a/src/vendor/cache/ostruct-0.6.0.gem b/src/vendor/cache/ostruct-0.6.0.gem new file mode 100644 index 0000000000..68fc02cc61 --- /dev/null +++ b/src/vendor/cache/ostruct-0.6.0.gem @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3b1736c99f4d985de36bde1155be5e22aaf6e564b30ff9bd481e2ef7c2d9ba85 +size 11776