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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rochefort.rb +5 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c17f990804b13617208ac9c09942132e1a39f81b
4
- data.tar.gz: 236b07c56d3f1d41c1f96454dca068f780291c44
3
+ metadata.gz: bc8b15abe5b9fc1c8b93e4a885c3ecfb91a11f4f
4
+ data.tar.gz: 9ff9c898a2e7d14c646214591e0522aa7c434333
5
5
  SHA512:
6
- metadata.gz: 39231ec80b8bf881175558612c67e33504098c90e203c663dbcda06f3820bfe0e1d663c2da25932c4ce8bc4fca4676bed7ac9c57c916424c2fc40e414324d286
7
- data.tar.gz: 7d6e979c8c8d6496d52896284895dcbcc4d7784df07955897687ab9f3cb91ebe48b93af521b00e95f15d3f1eed1293df6f6db8e53419c3f217b94f2ac2a712f5
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rochefort
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Borislav Nikolov