dogapi 1.16.0 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/dogapi.gemspec +1 -1
- data/lib/dogapi/common.rb +4 -4
- data/lib/dogapi/event.rb +1 -1
- data/lib/dogapi/metric.rb +1 -1
- data/lib/dogapi/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be1e947eab5207067682560c93fabcc7d9779b99
|
4
|
+
data.tar.gz: 26b9e3109d438f8462d18d5200afa3890ddf0649
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5057de8aa09b993a458580d79a6677e854cedf2838b7890268ff51baa2f9fd2ef49d67a6181a0c9015a48de58496496b7b3e0be2cff69a7a84ff234774992e6e
|
7
|
+
data.tar.gz: 57de459aaa7d3a09f73bc9a9515ab12be75a865ee3690217faef11f6af6ace12e3422f9f5c2d2713d0e5b8032b8b43794276475e6b8b2c1d6eb8cba3265e41e9
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
Changes
|
2
2
|
=======
|
3
|
+
# 1.17.0 / 2015-03-26
|
4
|
+
* Use MultiJSON for JSON handling. (thanks [@winebarrel][] [#64][])
|
5
|
+
|
3
6
|
# 1.16.0 / 2015-03-06
|
4
7
|
* Return response from API when metrics are sent as a batch. (thanks [@yyuu][] [#62](https://github.com/DataDog/dogapi-rb/pull/62))
|
5
8
|
|
@@ -118,10 +121,12 @@ Changes
|
|
118
121
|
[#60]: https://github.com/DataDog/dogapi-rb/issues/60
|
119
122
|
[#61]: https://github.com/DataDog/dogapi-rb/issues/61
|
120
123
|
[#62]: https://github.com/DataDog/dogapi-rb/issues/62
|
124
|
+
[#64]: https://github.com/DataDog/dogapi-rb/issues/64
|
121
125
|
[@ArjenSchwarz]: https://github.com/ArjenSchwarz
|
122
126
|
[@Kaixiang]: https://github.com/Kaixiang
|
123
127
|
[@ansel1]: https://github.com/ansel1
|
124
128
|
[@arielo]: https://github.com/arielo
|
125
129
|
[@byroot]: https://github.com/byroot
|
126
130
|
[@treeder]: https://github.com/treeder
|
127
|
-
[@
|
131
|
+
[@winebarrel]: https://github.com/winebarrel
|
132
|
+
[@yyuu]: https://github.com/yyuu
|
data/dogapi.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
'--main' << 'README.rdoc' <<
|
25
25
|
'--line-numbers' << '--inline-source'
|
26
26
|
|
27
|
-
spec.add_dependency '
|
27
|
+
spec.add_dependency 'multi_json'
|
28
28
|
|
29
29
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
30
30
|
spec.add_development_dependency 'rake', '~> 10'
|
data/lib/dogapi/common.rb
CHANGED
@@ -5,7 +5,7 @@ require 'socket'
|
|
5
5
|
require 'uri'
|
6
6
|
|
7
7
|
require 'rubygems'
|
8
|
-
require '
|
8
|
+
require 'multi_json'
|
9
9
|
|
10
10
|
module Dogapi
|
11
11
|
|
@@ -52,7 +52,7 @@ module Dogapi
|
|
52
52
|
req.set_form_data params
|
53
53
|
resp = conn.request(req)
|
54
54
|
begin
|
55
|
-
resp_obj =
|
55
|
+
resp_obj = MultiJson.load(resp.body)
|
56
56
|
rescue
|
57
57
|
raise 'Invalid JSON Response: ' + resp.body
|
58
58
|
end
|
@@ -128,7 +128,7 @@ module Dogapi
|
|
128
128
|
|
129
129
|
if send_json
|
130
130
|
req.content_type = 'application/json'
|
131
|
-
req.body =
|
131
|
+
req.body = MultiJson.dump(body)
|
132
132
|
end
|
133
133
|
|
134
134
|
resp = conn.request(req)
|
@@ -136,7 +136,7 @@ module Dogapi
|
|
136
136
|
|
137
137
|
if resp.code != 204 and resp.body != '' and resp.body != 'null' and resp.body != nil
|
138
138
|
begin
|
139
|
-
resp_obj =
|
139
|
+
resp_obj = MultiJson.load(resp.body)
|
140
140
|
rescue
|
141
141
|
raise 'Invalid JSON Response: ' + resp.body
|
142
142
|
end
|
data/lib/dogapi/event.rb
CHANGED
data/lib/dogapi/metric.rb
CHANGED
data/lib/dogapi/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dogapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: multi_json
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|