rochefort 0.1.0 → 0.1.1
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 +4 -4
- data/lib/rochefort.rb +5 -2
- 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: bc8b15abe5b9fc1c8b93e4a885c3ecfb91a11f4f
|
4
|
+
data.tar.gz: 9ff9c898a2e7d14c646214591e0522aa7c434333
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2705f8e5cb3609da99029270ff62e6c61fde9c837774ab8a49af3445fc247b4d95ff5fd0607687ddff1962c8e4e1ded2f67d20a22cf69d95586320d11d214484
|
7
|
+
data.tar.gz: 0f6625494b8b8d7a60f4123318bd11c1a5f18fa4234d7f0a0ab18eff11af9e9de3e668c132a1d0cf76411d0eaa037f633494b9b44afcdd00acdf4dd69c9ce31b
|
data/lib/rochefort.rb
CHANGED
@@ -28,8 +28,9 @@ class Rochefort
|
|
28
28
|
# )
|
29
29
|
# @return the offset at which the data was stored
|
30
30
|
def append(opts)
|
31
|
+
tags = opts[:tags] || []
|
31
32
|
data = RestClient::Request.execute(method: :post,
|
32
|
-
url: "#{@urlAppend}?namespace=#{opts[:namespace]}&allocSize=#{opts[:alloc_size]}",
|
33
|
+
url: "#{@urlAppend}?namespace=#{opts[:namespace]}&allocSize=#{opts[:alloc_size]}&tags=#{tags.join(",")}",
|
33
34
|
payload: opts[:data],
|
34
35
|
read_timeout: opts[:read_timeout] || 1,
|
35
36
|
open_timeout: opts[:open_timeout] || 1)
|
@@ -103,6 +104,7 @@ class Rochefort
|
|
103
104
|
end
|
104
105
|
|
105
106
|
# scans a namespace, reading from a stream, so the namespace can be very big
|
107
|
+
# also accepts array of tags to search for
|
106
108
|
# r = Rochefort.new(url)
|
107
109
|
# r.scan(namespace: ns) do |len, offset, value|
|
108
110
|
# puts value
|
@@ -142,8 +144,9 @@ class Rochefort
|
|
142
144
|
end
|
143
145
|
end
|
144
146
|
|
147
|
+
tags = opts[:tags] || []
|
145
148
|
RestClient::Request.execute(method: :get,
|
146
|
-
url: "#{@urlScan}?namespace=#{opts[:namespace]}",
|
149
|
+
url: "#{@urlScan}?namespace=#{opts[:namespace]}&tags=#{tags.join(",")}",
|
147
150
|
read_timeout: opts[:read_timeout] || 1,
|
148
151
|
open_timeout: opts[:open_timeout] || 1,
|
149
152
|
block_response: block)
|