gifnoc 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6f4495a415fb5e8ccaf6373b03b938995d308eddcd1f8ce8f4e9e6367ea62fa8
4
- data.tar.gz: 3cffaba84c2a9765370bdf5fce7f33f426c2858d6f84358dd9c11cd77fb8fa38
3
+ metadata.gz: 3a40d815b3b7e651d081e35a06e73042991e9881e6ea111d0b4dd70b0e8bcb2d
4
+ data.tar.gz: 2850e9c69461680b2faacb11c66cd20ce0ec797a8342326bf5e22c50e2f9d32c
5
5
  SHA512:
6
- metadata.gz: 0d5f9c0f8b7b5570311f30b7d22748a51bd3dc766858d25011e80a8a6d86cf7d3793566dc086bb8c11fe383182950c8cc72cfe6f0122e0292beced067f13f201
7
- data.tar.gz: 0c30ac0e382e75b0cf0fcc1e951dd0e27cc7817c2bd751014cb8cc2fa65230c703444a428fd5322e9e7bbd09997650f66a01c3fcd1906d8e3d318bb47118e997
6
+ metadata.gz: 52ae57b3e75734b6fb497755439a08e90a6430a5d92faaed79e5b0af26dcc242c645cb178e7ae0eafcd37b2f64b8c0bbe095ecdb61f8f17a19d2aa53ff46b605
7
+ data.tar.gz: 6714dc88b0eade48015d330cc14775d088e07c72c412086e493f4c25a49fcca66681b9fc88ed550f82f1a8d07cb6287bf970e53429b572a7f1e6314b6f2b0e2f
data/CHANGELOG CHANGED
@@ -1,2 +1,4 @@
1
1
  2018-11-22 v0.0.1
2
2
  - Initial Release
3
+ 2018-11-27 v0.0.2
4
+ - URL encode the record key when it's part of the API URL
@@ -1,3 +1,5 @@
1
+ require "uri"
2
+
1
3
  module Gifnoc
2
4
  module RecordAPIMethods
3
5
 
@@ -9,7 +11,7 @@ module Gifnoc
9
11
 
10
12
  def get_record(namespace_uuid, record_key)
11
13
  return with_response_handling do
12
- self.class.get("/namespaces/#{namespace_uuid}/records/#{record_key}", @options)
14
+ self.class.get("/namespaces/#{namespace_uuid}/records/#{URI.escape(record_key)}", @options)
13
15
  end
14
16
  end
15
17
 
@@ -25,13 +27,13 @@ module Gifnoc
25
27
  options = {body: record_hash.to_json}
26
28
  options = options.merge(@options)
27
29
  return with_response_handling do
28
- self.class.put("/namespaces/#{namespace_uuid}/records/#{record_key}", options)
30
+ self.class.put("/namespaces/#{namespace_uuid}/records/#{URI.escape(record_key)}", options)
29
31
  end
30
32
  end
31
33
 
32
34
  def delete_record(namespace_uuid, record_key)
33
35
  return with_response_handling do
34
- self.class.delete("/namespaces/#{namespace_uuid}/records/#{record_key}", @options)
36
+ self.class.delete("/namespaces/#{namespace_uuid}/records/#{URI.escape(record_key)}", @options)
35
37
  end
36
38
  end
37
39
 
@@ -1,3 +1,3 @@
1
1
  module Gifnoc
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gifnoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cloud 66
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-22 00:00:00.000000000 Z
11
+ date: 2018-11-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -206,7 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
206
206
  version: '0'
207
207
  requirements: []
208
208
  rubyforge_project:
209
- rubygems_version: 2.7.7
209
+ rubygems_version: 2.7.6
210
210
  signing_key:
211
211
  specification_version: 4
212
212
  summary: A Ruby Gifnoc client implementation