diplomat 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/diplomat/kv.rb +2 -1
- data/lib/diplomat/version.rb +1 -1
- data/spec/kv_spec.rb +2 -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: 70c59982d74727130664179412103cd60dbf48ab
|
4
|
+
data.tar.gz: e764efca5b3223cbae1f0204ce5740609362760b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86c72024cff3813b8d6ab0395f6774dda7d2148d5f940c44dcff501351d411c3512c217a566d841a47a9b8f3443a15580b92f111a531915b534b7fe380f666e0
|
7
|
+
data.tar.gz: 75171d8b9ee806a6d5cd2f0d8af2603b58d963e603ee4773c0238a28f36a225bea8f7858c868219ed5633ac1dcfd45c92ff8788a2b12be8fb83eaade42eadd50
|
data/lib/diplomat/kv.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'base64'
|
2
2
|
require 'faraday'
|
3
|
+
require 'pry'
|
3
4
|
|
4
5
|
module Diplomat
|
5
6
|
class Kv < Diplomat::RestClient
|
@@ -25,7 +26,7 @@ module Diplomat
|
|
25
26
|
req.url "/v1/kv/#{key}"
|
26
27
|
req.body = value
|
27
28
|
end
|
28
|
-
if @raw.body == "true"
|
29
|
+
if @raw.body == "true\n"
|
29
30
|
@key = key
|
30
31
|
@value = value
|
31
32
|
end
|
data/lib/diplomat/version.rb
CHANGED
data/spec/kv_spec.rb
CHANGED
@@ -34,7 +34,7 @@ describe Diplomat::Kv do
|
|
34
34
|
}])
|
35
35
|
|
36
36
|
faraday.stub(:get).and_return(OpenStruct.new({ body: json }))
|
37
|
-
faraday.stub(:put).and_return(OpenStruct.new({ body: "true"}))
|
37
|
+
faraday.stub(:put).and_return(OpenStruct.new({ body: "true\n"}))
|
38
38
|
kv = Diplomat::Kv.new(faraday)
|
39
39
|
|
40
40
|
expect(kv.put(key, key_params)).to eq(key_params)
|
@@ -48,7 +48,7 @@ describe Diplomat::Kv do
|
|
48
48
|
}])
|
49
49
|
|
50
50
|
faraday.stub(:get).and_return(OpenStruct.new({ body: json }))
|
51
|
-
faraday.stub(:put).and_return(OpenStruct.new({ body: "true"}))
|
51
|
+
faraday.stub(:put).and_return(OpenStruct.new({ body: "true\n"}))
|
52
52
|
kv = Diplomat::Kv.new(faraday)
|
53
53
|
|
54
54
|
expect(kv.put("toast/#{key}", key_params)).to eq(key_params)
|