updown 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/updown/call.rb +5 -1
- data/lib/updown/check.rb +4 -0
- data/lib/updown/version.rb +1 -1
- metadata +18 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae7726d29d3ab3d38259054cdab774e129640a24
|
4
|
+
data.tar.gz: c5ddc78ed903615481aad4d0fe8a1c306eebd6fd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d1b87d64a6190c1e29381ce067754cf47c377f1496c3ad9a3b631b257e8e3e538fd47ea2d69c023126dbd1238705de1d9c9a641a5440754e81c439afdb910a8
|
7
|
+
data.tar.gz: f968ad6072e94d9eb1f75f7a4cf1bbcd40768c9de21cb4892427fc56f096124a0481ec5c5c6850b99bbd0dcc2c7703b0aa1d43fb94f7b2971c38603433867357
|
data/README.md
CHANGED
@@ -40,6 +40,13 @@ Updown::Check.all
|
|
40
40
|
# => [<Updown::Check>, <Updown::Check>, … ]
|
41
41
|
```
|
42
42
|
|
43
|
+
Retrieve a specific check:
|
44
|
+
|
45
|
+
```ruby
|
46
|
+
Updown::Check.get check_token
|
47
|
+
# => <Updown::Check>
|
48
|
+
```
|
49
|
+
|
43
50
|
List downtimes for a specific check (paginated, 100 per call):
|
44
51
|
|
45
52
|
```ruby
|
data/lib/updown/call.rb
CHANGED
@@ -21,6 +21,10 @@ module Updown
|
|
21
21
|
process { Call.resource['checks'].post(attributes) }
|
22
22
|
end
|
23
23
|
|
24
|
+
def self.get_check(token, attributes={})
|
25
|
+
process { Call.resource["checks/#{token}"].get(attributes) }
|
26
|
+
end
|
27
|
+
|
24
28
|
def self.update_check(token, attributes={})
|
25
29
|
process { Call.resource["checks/#{token}"].put(attributes) }
|
26
30
|
end
|
@@ -37,4 +41,4 @@ module Updown
|
|
37
41
|
end
|
38
42
|
|
39
43
|
end
|
40
|
-
end
|
44
|
+
end
|
data/lib/updown/check.rb
CHANGED
@@ -14,6 +14,10 @@ module Updown
|
|
14
14
|
Check.new Updown::Call.create_check(attributes.merge(url: url))
|
15
15
|
end
|
16
16
|
|
17
|
+
def self.get(token, attributes = {})
|
18
|
+
Check.new Updown::Call.get_check(token, attributes)
|
19
|
+
end
|
20
|
+
|
17
21
|
def initialize(json)
|
18
22
|
@token = json['token']
|
19
23
|
@url = json['url']
|
data/lib/updown/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: updown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aske Hansen
|
@@ -9,90 +9,90 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2016-03-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - ~>
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: '1.7'
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - ~>
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: '1.7'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rake
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- - ~>
|
32
|
+
- - "~>"
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: '10.0'
|
35
35
|
type: :development
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- - ~>
|
39
|
+
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '10.0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: rest-client
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - ">="
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: thor
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: gem_config
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - ">="
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: colorize
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- -
|
95
|
+
- - ">="
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
description: A wrapper for the updown.io API
|
@@ -104,7 +104,7 @@ executables:
|
|
104
104
|
extensions: []
|
105
105
|
extra_rdoc_files: []
|
106
106
|
files:
|
107
|
-
- .gitignore
|
107
|
+
- ".gitignore"
|
108
108
|
- CHANGELOG.md
|
109
109
|
- Gemfile
|
110
110
|
- LICENSE.txt
|
@@ -128,17 +128,17 @@ require_paths:
|
|
128
128
|
- lib
|
129
129
|
required_ruby_version: !ruby/object:Gem::Requirement
|
130
130
|
requirements:
|
131
|
-
- -
|
131
|
+
- - ">="
|
132
132
|
- !ruby/object:Gem::Version
|
133
133
|
version: '0'
|
134
134
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- -
|
136
|
+
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
140
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.
|
141
|
+
rubygems_version: 2.5.1
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: updown.io API wrapper
|