rack-instruments 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rack/instruments.rb +6 -7
  2. metadata +5 -5
@@ -11,19 +11,18 @@ module Rack
11
11
  }
12
12
 
13
13
  request_id = self.class.id_generator.call
14
- request_start = Time.now
15
14
  status, headers, response = nil, nil, nil
16
15
 
17
16
  # make ID of the request accessible to consumers down the stack
18
17
  env["REQUEST_ID"] = request_id
19
18
 
20
19
  Slides.log(:instrumentation,
21
- method: env["REQUEST_METHOD"],
22
- path: env["REQUEST_PATH"],
23
- ip: env["X-FORWARDED-FOR"] || env["HTTP_X_FORWARDED_FOR"] ||
20
+ :method => env["REQUEST_METHOD"],
21
+ :path => env["REQUEST_PATH"],
22
+ :ip => env["X-FORWARDED-FOR"] || env["HTTP_X_FORWARDED_FOR"] ||
24
23
  env["REMOTE_ADDR"],
25
- id: request_id,
26
- status: -> { status }) do
24
+ :id => request_id,
25
+ :status => lambda { status }) do
27
26
  status, headers, response = @app.call(env)
28
27
  end
29
28
 
@@ -33,7 +32,7 @@ module Rack
33
32
 
34
33
  module InstrumentsConfig
35
34
  def self.extended(base)
36
- base.id_generator = -> { rand(36**8).to_s(36) }
35
+ base.id_generator = lambda { rand(36**8).to_s(36) }
37
36
  base.ignore_extensions = %w{css gif ico jpg js jpeg pdf png}
38
37
  end
39
38
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-instruments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-17 00:00:00.000000000 Z
12
+ date: 2012-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: slides
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: '0.1'
21
+ version: 0.1.9
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: '0.1'
29
+ version: 0.1.9
30
30
  description:
31
31
  email: brandur@mutelight.org
32
32
  executables: []
@@ -55,7 +55,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
55
  version: '0'
56
56
  requirements: []
57
57
  rubyforge_project:
58
- rubygems_version: 1.8.24
58
+ rubygems_version: 1.8.23
59
59
  signing_key:
60
60
  specification_version: 3
61
61
  summary: Rack middleware providing extremely basic instrumentation.