circonus 1.0.5 → 1.0.6
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.
- data/lib/circonus.rb +4 -4
- metadata +2 -2
data/lib/circonus.rb
CHANGED
@@ -65,7 +65,7 @@ class Circonus
|
|
65
65
|
|
66
66
|
def get(method,id)
|
67
67
|
cid = id.to_s.split('/').last
|
68
|
-
url = @url_prefix + method + '/' + cid
|
68
|
+
url = @url_prefix + method + '/' + CGI.escape(cid)
|
69
69
|
#print "url=#{url}\n"
|
70
70
|
r,err = _rest('get',url, @headers)
|
71
71
|
return nil,err if r.nil?
|
@@ -74,7 +74,7 @@ class Circonus
|
|
74
74
|
|
75
75
|
def delete(method,id)
|
76
76
|
cid = id.to_s.split('/').last
|
77
|
-
url = @url_prefix + method + '/' + cid
|
77
|
+
url = @url_prefix + method + '/' + CGI.escape(cid)
|
78
78
|
r,err = _rest('delete',url, @headers)
|
79
79
|
return nil,err if r.nil?
|
80
80
|
return Yajl::Parser.parse(r)
|
@@ -88,7 +88,7 @@ class Circonus
|
|
88
88
|
|
89
89
|
def update(method,id,data)
|
90
90
|
cid = id.to_s.split('/').last
|
91
|
-
r, err = _rest('put',@url_prefix + method + '/' + cid, @headers, data)
|
91
|
+
r, err = _rest('put',@url_prefix + method + '/' + CGI.escape(cid), @headers, data)
|
92
92
|
return nil,err if r.nil?
|
93
93
|
return Yajl::Parser.parse(r)
|
94
94
|
end
|
@@ -167,7 +167,7 @@ class Circonus
|
|
167
167
|
params['end'] = Time.now.to_i unless params.has_key? 'end'
|
168
168
|
params['period'] = 300 unless params.has_key? 'period'
|
169
169
|
params['type'] = 'numeric' unless params.has_key? 'type'
|
170
|
-
url = @url_prefix + 'data' + '/' + cid.split('/').last + '_' + CGI::escape(metric)
|
170
|
+
url = @url_prefix + 'data' + '/' + CGI.escape(cid.split('/').last) + '_' + CGI::escape(metric)
|
171
171
|
#puts "url=#{url}" if @debug
|
172
172
|
headers = @headers.merge({:params => params})
|
173
173
|
r,err = _rest('get',url, headers)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: circonus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-09-
|
12
|
+
date: 2013-09-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|