casted_hash 0.5.3 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/casted_hash.gemspec +1 -0
- data/lib/casted_hash.rb +1 -1
- data/test/test_casted_hash.rb +6 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a75e1ca5209da87620971999bede83c599689a7f
|
4
|
+
data.tar.gz: 9dfa369c27920138f3bae6a523a2eccc886c66c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fb74c2c6fc7949c73c59593fb4b4657709fa50184b755593e85dcd8b1bd825e92cc395aebde8542b257cdc21ac69bc97b1f512fb10d7afb62e6114f55e2195f
|
7
|
+
data.tar.gz: 0323de581f4e49bd0d455b9a9bea600aaa8fd1dbd5e1880fed7472e134490fd7b6309dc0c8902ff2f4c77f79bfa7caea112f56c81bf33c6ff1cffca3dec92536
|
data/casted_hash.gemspec
CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
15
15
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
16
16
|
spec.require_paths = ["lib"]
|
17
|
+
spec.required_ruby_version = '>= 2.2.0'
|
17
18
|
|
18
19
|
spec.add_development_dependency "bundler", ">= 1.3"
|
19
20
|
spec.add_development_dependency "rake"
|
data/lib/casted_hash.rb
CHANGED
data/test/test_casted_hash.rb
CHANGED
@@ -20,6 +20,12 @@ describe CastedHash do
|
|
20
20
|
assert_equal 2, @hash[:a]
|
21
21
|
end
|
22
22
|
|
23
|
+
it "can check size without casting" do
|
24
|
+
hash = CastedHash.new({:a => 1, :b => 2}, lambda {|x| x + 10 })
|
25
|
+
assert hash.any?
|
26
|
+
assert_empty hash.casted
|
27
|
+
end
|
28
|
+
|
23
29
|
it "casts when expected" do
|
24
30
|
hash = CastedHash.new({:a => 1, :b => 2}, lambda {|x| x + 10 })
|
25
31
|
assert !hash.casted?(:a)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: casted_hash
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephan Kaag
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 2.2.0
|
97
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
98
|
requirements:
|
99
99
|
- - ">="
|
@@ -101,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
version: '0'
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
|
-
rubygems_version: 2.
|
104
|
+
rubygems_version: 2.4.5
|
105
105
|
signing_key:
|
106
106
|
specification_version: 4
|
107
107
|
summary: A casted hash
|