rochefort 0.0.2 → 0.0.3

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 +3 -3
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04159da36c5cec7ecc5dbf676e37d4c5eaa5cac7
4
- data.tar.gz: 45c775ac20cff4cf2279a70f2c02ca17e30f3ff6
3
+ metadata.gz: 2be35c117382398bafe35dc0d16c868dfe107354
4
+ data.tar.gz: def433ebe4bd5851c913f618ab7a0067c852ec2e
5
5
  SHA512:
6
- metadata.gz: 95f37491857b34b8dceb992794f1b5d945733beff15ebdc37d6f5846f5fbea94d9d20192c3f57741f6d90782417d57086bce0e3334c7db684dd763734634fefa
7
- data.tar.gz: 17fa2d88e2e0f7bb8db135c698ee505b3a26083c1f65b82f2010cac940e5a88ec38a1c9777ff4d89c609de4379e0aedb054c938a9bf4bb8d79d5f4e03edd38db
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}?storagePrefix=#{opts[:storage_prefix]}&id=#{opts[:id]}",payload: opts[:data], read_timeout: opts[:read_timeout] || 1, open_timeout: opts[:open_timeout] || 1)
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}?storagePrefix=#{opts[:storage_prefix]}&offset=#{opts[:offset]}", read_timeout: opts[:read_timeout] || 1, open_timeout: opts[:open_timeout] || 1)
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}?storagePrefix=#{opts[:storage_prefix]}", payload: opts[:offsets].pack("q<*"), read_timeout: opts[:read_timeout] || 1, open_timeout: opts[:open_timeout] || 1).body
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
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.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Borislav Nikolov