bluepill-gearman 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/Changelog.md CHANGED
@@ -1,2 +1,3 @@
1
- # v0.0.1
2
- * Initial release - no encryption - olny encoded64 jobs
1
+ # v1.0.1 - spec tests passing
2
+ # v1.0.0
3
+ * Initial release
data/Rakefile CHANGED
@@ -12,3 +12,6 @@ end
12
12
  YARD::Rake::YardocTask.new do |t|
13
13
  t.files = ['lib/**/*.rb']
14
14
  end
15
+
16
+ desc "Run Tests"
17
+ task :default => :test
@@ -1,5 +1,5 @@
1
1
  module Bluepill
2
2
  module Gearman
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
@@ -17,24 +17,25 @@ describe Bluepill::Gearman::SendGearman do
17
17
  it "should notify gearman_server of a critical error via send_gearman when a transition to down occurs" do
18
18
  process.expect(:name, 'my_process')
19
19
  transition = Minitest::Mock.new
20
- transition.expect(:to_name,:down)
21
- notifier.expects(:send_gearman).with({:gearman_server => ['remotehost:4730'], :host => 'localhost', :service => 'my_process', :return_code => 2, :status => "Bluepill reported process down at #{Time.now}"})
20
+ transition.expect(:to_name, :down)
21
+ notifier.expects(:send_gearman).with({:gearman_job_server => ['remotehost:4730'], :host => 'localhost', :service => 'my_process', :return_code => 2, :status => "Bluepill reported process down at #{Time.now}", :queue => 'check_results', :encryption => false, :key => '', :every => 1.minute})
22
22
  notifier.notify(transition)
23
23
  end
24
24
 
25
- # it "should notify gearman_server of a warning error via send_gearman when a transition to unmonitored occurs" do
26
- # process.expect(:name, 'my_process')
27
- # transition = Minitest::Mock.new
28
- # transition.expect(:to_name,:unmonitored)
29
- # notifier.expects(:send_gearman).with({:gearman_server => ['remotehost:4730'], :host => 'localhost', :service => 'my_process', :return_code => 1, :status => "Bluepill stopped monitoring at #{Time.now}"})
30
- # notifier.notify(transition)
31
- # end
25
+ it "should notify gearman_server of a warning error via send_gearman when a transition to unmonitored occurs" do
26
+ process.expect(:name, 'my_process')
27
+ transition = Minitest::Mock.new
28
+ transition.expect(:to_name,:unmonitored)
29
+ notifier.expects(:send_gearman).with({:gearman_job_server => ['remotehost:4730'], :host => 'localhost', :service => 'my_process', :return_code => 1, :status => "Bluepill stopped monitoring at #{Time.now}", :queue => 'check_results', :encryption => false, :key => '', :every => 1.minute})
30
+ notifier.notify(transition)
31
+ end
32
32
 
33
- # it "should notify gearman_server that everything is ok via send_gearman when a transition to up occurs" do
34
- # process.expect(:name, 'my_process')
35
- # transition = Minitest::Mock.new
36
- # transition.expect(:to_name,:up)
37
- # notifier.expects(:send_gearman).with({:gearman_server => ['remotehost:4730'], :host => 'localhost', :service => 'my_process', :return_code => 0, :status => "Running"})
38
- # notifier.notify(transition)
39
- # end
33
+ it "should notify gearman_server that everything is ok via send_gearman when a transition to up occurs" do
34
+ process.expect(:name, 'my_process')
35
+ transition = Minitest::Mock.new
36
+ transition.expect(:to_name,:up)
37
+ notifier.expects(:send_gearman).with({:gearman_job_server => ['remotehost:4730'], :host => 'localhost', :service => 'my_process', :return_code => 0, :status => "Running", :queue => 'check_results', :encryption => false, :key => '', :every => 1.minute})
38
+ notifier.notify(transition)
39
+ end
40
+
40
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bluepill-gearman
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: