cistern 0.9.0 → 0.9.1
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 +4 -4
- data/Gemfile +2 -2
- data/lib/cistern/model.rb +11 -1
- data/lib/cistern/version.rb +1 -1
- data/spec/{cistern_spec.rb → formatter_spec.rb} +0 -0
- data/spec/{cistern_hash_spec.rb → hash_spec.rb} +1 -1
- data/spec/model_spec.rb +9 -9
- data/spec/wait_for_spec.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f248cb091a6313cee4f42390b45755120759d22
|
4
|
+
data.tar.gz: f91fa47b5dc99d4db1ec9f84f798882e2ef3231c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07c1776f56bbb673648409b4a1ba8b51ef36c90acb67634e7892703bc8dc894fac33aa23c4a48734dbbebf75e5932d612176ec5a6816c8f4092dd46f68f9baf2
|
7
|
+
data.tar.gz: 4e4b03ea861eb4151dcd8a033e3c9a511f24b90a3d29363ed6f203e19c417772bf0671469956693db576b139636ecad2889a02734fefeb2e395d72dfec5a7138
|
data/Gemfile
CHANGED
@@ -8,8 +8,8 @@ group :test do
|
|
8
8
|
gem "guard-bundler", "~> 2.0", require: false
|
9
9
|
gem "pry-nav"
|
10
10
|
gem "rake"
|
11
|
-
gem "rspec", "~> 2.
|
12
|
-
gem "redis-namespace"
|
11
|
+
gem "rspec", "~> 2.99"
|
12
|
+
gem "redis-namespace", "~> 1.4", "< 1.5"
|
13
13
|
gem "codeclimate-test-reporter", require: false
|
14
14
|
end
|
15
15
|
|
data/lib/cistern/model.rb
CHANGED
@@ -31,12 +31,22 @@ class Cistern::Model
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def ==(comparison_object)
|
34
|
-
|
34
|
+
super ||
|
35
35
|
(comparison_object.is_a?(self.class) &&
|
36
36
|
comparison_object.identity == self.identity &&
|
37
37
|
!comparison_object.new_record?)
|
38
38
|
end
|
39
39
|
|
40
|
+
alias :eql? :==
|
41
|
+
|
42
|
+
def hash
|
43
|
+
if self.identity
|
44
|
+
[self.class, self.identity].join(":").hash
|
45
|
+
else
|
46
|
+
super
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
40
50
|
def service
|
41
51
|
self.connection ? self.connection.class : Cistern
|
42
52
|
end
|
data/lib/cistern/version.rb
CHANGED
File without changes
|
data/spec/model_spec.rb
CHANGED
@@ -13,7 +13,7 @@ describe "Cistern::Model" do
|
|
13
13
|
duplicate = model.dup
|
14
14
|
|
15
15
|
expect(duplicate).to eq(model)
|
16
|
-
expect(duplicate).
|
16
|
+
expect(duplicate).to eql(model)
|
17
17
|
|
18
18
|
model.name= "anotherstring"
|
19
19
|
expect(duplicate.name).to eq("string")
|
@@ -59,14 +59,14 @@ describe "Cistern::Model" do
|
|
59
59
|
end
|
60
60
|
|
61
61
|
it "should parse boolean" do
|
62
|
-
expect(TypeSpec.new(flag: "false").flag).to
|
63
|
-
expect(TypeSpec.new(flag: "true").flag).to
|
64
|
-
expect(TypeSpec.new(flag: false).flag).to
|
65
|
-
expect(TypeSpec.new(flag: true).flag).to
|
66
|
-
expect(TypeSpec.new(flag: "0").flag).to
|
67
|
-
expect(TypeSpec.new(flag: "1").flag).to
|
68
|
-
expect(TypeSpec.new(flag: 0).flag).to
|
69
|
-
expect(TypeSpec.new(flag: 1).flag).to
|
62
|
+
expect(TypeSpec.new(flag: "false").flag).to be_falsey
|
63
|
+
expect(TypeSpec.new(flag: "true").flag).to be_truthy
|
64
|
+
expect(TypeSpec.new(flag: false).flag).to be_falsey
|
65
|
+
expect(TypeSpec.new(flag: true).flag).to be_truthy
|
66
|
+
expect(TypeSpec.new(flag: "0").flag).to be_falsey
|
67
|
+
expect(TypeSpec.new(flag: "1").flag).to be_truthy
|
68
|
+
expect(TypeSpec.new(flag: 0).flag).to be_falsey
|
69
|
+
expect(TypeSpec.new(flag: 1).flag).to be_truthy
|
70
70
|
expect(TypeSpec.new(flag: false)).not_to be_flag
|
71
71
|
expect(TypeSpec.new(flag: true)).to be_flag
|
72
72
|
end
|
data/spec/wait_for_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cistern
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Lane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: API client framework extracted from Fog
|
14
14
|
email:
|
@@ -44,9 +44,9 @@ files:
|
|
44
44
|
- lib/cistern/timeout.rb
|
45
45
|
- lib/cistern/version.rb
|
46
46
|
- lib/cistern/wait_for.rb
|
47
|
-
- spec/cistern_hash_spec.rb
|
48
|
-
- spec/cistern_spec.rb
|
49
47
|
- spec/collection_spec.rb
|
48
|
+
- spec/formatter_spec.rb
|
49
|
+
- spec/hash_spec.rb
|
50
50
|
- spec/mock_data_spec.rb
|
51
51
|
- spec/model_spec.rb
|
52
52
|
- spec/singular_spec.rb
|
@@ -77,9 +77,9 @@ signing_key:
|
|
77
77
|
specification_version: 4
|
78
78
|
summary: API client framework
|
79
79
|
test_files:
|
80
|
-
- spec/cistern_hash_spec.rb
|
81
|
-
- spec/cistern_spec.rb
|
82
80
|
- spec/collection_spec.rb
|
81
|
+
- spec/formatter_spec.rb
|
82
|
+
- spec/hash_spec.rb
|
83
83
|
- spec/mock_data_spec.rb
|
84
84
|
- spec/model_spec.rb
|
85
85
|
- spec/singular_spec.rb
|