cronitor 1.1.1 → 1.1.2

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: 2c4d6e86216ce953f1785789a31307f39b70fc27
4
- data.tar.gz: 1611b429956eb06d5cfa6ec35a824eede312fd66
3
+ metadata.gz: f7c630c9e75a3a005b00c6623e3727f76dbe0577
4
+ data.tar.gz: 0ca6517fb2fe4e56f4e53309a772e6713e5459f9
5
5
  SHA512:
6
- metadata.gz: c5c84f159a905fee122b521f2b57000e0f5fd90c35f66e673cf0cd91956f5491fc5e193a86ac834efa8d4c212986cf4351ccbe88b1dcec9ae5083de64c383dcb
7
- data.tar.gz: de8bcb6df31bfe8eed8207da872eb4090f0e918f18b67190ffc966f8eb56c8f8ed491acf220ce5dd2dbeacce84f80bfbc5d2f6950437453354d79366f91e1a49
6
+ metadata.gz: 6694d2e3b18dfedc2afe20bf10fd68166eb02943c650e9b08fa7049ee2ddd33228685218fc5157c05b227eab6e62ea437721aa1cc06411102a835e0f4de8270d
7
+ data.tar.gz: 00e23740317cc5f9f31b15843e557261211f012fa02727f6606202257fb80a13b9dbe016b783b85c9c3ae888100488a777140fab52d5cfb5211c18e12cd61495
@@ -16,7 +16,7 @@ class Cronitor
16
16
  @opts = opts
17
17
  @code = code
18
18
 
19
- if token.nil? && @code.nil?
19
+ if @token.nil? && @code.nil?
20
20
  fail(
21
21
  Cronitor::Error,
22
22
  'Either a Cronitor API token or an existing monitor code must be ' \
@@ -41,7 +41,7 @@ class Cronitor
41
41
 
42
42
  def exists?(name)
43
43
  response = Unirest.get(
44
- "#{API_URL}/monitors/#{URI.escape name}",
44
+ "#{API_URL}/monitors/#{URI.escape(name).gsub('[', '%5B').gsub(']', '%5D')}",
45
45
  auth: { user: token }
46
46
  )
47
47
  return false unless response.code == 200
@@ -1,3 +1,3 @@
1
1
  class Cronitor
2
- VERSION = '1.1.1'
2
+ VERSION = '1.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cronitor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Byrnes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-15 00:00:00.000000000 Z
11
+ date: 2015-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unirest