forked from rubyonjets/jets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
checkpoint: remove require spec_helper
- Loading branch information
Showing
73 changed files
with
188 additions
and
129 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,3 +1,4 @@ | ||
--color | ||
--format documentation | ||
--exclude-pattern spec/fixtures/apps/**/* | ||
--format documentation | ||
--require spec_helper |
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,58 @@ | ||
{ | ||
"resource": "/posts", | ||
"path": "/posts", | ||
"httpMethod": "POST", | ||
"headers": { | ||
"Accept": "*/*", | ||
"Accept-Encoding": "gzip, deflate", | ||
"cache-control": "no-cache", | ||
"CloudFront-Forwarded-Proto": "https", | ||
"CloudFront-Is-Desktop-Viewer": "true", | ||
"CloudFront-Is-Mobile-Viewer": "false", | ||
"CloudFront-Is-SmartTV-Viewer": "false", | ||
"CloudFront-Is-Tablet-Viewer": "false", | ||
"CloudFront-Viewer-Country": "US", | ||
"Content-Type": "text/plain", | ||
"Host": "uhghn8z6t1.execute-api.us-east-1.amazonaws.com", | ||
"Postman-Token": "7166b11b-59de-4e7b-ad35-24e556b7a083", | ||
"User-Agent": "PostmanRuntime/6.4.1", | ||
"Via": "1.1 55676da1e5c0a9c4e60a94a95b01dc04.cloudfront.net (CloudFront)", | ||
"X-Amz-Cf-Id": "iERhUw6ghRnv1uRYfxJaUsDGWVbERFSZ4K00CIgZtJ0T6yeFdItMeQ==", | ||
"X-Amzn-Trace-Id": "Root=1-59f50229-587ec5271678236e50ad91b1", | ||
"X-Forwarded-For": "69.42.1.180, 54.239.203.100", | ||
"X-Forwarded-Port": "443", | ||
"X-Forwarded-Proto": "https" | ||
}, | ||
"queryStringParameters": { | ||
"a": "1", | ||
"b": "2" | ||
}, | ||
"pathParameters": null, | ||
"stageVariables": null, | ||
"requestContext": { | ||
"path": "/stag/posts", | ||
"accountId": "160619113767", | ||
"resourceId": "c0yhg8", | ||
"stage": "stag", | ||
"requestId": "e5c39604-bc2d-11e7-abbe-1baaa0f8e02e", | ||
"identity": { | ||
"cognitoIdentityPoolId": null, | ||
"accountId": null, | ||
"cognitoIdentityId": null, | ||
"caller": null, | ||
"apiKey": "", | ||
"sourceIp": "69.42.1.180", | ||
"accessKey": null, | ||
"cognitoAuthenticationType": null, | ||
"cognitoAuthenticationProvider": null, | ||
"userArn": null, | ||
"userAgent": "PostmanRuntime/6.4.1", | ||
"user": null | ||
}, | ||
"resourcePath": "/posts", | ||
"httpMethod": "POST", | ||
"apiId": "uhghn8z6t1" | ||
}, | ||
"body": "{\n \"key3\": \"value3\",\n \"key2\": \"value2\",\n \"key1\": \"value1\"\n}", | ||
"isBase64Encoded": false | ||
} |
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,28 @@ | ||
module Jets | ||
class PolyFun | ||
autoload :LambdaExecutor, 'jets/poly_fun/lambda_executor' # main class delegates to other classes | ||
autoload :PythonExecutor, 'jets/poly_fun/python_executor' # main class delegates to other classes | ||
autoload :NodeExecutor, 'jets/poly_fun/node_executor' # main class delegates to other classes | ||
|
||
extend Memoist | ||
|
||
def initialize(app_class, app_meth) | ||
@app_class = app_class # already a Constant, IE: PostController | ||
@app_meth = app_meth | ||
end | ||
|
||
def process(event, context={}) | ||
if task.lang == :ruby | ||
@app_class.process(event, context, @app_meth) | ||
else | ||
executor = LambdaExecutor.new(task) | ||
executor.run(event, context) | ||
end | ||
end | ||
|
||
def task | ||
@app_class.tasks.find { |t| t.meth == @app_meth } | ||
end | ||
memoize :task | ||
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class Jets::PolyFun | ||
class LambdaExecutor | ||
def initialize(task) | ||
@task = task | ||
end | ||
|
||
def run(event, context) | ||
executor_class = "#{task.lang}_executor".classify.constantize | ||
executor = executor_class.new(task) | ||
executor.run(event, context) | ||
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
class Jets::PolyFun | ||
class NodeExecutor | ||
|
||
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class Jets::PolyFun | ||
class PythonExecutor | ||
def initialize(task) | ||
@task = task | ||
end | ||
|
||
def run(event, context) | ||
puts "python executor ran" | ||
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"resource": "/books", | ||
"path": "/books", | ||
"httpMethod": "GET", | ||
"headers": { | ||
"Accept": "*/*", | ||
"Accept-Encoding": "gzip, deflate", | ||
"cache-control": "no-cache", | ||
"CloudFront-Forwarded-Proto": "https", | ||
"CloudFront-Is-Desktop-Viewer": "true", | ||
"CloudFront-Is-Mobile-Viewer": "false", | ||
"CloudFront-Is-SmartTV-Viewer": "false", | ||
"CloudFront-Is-Tablet-Viewer": "false", | ||
"CloudFront-Viewer-Country": "US", | ||
"Content-Type": "text/plain", | ||
"Host": "uhghn8z6t1.execute-api.us-east-1.amazonaws.com", | ||
"Postman-Token": "7166b11b-59de-4e7b-ad35-24e556b7a083", | ||
"User-Agent": "PostmanRuntime/6.4.1", | ||
"Via": "1.1 55676da1e5c0a9c4e60a94a95b01dc04.cloudfront.net (CloudFront)", | ||
"X-Amz-Cf-Id": "iERhUw6ghRnv1uRYfxJaUsDGWVbERFSZ4K00CIgZtJ0T6yeFdItMeQ==", | ||
"X-Amzn-Trace-Id": "Root=1-59f50229-587ec5271678236e50ad91b1", | ||
"X-Forwarded-For": "69.42.1.180, 54.239.203.100", | ||
"X-Forwarded-Port": "443", | ||
"X-Forwarded-Proto": "https" | ||
}, | ||
"queryStringParameters": { | ||
"a": "1", | ||
"b": "2" | ||
}, | ||
"pathParameters": null, | ||
"stageVariables": null, | ||
"requestContext": { | ||
"path": "/stag/books", | ||
"accountId": "160619113767", | ||
"resourceId": "c0yhg8", | ||
"stage": "stag", | ||
"requestId": "e5c39604-bc2d-11e7-abbe-1baaa0f8e02e", | ||
"identity": { | ||
"cognitoIdentityPoolId": null, | ||
"accountId": null, | ||
"cognitoIdentityId": null, | ||
"caller": null, | ||
"apiKey": "", | ||
"sourceIp": "69.42.1.180", | ||
"accessKey": null, | ||
"cognitoAuthenticationType": null, | ||
"cognitoAuthenticationProvider": null, | ||
"userArn": null, | ||
"userAgent": "PostmanRuntime/6.4.1", | ||
"user": null | ||
}, | ||
"resourcePath": "/books", | ||
"httpMethod": "GET", | ||
"apiId": "uhghn8z6t1" | ||
}, | ||
"body": "{\n \"key3\": \"value3\",\n \"key2\": \"value2\",\n \"key1\": \"value1\"\n}", | ||
"isBase64Encoded": false | ||
} |
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,5 +1,3 @@ | ||
require "spec_helper" | ||
|
||
describe Jets::Application do | ||
context "Jets::Application.new" do | ||
let(:app) do | ||
|
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,5 +1,3 @@ | ||
require "spec_helper" | ||
|
||
describe Jets::Builders::CodeBuilder do | ||
context "general" do | ||
let(:builder) do | ||
|
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
require "spec_helper" | ||
|
||
describe Jets::Builders::GemFetcher do | ||
context "already downloaded" do | ||
let(:fetcher) do | ||
|
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,5 +1,3 @@ | ||
require "spec_helper" | ||
|
||
describe "HandlerGenerator" do | ||
context "controller" do | ||
let(:generator) do | ||
|
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,5 +1,3 @@ | ||
require "spec_helper" | ||
|
||
describe Jets::Cfn::Ship do | ||
let(:ship) do | ||
Jets::Cfn::Ship.new(noop: true) | ||
|
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_builders/api_gateway_builder_spec.rb
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_builders/api_gateway_deployment_spec.rb
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_builders/base_child_builder_spec.rb
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_builders/controller_builder_spec.rb
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_builders/function_properties_builder_spec.rb
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
require "spec_helper" | ||
|
||
class InterfaceTest | ||
include Jets::Cfn::TemplateBuilders::Interface | ||
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_mappers/api_gateway_deployment_mapper_spec.rb
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_mappers/api_gateway_mapper_spec.rb
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_mappers/config_rule_mapper_spec.rb
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_mappers/events_rule_mapper_spec.rb
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_mappers/gateway_deployment_mapper_spec.rb
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_mappers/gateway_method_mapper_spec.rb
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_mappers/gateway_resource_mapper_spec.rb
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
2 changes: 0 additions & 2 deletions
2
spec/lib/jets/cfn/template_mappers/lambda_function_mapper_spec.rb
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
require "spec_helper" | ||
|
||
describe Jets::CLI do | ||
let(:command) { Jets::CLI.new(given_args) } | ||
|
||
|
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
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
require "spec_helper" | ||
|
||
describe Jets::Commands::Deploy do | ||
let(:build) do | ||
Jets::Commands::Deploy.new(noop: true) | ||
|
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,5 +1,3 @@ | ||
require "spec_helper" | ||
|
||
describe Jets::Commands::RakeCommand do | ||
context Jets::Commands::RakeCommand do | ||
|
||
|
Oops, something went wrong.