jets_bb_fork 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/bin/commit_docs.sh +26 -0
- data/.circleci/config.yml +126 -0
- data/.codebuild/README.md +68 -0
- data/.codebuild/bin/jets +3 -0
- data/.codebuild/buildspec-base.yml +14 -0
- data/.codebuild/integration.sh +72 -0
- data/.codebuild/jets.postman_collection.json +323 -0
- data/.codebuild/scripts/install-docker.sh +12 -0
- data/.codebuild/scripts/install-dynamodb-local.sh +22 -0
- data/.codebuild/scripts/install-java.sh +22 -0
- data/.codebuild/scripts/install-node.sh +4 -0
- data/.github/ISSUE_TEMPLATE.md +7 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +84 -0
- data/.github/ISSUE_TEMPLATE/documentation.md +27 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +64 -0
- data/.github/ISSUE_TEMPLATE/question.md +16 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +42 -0
- data/.gitignore +24 -0
- data/.gitmodules +0 -0
- data/.python-version +1 -0
- data/.rspec +4 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +734 -0
- data/CONDUCT.md +1 -0
- data/CONTRIBUTING.md +1 -0
- data/Dockerfile +16 -0
- data/Dockerfile.base +53 -0
- data/Gemfile +14 -0
- data/Guardfile +22 -0
- data/LICENSE.txt +22 -0
- data/Procfile +2 -0
- data/README.md +203 -0
- data/Rakefile +24 -0
- data/backers.md +16 -0
- data/bin/release +9 -0
- data/buildspec.yml +18 -0
- data/exe/jets_bb_fork +14 -0
- data/jets.gemspec +68 -0
- data/lib/jets.rb +27 -0
- data/lib/jets/application.rb +216 -0
- data/lib/jets/application/defaults.rb +172 -0
- data/lib/jets/autoloaders.rb +97 -0
- data/lib/jets/aws_info.rb +113 -0
- data/lib/jets/aws_services.rb +65 -0
- data/lib/jets/aws_services/global_memoist.rb +57 -0
- data/lib/jets/aws_services/s3_bucket.rb +34 -0
- data/lib/jets/aws_services/stack_status.rb +59 -0
- data/lib/jets/booter.rb +119 -0
- data/lib/jets/builders/code_builder.rb +399 -0
- data/lib/jets/builders/code_size.rb +57 -0
- data/lib/jets/builders/gem_replacer.rb +76 -0
- data/lib/jets/builders/handler_generator.rb +186 -0
- data/lib/jets/builders/lambda_layer.rb +69 -0
- data/lib/jets/builders/md5.rb +60 -0
- data/lib/jets/builders/md5_zip.rb +61 -0
- data/lib/jets/builders/purger.rb +35 -0
- data/lib/jets/builders/rack_packager.rb +51 -0
- data/lib/jets/builders/rackup_wrappers/rackup +19 -0
- data/lib/jets/builders/rackup_wrappers/rackup.rb +7 -0
- data/lib/jets/builders/reconfigure_rails.rb +114 -0
- data/lib/jets/builders/reconfigure_rails/config/initializers/jets.rb +16 -0
- data/lib/jets/builders/ruby_packager.rb +207 -0
- data/lib/jets/builders/shim_vars/app.rb +78 -0
- data/lib/jets/builders/shim_vars/base.rb +25 -0
- data/lib/jets/builders/shim_vars/shared.rb +37 -0
- data/lib/jets/builders/templates/handler.rb +12 -0
- data/lib/jets/builders/tidy.rb +107 -0
- data/lib/jets/builders/util.rb +31 -0
- data/lib/jets/bundle.rb +82 -0
- data/lib/jets/camelizer.rb +71 -0
- data/lib/jets/cfn/builders/api_deployment_builder.rb +63 -0
- data/lib/jets/cfn/builders/api_gateway_builder.rb +157 -0
- data/lib/jets/cfn/builders/base_child_builder.rb +75 -0
- data/lib/jets/cfn/builders/controller_builder.rb +42 -0
- data/lib/jets/cfn/builders/function_builder.rb +14 -0
- data/lib/jets/cfn/builders/interface.rb +137 -0
- data/lib/jets/cfn/builders/job_builder.rb +14 -0
- data/lib/jets/cfn/builders/paged.rb +37 -0
- data/lib/jets/cfn/builders/parent_builder.rb +100 -0
- data/lib/jets/cfn/builders/rule_builder.rb +24 -0
- data/lib/jets/cfn/builders/shared_builder.rb +14 -0
- data/lib/jets/cfn/ship.rb +185 -0
- data/lib/jets/cfn/status.rb +212 -0
- data/lib/jets/cfn/upload.rb +139 -0
- data/lib/jets/cli.rb +194 -0
- data/lib/jets/commands/base.rb +146 -0
- data/lib/jets/commands/build.rb +234 -0
- data/lib/jets/commands/call.rb +169 -0
- data/lib/jets/commands/call/anonymous_guesser.rb +96 -0
- data/lib/jets/commands/call/autoload_guesser.rb +136 -0
- data/lib/jets/commands/call/base_guesser.rb +60 -0
- data/lib/jets/commands/call/guesser.rb +48 -0
- data/lib/jets/commands/clean.rb +19 -0
- data/lib/jets/commands/clean/base.rb +24 -0
- data/lib/jets/commands/clean/build.rb +13 -0
- data/lib/jets/commands/clean/log.rb +107 -0
- data/lib/jets/commands/console.rb +12 -0
- data/lib/jets/commands/db.rb +13 -0
- data/lib/jets/commands/db/environment-task.rake +3 -0
- data/lib/jets/commands/db/tasks.rb +44 -0
- data/lib/jets/commands/dbconsole.rb +131 -0
- data/lib/jets/commands/delete.rb +143 -0
- data/lib/jets/commands/deploy.rb +141 -0
- data/lib/jets/commands/dynamodb.rb +19 -0
- data/lib/jets/commands/dynamodb/migrate.rb +9 -0
- data/lib/jets/commands/dynamodb/migrator.rb +36 -0
- data/lib/jets/commands/gems.rb +21 -0
- data/lib/jets/commands/help.rb +9 -0
- data/lib/jets/commands/help/build.md +6 -0
- data/lib/jets/commands/help/call.md +61 -0
- data/lib/jets/commands/help/clean/build.md +5 -0
- data/lib/jets/commands/help/clean/log.md +5 -0
- data/lib/jets/commands/help/console.md +18 -0
- data/lib/jets/commands/help/db/generate.md +8 -0
- data/lib/jets/commands/help/dbconsole.md +9 -0
- data/lib/jets/commands/help/delete.md +22 -0
- data/lib/jets/commands/help/deploy.md +32 -0
- data/lib/jets/commands/help/destroy.md +16 -0
- data/lib/jets/commands/help/dynamodb/generate.md +52 -0
- data/lib/jets/commands/help/dynamodb/migrate.md +4 -0
- data/lib/jets/commands/help/gems/check.md +8 -0
- data/lib/jets/commands/help/generate.md +22 -0
- data/lib/jets/commands/help/import/rack.md +13 -0
- data/lib/jets/commands/help/import/rails.md +11 -0
- data/lib/jets/commands/help/new.md +42 -0
- data/lib/jets/commands/help/routes.md +16 -0
- data/lib/jets/commands/help/runner.md +17 -0
- data/lib/jets/commands/help/server.md +15 -0
- data/lib/jets/commands/help/status.md +14 -0
- data/lib/jets/commands/help/upgrade.md +5 -0
- data/lib/jets/commands/help/url.md +6 -0
- data/lib/jets/commands/import.rb +12 -0
- data/lib/jets/commands/import/base.rb +49 -0
- data/lib/jets/commands/import/cheatsheet.rb +35 -0
- data/lib/jets/commands/import/rack.rb +16 -0
- data/lib/jets/commands/import/rails.rb +74 -0
- data/lib/jets/commands/import/sequence.rb +90 -0
- data/lib/jets/commands/import/templates/config/database.yml +26 -0
- data/lib/jets/commands/import/templates/submodules-cheatsheet.md +89 -0
- data/lib/jets/commands/main.rb +157 -0
- data/lib/jets/commands/markdown/creator.rb +58 -0
- data/lib/jets/commands/markdown/index.rb +27 -0
- data/lib/jets/commands/markdown/page.rb +125 -0
- data/lib/jets/commands/markdown/shell.rb +11 -0
- data/lib/jets/commands/new.rb +157 -0
- data/lib/jets/commands/rake_command.rb +61 -0
- data/lib/jets/commands/rake_tasks.rb +46 -0
- data/lib/jets/commands/runner.rb +16 -0
- data/lib/jets/commands/sequence.rb +99 -0
- data/lib/jets/commands/stack_info.rb +30 -0
- data/lib/jets/commands/templates/skeleton/.gitignore +12 -0
- data/lib/jets/commands/templates/skeleton/.jetskeep +1 -0
- data/lib/jets/commands/templates/skeleton/.rspec +3 -0
- data/lib/jets/commands/templates/skeleton/Gemfile.tt +38 -0
- data/lib/jets/commands/templates/skeleton/Procfile +7 -0
- data/lib/jets/commands/templates/skeleton/README.md +11 -0
- data/lib/jets/commands/templates/skeleton/Rakefile +2 -0
- data/lib/jets/commands/templates/skeleton/app/controllers/application_controller.rb +2 -0
- data/lib/jets/commands/templates/skeleton/app/helpers/application_helper.rb +2 -0
- data/lib/jets/commands/templates/skeleton/app/jobs/application_job.rb +4 -0
- data/lib/jets/commands/templates/skeleton/app/models/application_item.rb +2 -0
- data/lib/jets/commands/templates/skeleton/app/models/application_record.rb +3 -0
- data/lib/jets/commands/templates/skeleton/app/views/layouts/application.html.erb.tt +25 -0
- data/lib/jets/commands/templates/skeleton/config.ru +5 -0
- data/lib/jets/commands/templates/skeleton/config/application.rb.tt +67 -0
- data/lib/jets/commands/templates/skeleton/config/database.yml.tt +26 -0
- data/lib/jets/commands/templates/skeleton/config/dynamodb.yml +22 -0
- data/lib/jets/commands/templates/skeleton/config/environments/development.rb +7 -0
- data/lib/jets/commands/templates/skeleton/config/environments/production.rb +9 -0
- data/lib/jets/commands/templates/skeleton/config/environments/test.rb +7 -0
- data/lib/jets/commands/templates/skeleton/config/routes.rb +9 -0
- data/lib/jets/commands/templates/skeleton/db/.gitkeep +0 -0
- data/lib/jets/commands/templates/skeleton/public/404.html +67 -0
- data/lib/jets/commands/templates/skeleton/public/422.html +67 -0
- data/lib/jets/commands/templates/skeleton/public/500.html +66 -0
- data/lib/jets/commands/templates/skeleton/public/favicon.ico +0 -0
- data/lib/jets/commands/templates/skeleton/public/index.html.tt +91 -0
- data/lib/jets/commands/templates/skeleton/spec/controllers/posts_controller_spec.rb +15 -0
- data/lib/jets/commands/templates/skeleton/spec/fixtures/payloads/posts-index.json +51 -0
- data/lib/jets/commands/templates/skeleton/spec/fixtures/payloads/posts-show.json +53 -0
- data/lib/jets/commands/templates/skeleton/spec/spec_helper.rb.tt +30 -0
- data/lib/jets/commands/templates/webpacker/app/javascript/packs/application.js.tt +14 -0
- data/lib/jets/commands/templates/webpacker/app/javascript/packs/theme.scss.tt +24 -0
- data/lib/jets/commands/templates/webpacker/app/javascript/src/jets/crud.js +87 -0
- data/lib/jets/commands/upgrade.rb +145 -0
- data/lib/jets/commands/upgrade/templates/bin/webpack +19 -0
- data/lib/jets/commands/upgrade/templates/bin/webpack-dev-server +19 -0
- data/lib/jets/commands/url.rb +68 -0
- data/lib/jets/commands/webpacker_template.rb +18 -0
- data/lib/jets/controller.rb +3 -0
- data/lib/jets/controller/base.rb +108 -0
- data/lib/jets/controller/callbacks.rb +68 -0
- data/lib/jets/controller/cookies.rb +38 -0
- data/lib/jets/controller/cookies/jar.rb +269 -0
- data/lib/jets/controller/layout.rb +17 -0
- data/lib/jets/controller/middleware/cors.rb +60 -0
- data/lib/jets/controller/middleware/local.rb +116 -0
- data/lib/jets/controller/middleware/local/api_gateway.rb +93 -0
- data/lib/jets/controller/middleware/local/mimic_aws_call.rb +38 -0
- data/lib/jets/controller/middleware/local/route_matcher.rb +106 -0
- data/lib/jets/controller/middleware/main.rb +46 -0
- data/lib/jets/controller/middleware/reloader.rb +15 -0
- data/lib/jets/controller/middleware/webpacker_setup.rb +6 -0
- data/lib/jets/controller/params.rb +87 -0
- data/lib/jets/controller/rack/adapter.rb +88 -0
- data/lib/jets/controller/rack/env.rb +105 -0
- data/lib/jets/controller/redirection.rb +55 -0
- data/lib/jets/controller/rendering.rb +79 -0
- data/lib/jets/controller/rendering/rack_renderer.rb +250 -0
- data/lib/jets/controller/request.rb +29 -0
- data/lib/jets/controller/response.rb +61 -0
- data/lib/jets/controller/stage.rb +33 -0
- data/lib/jets/core.rb +149 -0
- data/lib/jets/core_ext/kernel.rb +13 -0
- data/lib/jets/db.rb +15 -0
- data/lib/jets/dotenv.rb +48 -0
- data/lib/jets/dotenv/ssm.rb +48 -0
- data/lib/jets/erb.rb +51 -0
- data/lib/jets/generator.rb +48 -0
- data/lib/jets/generator/templates/erb/controller/view.html.erb +2 -0
- data/lib/jets/generator/templates/erb/scaffold/_form.html.erb +39 -0
- data/lib/jets/generator/templates/erb/scaffold/edit.html.erb +6 -0
- data/lib/jets/generator/templates/erb/scaffold/index.html.erb +29 -0
- data/lib/jets/generator/templates/erb/scaffold/new.html.erb +5 -0
- data/lib/jets/generator/templates/erb/scaffold/show.html.erb +9 -0
- data/lib/jets/generator/templates/rails/assets/javascript.js +2 -0
- data/lib/jets/generator/templates/rails/assets/stylesheet.css +4 -0
- data/lib/jets/generator/templates/rails/controller/controller.rb +13 -0
- data/lib/jets/generator/templates/rails/helper/helper.rb +4 -0
- data/lib/jets/generator/templates/rails/scaffold/scaffold.css +80 -0
- data/lib/jets/generator/templates/rails/scaffold_controller/api_controller.rb +62 -0
- data/lib/jets/generator/templates/rails/scaffold_controller/controller.rb +79 -0
- data/lib/jets/inflections.rb +32 -0
- data/lib/jets/internal/app/controllers/jets/mailers_controller.rb +97 -0
- data/lib/jets/internal/app/controllers/jets/public_controller.rb +31 -0
- data/lib/jets/internal/app/controllers/jets/rack_controller.rb +25 -0
- data/lib/jets/internal/app/functions/jets/base_path.rb +157 -0
- data/lib/jets/internal/app/helpers/jets/mailers_helper.rb +9 -0
- data/lib/jets/internal/app/jobs/jets/preheat_job.rb +70 -0
- data/lib/jets/internal/app/shared/functions/jets/s3_bucket_config.rb +43 -0
- data/lib/jets/internal/app/views/jets/mailers/email.html.erb +145 -0
- data/lib/jets/internal/app/views/jets/mailers/index.html.erb +8 -0
- data/lib/jets/internal/app/views/jets/mailers/mailer.html.erb +6 -0
- data/lib/jets/internal/turbines/jets/mailer.rb +51 -0
- data/lib/jets/job/base.rb +39 -0
- data/lib/jets/job/dsl.rb +40 -0
- data/lib/jets/job/dsl/dynamodb_event.rb +65 -0
- data/lib/jets/job/dsl/event_source_mapping.rb +11 -0
- data/lib/jets/job/dsl/iot_event.rb +24 -0
- data/lib/jets/job/dsl/kinesis_event.rb +46 -0
- data/lib/jets/job/dsl/log_event.rb +15 -0
- data/lib/jets/job/dsl/rule_event.rb +75 -0
- data/lib/jets/job/dsl/s3_event.rb +36 -0
- data/lib/jets/job/dsl/sns_event.rb +54 -0
- data/lib/jets/job/dsl/sqs_event.rb +96 -0
- data/lib/jets/job/helpers/kinesis_event_helper.rb +13 -0
- data/lib/jets/job/helpers/log_event_helper.rb +17 -0
- data/lib/jets/job/helpers/s3_event_helper.rb +13 -0
- data/lib/jets/klass.rb +109 -0
- data/lib/jets/lambda/dsl.rb +419 -0
- data/lib/jets/lambda/function.rb +29 -0
- data/lib/jets/lambda/function_constructor.rb +55 -0
- data/lib/jets/lambda/functions.rb +34 -0
- data/lib/jets/lambda/task.rb +111 -0
- data/lib/jets/logger.rb +21 -0
- data/lib/jets/mega/hash_converter.rb +25 -0
- data/lib/jets/mega/request.rb +139 -0
- data/lib/jets/mega/request/source.rb +21 -0
- data/lib/jets/middleware.rb +33 -0
- data/lib/jets/middleware/configurator.rb +84 -0
- data/lib/jets/middleware/default_stack.rb +51 -0
- data/lib/jets/middleware/layer.rb +34 -0
- data/lib/jets/middleware/stack.rb +77 -0
- data/lib/jets/naming.rb +49 -0
- data/lib/jets/overrides/lambda.rb +1 -0
- data/lib/jets/overrides/lambda/marshaller.rb +31 -0
- data/lib/jets/overrides/rails.rb +4 -0
- data/lib/jets/overrides/rails/asset_tag_helper.rb +114 -0
- data/lib/jets/overrides/rails/common_methods.rb +13 -0
- data/lib/jets/overrides/rails/rendering_helper.rb +26 -0
- data/lib/jets/overrides/rails/url_helper.rb +25 -0
- data/lib/jets/poly_fun.rb +73 -0
- data/lib/jets/poly_fun/base_executor.rb +125 -0
- data/lib/jets/poly_fun/lambda_executor.rb +16 -0
- data/lib/jets/poly_fun/node_error.rb +8 -0
- data/lib/jets/poly_fun/node_executor.rb +54 -0
- data/lib/jets/poly_fun/python_error.rb +8 -0
- data/lib/jets/poly_fun/python_executor.rb +23 -0
- data/lib/jets/preheat.rb +117 -0
- data/lib/jets/processors/deducer.rb +65 -0
- data/lib/jets/processors/main_processor.rb +61 -0
- data/lib/jets/rack_server.rb +86 -0
- data/lib/jets/rdoc.rb +30 -0
- data/lib/jets/resource.rb +71 -0
- data/lib/jets/resource/api_gateway/base_path/function.rb +42 -0
- data/lib/jets/resource/api_gateway/base_path/mapping.rb +44 -0
- data/lib/jets/resource/api_gateway/base_path/role.rb +76 -0
- data/lib/jets/resource/api_gateway/cors.rb +61 -0
- data/lib/jets/resource/api_gateway/deployment.rb +78 -0
- data/lib/jets/resource/api_gateway/domain_name.rb +59 -0
- data/lib/jets/resource/api_gateway/method.rb +98 -0
- data/lib/jets/resource/api_gateway/resource.rb +101 -0
- data/lib/jets/resource/api_gateway/rest_api.rb +56 -0
- data/lib/jets/resource/api_gateway/rest_api/change_detection.rb +42 -0
- data/lib/jets/resource/api_gateway/rest_api/logical_id.rb +63 -0
- data/lib/jets/resource/api_gateway/rest_api/routes.rb +7 -0
- data/lib/jets/resource/api_gateway/rest_api/routes/change.rb +8 -0
- data/lib/jets/resource/api_gateway/rest_api/routes/change/base.rb +130 -0
- data/lib/jets/resource/api_gateway/rest_api/routes/change/to.rb +29 -0
- data/lib/jets/resource/api_gateway/rest_api/routes/change/variable.rb +39 -0
- data/lib/jets/resource/api_gateway/rest_api/routes/collision.rb +121 -0
- data/lib/jets/resource/api_gateway/rest_api/routes/collision/variable_exception.rb +7 -0
- data/lib/jets/resource/associated.rb +37 -0
- data/lib/jets/resource/base.rb +28 -0
- data/lib/jets/resource/child_stack/api_deployment.rb +56 -0
- data/lib/jets/resource/child_stack/api_gateway.rb +53 -0
- data/lib/jets/resource/child_stack/app_class.rb +107 -0
- data/lib/jets/resource/child_stack/base.rb +24 -0
- data/lib/jets/resource/child_stack/shared.rb +92 -0
- data/lib/jets/resource/config/config_rule.rb +74 -0
- data/lib/jets/resource/config/managed_rule.rb +15 -0
- data/lib/jets/resource/events/rule.rb +31 -0
- data/lib/jets/resource/iam/application_role.rb +27 -0
- data/lib/jets/resource/iam/base_role_definition.rb +47 -0
- data/lib/jets/resource/iam/class_role.rb +74 -0
- data/lib/jets/resource/iam/function_role.rb +54 -0
- data/lib/jets/resource/iam/managed_policy.rb +22 -0
- data/lib/jets/resource/iam/policy_document.rb +41 -0
- data/lib/jets/resource/iot/topic_rule.rb +34 -0
- data/lib/jets/resource/lambda/event_source_mapping.rb +31 -0
- data/lib/jets/resource/lambda/function.rb +214 -0
- data/lib/jets/resource/lambda/function/environment.rb +62 -0
- data/lib/jets/resource/lambda/gem_layer.rb +17 -0
- data/lib/jets/resource/lambda/layer_version.rb +44 -0
- data/lib/jets/resource/logs/subscription_filter.rb +31 -0
- data/lib/jets/resource/permission.rb +45 -0
- data/lib/jets/resource/replacer.rb +85 -0
- data/lib/jets/resource/route53/record_set.rb +70 -0
- data/lib/jets/resource/s3/bucket.rb +24 -0
- data/lib/jets/resource/sns/subscription.rb +29 -0
- data/lib/jets/resource/sns/topic.rb +35 -0
- data/lib/jets/resource/sns/topic_policy.rb +40 -0
- data/lib/jets/resource/sqs/queue.rb +21 -0
- data/lib/jets/resource/standardizer.rb +42 -0
- data/lib/jets/route.rb +166 -0
- data/lib/jets/router.rb +177 -0
- data/lib/jets/router/scope.rb +30 -0
- data/lib/jets/rule/base.rb +19 -0
- data/lib/jets/rule/dsl.rb +110 -0
- data/lib/jets/spec_helpers.rb +54 -0
- data/lib/jets/spec_helpers/params.rb +10 -0
- data/lib/jets/spec_helpers/request.rb +78 -0
- data/lib/jets/spec_helpers/response.rb +5 -0
- data/lib/jets/stack.rb +88 -0
- data/lib/jets/stack/builder.rb +43 -0
- data/lib/jets/stack/definition.rb +50 -0
- data/lib/jets/stack/depends.rb +34 -0
- data/lib/jets/stack/depends/item.rb +9 -0
- data/lib/jets/stack/function.rb +69 -0
- data/lib/jets/stack/main.rb +4 -0
- data/lib/jets/stack/main/dsl.rb +28 -0
- data/lib/jets/stack/main/dsl/base.rb +49 -0
- data/lib/jets/stack/main/dsl/cloudwatch.rb +19 -0
- data/lib/jets/stack/main/dsl/iam.rb +8 -0
- data/lib/jets/stack/main/dsl/lambda.rb +83 -0
- data/lib/jets/stack/main/dsl/s3.rb +12 -0
- data/lib/jets/stack/main/dsl/sns.rb +16 -0
- data/lib/jets/stack/main/dsl/sqs.rb +10 -0
- data/lib/jets/stack/output.rb +35 -0
- data/lib/jets/stack/output/dsl.rb +19 -0
- data/lib/jets/stack/output/lookup.rb +36 -0
- data/lib/jets/stack/parameter.rb +37 -0
- data/lib/jets/stack/parameter/dsl.rb +42 -0
- data/lib/jets/stack/resource.rb +31 -0
- data/lib/jets/stack/resource/dsl.rb +19 -0
- data/lib/jets/stack/s3_event.rb +87 -0
- data/lib/jets/tmp_loader.rb +52 -0
- data/lib/jets/turbine.rb +41 -0
- data/lib/jets/turbo.rb +55 -0
- data/lib/jets/turbo/database_yaml.rb +41 -0
- data/lib/jets/turbo/project/.gitignore +12 -0
- data/lib/jets/turbo/project/.jetskeep +1 -0
- data/lib/jets/turbo/project/Gemfile +16 -0
- data/lib/jets/turbo/project/Rakefile +2 -0
- data/lib/jets/turbo/project/app/controllers/application_controller.rb +2 -0
- data/lib/jets/turbo/project/app/helpers/application_helper.rb +2 -0
- data/lib/jets/turbo/project/app/jobs/application_job.rb +4 -0
- data/lib/jets/turbo/project/config.ru +5 -0
- data/lib/jets/turbo/project/config/application.rb +4 -0
- data/lib/jets/turbo/project/config/routes.rb +4 -0
- data/lib/jets/turbo/rails.rb +127 -0
- data/lib/jets/turbo/templates/config/database.yml +26 -0
- data/lib/jets/util.rb +38 -0
- data/lib/jets/version.rb +3 -0
- data/readme/prerelease.md +6 -0
- data/readme/testing.md +60 -0
- metadata +1004 -0
@@ -0,0 +1,26 @@
|
|
1
|
+
default: &default
|
2
|
+
adapter: <%= @database == 'mysql' ? 'mysql2' : 'postgresql' %>
|
3
|
+
encoding: utf8
|
4
|
+
pool: <%%= ENV["DB_POOL"] || 5 %>
|
5
|
+
database: <%%= ENV['DB_NAME'] || '<%= @project_name %>_development' %>
|
6
|
+
<% if @database == 'mysql' -%>
|
7
|
+
username: <%%= ENV['DB_USER'] || 'root' %>
|
8
|
+
<% else -%>
|
9
|
+
username: <%%= ENV['DB_USER'] || ENV['USER'] %>
|
10
|
+
<% end -%>
|
11
|
+
password: <%%= ENV['DB_PASS'] %>
|
12
|
+
host: <%%= ENV["DB_HOST"] %>
|
13
|
+
url: <%%= ENV['DATABASE_URL'] %> # takes higher precedence than other settings
|
14
|
+
|
15
|
+
development:
|
16
|
+
<<: *default
|
17
|
+
database: <%%= ENV['DB_NAME'] || '<%= @project_name %>_development' %>
|
18
|
+
|
19
|
+
test:
|
20
|
+
<<: *default
|
21
|
+
database: <%= @project_name %>_test
|
22
|
+
|
23
|
+
production:
|
24
|
+
<<: *default
|
25
|
+
database: <%= @project_name %>_production
|
26
|
+
url: <%%= ENV['DATABASE_URL'] %>
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Jets::Config.project_namespace is special value results in using the project namespace. Example :
|
2
|
+
# table_namespace: <%= Jets.config.project_namespace %>
|
3
|
+
# This is the default value.
|
4
|
+
|
5
|
+
development:
|
6
|
+
table_namespace: <%= Jets.config.table_namespace %>
|
7
|
+
# More examples:
|
8
|
+
# table_namespace: demo-dev
|
9
|
+
|
10
|
+
endpoint: http://localhost:8000 # comment out if want to test with real dynamodb
|
11
|
+
# on AWS. You can also set the DYNAMODB_ENDPOINT environment variable.
|
12
|
+
# You can also are actually deploying a development environment is to
|
13
|
+
# change bin/server and export DYNAMODB_ENDPOINT=http://localhost:8000 at the top
|
14
|
+
# there.
|
15
|
+
|
16
|
+
test:
|
17
|
+
# table_namespace: proj # do not include the env
|
18
|
+
endpoint: http://localhost:8000
|
19
|
+
table_namespace: <%= Jets.config.table_namespace %>
|
20
|
+
|
21
|
+
production:
|
22
|
+
table_namespace: <%= Jets.config.table_namespace %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Jets.application.configure do
|
2
|
+
# Example:
|
3
|
+
# config.function.memory_size = 2048
|
4
|
+
|
5
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
6
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
7
|
+
# Docs: http://rubyonjets.com/docs/email-sending/
|
8
|
+
# config.action_mailer.raise_delivery_errors = false
|
9
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
Jets.application.configure do
|
2
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
3
|
+
# The :test delivery method accumulates sent emails in the
|
4
|
+
# ActionMailer::Base.deliveries array.
|
5
|
+
# Docs: http://rubyonjets.com/docs/email-sending/
|
6
|
+
config.action_mailer.delivery_method = :test
|
7
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Jets.application.routes.draw do
|
2
|
+
root "jets/public#show"
|
3
|
+
|
4
|
+
# The jets/public#show controller can serve static utf8 content out of the public folder.
|
5
|
+
# Note, as part of the deploy process Jets uploads files in the public folder to s3
|
6
|
+
# and serves them out of s3 directly. S3 is well suited to serve static assets.
|
7
|
+
# More info here: https://rubyonjets.com/docs/extras/assets-serving/
|
8
|
+
any "*catchall", to: "jets/public#show"
|
9
|
+
end
|
File without changes
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
.rails-default-error-page {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
.rails-default-error-page div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.rails-default-error-page div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
.rails-default-error-page h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
.rails-default-error-page div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body class="rails-default-error-page">
|
58
|
+
<!-- This file lives in public/404.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The page you were looking for doesn't exist.</h1>
|
62
|
+
<p>You may have mistyped the address or the page may have moved.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,67 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>The change you wanted was rejected (422)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
.rails-default-error-page {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
.rails-default-error-page div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.rails-default-error-page div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
.rails-default-error-page h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
.rails-default-error-page div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body class="rails-default-error-page">
|
58
|
+
<!-- This file lives in public/422.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>The change you wanted was rejected.</h1>
|
62
|
+
<p>Maybe you tried to change something you didn't have access to.</p>
|
63
|
+
</div>
|
64
|
+
<p>If you are the application owner check the logs for more information.</p>
|
65
|
+
</div>
|
66
|
+
</body>
|
67
|
+
</html>
|
@@ -0,0 +1,66 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>We're sorry, but something went wrong (500)</title>
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
6
|
+
<style>
|
7
|
+
.rails-default-error-page {
|
8
|
+
background-color: #EFEFEF;
|
9
|
+
color: #2E2F30;
|
10
|
+
text-align: center;
|
11
|
+
font-family: arial, sans-serif;
|
12
|
+
margin: 0;
|
13
|
+
}
|
14
|
+
|
15
|
+
.rails-default-error-page div.dialog {
|
16
|
+
width: 95%;
|
17
|
+
max-width: 33em;
|
18
|
+
margin: 4em auto 0;
|
19
|
+
}
|
20
|
+
|
21
|
+
.rails-default-error-page div.dialog > div {
|
22
|
+
border: 1px solid #CCC;
|
23
|
+
border-right-color: #999;
|
24
|
+
border-left-color: #999;
|
25
|
+
border-bottom-color: #BBB;
|
26
|
+
border-top: #B00100 solid 4px;
|
27
|
+
border-top-left-radius: 9px;
|
28
|
+
border-top-right-radius: 9px;
|
29
|
+
background-color: white;
|
30
|
+
padding: 7px 12% 0;
|
31
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
32
|
+
}
|
33
|
+
|
34
|
+
.rails-default-error-page h1 {
|
35
|
+
font-size: 100%;
|
36
|
+
color: #730E15;
|
37
|
+
line-height: 1.5em;
|
38
|
+
}
|
39
|
+
|
40
|
+
.rails-default-error-page div.dialog > p {
|
41
|
+
margin: 0 0 1em;
|
42
|
+
padding: 1em;
|
43
|
+
background-color: #F7F7F7;
|
44
|
+
border: 1px solid #CCC;
|
45
|
+
border-right-color: #999;
|
46
|
+
border-left-color: #999;
|
47
|
+
border-bottom-color: #999;
|
48
|
+
border-bottom-left-radius: 4px;
|
49
|
+
border-bottom-right-radius: 4px;
|
50
|
+
border-top-color: #DADADA;
|
51
|
+
color: #666;
|
52
|
+
box-shadow: 0 3px 8px rgba(50, 50, 50, 0.17);
|
53
|
+
}
|
54
|
+
</style>
|
55
|
+
</head>
|
56
|
+
|
57
|
+
<body class="rails-default-error-page">
|
58
|
+
<!-- This file lives in public/500.html -->
|
59
|
+
<div class="dialog">
|
60
|
+
<div>
|
61
|
+
<h1>We're sorry, but something went wrong.</h1>
|
62
|
+
</div>
|
63
|
+
<p>If you are the application owner check the logs for more information.</p>
|
64
|
+
</div>
|
65
|
+
</body>
|
66
|
+
</html>
|
Binary file
|
@@ -0,0 +1,91 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>Ruby on Jets</title>
|
5
|
+
<meta charset="utf-8">
|
6
|
+
<meta name="viewport" content="width=device-width">
|
7
|
+
<style type="text/css" media="screen" charset="utf-8">
|
8
|
+
body {
|
9
|
+
text-align: center;
|
10
|
+
margin: 0;
|
11
|
+
}
|
12
|
+
img {
|
13
|
+
max-width: 320px;
|
14
|
+
}
|
15
|
+
.container {
|
16
|
+
max-width: 648px;
|
17
|
+
}
|
18
|
+
@media (min-width: 768px) {
|
19
|
+
img {
|
20
|
+
max-width: none;
|
21
|
+
}
|
22
|
+
.container {
|
23
|
+
max-width: none;
|
24
|
+
}
|
25
|
+
}
|
26
|
+
|
27
|
+
.header {
|
28
|
+
padding: 20px;
|
29
|
+
/*background-color: #b81513;*/
|
30
|
+
/*color: white;*/
|
31
|
+
}
|
32
|
+
.title {
|
33
|
+
font-size: 1.5em;
|
34
|
+
}
|
35
|
+
@media (max-width: 500px) {
|
36
|
+
.title {
|
37
|
+
font-size: 1.3em;
|
38
|
+
}
|
39
|
+
}
|
40
|
+
.intro {
|
41
|
+
text-align: left;
|
42
|
+
font-size: large;
|
43
|
+
margin: 0 auto;
|
44
|
+
padding: 0 20px;
|
45
|
+
max-width: 640px;
|
46
|
+
}
|
47
|
+
pre, code {
|
48
|
+
padding: 0;
|
49
|
+
margin: 0;
|
50
|
+
}
|
51
|
+
pre {
|
52
|
+
margin-left: 20px;
|
53
|
+
width: 99%;
|
54
|
+
overflow: auto;
|
55
|
+
}
|
56
|
+
@media (max-width: 500px) {
|
57
|
+
pre {
|
58
|
+
margin-left: -30px;
|
59
|
+
font-size: 0.8em;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
</style>
|
63
|
+
</head>
|
64
|
+
|
65
|
+
<body>
|
66
|
+
<div class="container">
|
67
|
+
<header class="header">
|
68
|
+
<img src="https://s3.amazonaws.com/jets-public/jets/images/jets.png" class="logo" alt="logo" />
|
69
|
+
<h1 class="title">Welcome and congrats!<br /> Jets is running.</h1>
|
70
|
+
</header>
|
71
|
+
<div class="intro">
|
72
|
+
<p>
|
73
|
+
To get started:
|
74
|
+
</p>
|
75
|
+
<div class="code"><pre><code>
|
76
|
+
$ jets generate scaffold post title:string
|
77
|
+
$ jets db:create db:migrate
|
78
|
+
$ jets server
|
79
|
+
$ open http://localhost:8888/posts
|
80
|
+
$ jets help
|
81
|
+
</code></pre></div>
|
82
|
+
<p>More on info: <a href="http://rubyonjets.com">rubyonjets.com</a></p>
|
83
|
+
<p>Also check out the <a href="http://rubyonjets.com/reference">Jets CLI reference</a>.</p>
|
84
|
+
</div>
|
85
|
+
<p class="version">
|
86
|
+
<strong>Jets version:</strong> <%= Jets.version %><br />
|
87
|
+
<strong>Ruby version:</strong> <%= Jets::RUBY_VERSION %>
|
88
|
+
</p>
|
89
|
+
</div>
|
90
|
+
</body>
|
91
|
+
</html>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# Example:
|
2
|
+
# describe PostsController, type: :controller do
|
3
|
+
# it "index returns a success response" do
|
4
|
+
# get '/posts'
|
5
|
+
# expect(response.status).to eq 200
|
6
|
+
# pp response.body
|
7
|
+
# end
|
8
|
+
#
|
9
|
+
# it "show returns a success response" do
|
10
|
+
# Post.create(id: 1) unless Post.find_by(id: 1) # TODO: set up factory_bot
|
11
|
+
# get '/posts/:id', id: 1
|
12
|
+
# expect(response.status).to eq 200
|
13
|
+
# pp response.body
|
14
|
+
# end
|
15
|
+
# end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
{
|
2
|
+
"resource": "/posts",
|
3
|
+
"path": "/posts",
|
4
|
+
"httpMethod": "GET",
|
5
|
+
"headers": {
|
6
|
+
"Accept": "*/*",
|
7
|
+
"CloudFront-Forwarded-Proto": "https",
|
8
|
+
"CloudFront-Is-Desktop-Viewer": "true",
|
9
|
+
"CloudFront-Is-Mobile-Viewer": "false",
|
10
|
+
"CloudFront-Is-SmartTV-Viewer": "false",
|
11
|
+
"CloudFront-Is-Tablet-Viewer": "false",
|
12
|
+
"CloudFront-Viewer-Country": "US",
|
13
|
+
"Host": "qg45s7uvg2.execute-api.us-east-1.amazonaws.com",
|
14
|
+
"User-Agent": "curl/7.54.0",
|
15
|
+
"Via": "1.1 3d3d633d266d05d90a4eea7a6a59b514.cloudfront.net (CloudFront)",
|
16
|
+
"X-Amz-Cf-Id": "4mAgowukJJbA7lgTWITzgOPmdiDsXPCwy6vonS8VKPXCdEsmldVgdg==",
|
17
|
+
"X-Amzn-Trace-Id": "Root=1-59fb8ea5-38c5ad176dac130f3eb9ce97",
|
18
|
+
"X-Forwarded-For": "69.42.1.180, 54.239.203.118",
|
19
|
+
"X-Forwarded-Port": "443",
|
20
|
+
"X-Forwarded-Proto": "https"
|
21
|
+
},
|
22
|
+
"queryStringParameters": null,
|
23
|
+
"pathParameters": null,
|
24
|
+
"stageVariables": null,
|
25
|
+
"requestContext": {
|
26
|
+
"path": "/prod/posts",
|
27
|
+
"accountId": "123456789012",
|
28
|
+
"resourceId": "ery965",
|
29
|
+
"stage": "prod",
|
30
|
+
"requestId": "292fbcc8-c015-11e7-94fa-cd109b693f3c",
|
31
|
+
"identity": {
|
32
|
+
"cognitoIdentityPoolId": null,
|
33
|
+
"accountId": null,
|
34
|
+
"cognitoIdentityId": null,
|
35
|
+
"caller": null,
|
36
|
+
"apiKey": "",
|
37
|
+
"sourceIp": "69.42.1.180",
|
38
|
+
"accessKey": null,
|
39
|
+
"cognitoAuthenticationType": null,
|
40
|
+
"cognitoAuthenticationProvider": null,
|
41
|
+
"userArn": null,
|
42
|
+
"userAgent": "curl/7.54.0",
|
43
|
+
"user": null
|
44
|
+
},
|
45
|
+
"resourcePath": "/posts",
|
46
|
+
"httpMethod": "GET",
|
47
|
+
"apiId": "qg45s7uvg2"
|
48
|
+
},
|
49
|
+
"body": null,
|
50
|
+
"isBase64Encoded": false
|
51
|
+
}
|