leofs_manager_client 0.4.3 → 0.4.4
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,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NWY2MzYyZmEzNWExNDI5ZmMxNDE2YjcyODAyZTY0MDIwYWIzOWY1ZQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjljZGJiOWNhMGVkODRjMjJjYWU0ZjE0ZDIzMmY4MDk4ZThkMmYxMg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODk1MjY1MWJhYjA5NDlmY2QzYTJkZjNmZDJiYTMzNDdhN2FkZGRmMzcwYTJl
|
10
|
+
ODA4MzI2ZjhjNGY0NWRhOTIxOTQxNTIyNzJhNTdlNWVjYTYxNDE5MDQ3ZmNi
|
11
|
+
MWE3YzliMDMwMzI0ZGRlNzljZDE0MjM4MTZhMmE3NmYyOTdhODk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjI3YTJkYzg2NTAwZTMwYjAyMmVjOTM4NTFmYmI4ODRkYmMwODEyYjQwZThl
|
14
|
+
NDA2MjllNDM3ODQ1ZGVlNDBkOTE0ZTQ0ODZjMWQwZjk0ZDEyZTc2MmM2Zjdl
|
15
|
+
N2NlNjk3ZmQxMTkyYjJmMTdlNDYwMGFhMzgzZmY3NmUyMTdlM2I=
|
data/lib/leofs_manager_client.rb
CHANGED
@@ -57,8 +57,9 @@ module LeoFSManager
|
|
57
57
|
@w = Integer(h[:w])
|
58
58
|
@d = Integer(h[:d])
|
59
59
|
@ring_size = Integer(h[:ring_size])
|
60
|
-
|
61
|
-
@
|
60
|
+
#XXX: leo_manager returns ring_hash_(cur|prev) as decimal (not hex)
|
61
|
+
@ring_cur = Integer(h[:ring_hash_cur]).to_s(16)
|
62
|
+
@ring_prev = Integer(h[:ring_hash_prev]).to_s(16)
|
62
63
|
end
|
63
64
|
end
|
64
65
|
|
@@ -71,6 +72,7 @@ module LeoFSManager
|
|
71
72
|
@node = h[:node]
|
72
73
|
@when = Time.parse(h[:when])
|
73
74
|
@state = h[:state]
|
75
|
+
#XXX: these are written in hex
|
74
76
|
@ring_cur = h[:ring_cur]
|
75
77
|
@ring_prev = h[:ring_prev]
|
76
78
|
end
|
@@ -90,6 +90,34 @@ describe LeoFSManager do
|
|
90
90
|
end
|
91
91
|
end
|
92
92
|
|
93
|
+
describe Status do
|
94
|
+
describe Status::System do
|
95
|
+
let(:ring_hash) { "1679896365" }
|
96
|
+
|
97
|
+
subject do
|
98
|
+
Status::System.new({
|
99
|
+
:version => "0.14.0",
|
100
|
+
:n => "2",
|
101
|
+
:r => "1",
|
102
|
+
:w => "1",
|
103
|
+
:d => "1",
|
104
|
+
:ring_size => "128",
|
105
|
+
:ring_hash_cur => ring_hash,
|
106
|
+
:ring_hash_prev => ring_hash
|
107
|
+
})
|
108
|
+
end
|
109
|
+
|
110
|
+
[:n, :r, :w, :d, :ring_size].each do |property|
|
111
|
+
its(property) { should be_a Integer }
|
112
|
+
end
|
113
|
+
|
114
|
+
[:ring_cur, :ring_prev].each do |property|
|
115
|
+
its(property) { should be_a String }
|
116
|
+
its(property) { should == Integer(ring_hash).to_s(16) }
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
120
|
+
|
93
121
|
describe Client do
|
94
122
|
before(:all) do
|
95
123
|
Dummy::Manager.new
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leofs_manager_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masaki Matsushita
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-04-
|
12
|
+
date: 2013-04-08 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Client for LeoFS Manager
|
15
15
|
email:
|