easymon 1.3 → 1.4

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of easymon might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 6d0e28f8e997050c2331556bc5590cc3bb6d5bea
4
- data.tar.gz: 252312ef1045ab3b6acdd7893628b676b631e304
2
+ SHA256:
3
+ metadata.gz: 995c7954f5c5d720f9840c0f93b1d673de2e6a6682c7a134336cac6d21f2a280
4
+ data.tar.gz: 7cbce9feb1e3a4f4fc7c661a5597314fb2107e3ac36d5ee84cfa2810c218dc75
5
5
  SHA512:
6
- metadata.gz: c6883cf5fb8c234f358b50253d5eb0f38ae8456112b15ef8d73ea8a4f880f17211642f5fc3ffdedfc25f800c5e747c187633dc9f08fe16cbc62da05d802072c7
7
- data.tar.gz: 06e78f0fc445aca9a0b671d3eb8aaedc5f5846c078dc00acf41c0c14acda2987763cc2e1b6c260b892e098378fae62e5ffacb16610e108fb2df6319192d3995f
6
+ metadata.gz: c805aec0b3a45ac5e289ffe5fe7f17e85abb250dbd31d09787e1e3912e11d4040a3a7aa9c04018fc8dfe4febc3e0aaeb638f4ef4e4a65eea8d0250d2fb60b090
7
+ data.tar.gz: 2763483c3faf6714ccfbc3ea055bb985a9ed0a125527e41ec9e72e25946a85979794590c6886fa42259c9e1fa6dbac99b441ac575ef89a3bfbebdf7c8d8372b0
data/README.md CHANGED
@@ -173,7 +173,7 @@ check = Easymon::SemaphoreCheck.new("config/redis.yml")
173
173
 
174
174
  This is mainly a check that gets subclassed by the next check.
175
175
 
176
- ###Traffic Enabled
176
+ ### Traffic Enabled
177
177
  `Easymon::TrafficEnabledCheck` is fairly specific, but when we want a server to
178
178
  accept traffic, we can place a file in the Rails.root, and the load balancers
179
179
  can use the result of this check to help decide whether or not to send traffic
@@ -184,7 +184,7 @@ Easymon::TrafficEnabledCheck.new("enable-traffic")
184
184
  ````
185
185
  This is a subclass of the Semaphore check mentioned above.
186
186
 
187
- ###Split ActiveRecord
187
+ ### Split ActiveRecord
188
188
  `Easymon::SplitActiveRecordCheck` is the most complicated check, as it's not
189
189
  something you can use out of the gate. Here we pass a block so we get a fresh
190
190
  instance of `ActiveRecord::Base` or whatever other class we might be using to
@@ -22,7 +22,7 @@ module Easymon
22
22
  def redis_up?
23
23
  redis = Redis.new(@config)
24
24
  reply = redis.ping == 'PONG'
25
- redis.client.disconnect
25
+ redis.close
26
26
  reply
27
27
  rescue
28
28
  false
@@ -1,3 +1,3 @@
1
1
  module Easymon
2
- VERSION = "1.3"
2
+ VERSION = "1.4"
3
3
  end
@@ -61,14 +61,14 @@ module Easymon
61
61
 
62
62
  test "show when the check passes" do
63
63
  Easymon::Repository.add("database", Easymon::ActiveRecordCheck.new(ActiveRecord::Base))
64
- get :show, check: "database"
64
+ get :show, :params => { check: "database" }
65
65
  assert_response :success
66
66
  assert response.body.include?("Up"), "Response should include message text, got #{response.body}"
67
67
  end
68
68
 
69
69
  test "show json when the check passes" do
70
70
  Easymon::Repository.add("database", Easymon::ActiveRecordCheck.new(ActiveRecord::Base))
71
- get :show, :check => "database", :format => :json
71
+ get :show, :params => { :check => "database", :format => :json }
72
72
 
73
73
  json = JSON.parse(response.body)
74
74
 
@@ -80,7 +80,7 @@ module Easymon
80
80
  Easymon::Repository.add("database", Easymon::ActiveRecordCheck.new(ActiveRecord::Base))
81
81
  ActiveRecord::Base.connection.stubs(:active?).raises("boom")
82
82
 
83
- get :show, :check => "database"
83
+ get :show, :params => { :check => "database" }
84
84
 
85
85
  assert_response :service_unavailable
86
86
  assert response.body.include?("Down"), "Response should include failure text, got #{response.body}"
@@ -89,7 +89,7 @@ module Easymon
89
89
  test "show if the check is not found" do
90
90
  Easymon::Repository.names.each {|name| Easymon::Repository.remove(name)}
91
91
 
92
- get :show, :check => "database"
92
+ get :show, :params => { :check => "database" }
93
93
  assert_response :not_found
94
94
  end
95
95
 
@@ -99,7 +99,7 @@ module Easymon
99
99
  get :index
100
100
  assert_response :forbidden
101
101
 
102
- get :show, :check => "database"
102
+ get :show, :params => { :check => "database" }
103
103
  assert_response :forbidden
104
104
  end
105
105
  end