e20_ops_middleware 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -23,7 +23,7 @@ Install
23
23
 
24
24
  Add to your `Gemfile`:
25
25
 
26
- gem "e20_ops_middleware"
26
+ gem "e20_ops_middleware", :require => "e20/ops/middleware"
27
27
 
28
28
  Install the gem:
29
29
 
@@ -31,7 +31,7 @@ Install the gem:
31
31
 
32
32
  Create a `config/initializers/ops_middleware.rb` with the following:
33
33
 
34
- ActionController::Dispatcher.middleware.with_options :logger => Rails.logger do |m|
34
+ Rails.application.middleware.with_options :logger => Rails.logger do |m|
35
35
  m.use E20::Ops::Middleware::RevisionMiddleware
36
36
  m.use E20::Ops::Middleware::HostnameMiddleware
37
37
  m.use E20::Ops::Middleware::TransactionIdMiddleware
@@ -83,7 +83,7 @@ HTTP header:
83
83
  Content-Type: text/html; charset=utf-8
84
84
  Content-Length: 3304
85
85
  X-Served-By: fulton
86
-
86
+
87
87
  The hostname will also be logged upon application start:
88
88
 
89
89
  $ grep HostnameMiddleware log/production.log
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.0
1
+ 2.1.1
@@ -15,7 +15,7 @@ module E20
15
15
  def call(env)
16
16
  if env["PATH_INFO"] == "/system/revision"
17
17
  body = "#{@revision}\n"
18
- [200, { "Content-Type" => "text/plain", "Content-Length" => body.size.to_s }, body]
18
+ [200, { "Content-Type" => "text/plain", "Content-Length" => body.size.to_s }, [body]]
19
19
  else
20
20
  status, headers, body = @app.call(env)
21
21
  headers["X-Revision"] = @revision.to_s
@@ -11,7 +11,7 @@ describe E20::Ops::Middleware::RevisionMiddleware do
11
11
  it "returns the current running revision" do
12
12
  middleware = E20::Ops::Middleware::RevisionMiddleware.new(app, :revision => "rev")
13
13
  status, headers, body = middleware.call({"PATH_INFO" => "/system/revision"})
14
- body.should == "rev\n"
14
+ body.should == ["rev\n"]
15
15
  end
16
16
  end
17
17
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: e20_ops_middleware
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
5
- prerelease: false
4
+ hash: 9
5
+ prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
- - 0
10
- version: 2.1.0
9
+ - 1
10
+ version: 2.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Efficiency 2.0
@@ -15,12 +15,10 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-28 00:00:00 -04:00
18
+ date: 2011-03-16 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- prerelease: false
23
- type: :runtime
24
22
  name: uuidtools
25
23
  version_requirements: &id001 !ruby/object:Gem::Requirement
26
24
  none: false
@@ -32,10 +30,10 @@ dependencies:
32
30
  - 2
33
31
  - 1
34
32
  version: "2.1"
33
+ prerelease: false
34
+ type: :runtime
35
35
  requirement: *id001
36
36
  - !ruby/object:Gem::Dependency
37
- prerelease: false
38
- type: :development
39
37
  name: rspec
40
38
  version_requirements: &id002 !ruby/object:Gem::Requirement
41
39
  none: false
@@ -48,6 +46,8 @@ dependencies:
48
46
  - 3
49
47
  - 0
50
48
  version: 1.3.0
49
+ prerelease: false
50
+ type: :development
51
51
  requirement: *id002
52
52
  description: Adds middleware for debugging purposes
53
53
  email: tech@efficiency20.com
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  requirements: []
110
110
 
111
111
  rubyforge_project:
112
- rubygems_version: 1.3.7
112
+ rubygems_version: 1.5.2
113
113
  signing_key:
114
114
  specification_version: 3
115
115
  summary: Collection of useful middleware for exposing information about deployed Rack applications