uptimerobot 0.1.1 → 0.1.2
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 +4 -4
- data/README.md +4 -4
- data/lib/uptimerobot/client.rb +1 -1
- data/lib/uptimerobot/version.rb +1 -1
- data/spec/spec_helper.rb +4 -2
- data/spec/uptimerobot_spec.rb +8 -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: 006ec7202822a33f9317f61b64d60b7140ff00f5
|
4
|
+
data.tar.gz: 65078bd836e6a1ebf9785bd963393ce69fb9a244
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: da1b503a92834da031af255877d716e145e96206a07814294e09d1c0d40036cb58df31dd5133a4f25cf9782d52e5096c0fe4da398bfdbb43ca95e5af74ae950b
|
7
|
+
data.tar.gz: 411656731c19126fe966e0fe3ce0f0fedb34226c67794ac22f8c532225bb4fe422a1f97a737248b9929020b66967881421172975f88f76d1d381cb8a781c0524
|
data/README.md
CHANGED
@@ -43,10 +43,10 @@ client.getMonitors
|
|
43
43
|
# ...
|
44
44
|
|
45
45
|
client.newMonitor(
|
46
|
-
:
|
47
|
-
:
|
48
|
-
:
|
49
|
-
:
|
46
|
+
monitorFriendlyName: 'Google',
|
47
|
+
monitorURL: 'http://www.google.com',
|
48
|
+
monitorType: UptimeRobot::Monitor::Type::HTTP,
|
49
|
+
monitorAlertContacts: '448,716'
|
50
50
|
)
|
51
51
|
```
|
52
52
|
|
data/lib/uptimerobot/client.rb
CHANGED
data/lib/uptimerobot/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -6,10 +6,12 @@ DEFAULT_PARAMS = {
|
|
6
6
|
'noJsonCallback' => '1'
|
7
7
|
}
|
8
8
|
|
9
|
-
def uptime_robot
|
9
|
+
def uptime_robot(options = {})
|
10
|
+
options = {apiKey: 'ZAPZAPZAP'}.merge(options)
|
11
|
+
|
10
12
|
stubs = Faraday::Adapter::Test::Stubs.new
|
11
13
|
|
12
|
-
described_class.new(
|
14
|
+
described_class.new(options) do |faraday|
|
13
15
|
faraday.adapter :test, stubs do |stub|
|
14
16
|
yield(stub)
|
15
17
|
end
|
data/spec/uptimerobot_spec.rb
CHANGED
@@ -320,4 +320,12 @@ describe UptimeRobot::Client do
|
|
320
320
|
}.to raise_error(ArgumentError, 'invalid argument: [0]')
|
321
321
|
end
|
322
322
|
end
|
323
|
+
|
324
|
+
context 'when apiKey is not passed' do
|
325
|
+
it do
|
326
|
+
expect {
|
327
|
+
uptime_robot(:apiKey => nil)
|
328
|
+
}.to raise_error(ArgumentError, ':apiKey is required')
|
329
|
+
end
|
330
|
+
end
|
323
331
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: uptimerobot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sugawara
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|