fetching 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/fetching/version.rb +1 -1
- data/lib/fetching.rb +1 -0
- data/spec/fetching_array_spec.rb +2 -2
- data/spec/fetching_spec.rb +28 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d376f053b0ff1258626543fce7a932245218cbfc
|
4
|
+
data.tar.gz: 4fce06a064b39f7017cb4a5bc2eb312e19db3fcc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25a61cf2c0b4338d5a17530881b5d87fc6cdf4656726aca674dc007dbac02456ff00f141d536fb2daa414a9347fb0ba750d643ff7e16e621e74d010ef7bdd764
|
7
|
+
data.tar.gz: 656d5b6e258b930a5becb45ac94098e5c9ab59ea36c6473a0c8355152c3fa40d04be23c9100a200b196c9c0baf4f162731e12161ce589debebc3afd5ba5c8fac
|
data/README.md
CHANGED
data/lib/fetching/version.rb
CHANGED
data/lib/fetching.rb
CHANGED
data/spec/fetching_array_spec.rb
CHANGED
@@ -34,11 +34,11 @@ describe Fetching::FetchingArray do
|
|
34
34
|
let(:fetching) { Fetching(array) }
|
35
35
|
|
36
36
|
describe "#empty?" do
|
37
|
-
it("should be false") { expect(fetching.empty?).to
|
37
|
+
it("should be false") { expect(fetching.empty?).to be_falsy }
|
38
38
|
|
39
39
|
context "when empty" do
|
40
40
|
let(:array) { [] }
|
41
|
-
it("should be true") { expect(fetching.empty?).to
|
41
|
+
it("should be true") { expect(fetching.empty?).to be_truthy }
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
data/spec/fetching_spec.rb
CHANGED
@@ -52,4 +52,32 @@ describe Fetching do
|
|
52
52
|
expect(described_class.from_json(json)).to eq(expected)
|
53
53
|
end
|
54
54
|
|
55
|
+
# some of these specs may seem redundant, but several cases
|
56
|
+
#+ generated NoMethodErrors previously so I wanted to make sure
|
57
|
+
#+ all use cases work now
|
58
|
+
describe '#nil?' do
|
59
|
+
it 'is true if the object is nil' do
|
60
|
+
expect(Fetching(nil)).to be_nil
|
61
|
+
end
|
62
|
+
|
63
|
+
it 'is true if the value of a key in a FetchingHash is nil' do
|
64
|
+
expect(Fetching(value: nil).value).to be_nil
|
65
|
+
end
|
66
|
+
|
67
|
+
it 'is true if the value of an index in a FetchingArray is nil' do
|
68
|
+
expect(Fetching(['a', nil, 'b'])[1]).to be_nil
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'is false if the object has a value' do
|
72
|
+
expect(Fetching({})).not_to be_nil
|
73
|
+
end
|
74
|
+
|
75
|
+
it 'is false if the value of a key in a FetchingHash is non-nil' do
|
76
|
+
expect(Fetching(value: 'not nil!').value).not_to be_nil
|
77
|
+
end
|
78
|
+
|
79
|
+
it 'is false if the value of an index in a FetchingArray is non-nil' do
|
80
|
+
expect(Fetching(['a', 1, 'b'])[1]).not_to be_nil
|
81
|
+
end
|
82
|
+
end
|
55
83
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fetching
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Gee
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-12-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
111
|
version: '0'
|
112
112
|
requirements: []
|
113
113
|
rubyforge_project:
|
114
|
-
rubygems_version: 2.
|
114
|
+
rubygems_version: 2.4.4
|
115
115
|
signing_key:
|
116
116
|
specification_version: 4
|
117
117
|
summary: 'This gem is a work in progress. The implementation code is not what''s
|