hoptoad_handler 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = ["lib"]
21
21
 
22
22
  s.add_dependency("chef", ">= 0.9.0")
23
- s.add_dependency("toadhopper")
23
+ s.add_dependency("toadhopper", ">= 1.3.0")
24
24
 
25
25
  s.add_development_dependency("mocha")
26
26
  end
@@ -20,7 +20,7 @@ require "chef/handler"
20
20
  require "toadhopper"
21
21
 
22
22
  class HoptoadHandler < Chef::Handler
23
- VERSION = "0.1.3"
23
+ VERSION = "0.1.4"
24
24
 
25
25
  attr_accessor :options, :api_key
26
26
 
@@ -37,15 +37,14 @@ class HoptoadHandler < Chef::Handler
37
37
  end
38
38
  end
39
39
 
40
- # TODO: remove to_s when toadhopper will be fixed
41
40
  def hoptoad_params
42
41
  {
43
42
  :notifier_name => "Chef Hoptoad Notifier", :notifier_version => VERSION, :notifier_url => "https://github.com/morgoth/hoptoad_handler",
44
43
  :component => run_status.node.name, :url => nil, :environment => {},
45
44
  :params => {
46
- :start_time => run_status.start_time.to_s,
47
- :end_time => run_status.end_time.to_s,
48
- :elapsed_time => run_status.elapsed_time.to_s,
45
+ :start_time => run_status.start_time,
46
+ :end_time => run_status.end_time,
47
+ :elapsed_time => run_status.elapsed_time,
49
48
  :run_list => run_status.node.run_list.to_s
50
49
  }
51
50
  }.merge(options)
@@ -11,12 +11,12 @@ describe HoptoadHandler do
11
11
  end
12
12
  end
13
13
 
14
- it "should setting options" do
14
+ it "should set options" do
15
15
  handler = HoptoadHandler.new(:framework_env => "staging")
16
16
  assert_equal "staging", handler.options[:framework_env]
17
17
  end
18
18
 
19
- it "should reporting exception using client" do
19
+ it "should report exception using client" do
20
20
  run_status = stub(:failed? => true, :exception => "Exception")
21
21
  client = mock
22
22
  handler = HoptoadHandler.new(:api_key => "fake")
@@ -28,7 +28,7 @@ describe HoptoadHandler do
28
28
  handler.report
29
29
  end
30
30
 
31
- it "should returning hoptoad params" do
31
+ it "should return hoptoad params" do
32
32
  node = stub(:name => "node-name", :run_list => "cookbook::recipe")
33
33
  run_status = stub(:node => node, :start_time => Time.mktime(2011,1,1),
34
34
  :end_time => Time.mktime(2011,1,2), :elapsed_time => Time.mktime(2011,1,3))
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoptoad_handler
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 19
4
5
  prerelease:
5
- version: 0.1.3
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 4
10
+ version: 0.1.4
6
11
  platform: ruby
7
12
  authors:
8
13
  - Adam Jacob
@@ -11,7 +16,7 @@ autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
18
 
14
- date: 2011-05-06 00:00:00 Z
19
+ date: 2011-06-13 00:00:00 Z
15
20
  dependencies:
16
21
  - !ruby/object:Gem::Dependency
17
22
  name: chef
@@ -21,6 +26,11 @@ dependencies:
21
26
  requirements:
22
27
  - - ">="
23
28
  - !ruby/object:Gem::Version
29
+ hash: 59
30
+ segments:
31
+ - 0
32
+ - 9
33
+ - 0
24
34
  version: 0.9.0
25
35
  type: :runtime
26
36
  version_requirements: *id001
@@ -32,7 +42,12 @@ dependencies:
32
42
  requirements:
33
43
  - - ">="
34
44
  - !ruby/object:Gem::Version
35
- version: "0"
45
+ hash: 27
46
+ segments:
47
+ - 1
48
+ - 3
49
+ - 0
50
+ version: 1.3.0
36
51
  type: :runtime
37
52
  version_requirements: *id002
38
53
  - !ruby/object:Gem::Dependency
@@ -43,6 +58,9 @@ dependencies:
43
58
  requirements:
44
59
  - - ">="
45
60
  - !ruby/object:Gem::Version
61
+ hash: 3
62
+ segments:
63
+ - 0
46
64
  version: "0"
47
65
  type: :development
48
66
  version_requirements: *id003
@@ -79,17 +97,23 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
97
  requirements:
80
98
  - - ">="
81
99
  - !ruby/object:Gem::Version
100
+ hash: 3
101
+ segments:
102
+ - 0
82
103
  version: "0"
83
104
  required_rubygems_version: !ruby/object:Gem::Requirement
84
105
  none: false
85
106
  requirements:
86
107
  - - ">="
87
108
  - !ruby/object:Gem::Version
109
+ hash: 3
110
+ segments:
111
+ - 0
88
112
  version: "0"
89
113
  requirements: []
90
114
 
91
115
  rubyforge_project: hoptoad_handler
92
- rubygems_version: 1.8.1
116
+ rubygems_version: 1.7.2
93
117
  signing_key:
94
118
  specification_version: 3
95
119
  summary: Chef handler for sending exceptions to Hoptoad