dogapi 1.2.2 → 1.2.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.
data/README.rdoc CHANGED
@@ -1,4 +1,4 @@
1
- = Ruby client for Datadog API v1.2.1
1
+ = Ruby client for Datadog API v1.2.3
2
2
 
3
3
  The Ruby client is a library suitable for inclusion in existing Ruby projects or for development of standalone scripts. It provides an abstraction on top of Datadog's raw HTTP interface for reporting events and metrics.
4
4
 
data/lib/dogapi/common.rb CHANGED
@@ -91,6 +91,7 @@ module Dogapi
91
91
  session.verify_mode = OpenSSL::SSL::VERIFY_NONE
92
92
  end
93
93
  session.start do |conn|
94
+ conn.read_timeout = 5
94
95
  yield(conn)
95
96
  end
96
97
  end
data/lib/dogapi/facade.rb CHANGED
@@ -158,12 +158,18 @@ module Dogapi
158
158
  def update_tags(host_id, tags)
159
159
  @tag_svc.update(host_id, tags)
160
160
  end
161
-
161
+
162
+ # <b>DEPRECATED:</b> Spelling mistake temporarily preserved as an alias.
163
+ def detatch_tags(host_id)
164
+ warn "[DEPRECATION] Dogapi::Client.detatch() is deprecated. Use `detach` instead."
165
+ detach_tags(host_id)
166
+ end
167
+
162
168
  # Remove all tags from the given host
163
169
  #
164
170
  # +host_id+ can be the host's numeric id or string name
165
- def detatch_tags(host_id)
166
- @tag_svc.detatch(host_id)
171
+ def detach_tags(host_id)
172
+ @tag_svc.detach(host_id)
167
173
  end
168
174
 
169
175
  private
data/lib/dogapi/v1/tag.rb CHANGED
@@ -56,8 +56,14 @@ module Dogapi
56
56
  request(Net::HTTP::Put, '/api/' + API_VERSION + '/tags/hosts/' + host_id.to_s, params, body, true)
57
57
  end
58
58
 
59
- # Remove all tags from a host
59
+ # <b>DEPRECATED:</b> Spelling mistake temporarily preserved as an alias.
60
60
  def detatch(host_id)
61
+ warn "[DEPRECATION] Dogapi::V1::TagService.detatch() is deprecated. Use `detach` instead."
62
+ detach(host_id)
63
+ end
64
+
65
+ # Remove all tags from a host
66
+ def detach(host_id)
61
67
  params = {
62
68
  :api_key => @api_key,
63
69
  :application_key => @application_key
data/tests/tc_client.rb CHANGED
@@ -26,7 +26,7 @@ class TestClient < Test::Unit::TestCase
26
26
 
27
27
  dog.all_tags()
28
28
 
29
- dog.detatch_tags(hostname)
29
+ dog.detach_tags(hostname)
30
30
  code, resp = dog.host_tags(hostname)
31
31
  assert resp["tags"].size == 0
32
32
 
@@ -51,7 +51,7 @@ class TestClient < Test::Unit::TestCase
51
51
  assert new_tags.size == 1
52
52
  assert new_tags.include?('test.tag.4')
53
53
 
54
- dog.detatch_tags(hostname)
54
+ dog.detach_tags(hostname)
55
55
  code, resp = dog.host_tags(hostname)
56
56
  assert resp["tags"].size == 0
57
57
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dogapi
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 2
10
- version: 1.2.2
9
+ - 3
10
+ version: 1.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Datadog, Inc.
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-10-31 00:00:00 Z
18
+ date: 2011-11-03 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: json