xrbp 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/examples/server_info.rb +8 -0
- data/lib/xrbp/model/node.rb +11 -0
- data/lib/xrbp/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f48abc4b153d8aa5a31d794dc7c0ed9a8e86645fa47cd40fe8e7fdfa40a089c
|
4
|
+
data.tar.gz: ad79925c9fa4c3b3ac7383d70361ce702d48b0cd3569224a66c96f6c7e401fd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e328dd52b245837f57da0b4c2bf1739c252f6ae9b226c2d7c95cdeac237bc31d9640082cdcdc0b880853a3bb282ce2c9c11d8a1ec7c7e7c63cb35544c66d20c
|
7
|
+
data.tar.gz: 9e5f4fa85c9a019ebdc651f4c6cd47f5db8eed98b61ab46123900bdd6fe08d1ac41088c49d7fdd9eb87460f4f830bb47030459a1d29a3c76881f0937dee7bf26
|
data/lib/xrbp/model/node.rb
CHANGED
@@ -127,6 +127,17 @@ module XRBP
|
|
127
127
|
connection.rsleep(delay) unless connection.force_quit?
|
128
128
|
end
|
129
129
|
end
|
130
|
+
|
131
|
+
# Retrieve server info via WebSocket::Connection
|
132
|
+
def server_info(opts={}, &bl)
|
133
|
+
set_opts(opts)
|
134
|
+
connection.cmd(WebSocket::Cmds::ServerInfo.new, &bl)
|
135
|
+
end
|
136
|
+
|
137
|
+
# Retrieve ledgers which this server has
|
138
|
+
def complete_ledgers(opts={})
|
139
|
+
server_info(opts)["result"]["info"]["complete_ledgers"].split("-").collect { |l| l.to_i }
|
140
|
+
end
|
130
141
|
end
|
131
142
|
end # module Model
|
132
143
|
end # module XRBP
|
data/lib/xrbp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xrbp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dev Null Productions
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-03-
|
11
|
+
date: 2020-03-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -197,6 +197,7 @@ files:
|
|
197
197
|
- examples/paginate.rb
|
198
198
|
- examples/prioritized.rb
|
199
199
|
- examples/round_robin.rb
|
200
|
+
- examples/server_info.rb
|
200
201
|
- examples/username.rb
|
201
202
|
- examples/validator.rb
|
202
203
|
- examples/websocket.rb
|