From 6dc6dd7efb8836a332ba793c4f5836fa607683c2 Mon Sep 17 00:00:00 2001 From: godric Date: Mon, 19 Feb 2024 09:21:53 +0100 Subject: [PATCH] Bump ruby requirements to >= 3.0, bump self versions --- .circleci/config.yml | 4 ++-- getaround-rubocop/.ruby-version | 2 +- getaround-rubocop/Gemfile.lock | 4 ++-- getaround-rubocop/getaround-rubocop.gemspec | 4 ++-- getaround_utils/.ruby-version | 2 +- getaround_utils/Gemfile.lock | 4 ++-- getaround_utils/getaround_utils.gemspec | 2 +- getaround_utils/lib/getaround_utils/version.rb | 2 +- .../spec/getaround_utils/mixins/loggable_spec.rb | 4 ++-- .../spec/getaround_utils/railties/ougai_spec.rb | 10 +++++----- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d36147f..1db27b0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ jobs: test-getaround-rubocop: docker: - - image: cimg/ruby:2.7.4 + - image: cimg/ruby:3.0.6 working_directory: /tmp/build/getaround-rubocop steps: - checkout: @@ -22,7 +22,7 @@ jobs: test-getaround_utils: docker: - - image: cimg/ruby:2.7.4 + - image: cimg/ruby:3.0.6 working_directory: /tmp/build/getaround_utils steps: - checkout: diff --git a/getaround-rubocop/.ruby-version b/getaround-rubocop/.ruby-version index 30c5992..14dbd37 100644 --- a/getaround-rubocop/.ruby-version +++ b/getaround-rubocop/.ruby-version @@ -1 +1 @@ -ruby-2.7.4 +ruby-3.0.6 diff --git a/getaround-rubocop/Gemfile.lock b/getaround-rubocop/Gemfile.lock index c92c311..89d22d9 100644 --- a/getaround-rubocop/Gemfile.lock +++ b/getaround-rubocop/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - getaround-rubocop (0.2.9) + getaround-rubocop (0.2.10) relaxed-rubocop (= 2.5) rubocop (= 1.55.1) rubocop-performance (= 1.18.0) @@ -73,4 +73,4 @@ DEPENDENCIES getaround-rubocop! BUNDLED WITH - 2.3.16 + 2.4.22 diff --git a/getaround-rubocop/getaround-rubocop.gemspec b/getaround-rubocop/getaround-rubocop.gemspec index 004c249..b67a852 100644 --- a/getaround-rubocop/getaround-rubocop.gemspec +++ b/getaround-rubocop/getaround-rubocop.gemspec @@ -2,14 +2,14 @@ Gem::Specification.new do |gem| gem.name = "getaround-rubocop" - gem.version = '0.2.9' + gem.version = '0.2.10' gem.summary = "Backend configuration files" gem.description = "Shared base configuration for Getaround Backend Applications." gem.authors = ["Drivy", "Laurent Humez"] gem.email = ["oss@drivy.com"] gem.homepage = "https://github.com/drivy" gem.license = "MIT" - gem.required_ruby_version = '>= 2.7' + gem.required_ruby_version = '>= 3.0' gem.files = Dir.chdir(File.expand_path(__dir__)) do `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) } diff --git a/getaround_utils/.ruby-version b/getaround_utils/.ruby-version index 30c5992..456bc36 100644 --- a/getaround_utils/.ruby-version +++ b/getaround_utils/.ruby-version @@ -1 +1 @@ -ruby-2.7.4 +ruby-3.0.6 \ No newline at end of file diff --git a/getaround_utils/Gemfile.lock b/getaround_utils/Gemfile.lock index 9ee9007..d97089e 100644 --- a/getaround_utils/Gemfile.lock +++ b/getaround_utils/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - getaround_utils (0.2.28) + getaround_utils (0.2.30) rack (~> 2.0) GEM @@ -264,4 +264,4 @@ DEPENDENCIES webmock (~> 3.7) BUNDLED WITH - 2.3.16 + 2.4.22 diff --git a/getaround_utils/getaround_utils.gemspec b/getaround_utils/getaround_utils.gemspec index a24e355..3804787 100644 --- a/getaround_utils/getaround_utils.gemspec +++ b/getaround_utils/getaround_utils.gemspec @@ -11,7 +11,7 @@ Gem::Specification.new do |gem| gem.email = ['oss@drivy.com'] gem.homepage = 'https://github.com/drivy' gem.license = 'MIT' - gem.required_ruby_version = '>= 2.7' + gem.required_ruby_version = '>= 3.0' gem.files = Dir.chdir(File.expand_path(__dir__)) do `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) } diff --git a/getaround_utils/lib/getaround_utils/version.rb b/getaround_utils/lib/getaround_utils/version.rb index 59dd4da..b611acc 100644 --- a/getaround_utils/lib/getaround_utils/version.rb +++ b/getaround_utils/lib/getaround_utils/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module GetaroundUtils - VERSION = '0.2.29' + VERSION = '0.2.30' end diff --git a/getaround_utils/spec/getaround_utils/mixins/loggable_spec.rb b/getaround_utils/spec/getaround_utils/mixins/loggable_spec.rb index c1e1b1b..cb90f1d 100644 --- a/getaround_utils/spec/getaround_utils/mixins/loggable_spec.rb +++ b/getaround_utils/spec/getaround_utils/mixins/loggable_spec.rb @@ -184,8 +184,8 @@ def append_infos_to_loggable(payload) stub_const('BaseClass', Class.new{ include GetaroundUtils::Mixins::Loggable - def use_monitorable(*args) - monitorable_log(*args) + def use_monitorable(*args, **kwargs) + monitorable_log(*args, **kwargs) end }) end diff --git a/getaround_utils/spec/getaround_utils/railties/ougai_spec.rb b/getaround_utils/spec/getaround_utils/railties/ougai_spec.rb index 0f019f9..6c44d7b 100644 --- a/getaround_utils/spec/getaround_utils/railties/ougai_spec.rb +++ b/getaround_utils/spec/getaround_utils/railties/ougai_spec.rb @@ -17,13 +17,13 @@ it 'forwards simple log params to the formatter' do expect(Rails.application.config.ougai_logger.formatter).to receive(:call) - .with("ERROR", kind_of(Time), nil, msg: 'message') + .with("ERROR", kind_of(Time), nil, { msg: 'message' }) Rails.logger.error('message') end it 'forwards structured log params to the formatter' do expect(Rails.application.config.ougai_logger.formatter).to receive(:call) - .with("ERROR", kind_of(Time), nil, key: :value, msg: 'message') + .with("ERROR", kind_of(Time), nil, { key: :value, msg: 'message' }) Rails.logger.error('message', key: :value) end end @@ -59,7 +59,7 @@ def log_message; logger.warn('message', key: :value); end allow(RequestStore).to receive(:store) .and_return(ougai: { http: { request_id: 'test' } }) expect(Rails.application.config.ougai_logger.formatter).to receive(:call) - .with("WARN", kind_of(Time), nil, key: :value, msg: 'message', http: { request_id: 'test' }) + .with("WARN", kind_of(Time), nil, { key: :value, msg: 'message', http: { request_id: 'test' } }) controller.log_message end end @@ -77,7 +77,7 @@ def log_message; logger.warn('message', key: :value); end base_logger = OugaiRailsLogger.new($stdout) logger = ActiveSupport::TaggedLogging.new(base_logger) expect(logger.formatter).to receive(:_call) - .with('WARN', kind_of(Time), nil, msg: "message", tags: ["tag"]) + .with('WARN', kind_of(Time), nil, { msg: "message", tags: ["tag"] }) logger.tagged('tag') { logger.warn('message') } end end @@ -104,7 +104,7 @@ def perform it 'includes the extra data from the sidekiq context' do expect(Rails.application.config.ougai_logger.formatter).to receive(:call) - .with("WARN", kind_of(Time), nil, key: :value, msg: 'message', sidekiq: { job_id: 'test' }) + .with("WARN", kind_of(Time), nil, { key: :value, msg: 'message', sidekiq: { job_id: 'test' } }) worker.new.perform end end