cronitor 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -2
- data/README.md +3 -0
- data/lib/cronitor.rb +6 -3
- data/lib/cronitor/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0efbe8c896f144e98aba3dab86d303598860754a
|
4
|
+
data.tar.gz: a8e38a24411ca2819c8c24e16807b598efc4e5ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3250356169dc02257781ca28d3cd0dcfb700b19da21a30c1a6548a21ae81f0fbc9a65b11f3773d824afb26da995eb9890760f412d70a473be701533abae76ebd
|
7
|
+
data.tar.gz: 4271de4e6e6e2d6eef7c90767e6396cb0c23069e45d4ff612c4a69b20d01f96aef650871b5b5bca0e89173568a02f55c185027a2f9ec446eedd8b5b21f08130f
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
# Cronitor
|
2
2
|
|
3
|
+
[![Travis](https://img.shields.io/travis/evertrue/cronitor.svg)](https://github.com/evertrue/cronitor)
|
4
|
+
[![Gem Version](https://badge.fury.io/rb/cronitor.svg)](https://badge.fury.io/rb/cronitor)
|
5
|
+
|
3
6
|
[Cronitor](https://cronitor.io/) is a service for heartbeat-style monitoring of just about anything that can send an HTTP request.
|
4
7
|
|
5
8
|
This gem provides a simple abstraction for the creation and pinging of a Cronitor monitor. For a better understanding of the API this gem talks to, please see [How Cronitor Works](https://cronitor.io/help/how-cronitor-works).
|
data/lib/cronitor.rb
CHANGED
@@ -16,9 +16,12 @@ class Cronitor
|
|
16
16
|
@opts = opts
|
17
17
|
@code = code
|
18
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
if token.nil? && code.nil?
|
20
|
+
fail(
|
21
|
+
Cronitor::Error,
|
22
|
+
'Either a Cronitor API token or an existing monitor code must be ' \
|
23
|
+
'provided')
|
24
|
+
end
|
22
25
|
|
23
26
|
create if code.nil?
|
24
27
|
end
|
data/lib/cronitor/version.rb
CHANGED