scout 5.3.3 → 5.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +7 -0
  2. data/lib/scout/server.rb +9 -3
  3. data/lib/scout.rb +1 -1
  4. metadata +6 -6
data/CHANGELOG CHANGED
@@ -1,3 +1,10 @@
1
+ == Master
2
+
3
+ == 5.3.4
4
+
5
+ * Incorporating sleep interval into Server#time_to_checkin?
6
+ * Added proxy support via http_proxy environment variable
7
+
1
8
  == 5.3.3
2
9
 
3
10
  * Sending embedded options to server for local & plugin overrides.
data/lib/scout/server.rb CHANGED
@@ -243,7 +243,7 @@ module Scout
243
243
  def time_to_checkin?
244
244
  @history['last_checkin'] == nil ||
245
245
  @directives['interval'] == nil ||
246
- (Time.now.to_i - Time.at(@history['last_checkin']).to_i).abs+15 > @directives['interval'].to_i*60
246
+ (Time.now.to_i - Time.at(@history['last_checkin']).to_i).abs+15+sleep_interval > @directives['interval'].to_i*60
247
247
  rescue
248
248
  debug "Failed to calculate time_to_checkin. @history['last_checkin']=#{@history['last_checkin']}. "+
249
249
  "@directives['interval']=#{@directives['interval']}. Time.now.to_i=#{Time.now.to_i}"
@@ -565,11 +565,17 @@ module Scout
565
565
  HTTP_HEADERS.merge(headers) )
566
566
  end
567
567
  end
568
-
568
+
569
569
  def request(url, response_handler, error, &connector)
570
570
  response = nil
571
571
  Timeout.timeout(5 * 60, APITimeoutError) do
572
- http = Net::HTTP.new(url.host, url.port)
572
+ if p=ENV['http_proxy']
573
+ info("Using HTTP proxy from ENV['http_proxy']=#{p}")
574
+ proxy = URI.parse(p)
575
+ http = Net::HTTP.proxy(proxy.host,proxy.port).new(url.host, url.port)
576
+ else
577
+ http = Net::HTTP.new(url.host, url.port)
578
+ end
573
579
  if url.is_a? URI::HTTPS
574
580
  http.use_ssl = true
575
581
  http.ca_file = File.join( File.dirname(__FILE__),
data/lib/scout.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby -wKU
2
2
 
3
3
  module Scout
4
- VERSION = "5.3.3".freeze
4
+ VERSION = "5.3.4".freeze
5
5
  end
6
6
 
7
7
  require "scout/command"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout
3
3
  version: !ruby/object:Gem::Version
4
- hash: 61
5
- prerelease:
4
+ hash: 51
5
+ prerelease: false
6
6
  segments:
7
7
  - 5
8
8
  - 3
9
- - 3
10
- version: 5.3.3
9
+ - 4
10
+ version: 5.3.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Scout Monitoring
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-06-28 00:00:00 -07:00
18
+ date: 2011-12-02 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  requirements: []
223
223
 
224
224
  rubyforge_project: scout
225
- rubygems_version: 1.4.2
225
+ rubygems_version: 1.3.7
226
226
  signing_key:
227
227
  specification_version: 3
228
228
  summary: Scout makes monitoring and reporting on your web applications as flexible and simple as possible.