daikon 0.7.5 → 0.7.6

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,9 +1,9 @@
1
1
  source "http://rubygems.org"
2
2
 
3
- gem "daemons", "~> 1.1.0"
4
- gem "excon", "~> 0.5.1"
5
- gem "json_pure", "~> 1.4.6"
6
- gem "redis", "~> 2.1.1"
3
+ gem "daemons", "1.1.0"
4
+ gem "excon", "0.5.6"
5
+ gem "json_pure", "1.4.6"
6
+ gem "redis", "2.1.1"
7
7
 
8
8
  group :development do
9
9
  gem "bourne"
data/Gemfile.lock CHANGED
@@ -12,7 +12,7 @@ GEM
12
12
  term-ansicolor (~> 1.0.5)
13
13
  daemons (1.1.0)
14
14
  diff-lcs (1.1.2)
15
- excon (0.5.1)
15
+ excon (0.5.6)
16
16
  gherkin (2.2.9)
17
17
  json (~> 1.4.6)
18
18
  term-ansicolor (~> 1.0.5)
@@ -44,10 +44,10 @@ PLATFORMS
44
44
  DEPENDENCIES
45
45
  bourne
46
46
  cucumber
47
- daemons (~> 1.1.0)
48
- excon (~> 0.5.1)
47
+ daemons (= 1.1.0)
48
+ excon (= 0.5.6)
49
49
  jeweler
50
- json_pure (~> 1.4.6)
51
- redis (~> 2.1.1)
50
+ json_pure (= 1.4.6)
51
+ redis (= 2.1.1)
52
52
  rspec
53
53
  timecop
data/daikon.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{daikon}
8
- s.version = "0.7.5"
8
+ s.version = "0.7.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nick Quaranto"]
12
- s.date = %q{2011-02-17}
12
+ s.date = %q{2011-03-10}
13
13
  s.default_executable = %q{daikon}
14
14
  s.description = %q{daikon, a radishapp.com client}
15
15
  s.email = %q{nick@quaran.to}
@@ -43,7 +43,7 @@ Gem::Specification.new do |s|
43
43
  s.licenses = ["MIT"]
44
44
  s.require_paths = ["lib"]
45
45
  s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
46
- s.rubygems_version = %q{1.3.7}
46
+ s.rubygems_version = %q{1.6.1}
47
47
  s.summary = %q{daikon, a radishapp.com client}
48
48
  s.test_files = [
49
49
  "spec/client_spec.rb",
@@ -54,24 +54,23 @@ Gem::Specification.new do |s|
54
54
  ]
55
55
 
56
56
  if s.respond_to? :specification_version then
57
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
58
57
  s.specification_version = 3
59
58
 
60
59
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
61
- s.add_runtime_dependency(%q<daemons>, ["~> 1.1.0"])
62
- s.add_runtime_dependency(%q<excon>, ["~> 0.5.1"])
63
- s.add_runtime_dependency(%q<json_pure>, ["~> 1.4.6"])
64
- s.add_runtime_dependency(%q<redis>, ["~> 2.1.1"])
60
+ s.add_runtime_dependency(%q<daemons>, ["= 1.1.0"])
61
+ s.add_runtime_dependency(%q<excon>, ["= 0.5.6"])
62
+ s.add_runtime_dependency(%q<json_pure>, ["= 1.4.6"])
63
+ s.add_runtime_dependency(%q<redis>, ["= 2.1.1"])
65
64
  s.add_development_dependency(%q<bourne>, [">= 0"])
66
65
  s.add_development_dependency(%q<cucumber>, [">= 0"])
67
66
  s.add_development_dependency(%q<jeweler>, [">= 0"])
68
67
  s.add_development_dependency(%q<rspec>, [">= 0"])
69
68
  s.add_development_dependency(%q<timecop>, [">= 0"])
70
69
  else
71
- s.add_dependency(%q<daemons>, ["~> 1.1.0"])
72
- s.add_dependency(%q<excon>, ["~> 0.5.1"])
73
- s.add_dependency(%q<json_pure>, ["~> 1.4.6"])
74
- s.add_dependency(%q<redis>, ["~> 2.1.1"])
70
+ s.add_dependency(%q<daemons>, ["= 1.1.0"])
71
+ s.add_dependency(%q<excon>, ["= 0.5.6"])
72
+ s.add_dependency(%q<json_pure>, ["= 1.4.6"])
73
+ s.add_dependency(%q<redis>, ["= 2.1.1"])
75
74
  s.add_dependency(%q<bourne>, [">= 0"])
76
75
  s.add_dependency(%q<cucumber>, [">= 0"])
77
76
  s.add_dependency(%q<jeweler>, [">= 0"])
@@ -79,10 +78,10 @@ Gem::Specification.new do |s|
79
78
  s.add_dependency(%q<timecop>, [">= 0"])
80
79
  end
81
80
  else
82
- s.add_dependency(%q<daemons>, ["~> 1.1.0"])
83
- s.add_dependency(%q<excon>, ["~> 0.5.1"])
84
- s.add_dependency(%q<json_pure>, ["~> 1.4.6"])
85
- s.add_dependency(%q<redis>, ["~> 2.1.1"])
81
+ s.add_dependency(%q<daemons>, ["= 1.1.0"])
82
+ s.add_dependency(%q<excon>, ["= 0.5.6"])
83
+ s.add_dependency(%q<json_pure>, ["= 1.4.6"])
84
+ s.add_dependency(%q<redis>, ["= 2.1.1"])
86
85
  s.add_dependency(%q<bourne>, [">= 0"])
87
86
  s.add_dependency(%q<cucumber>, [">= 0"])
88
87
  s.add_dependency(%q<jeweler>, [">= 0"])
data/lib/daikon.rb CHANGED
@@ -25,5 +25,5 @@ require 'daikon/monitor'
25
25
  require 'daikon/redis_hacks'
26
26
 
27
27
  module Daikon
28
- VERSION = "0.7.5"
28
+ VERSION = "0.7.6"
29
29
  end
data/lib/daikon/client.rb CHANGED
@@ -45,6 +45,7 @@ module Daikon
45
45
  options[:headers]['Authorization'] = config.api_key
46
46
 
47
47
  log "#{options[:method]} #{config.server_prefix}#{options[:path]}"
48
+ http.reset
48
49
  http.request(options)
49
50
  end
50
51
 
data/spec/client_spec.rb CHANGED
@@ -41,7 +41,7 @@ describe Daikon::Client, "when server is down" do
41
41
  subject { Daikon::Client.new }
42
42
  before do
43
43
  subject.setup(Daikon::Configuration.new)
44
- http = stub("http")
44
+ http = stub("http", :reset => nil)
45
45
  http.stubs(:request).raises(Timeout::Error)
46
46
  subject.stubs(:http => http)
47
47
  end
@@ -57,7 +57,7 @@ describe Daikon::Client, "when it returns bad json" do
57
57
  subject { Daikon::Client.new }
58
58
  before do
59
59
  subject.setup(Daikon::Configuration.new)
60
- http = stub("http", :request => Excon::Response.new(:body => "{'bad':'json}"))
60
+ http = stub("http", :request => Excon::Response.new(:body => "{'bad':'json}"), :reset => nil)
61
61
  subject.stubs(:http => http)
62
62
  end
63
63
 
@@ -76,6 +76,7 @@ shared_examples_for "a summary api consumer" do
76
76
  "Content-Type" => "application/json"
77
77
  }
78
78
 
79
+ http.should have_received(:reset)
79
80
  http.should have_received(:request).with(
80
81
  :method => "POST",
81
82
  :path => "/api/v1/summaries.json",
@@ -86,7 +87,7 @@ end
86
87
 
87
88
  describe Daikon::Client, "rotate monitor" do
88
89
  subject { Daikon::Client.new }
89
- let(:http) { stub("http", :request => Excon::Response.new) }
90
+ let(:http) { stub("http", :request => Excon::Response.new, :reset => nil) }
90
91
  let(:now) { "2011-01-19T18:23:55-05:00" }
91
92
  let(:past) { "2011-01-19T18:23:54-05:00" }
92
93
  let(:payload) do
@@ -136,6 +137,7 @@ shared_examples_for "a info api consumer" do
136
137
  "Content-Type" => "application/json"
137
138
  }
138
139
 
140
+ http.should have_received(:reset)
139
141
  http.should have_received(:request).with(
140
142
  :method => "POST",
141
143
  :path => "/api/v1/infos.json",
@@ -148,7 +150,7 @@ describe Daikon::Client, "report info" do
148
150
  subject { Daikon::Client.new }
149
151
  let(:results) { {"connected_clients"=>"1", "used_cpu_sys_childrens"=>"0.00"} }
150
152
  let(:redis) { stub("redis instance", :info => results) }
151
- let(:http) { stub("http", :request => Excon::Response.new) }
153
+ let(:http) { stub("http", :request => Excon::Response.new, :reset => nil) }
152
154
 
153
155
  before do
154
156
  subject.stubs(:redis => redis, :http => http)
metadata CHANGED
@@ -1,12 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: daikon
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 7
8
- - 5
9
- version: 0.7.5
4
+ prerelease:
5
+ version: 0.7.6
10
6
  platform: ruby
11
7
  authors:
12
8
  - Nick Quaranto
@@ -14,7 +10,7 @@ autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
12
 
17
- date: 2011-02-17 00:00:00 -05:00
13
+ date: 2011-03-10 00:00:00 -05:00
18
14
  default_executable: daikon
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
@@ -22,12 +18,8 @@ dependencies:
22
18
  requirement: &id001 !ruby/object:Gem::Requirement
23
19
  none: false
24
20
  requirements:
25
- - - ~>
21
+ - - "="
26
22
  - !ruby/object:Gem::Version
27
- segments:
28
- - 1
29
- - 1
30
- - 0
31
23
  version: 1.1.0
32
24
  type: :runtime
33
25
  prerelease: false
@@ -37,13 +29,9 @@ dependencies:
37
29
  requirement: &id002 !ruby/object:Gem::Requirement
38
30
  none: false
39
31
  requirements:
40
- - - ~>
32
+ - - "="
41
33
  - !ruby/object:Gem::Version
42
- segments:
43
- - 0
44
- - 5
45
- - 1
46
- version: 0.5.1
34
+ version: 0.5.6
47
35
  type: :runtime
48
36
  prerelease: false
49
37
  version_requirements: *id002
@@ -52,12 +40,8 @@ dependencies:
52
40
  requirement: &id003 !ruby/object:Gem::Requirement
53
41
  none: false
54
42
  requirements:
55
- - - ~>
43
+ - - "="
56
44
  - !ruby/object:Gem::Version
57
- segments:
58
- - 1
59
- - 4
60
- - 6
61
45
  version: 1.4.6
62
46
  type: :runtime
63
47
  prerelease: false
@@ -67,12 +51,8 @@ dependencies:
67
51
  requirement: &id004 !ruby/object:Gem::Requirement
68
52
  none: false
69
53
  requirements:
70
- - - ~>
54
+ - - "="
71
55
  - !ruby/object:Gem::Version
72
- segments:
73
- - 2
74
- - 1
75
- - 1
76
56
  version: 2.1.1
77
57
  type: :runtime
78
58
  prerelease: false
@@ -84,8 +64,6 @@ dependencies:
84
64
  requirements:
85
65
  - - ">="
86
66
  - !ruby/object:Gem::Version
87
- segments:
88
- - 0
89
67
  version: "0"
90
68
  type: :development
91
69
  prerelease: false
@@ -97,8 +75,6 @@ dependencies:
97
75
  requirements:
98
76
  - - ">="
99
77
  - !ruby/object:Gem::Version
100
- segments:
101
- - 0
102
78
  version: "0"
103
79
  type: :development
104
80
  prerelease: false
@@ -110,8 +86,6 @@ dependencies:
110
86
  requirements:
111
87
  - - ">="
112
88
  - !ruby/object:Gem::Version
113
- segments:
114
- - 0
115
89
  version: "0"
116
90
  type: :development
117
91
  prerelease: false
@@ -123,8 +97,6 @@ dependencies:
123
97
  requirements:
124
98
  - - ">="
125
99
  - !ruby/object:Gem::Version
126
- segments:
127
- - 0
128
100
  version: "0"
129
101
  type: :development
130
102
  prerelease: false
@@ -136,8 +108,6 @@ dependencies:
136
108
  requirements:
137
109
  - - ">="
138
110
  - !ruby/object:Gem::Version
139
- segments:
140
- - 0
141
111
  version: "0"
142
112
  type: :development
143
113
  prerelease: false
@@ -185,23 +155,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
185
155
  requirements:
186
156
  - - ">="
187
157
  - !ruby/object:Gem::Version
188
- segments:
189
- - 1
190
- - 8
191
- - 7
192
158
  version: 1.8.7
193
159
  required_rubygems_version: !ruby/object:Gem::Requirement
194
160
  none: false
195
161
  requirements:
196
162
  - - ">="
197
163
  - !ruby/object:Gem::Version
198
- segments:
199
- - 0
200
164
  version: "0"
201
165
  requirements: []
202
166
 
203
167
  rubyforge_project:
204
- rubygems_version: 1.3.7
168
+ rubygems_version: 1.6.1
205
169
  signing_key:
206
170
  specification_version: 3
207
171
  summary: daikon, a radishapp.com client