Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
twinturbo
committed
May 14, 2012
1 parent
8f18e34
commit a29fb74
Showing
9 changed files
with
110 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Manifold | ||
class Engine < Rails::Railtie | ||
config.manifold = Manifold.config | ||
|
||
initializer "manifold.middleware" do |app| | ||
app.config.middleware.insert 0, Manifold::Middleware | ||
end | ||
|
||
initializer "manifold.headers" do |app| | ||
app.config.manifold.expose << "X-Request-Id" | ||
app.config.manifold.expose << "X-Runtime" | ||
app.config.manifold.expose << "X-Rack-Cache" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Manifold | ||
VERSION = "0.0.1" | ||
VERSION = "1.0.0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
require 'test_helper' | ||
|
||
class RailsIntegrationTest < MiniTest::Unit::TestCase | ||
def test_loads_middleware | ||
middleware = TestRailsApp.config.middleware | ||
assert_equal Manifold::Middleware, middleware.first.klass | ||
end | ||
|
||
def tests_exposes_headers_uses_in_rails_applications | ||
config = TestRailsApp.config.manifold | ||
|
||
assert_includes config.expose, 'X-Request-Id' | ||
assert_includes config.expose, 'X-Runtime' | ||
assert_includes config.expose, 'X-Rack-Cache' | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters