kalibro_client 0.0.3 → 0.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ee463177f19553bdd84f4a3fca809c486c5ac53
|
4
|
+
data.tar.gz: b46c3d43ba8f8f92275f88e71043c2f7da159e97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c1428cf4fbec3c9b3934b543b1099e161cd48b760a08c8d02988b65140ad04ef8758f3e120fa226eaa4e0ca122444639b561ac711e432249a5b549e4ca05c57
|
7
|
+
data.tar.gz: 39319f9551c5a753ade4e302de32b708d1f1f864a82694462e79068f8c3b10f0e26dcd8138db08487ac623785afacd4f2327af181c5dea7260522c634192d118
|
@@ -47,6 +47,16 @@ module KalibroClient
|
|
47
47
|
def >(other_granularity)
|
48
48
|
!(self <= other_granularity)
|
49
49
|
end
|
50
|
+
|
51
|
+
def <=>(other_granularity)
|
52
|
+
if self < other_granularity
|
53
|
+
return -1
|
54
|
+
elsif self > other_granularity
|
55
|
+
return 1
|
56
|
+
else
|
57
|
+
return 0
|
58
|
+
end
|
59
|
+
end
|
50
60
|
end
|
51
61
|
|
52
62
|
end
|
@@ -50,6 +50,9 @@ describe KalibroClient::Entities::Miscellaneous::Granularity do
|
|
50
50
|
it 'should return false when checking for >=' do
|
51
51
|
expect(subject >= other_granularity).to be_falsey
|
52
52
|
end
|
53
|
+
it 'should return -1 when checking for <=>' do
|
54
|
+
expect(subject <=> other_granularity).to eq(-1)
|
55
|
+
end
|
53
56
|
end
|
54
57
|
|
55
58
|
context 'comparing to an equal one' do
|
@@ -66,6 +69,9 @@ describe KalibroClient::Entities::Miscellaneous::Granularity do
|
|
66
69
|
it 'should return true when checking for >=' do
|
67
70
|
expect(subject >= other_granularity).to be_truthy
|
68
71
|
end
|
72
|
+
it 'should return 0 when checking for <=>' do
|
73
|
+
expect(subject <=> other_granularity).to eq(0)
|
74
|
+
end
|
69
75
|
end
|
70
76
|
|
71
77
|
context 'comparing to a smaller one' do
|
@@ -82,6 +88,9 @@ describe KalibroClient::Entities::Miscellaneous::Granularity do
|
|
82
88
|
it 'should return true when checking for >=' do
|
83
89
|
expect(subject >= other_granularity).to be_truthy
|
84
90
|
end
|
91
|
+
it 'should return 1 when checking for <=>' do
|
92
|
+
expect(subject <=> other_granularity).to eq(1)
|
93
|
+
end
|
85
94
|
end
|
86
95
|
end
|
87
96
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kalibro_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Diego de Araújo Martinez Camarinha
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2015-
|
14
|
+
date: 2015-04-01 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|