dogapi 1.18.0 → 1.19.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 +49 -45
- data/lib/dogapi/facade.rb +4 -0
- data/lib/dogapi/v1/screenboard.rb +13 -0
- data/lib/dogapi/version.rb +1 -1
- data/tests/test_monitors.rb +2 -1
- data/tests/test_screenboard.rb +13 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de64563ab5144d6702205f3880a060f67df51241
|
4
|
+
data.tar.gz: f05d0e0f8ee326fa9d894ca79dccc7b60de1a936
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5b4ab9bf5dff9e693be19c9c06e3d4e73650565f79eda03241415d10173df6002ca907ce0a5f8f3ec3101a0ca543f04bb7b311efefebef5d94b586aa912f9769
|
7
|
+
data.tar.gz: 9863d208e81b87f6fa0f353126253c4d0fe2c1ec6d0b6ff13d6308e5ed4bab1ed8c53027e6f19adac7d9a1107c95b1d1b3636728a3cd8dcd4a4a20351937e269
|
data/CHANGELOG.md
CHANGED
@@ -1,113 +1,116 @@
|
|
1
1
|
Changes
|
2
2
|
=======
|
3
3
|
|
4
|
+
# 1.19.0 / 2015-06-22
|
5
|
+
* [FEATURE] Revoke a shared a Screenboard. See [#69][]
|
6
|
+
|
4
7
|
# 1.18.0 / 2015-06-01
|
5
|
-
* Add support for host muting.
|
8
|
+
* [FEATURE] Add support for host muting.
|
6
9
|
|
7
10
|
# 1.17.0 / 2015-03-26
|
8
|
-
* Use MultiJSON for JSON handling. (thanks [@winebarrel][] [#64][])
|
11
|
+
* [IMPROVEMENT] Use MultiJSON for JSON handling. (thanks [@winebarrel][] [#64][])
|
9
12
|
|
10
13
|
# 1.16.0 / 2015-03-06
|
11
|
-
* Return response from API when metrics are sent as a batch. (thanks [@yyuu][] [#62](https://github.com/DataDog/dogapi-rb/pull/62))
|
14
|
+
* [IMPROVEMENT] Return response from API when metrics are sent as a batch. (thanks [@yyuu][] [#62](https://github.com/DataDog/dogapi-rb/pull/62))
|
12
15
|
|
13
16
|
# 1.15.0 / 2015-02-03
|
14
|
-
*
|
15
|
-
*
|
17
|
+
* [BUGFIX] Add open_timeout to avoid stuck HTTP calls (thanks [@Kaixiang][] [#55](https://github.com/DataDog/dogapi-rb/pull/55))
|
18
|
+
* [BUGFIX] Encode capistrano output messages to UTF-8 before manipulating them. (thanks [@byroot][] [#52](https://github.com/DataDog/dogapi-rb/pull/52))
|
16
19
|
|
17
20
|
# 1.14.0 / 2015-01-09
|
18
|
-
* Add get_all_screenboards [#61](https://github.com/DataDog/dogapi-rb/pull/61)
|
19
|
-
* Remove required start argument from schedule_downtime [#60](https://github.com/DataDog/dogapi-rb/pull/60)
|
21
|
+
* [FEATURE] Add get_all_screenboards [#61](https://github.com/DataDog/dogapi-rb/pull/61)
|
22
|
+
* [IMPROVEMENT] Remove required start argument from schedule_downtime [#60](https://github.com/DataDog/dogapi-rb/pull/60)
|
20
23
|
|
21
24
|
# 1.13.0 / 2014-12-10
|
22
|
-
* Add tag filter to get_all_monitors [#58](https://github.com/DataDog/dogapi-rb/pull/58)
|
23
|
-
* Add update downtime method [#59](https://github.com/DataDog/dogapi-rb/pull/59)
|
25
|
+
* [FEATURE] Add tag filter to get_all_monitors [#58](https://github.com/DataDog/dogapi-rb/pull/58)
|
26
|
+
* [FEATURE] Add update downtime method [#59](https://github.com/DataDog/dogapi-rb/pull/59)
|
24
27
|
|
25
28
|
# 1.12.0 / 2014-11-17
|
26
|
-
* Add support for the Monitor API [#51](https://github.com/DataDog/dogapi-rb/pull/51)
|
27
|
-
* Truncate event title and text before submission [#53](https://github.com/DataDog/dogapi-rb/pull/53)
|
29
|
+
* [FEATURE] Add support for the Monitor API [#51](https://github.com/DataDog/dogapi-rb/pull/51)
|
30
|
+
* [IMPROVEMENT] Truncate event title and text before submission [#53](https://github.com/DataDog/dogapi-rb/pull/53)
|
28
31
|
|
29
32
|
# 1.11.0 / 2014-07-03
|
30
|
-
*
|
31
|
-
*
|
33
|
+
* [IMPROVEMENT] Add support for HTTP proxy defined by the environment variables
|
34
|
+
* [IMPROVEMENT] Allow to send several metrics in the same HTTP request
|
32
35
|
|
33
36
|
# 1.10.0 / 2014-05-13
|
34
|
-
*
|
35
|
-
*
|
36
|
-
* Report application name when deploy with Capistrano (thanks [@ArjenSchwarz][] [#46](https://github.com/DataDog/dogapi-rb/pull/46))
|
37
|
+
* [IMPROVEMENT] Make HTTP timeout configurable ([#29](https://github.com/DataDog/dogapi-rb/issues/29))
|
38
|
+
* [IMPROVEMENT] Re-enable SSL verification ([#37](https://github.com/DataDog/dogapi-rb/issues/37))
|
39
|
+
* [IMPROVEMENT] Report application name when deploy with Capistrano (thanks [@ArjenSchwarz][] [#46](https://github.com/DataDog/dogapi-rb/pull/46))
|
37
40
|
|
38
41
|
# 1.9.2 / 2014-02-13
|
39
|
-
* Fully support for capistrano v3 ([#43](https://github.com/DataDog/dogapi-rb/pull/43))
|
40
|
-
* Strip control characters from capistrano messages ([#36](https://github.com/DataDog/dogapi-rb/issues/36))
|
41
|
-
* Tag capistrano events by stage (thanks [@arielo][] [#25](https://github.com/DataDog/dogapi-rb/pull/25))
|
42
|
+
* [IMPROVEMENT] Fully support for capistrano v3 ([#43](https://github.com/DataDog/dogapi-rb/pull/43))
|
43
|
+
* [IMPROVEMENT] Strip control characters from capistrano messages ([#36](https://github.com/DataDog/dogapi-rb/issues/36))
|
44
|
+
* [IMPROVEMENT] Tag capistrano events by stage (thanks [@arielo][] [#25](https://github.com/DataDog/dogapi-rb/pull/25))
|
42
45
|
|
43
46
|
# 1.9.1 / 2014-01-06
|
44
|
-
* Log a warning instead of crashing when trying to integration with capistrano v3
|
47
|
+
* [IMPROVEMENT] Log a warning instead of crashing when trying to integration with capistrano v3
|
45
48
|
|
46
49
|
# 1.9.0 / 2013-09-06
|
47
|
-
* When emitting a metric without an explicit host, default to local hostname.
|
50
|
+
* [IMPROVEMENT] When emitting a metric without an explicit host, default to local hostname.
|
48
51
|
|
49
52
|
# 1.8.1 / 2013-08-22
|
50
|
-
* Update Dash API to support template variables.
|
53
|
+
* [FEATURE] Update Dash API to support template variables.
|
51
54
|
|
52
55
|
# 1.8.0 / 2013-07-16
|
53
|
-
* Add an API for interacting with Screenboards
|
56
|
+
* [FEATURE] Add an API for interacting with Screenboards
|
54
57
|
|
55
58
|
# 1.7.1 / 2013-06-23
|
56
|
-
*
|
57
|
-
* Add an API for
|
58
|
-
*
|
59
|
+
* [BUGFIX] Fix bug in capistrano integration with logging of nil (thanks [@arielo][])
|
60
|
+
* [FEATURE] Add an API for inviting users
|
61
|
+
* [FEATURE] Add an API for taking graph snapshots
|
59
62
|
|
60
63
|
# 1.7.0
|
61
64
|
* Not released.
|
62
65
|
|
63
66
|
# 1.6.0 / 2013-02-19
|
64
|
-
* Support for setting `source` type when submitting host tags
|
67
|
+
* [FEATURE] Support for setting `source` type when submitting host tags
|
65
68
|
|
66
69
|
# 1.5.2 / 2013-02-13
|
67
|
-
* Fix a bug in hashing the Event object when the instance variables are symbols.
|
70
|
+
* [BUGFIX] Fix a bug in hashing the Event object when the instance variables are symbols.
|
68
71
|
|
69
72
|
# 1.5.0 / 2012-11-06
|
70
|
-
* Alerting API
|
73
|
+
* [FEATURE] Alerting API
|
71
74
|
|
72
75
|
# 1.4.3
|
73
|
-
* Fix bug with capistrano integration for capistrano 2.13.5 (thanks [@ansel1][])
|
76
|
+
* [BUGFIX] Fix bug with capistrano integration for capistrano 2.13.5 (thanks [@ansel1][])
|
74
77
|
|
75
78
|
# 1.4.2
|
76
|
-
* Added missing dashboards endpoint.
|
79
|
+
* [BUGFIX] Added missing dashboards endpoint.
|
77
80
|
|
78
81
|
# 1.4.1
|
79
|
-
* Fixed searching for events with tags.
|
82
|
+
* [BUGFIX] Fixed searching for events with tags.
|
80
83
|
|
81
84
|
# 1.4.0
|
82
|
-
* Added support for the dashboard, search and comment API endpoints.
|
85
|
+
* [FEATURE] Added support for the dashboard, search and comment API endpoints.
|
83
86
|
|
84
87
|
# 1.3.6
|
85
|
-
* Small fix for capistrano integration
|
88
|
+
* [BUGFIX] Small fix for capistrano integration
|
86
89
|
|
87
90
|
# 1.3.4
|
88
|
-
* Various bug fixes (event.to_hash, md5 import, capistrano lambda roles)
|
91
|
+
* [BUGFIX] Various bug fixes (event.to_hash, md5 import, capistrano lambda roles)
|
89
92
|
|
90
93
|
# 1.3.3
|
91
|
-
* Bug fix for submitting counters
|
94
|
+
* [BUGFIX] Bug fix for submitting counters
|
92
95
|
|
93
96
|
# 1.3.2
|
94
|
-
* Support an aggregation key to aggregate events together
|
97
|
+
* [IMPROVEMENT] Support an aggregation key to aggregate events together
|
95
98
|
|
96
99
|
# 1.3.1
|
97
|
-
* Metrics can be counters, rather than just gauges (thanks to [@treeder][])
|
98
|
-
* Metrics can be tagged.
|
100
|
+
* [FEATURE] Metrics can be counters, rather than just gauges (thanks to [@treeder][])
|
101
|
+
* [FEATURE] Metrics can be tagged.
|
99
102
|
|
100
103
|
# 1.3.0
|
101
|
-
* Capistrano integration. See https://github.com/DataDog/dogapi-rb/tree/master/lib/capistrano
|
104
|
+
* [FEATURE] Capistrano integration. See https://github.com/DataDog/dogapi-rb/tree/master/lib/capistrano
|
102
105
|
|
103
106
|
# 1.2.x
|
104
|
-
* You can now manage host tags
|
105
|
-
*
|
106
|
-
*
|
107
|
-
*
|
107
|
+
* [FEATURE] You can now manage host tags
|
108
|
+
* [IMPROVEMENT] Functionality relating to events with a duration has been deprecated
|
109
|
+
* [IMPROVEMENT] The underlying clients have been updated to use Datadog's new public HTTP API[https://github.com/DataDog/dogapi/wiki]
|
110
|
+
* [IMPROVEMENT] You can now get event details and query the stream in addition to posting events
|
108
111
|
|
109
112
|
# 1.1.x
|
110
|
-
* You do not need to use environment variables anymore to use the client.
|
113
|
+
* [IMPROVEMENT] You do not need to use environment variables anymore to use the client.
|
111
114
|
|
112
115
|
<!--- The following link definition list is generated by PimpMyChangelog --->
|
113
116
|
[#25]: https://github.com/DataDog/dogapi-rb/issues/25
|
@@ -126,6 +129,7 @@ Changes
|
|
126
129
|
[#61]: https://github.com/DataDog/dogapi-rb/issues/61
|
127
130
|
[#62]: https://github.com/DataDog/dogapi-rb/issues/62
|
128
131
|
[#64]: https://github.com/DataDog/dogapi-rb/issues/64
|
132
|
+
[#69]: https://github.com/DataDog/dogapi-rb/issues/69
|
129
133
|
[@ArjenSchwarz]: https://github.com/ArjenSchwarz
|
130
134
|
[@Kaixiang]: https://github.com/Kaixiang
|
131
135
|
[@ansel1]: https://github.com/ansel1
|
data/lib/dogapi/facade.rb
CHANGED
@@ -91,6 +91,19 @@ module Dogapi
|
|
91
91
|
end
|
92
92
|
end
|
93
93
|
|
94
|
+
def revoke_screenboard(board_id)
|
95
|
+
begin
|
96
|
+
params = {
|
97
|
+
:api_key => @api_key,
|
98
|
+
:application_key => @application_key
|
99
|
+
}
|
100
|
+
|
101
|
+
request(Net::HTTP::Delete, "/api/#{API_VERSION}/screen/share/#{board_id}", params, nil, false)
|
102
|
+
rescue Exception => e
|
103
|
+
suppress_error_if_silent e
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
94
107
|
end
|
95
108
|
|
96
109
|
end
|
data/lib/dogapi/version.rb
CHANGED
data/tests/test_monitors.rb
CHANGED
data/tests/test_screenboard.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'dogapi'
|
2
2
|
require 'time'
|
3
3
|
require 'test_base.rb'
|
4
|
+
require 'open-uri'
|
4
5
|
|
5
6
|
class TestScreenboard < Test::Unit::TestCase
|
6
7
|
include TestBase
|
@@ -66,6 +67,18 @@ class TestScreenboard < Test::Unit::TestCase
|
|
66
67
|
assert_equal status, "200", "invalid HTTP response => #{status}"
|
67
68
|
assert share_result["board_id"] == result["id"]
|
68
69
|
|
70
|
+
open(share_result["public_url"]) do |f|
|
71
|
+
assert_equal f.status.first, "200", "invalid HTTP response => #{status}"
|
72
|
+
end
|
73
|
+
|
74
|
+
status, revoke_result = dog.revoke_screenboard(result["id"])
|
75
|
+
assert_equal status, "200", "invalid HTTP response => #{status}"
|
76
|
+
|
77
|
+
ex = assert_raise OpenURI::HTTPError do
|
78
|
+
open(share_result["public_url"])
|
79
|
+
end
|
80
|
+
assert_equal ex.message, "404 Not Found"
|
81
|
+
|
69
82
|
status, del_result = dog.delete_screenboard(result["id"])
|
70
83
|
assert_equal status, "200", "invalid HTTP response => #{status}"
|
71
84
|
assert del_result["id"] == result["id"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dogapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.19.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-06-
|
11
|
+
date: 2015-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|