request_id 0.1.5 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a4b3c575d3873ba8064a9f810e09d200caef2950
4
- data.tar.gz: e0906a43d479ce36ad68b6cdb1f061c129f9c805
3
+ metadata.gz: 04f6bb692a9428eae84c65802ef209c801b5f621
4
+ data.tar.gz: d9d99f2739d1f495b2872ff54c3b48171ba4941b
5
5
  SHA512:
6
- metadata.gz: 07f9be9a618b8e89aca8c3cb1cefbadb8c2a7e817773dbb777fdc817f64dd27d4f793454b1b553b8c3d6abc95c4aff810d69a8ddfdcf50c0d1a31478ac2a9986
7
- data.tar.gz: d0cfdf885577efed43a0d2baffb58287def22abf3e8f0710980a14aaaea73755c669cdb48120c64b80440ba0c364aeb4ffc9c02cd587201e12d145633c3a93be
6
+ metadata.gz: 8a387cc775203c7f9a3726c430059e39d0bad5b2a68356db35200211f314d0b23b537f503a61fb55debb355294daf4ebd0f577b753fdff24b33f3c6bc664de96
7
+ data.tar.gz: 7a8ca15f5175521d60a9c42d6d4cede5cde21d26265b67df1234a65d5bba226de805001e23f900d739af7bdbb6736dd55c09a3d080eb2cb3a4fa73a0d9bd1dbe
@@ -17,7 +17,7 @@ module Rack
17
17
  # logger.info "request_id=#{Thread.current[:request_id]} Hello world"
18
18
  # # => request_id=a08a6712229fb991c0e5026c246862c7 Hello world
19
19
  class RequestId
20
- REQUEST_HEADER = 'HTTP_HEROKU_REQUEST_ID'.freeze
20
+ REQUEST_HEADER = 'HTTP_X_REQUEST_ID'.freeze
21
21
  RESPONSE_HEADER = 'X-Request-Id'.freeze
22
22
 
23
23
  def initialize(app, options = {})
@@ -1,3 +1,3 @@
1
1
  module RequestId
2
- VERSION = '0.1.5'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -12,11 +12,11 @@ describe Rack::RequestId do
12
12
  Thread.current.should_receive(:[]=).with(:request_id, request_id)
13
13
  app.should_receive(:call)
14
14
  Thread.current.should_receive(:[]=).with(:request_id, nil)
15
- middleware.call('HTTP_HEROKU_REQUEST_ID' => request_id)
15
+ middleware.call('HTTP_X_REQUEST_ID' => request_id)
16
16
  end
17
17
 
18
18
  it 'sets the X-Request-Id header in the response' do
19
- status, headers, body = middleware.call('HTTP_HEROKU_REQUEST_ID' => request_id)
19
+ status, headers, body = middleware.call('HTTP_X_REQUEST_ID' => request_id)
20
20
  expect(headers['X-Request-Id']).to eq request_id
21
21
  end
22
22
 
@@ -25,7 +25,7 @@ describe Rack::RequestId do
25
25
  Thread.current.should_receive(:[]=).with(:request_id, request_id)
26
26
  app.should_receive(:call).and_raise
27
27
  Thread.current.should_receive(:[]=).with(:request_id, nil)
28
- expect { middleware.call('HTTP_HEROKU_REQUEST_ID' => request_id) }.to raise_error
28
+ expect { middleware.call('HTTP_X_REQUEST_ID' => request_id) }.to raise_error
29
29
  end
30
30
  end
31
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: request_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric J. Holmes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-18 00:00:00.000000000 Z
11
+ date: 2014-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  version: '0'
101
101
  requirements: []
102
102
  rubyforge_project:
103
- rubygems_version: 2.0.3
103
+ rubygems_version: 2.0.14
104
104
  signing_key:
105
105
  specification_version: 4
106
106
  summary: Classes for tracking request id