Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[now-ruby] Add rack examples to ruby integration tests #3626

Merged
merged 6 commits into from
Jan 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/now-ruby/test/fixtures/07-rack/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "rack", "~> 2.0"
13 changes: 13 additions & 0 deletions packages/now-ruby/test/fixtures/07-rack/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
rack (2.1.1)

PLATFORMS
ruby

DEPENDENCIES
rack (~> 2.0)

BUNDLED WITH
1.17.3
7 changes: 7 additions & 0 deletions packages/now-ruby/test/fixtures/07-rack/index.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class RackApp
def call(env)
[ 200, { "Content-Type" => "text/plain" }, ["gem:RANDOMNESS_PLACEHOLDER"] ]
end
end

run RackApp.new
5 changes: 5 additions & 0 deletions packages/now-ruby/test/fixtures/07-rack/now.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": 2,
"builds": [{ "src": "index.ru", "use": "@now/ruby" }],
"probes": [{ "path": "/", "mustContain": "gem:RANDOMNESS_PLACEHOLDER" }]
}
3 changes: 3 additions & 0 deletions packages/now-ruby/test/fixtures/08-rack-proc/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "rack", "~> 2.0"
13 changes: 13 additions & 0 deletions packages/now-ruby/test/fixtures/08-rack-proc/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GEM
remote: https://rubygems.org/
specs:
rack (2.1.1)

PLATFORMS
ruby

DEPENDENCIES
rack (~> 2.0)

BUNDLED WITH
1.17.3
1 change: 1 addition & 0 deletions packages/now-ruby/test/fixtures/08-rack-proc/index.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
run ->(env) { [200, {"Content-Type" => "text/plain"}, ["gem:RANDOMNESS_PLACEHOLDER"]] }
5 changes: 5 additions & 0 deletions packages/now-ruby/test/fixtures/08-rack-proc/now.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"version": 2,
"builds": [{ "src": "index.ru", "use": "@now/ruby" }],
"probes": [{ "path": "/", "mustContain": "gem:RANDOMNESS_PLACEHOLDER" }]
}