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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 66fc4f90a580d921f2ccf33198de4a56e535a1bb
4
- data.tar.gz: c8b2c3ac8a1f17a9313ad4b2e058b64825fb1a74
3
+ metadata.gz: 0efbe8c896f144e98aba3dab86d303598860754a
4
+ data.tar.gz: a8e38a24411ca2819c8c24e16807b598efc4e5ed
5
5
  SHA512:
6
- metadata.gz: 06318c62b1c8d73a08a89b3c9606a19df6b11430cbbda104f05b8e4ce5f9ab71d2377deb82cb6a2357d1fc68db24ffc336bc6839c21979ffbf757498add34552
7
- data.tar.gz: a56512e5daf6733ee8580f81c587beaf7b17aaed36b97692bc81dafb6ed9efe1552143c8f5a78e038208fe0d5293350e2124e70a2eceaebc781f69fca3f0a562
6
+ metadata.gz: 3250356169dc02257781ca28d3cd0dcfb700b19da21a30c1a6548a21ae81f0fbc9a65b11f3773d824afb26da995eb9890760f412d70a473be701533abae76ebd
7
+ data.tar.gz: 4271de4e6e6e2d6eef7c90767e6396cb0c23069e45d4ff612c4a69b20d01f96aef650871b5b5bca0e89173568a02f55c185027a2f9ec446eedd8b5b21f08130f
@@ -1,4 +1,4 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.1
4
- before_install: gem install bundler -v 1.10.6
3
+ - 2.2
4
+ before_install: gem install bundler -v 1.10
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).
@@ -16,9 +16,12 @@ class Cronitor
16
16
  @opts = opts
17
17
  @code = code
18
18
 
19
- # TODO Update this to allow for tokenless usage w/ a code for an already
20
- # created monitor
21
- fail Cronitor::Error, 'Missing Cronitor API token' if token.nil?
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
@@ -1,3 +1,3 @@
1
1
  class Cronitor
2
- VERSION = '0.2.0'
2
+ VERSION = '0.3.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cronitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Byrnes