hash-proxy 0.1.7 → 1.0.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
- SHA1:
3
- metadata.gz: f8eb13d235ef7982d3e5198f8a0162e5ffab73b7
4
- data.tar.gz: 2d8917c67b98c0053da4b5a13cbe6fea23d330a3
2
+ SHA256:
3
+ metadata.gz: 1855238cbfa38c1d0a5a5b132a738b2fb3a4e8b246ce04894c8078a465cec86a
4
+ data.tar.gz: 8978e1a5e8a4085e72efe37fc20cfe6f16dc1a88f6ce5dfb8276018e90f9b14f
5
5
  SHA512:
6
- metadata.gz: 33047135a972c9592132d6562515f8f9f787c70e23ef36e1bff8e6ed00c7ffe5f1e1754f1f041d6716af9456426d8890ec626d94cafb9f86cda4f17c6105eba8
7
- data.tar.gz: 9222c1f4376fae7060388d95ae2781474f8abf6064081c59e8161b6f79192fa2c573255c16be9c7c70d6b43825746562dd2313b3ea1d84c91f07499142b5e5a3
6
+ metadata.gz: ad492489ada070fc21f89f242490b19fd47b05757945c3bfd874229c88b9c10c5818c777e9a2c4e8cff67259bdbfe5472e2822e160ec58362bc81e74991ec2c6
7
+ data.tar.gz: 0cefd52c86fa17359ec33c3ab2f819784fdbe81c693ae9402db95679f4c51cde21b67a4785ed38494600a7dd775ccd0a826f39ecc89bf73e64012331495c6058
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.4.1
1
+ 3.1.1
data/Gemfile.lock CHANGED
@@ -1,11 +1,13 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- bones (3.8.4)
4
+ addressable (2.8.1)
5
+ public_suffix (>= 2.0.2, < 6.0)
6
+ bones (3.9.0)
5
7
  little-plugger (~> 1.1)
6
8
  loquacious (~> 1.9)
7
- rake (~> 12.0)
8
- rdoc (~> 5.0)
9
+ rake (~> 13.0)
10
+ rdoc (~> 6.0)
9
11
  bones-git (1.3.1)
10
12
  git (~> 1.2)
11
13
  bones-rspec (2.0.1)
@@ -14,27 +16,37 @@ GEM
14
16
  bones-yard (1.0.0)
15
17
  bones (>= 3.5.0)
16
18
  yard (>= 0.5.8)
17
- diff-lcs (1.3)
18
- git (1.5.0)
19
+ diff-lcs (1.5.0)
20
+ git (1.13.0)
21
+ addressable (~> 2.8)
22
+ rchardet (~> 1.8)
19
23
  little-plugger (1.1.4)
20
24
  loquacious (1.9.1)
21
- rake (12.3.1)
22
- rdoc (5.1.0)
23
- redcarpet (3.4.0)
24
- rspec (3.8.0)
25
- rspec-core (~> 3.8.0)
26
- rspec-expectations (~> 3.8.0)
27
- rspec-mocks (~> 3.8.0)
28
- rspec-core (3.8.0)
29
- rspec-support (~> 3.8.0)
30
- rspec-expectations (3.8.2)
25
+ psych (5.0.1)
26
+ stringio
27
+ public_suffix (5.0.1)
28
+ rake (13.0.6)
29
+ rchardet (1.8.0)
30
+ rdoc (6.5.0)
31
+ psych (>= 4.0.0)
32
+ redcarpet (3.5.1)
33
+ rspec (3.12.0)
34
+ rspec-core (~> 3.12.0)
35
+ rspec-expectations (~> 3.12.0)
36
+ rspec-mocks (~> 3.12.0)
37
+ rspec-core (3.12.0)
38
+ rspec-support (~> 3.12.0)
39
+ rspec-expectations (3.12.1)
31
40
  diff-lcs (>= 1.2.0, < 2.0)
32
- rspec-support (~> 3.8.0)
33
- rspec-mocks (3.8.0)
41
+ rspec-support (~> 3.12.0)
42
+ rspec-mocks (3.12.1)
34
43
  diff-lcs (>= 1.2.0, < 2.0)
35
- rspec-support (~> 3.8.0)
36
- rspec-support (3.8.0)
37
- yard (0.9.16)
44
+ rspec-support (~> 3.12.0)
45
+ rspec-support (3.12.0)
46
+ stringio (3.0.4)
47
+ webrick (1.7.0)
48
+ yard (0.9.28)
49
+ webrick (~> 1.7.0)
38
50
 
39
51
  PLATFORMS
40
52
  ruby
@@ -48,4 +60,4 @@ DEPENDENCIES
48
60
  rspec
49
61
 
50
62
  BUNDLED WITH
51
- 1.15.4
63
+ 2.4.1
data/LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ License
2
+ -------
3
+
4
+ (The MIT License)
5
+
6
+ Copyright (c) 2012-2022 Douglas A. Seifert
7
+
8
+ Permission is hereby granted, free of charge, to any person obtaining
9
+ a copy of this software and associated documentation files (the
10
+ 'Software'), to deal in the Software without restriction, including
11
+ without limitation the rights to use, copy, modify, merge, publish,
12
+ distribute, sublicense, and/or sell copies of the Software, and to
13
+ permit persons to whom the Software is furnished to do so, subject to
14
+ the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be
17
+ included in all copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
20
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
23
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -82,6 +82,9 @@ Original author: Douglas A. Seifert (doug@dseifert.net)
82
82
 
83
83
  History
84
84
  -------
85
+ ### Version 1.0.0 / 2022-12-27
86
+ * upgrade to latest versions of everything
87
+ * switch specs over to expect style
85
88
 
86
89
  ### Version 0.1.6 / 2014-09-25
87
90
  * Pin to rspec < 3
@@ -128,7 +131,7 @@ License
128
131
 
129
132
  (The MIT License)
130
133
 
131
- Copyright (c) 2012 Douglas A. Seifert
134
+ Copyright (c) 2012-2022 Douglas A. Seifert
132
135
 
133
136
  Permission is hereby granted, free of charge, to any person obtaining
134
137
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -13,6 +13,7 @@ Bones {
13
13
  authors 'Douglas A. Seifert'
14
14
  email 'doug@dseifert.net'
15
15
  url 'https://github.com/seifertd/hash-proxy'
16
+ license 'MIT'
16
17
  #depend_on 'bones', :development => true
17
18
  #depend_on 'bones-rspec', :development => true
18
19
  #depend_on 'bones-git', :development => true
@@ -34,7 +34,7 @@ describe HashProxy do
34
34
 
35
35
  it "does not get confused by methods defined on Kernel" do
36
36
  proxy = HashProxy::Proxy.new({})
37
- expect(lambda { proxy[:format] }).to_not raise_error
37
+ expect{proxy[:format]}.to_not raise_error
38
38
  expect(proxy.format).to be_nil
39
39
  end
40
40
 
@@ -68,10 +68,12 @@ describe HashProxy do
68
68
 
69
69
  it "handles crappy method calls" do
70
70
  proxy = HashProxy::Proxy.new({})
71
- expect(lambda { proxy.send(:'=', 'crap') }).to raise_error(NoMethodError)
71
+ expect do
72
+ proxy.send(:'=', 'crap')
73
+ end.to raise_error(NoMethodError)
72
74
  end
73
75
 
74
- it "turns hash keys i).to method calls" do
76
+ it "turns hash keys into method calls" do
75
77
  hash = {foo: 'bar', baz: 'bip'}
76
78
  proxy = HashProxy::Proxy.new(hash)
77
79
  expect(proxy.foo).to eq('bar')
@@ -109,14 +111,14 @@ describe HashProxy do
109
111
 
110
112
  it "should not convert values if nothing is referenced" do
111
113
  hash = {'foo' => 'bar', 'arr1' => [1,2,3], 'baz' => 'bip'}
112
- HashProxy::Proxy.new(hash)
113
- expect(HashProxy::Proxy).not_to receive(:convert_value)
114
+ proxy = HashProxy::Proxy.new(hash)
115
+ expect(HashProxy::Proxy).to_not receive(:convert_value)
116
+ proxy.to_s
114
117
  end
115
118
 
116
119
  it "should convert values if they are referenced" do
117
120
  hash = {foo: 'bar', baz: 'bip'}
118
121
  proxy = HashProxy::Proxy.new(hash)
119
- #proxy.should_receive(:convert_value).once.with('bar').and_return('bar')
120
122
  expect(proxy).to receive(:convert_value).once.with('bar').and_return('bar')
121
123
  expect(proxy.foo).to eq('bar')
122
124
  end
@@ -166,11 +168,11 @@ describe HashProxy do
166
168
  end
167
169
  end
168
170
 
169
- # TODO: Am I itching badly enough).to make this pass? ....
171
+ # TODO: Am I itching badly enough to make this pass? ....
170
172
  #it "should lazily handle nested arrays" do
171
173
  # hash = {:foo => [{:key1 => 'val11', :key2 => 'val12'}, {:key1 => 'val21', :key2 => 'val22'}], :bar => :baz}
172
174
  # proxy = HashProxy.create_from(hash)
173
- # expect(proxy.foo).to eq([{:key1 => 'val11', :key2 => 'val12'}, {:key1 => 'val21', :key2 => 'val22'}])
175
+ # proxy.foo.should eq([{:key1 => 'val11', :key2 => 'val12'}, {:key1 => 'val21', :key2 => 'val22'}])
174
176
  #end
175
177
 
176
178
  end
data/version.txt CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 1.0.0
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash-proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas A. Seifert
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-05 00:00:00.000000000 Z
11
+ date: 2022-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bones
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.8.4
19
+ version: 3.9.0
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 3.8.4
26
+ version: 3.9.0
27
27
  description: |-
28
28
  An object that proxies method calls to a Hash object as hash key lookups.
29
29
  Handles nested hashes and arrays.
@@ -40,6 +40,7 @@ files:
40
40
  - Gemfile
41
41
  - Gemfile.lock
42
42
  - History.txt
43
+ - LICENSE
43
44
  - README.md
44
45
  - Rakefile
45
46
  - lib/hash_proxy.rb
@@ -49,7 +50,8 @@ files:
49
50
  - spec/spec_helper.rb
50
51
  - version.txt
51
52
  homepage: https://github.com/seifertd/hash-proxy
52
- licenses: []
53
+ licenses:
54
+ - MIT
53
55
  metadata: {}
54
56
  post_install_message:
55
57
  rdoc_options:
@@ -68,8 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
70
  - !ruby/object:Gem::Version
69
71
  version: '0'
70
72
  requirements: []
71
- rubyforge_project: hash-proxy
72
- rubygems_version: 2.6.12
73
+ rubygems_version: 3.3.7
73
74
  signing_key:
74
75
  specification_version: 4
75
76
  summary: An object that proxies method calls to a Hash object as hash key lookups.