Skip to content

Commit 411dae6

Browse files
committed
💚 Fix CI
1 parent 7187fcb commit 411dae6

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

.rubocop_gradual.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"snaky_hash.gemspec:3697348532": [
99
[4, 23, 12, "Gemspec/RubyVersionGlobalsUsage: Do not use `RUBY_VERSION` in gemspec file.", 31296028]
1010
],
11-
"spec/shared_contexts/base_hash.rb:2034972498": [
11+
"spec/shared_contexts/base_hash.rb:2552169260": [
1212
[3, 22, 11, "RSpec/ContextWording: Context description should match /^when\\b/, /^with\\b/, or /^without\\b/.", 3936427458]
1313
],
1414
"spec/snaky_hash/bad_snake_spec.rb:3931746112": [

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ PATH
2424
remote: .
2525
specs:
2626
snaky_hash (2.0.1)
27-
hashie
27+
hashie (>= 0.1.0, < 6)
2828
version_gem (>= 1.1.8, < 3)
2929

3030
GEM

snaky_hash.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Gem::Specification.new do |spec|
4343
spec.license = "MIT"
4444
spec.required_ruby_version = ">= 2.2.0"
4545

46-
spec.metadata["homepage_uri"] = "https://#{spec.name.tr('_', '-')}.galtzo.com/"
46+
spec.metadata["homepage_uri"] = "https://#{spec.name.tr("_", "-")}.galtzo.com/"
4747
# Yes, GitHub/Microsoft is a disgusting monopoly, but GH stars have value :(
4848
spec.metadata["source_code_uri"] = "#{gh_mirror}/releases/tag//v#{spec.version}"
4949
spec.metadata["changelog_uri"] = "#{gl_homepage}/-/blob/v#{spec.version}/CHANGELOG.md"

spec/shared_contexts/base_hash.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
RSpec.shared_context "base hash" do
44
let(:base_hash) do
5-
{
5+
bh = {
66
"varOne" => 1,
77
"two" => 2,
88
:three => 3,
@@ -24,7 +24,8 @@
2424
"spaced Key" => "When would this happen?",
2525
"trailing spaces " => "better safe than sorry",
2626
"extra spaces" => "hopefully this never happens",
27-
4 => "not symbolizable",
2827
}
28+
# Hashie v5 is the oldest version of hashie that works with non-symbolizable keys
29+
bh.merge!(4 => "not symbolizable") if defined?(Hashie::VERSION) && Gem::Version.new(Hashie::VERSION) >= Gem::Version.new("5.0.0")
2930
end
3031
end

spec/shared_examples/a_snaked_hash.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@
107107
end
108108

109109
it "does not transform non-Symbolizable keys" do
110+
skip("Hashie v5 is the oldest version of hashie that works with non-symbolizable keys") unless defined?(Hashie::VERSION) && Gem::Version.new(Hashie::VERSION) >= Gem::Version.new("5.0.0")
110111
expect(subject[4]).to eq("not symbolizable")
111112
expect(subject[:"4"]).to be_nil
112113
expect(subject["4"]).to be_nil

0 commit comments

Comments
 (0)