From 2103ee57c904056bf8ed1d5d36bcf6dd136b7c90 Mon Sep 17 00:00:00 2001 From: Harry Lascelles Date: Tue, 10 Sep 2024 18:41:08 +0100 Subject: [PATCH] Reduce key skipping log level This needn't be a warn. --- CHANGELOG.md | 4 ++++ Gemfile.lock | 2 +- gemfiles/psych_4.0.gemfile.lock | 2 +- gemfiles/psych_5.0.gemfile.lock | 2 +- gemfiles/rails_6.gemfile.lock | 2 +- gemfiles/rails_6_1.gemfile.lock | 2 +- gemfiles/rails_7.gemfile.lock | 2 +- lib/figjam/application.rb | 2 +- lib/figjam/version.rb | 2 +- spec/figjam/application_spec.rb | 3 ++- spec/figjam/env_spec.rb | 2 -- spec/spec_helper.rb | 2 +- 12 files changed, 15 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ecea10..6c4ef55 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.6.2 (2024-09-10) + +- Reduce override log level to info [#160](https://github.com/hlascelles/figjam/pull/160) + ## 1.6.1 (2024-04-28) - Add ruby 3.3 tests [#117](https://github.com/hlascelles/figjam/pull/117) diff --git a/Gemfile.lock b/Gemfile.lock index bb58d62..fbae305 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - figjam (1.6.1) + figjam (1.6.2) thor (>= 0.14.0, < 2) GEM diff --git a/gemfiles/psych_4.0.gemfile.lock b/gemfiles/psych_4.0.gemfile.lock index 1c50bc9..b93290a 100644 --- a/gemfiles/psych_4.0.gemfile.lock +++ b/gemfiles/psych_4.0.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - figjam (1.6.1) + figjam (1.6.2) thor (>= 0.14.0, < 2) GEM diff --git a/gemfiles/psych_5.0.gemfile.lock b/gemfiles/psych_5.0.gemfile.lock index cd229f1..f5a1e49 100644 --- a/gemfiles/psych_5.0.gemfile.lock +++ b/gemfiles/psych_5.0.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - figjam (1.6.1) + figjam (1.6.2) thor (>= 0.14.0, < 2) GEM diff --git a/gemfiles/rails_6.gemfile.lock b/gemfiles/rails_6.gemfile.lock index 27c9208..86f3580 100644 --- a/gemfiles/rails_6.gemfile.lock +++ b/gemfiles/rails_6.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - figjam (1.6.1) + figjam (1.6.2) thor (>= 0.14.0, < 2) GEM diff --git a/gemfiles/rails_6_1.gemfile.lock b/gemfiles/rails_6_1.gemfile.lock index 58d77c3..99d2fde 100644 --- a/gemfiles/rails_6_1.gemfile.lock +++ b/gemfiles/rails_6_1.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - figjam (1.6.1) + figjam (1.6.2) thor (>= 0.14.0, < 2) GEM diff --git a/gemfiles/rails_7.gemfile.lock b/gemfiles/rails_7.gemfile.lock index 7162fe3..f28d0df 100644 --- a/gemfiles/rails_7.gemfile.lock +++ b/gemfiles/rails_7.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - figjam (1.6.1) + figjam (1.6.2) thor (>= 0.14.0, < 2) GEM diff --git a/lib/figjam/application.rb b/lib/figjam/application.rb index cdeef74..2153d07 100644 --- a/lib/figjam/application.rb +++ b/lib/figjam/application.rb @@ -108,7 +108,7 @@ def each(&block) end private def key_skipped(key) - warn "WARNING: Skipping key #{key.inspect}. Already set in ENV." + puts "INFO: Skipping key #{key.inspect}. Already set in ENV." end end end diff --git a/lib/figjam/version.rb b/lib/figjam/version.rb index 739f2c9..516f30c 100644 --- a/lib/figjam/version.rb +++ b/lib/figjam/version.rb @@ -1,3 +1,3 @@ module Figjam - VERSION = "1.6.1".freeze + VERSION = "1.6.2".freeze end diff --git a/spec/figjam/application_spec.rb b/spec/figjam/application_spec.rb index d78cc9b..9f84738 100644 --- a/spec/figjam/application_spec.rb +++ b/spec/figjam/application_spec.rb @@ -214,7 +214,8 @@ def yaml_to_path(yaml) it "skips keys (and warns) that have already been set externally" do ::ENV["foo"] = "baz" - expect(application).to receive(:warn) + expect(application) + .to receive(:puts).with('INFO: Skipping key "foo". Already set in ENV.') expect { application.load diff --git a/spec/figjam/env_spec.rb b/spec/figjam/env_spec.rb index ae91882..b82a1b9 100644 --- a/spec/figjam/env_spec.rb +++ b/spec/figjam/env_spec.rb @@ -35,7 +35,6 @@ end end - # rubocop:disable RSpec/RepeatedSubjectCall context "with bang methods" do it "makes ENV values accessible as lowercase methods" do expect(env.hello!).to eq("world") @@ -108,7 +107,6 @@ expect { env.goodbye = "world" }.to raise_error(NoMethodError) end end - # rubocop:enable RSpec/RepeatedSubjectCall end describe "#respond_to?" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 882d30b..aa50a0b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -12,4 +12,4 @@ Bundler.require(:test) -Dir[File.expand_path("support/*.rb", __dir__)].sort.each { |f| require f } +Dir[File.expand_path("support/*.rb", __dir__)].each { |f| require f }