rochefort 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rochefort.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2be35c117382398bafe35dc0d16c868dfe107354
|
4
|
+
data.tar.gz: def433ebe4bd5851c913f618ab7a0067c852ec2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8846e9dcfbf52d77b124e532d58866bec05330d3d4eccbdb0b0db80f9ff60e5ed09071847104c132b334fdaa98e6f63b41118f62bbad26ab0d9f5ca290553a2a
|
7
|
+
data.tar.gz: ba9f5342d16954f128c3a602c403914bf1990524472b586e194fc125dea9e883558a9c5ef64e89160fcd76280dd5825e7a56f0957d7c4e16276d7f3eb898b892
|
data/lib/rochefort.rb
CHANGED
@@ -17,18 +17,18 @@ class Rochefort
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def append(opts)
|
20
|
-
data = RestClient::Request.execute(method: :post, url: "#{@urlSet}?
|
20
|
+
data = RestClient::Request.execute(method: :post, url: "#{@urlSet}?namespace=#{opts[:namespace]}&id=#{opts[:id]}",payload: opts[:data], read_timeout: opts[:read_timeout] || 1, open_timeout: opts[:open_timeout] || 1)
|
21
21
|
out = JSON.parse(data.body)
|
22
22
|
return out["offset"]
|
23
23
|
end
|
24
24
|
|
25
25
|
def get(opts)
|
26
|
-
data = RestClient::Request.execute(method: :get, url: "#{@urlGet}?
|
26
|
+
data = RestClient::Request.execute(method: :get, url: "#{@urlGet}?namespace=#{opts[:namespace]}&offset=#{opts[:offset]}", read_timeout: opts[:read_timeout] || 1, open_timeout: opts[:open_timeout] || 1)
|
27
27
|
return data
|
28
28
|
end
|
29
29
|
|
30
30
|
def getMulti(opts)
|
31
|
-
data = RestClient::Request.execute(method: :get, url: "#{@urlGetMulti}?
|
31
|
+
data = RestClient::Request.execute(method: :get, url: "#{@urlGetMulti}?namespace=#{opts[:namespace]}", payload: opts[:offsets].pack("q<*"), read_timeout: opts[:read_timeout] || 1, open_timeout: opts[:open_timeout] || 1).body
|
32
32
|
offset = 0
|
33
33
|
out = []
|
34
34
|
while offset != data.length
|