forked from basecamp/pow
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added
env
argument to all Rackup test fixtures
The test suite wouldn't pass, and the individual fixtures wouldn't run in pow without this required rack argument.
- Loading branch information
Showing
4 changed files
with
4 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
require "json" | ||
|
||
run lambda { | ||
run lambda { |env| | ||
body = ENV.keys.grep(/^POW/).inject({}) { |e, k| e.merge(k => ENV[k]) }.to_json | ||
[200, {'Content-Type' => 'text/plain', 'Content-Length' => body.length.to_s}, [body]] | ||
} |
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 +1 @@ | ||
run lambda { [200, {'Content-Type' => 'text/plain'}, ['OK']] } | ||
run lambda { |env| [200, {'Content-Type' => 'text/plain'}, ['OK']] } |
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,4 +1,4 @@ | ||
run lambda { | ||
run lambda { |env| | ||
body = Process.pid.to_s | ||
[200, {'Content-Type' => 'text/plain', 'Content-Length' => body.length.to_s}, [body]] | ||
} |
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 @@ | ||
run lambda { | ||
run lambda { |env| | ||
[200, {'Content-Type' => 'text/plain', 'Content-Length' => '5'}, ['Hello']] | ||
} |