collapsium 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a0237b4fe627fff71b5c02f5e3f77f9d9713e849
4
- data.tar.gz: fd48fd69e118edfba70a91ee7920495008a140ad
3
+ metadata.gz: ac48359cda7fa845f6ee9bf88db8da16b190899d
4
+ data.tar.gz: c7c5c3c9c28978e1c85d397ea6a731bdaf911042
5
5
  SHA512:
6
- metadata.gz: 69e87ad355d708944ef6bda61139a63028a666cf9165b2438c2b47da3edc92fdaa4b581435528ef31754b09cd265e2908dc3205c049e9ea1424b4d7b93536cfe
7
- data.tar.gz: f85612ff08aeaf56ca7699a68ef171709905aa838eabf26c7196002b95529cb79eeff998a5a546a70cf46d64485842cc913449e4d073a51e441ba1d50102dec2
6
+ metadata.gz: eebf8ce4bcbab3920f3809ccb793e33da5b4343ec14c8e2c5b8edb7309f80a06e8b3c6c21dcad144484148c2adf56d19af21fbf9e3987ff3346ae95ec6d95891
7
+ data.tar.gz: da064743e896e5fe6505d2fc9dd5213adec4964dc93871b97a74592da0e0569df87590e3d75bde56ae532b1b7c7a1c5c7aeb309039998bd706deea7ff3f1730b
data/.travis.yml CHANGED
@@ -5,7 +5,7 @@ rvm:
5
5
  - 2.2
6
6
  script:
7
7
  - bundle exec rake
8
- - bundle exec codeclimate-test-reporter
8
+ - bundle exec codeclimate-test-reporter || true
9
9
  addons:
10
10
  code_climate:
11
11
  repo_token: 56724b4322c0a98f681db40ccfa92d1a9fd4755a18daf82683f95fcaa058499d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- collapsium (0.7.0)
4
+ collapsium (0.8.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -71,7 +71,10 @@ module Collapsium
71
71
  return sorted
72
72
  end
73
73
 
74
- READ_METHODS = ::Collapsium::Support::HashMethods::KEYED_READ_METHODS.freeze
74
+ READ_METHODS = (
75
+ ::Collapsium::Support::HashMethods::KEYED_READ_METHODS \
76
+ + ::Collapsium::Support::HashMethods::KEYED_WRITE_METHODS
77
+ ).freeze
75
78
 
76
79
  INDIFFERENT_ACCESS_READER = proc do |wrapped_method, *args, &block|
77
80
  # Bail out early if the receiver is not a Hash. Do the same if we have
@@ -8,5 +8,5 @@
8
8
  #
9
9
  module Collapsium
10
10
  # The current release version
11
- VERSION = "0.7.0".freeze
11
+ VERSION = "0.8.0".freeze
12
12
  end
@@ -92,6 +92,19 @@ describe ::Collapsium::IndifferentAccess do
92
92
  expect(result).to be_truthy
93
93
  end
94
94
 
95
+ it "also works for write access" do
96
+ test = {
97
+ "foo" => 123
98
+ }
99
+ test.extend(::Collapsium::IndifferentAccess)
100
+
101
+ expect { test[:foo] = 42 }.not_to raise_error
102
+ expect(test["foo"]).to eql 42
103
+
104
+ expect { test.delete(:foo) }.not_to raise_error
105
+ expect(test.empty?).to be_truthy
106
+ end
107
+
95
108
  context IncludedIndifferentHash do
96
109
  let(:tester) { IncludedIndifferentHash.new }
97
110
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: collapsium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Finkhaeuser