kalibro_client 0.0.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 31aabdda1cc6f38edd2933a2677c99705a64f153
4
- data.tar.gz: b847a2319acc4eeb0adccf34c4acde810c1eee92
3
+ metadata.gz: 2ee463177f19553bdd84f4a3fca809c486c5ac53
4
+ data.tar.gz: b46c3d43ba8f8f92275f88e71043c2f7da159e97
5
5
  SHA512:
6
- metadata.gz: a6fd5497cc5cc15aa93cc17f247470cb07e4fcd8ce049bf5bc78ddd2e54a349b4f0ffb4714d2ba8938b8a883e2d1ec8e5cb239c78990e194347c477fbef1ed87
7
- data.tar.gz: e59456de46f9638a5345fc57a7b6fa797dd6ae46b4efa16f2bcb90df52485f688109929332f7773b8115a55ccec280dc4e8fc58e3d04dfebcf15aca385ec685f
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
@@ -15,5 +15,5 @@
15
15
  # along with this program. If not, see <http://www.gnu.org/licenses/>.
16
16
 
17
17
  module KalibroClient
18
- VERSION = "0.0.3"
18
+ VERSION = "0.1.0"
19
19
  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.3
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-02-25 00:00:00.000000000 Z
14
+ date: 2015-04-01 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler