runscope_statuspage 0.1.0 → 0.1.1
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f623754ab2431efc77d3156586e9428bf9c6a041
|
4
|
+
data.tar.gz: da38e4e14eb39dd622305ace009acbc4a28e32cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1645d2e82c35118601ed59b537a23245f8588b5a21ab78d95a01a6d2c882b364aad105ab1e8b9c681876d9b135a73b32785a8b8bcf3e25e519b19627ba00e227
|
7
|
+
data.tar.gz: 00a5dab51f9214dedd4a334b6963b1db76e2f8ac0eb4a8d6cdcdbf885e45d08f1b72b66020c74656803aa239cff06fd2312252b3baaccd0a23c3986c1baf8fe7
|
@@ -9,25 +9,25 @@ module RunscopeStatuspage
|
|
9
9
|
|
10
10
|
# Set credentials
|
11
11
|
def initialize(token)
|
12
|
-
@options = { headers: {
|
12
|
+
@options = { headers: {"Authorization" => "OAuth #{token}"} }
|
13
13
|
end
|
14
14
|
|
15
15
|
# Create incident
|
16
16
|
def create_realtime_incident(page, name, msg, status, twitter)
|
17
|
-
self.class.post("/pages/#{page}/incidents.json", @options.merge!(body: {
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
17
|
+
self.class.post("/pages/#{page}/incidents.json", @options.merge!(body: {"incident" => {
|
18
|
+
"name" => name,
|
19
|
+
"message" => msg,
|
20
|
+
"status" => status.nil? ? 'investigating' : status,
|
21
|
+
"wants_twitter_update" => twitter
|
22
22
|
}}))
|
23
23
|
end
|
24
24
|
|
25
25
|
# Publish data for a custom page metric
|
26
26
|
def push_metric_data(page_id, metric_id, data, timestamp)
|
27
|
-
self.class.post("/pages/#{page_id}/metrics/#{metric_id}/data.json", @options.merge!(data: {
|
28
|
-
|
29
|
-
|
30
|
-
}}))
|
27
|
+
self.class.post("/pages/#{page_id}/metrics/#{metric_id}/data.json", @options.merge!(data: {"data" => {
|
28
|
+
"value" => data,
|
29
|
+
"timestamp" => timestamp
|
30
|
+
}}))
|
31
31
|
end
|
32
32
|
|
33
33
|
# Delete all data for a custom page metric
|
data/runscope_statuspage.gemspec
CHANGED
@@ -8,6 +8,8 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.version = RunscopeStatuspage::VERSION
|
9
9
|
spec.authors = ['David Stancu']
|
10
10
|
spec.email = ['dstancu@nyu.edu']
|
11
|
+
|
12
|
+
|
11
13
|
spec.summary = 'Push RunScope data to StatusPage.io'
|
12
14
|
spec.description = 'Get test data from RunScope and easily report incidents to StatusPage.io, all with one gem.'
|
13
15
|
spec.homepage = 'https://github.com/mach-kernel/runscope_statuspage'
|