suspenders 20230113.0 → 20240516.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +83 -176
- data/Rakefile +13 -0
- data/lib/generators/suspenders/accessibility_generator.rb +24 -0
- data/lib/generators/suspenders/advisories_generator.rb +32 -0
- data/lib/generators/suspenders/ci_generator.rb +57 -0
- data/lib/generators/suspenders/email_generator.rb +56 -0
- data/lib/generators/suspenders/environments/development_generator.rb +50 -0
- data/lib/generators/suspenders/environments/production_generator.rb +27 -0
- data/lib/generators/suspenders/environments/test_generator.rb +39 -0
- data/lib/generators/suspenders/factories_generator.rb +64 -0
- data/lib/generators/suspenders/inline_svg_generator.rb +24 -0
- data/lib/generators/suspenders/install/web_generator.rb +71 -0
- data/lib/generators/suspenders/jobs_generator.rb +34 -0
- data/lib/generators/suspenders/lint_generator.rb +94 -0
- data/lib/generators/suspenders/prerequisites_generator.rb +19 -0
- data/lib/generators/suspenders/rake_generator.rb +25 -0
- data/lib/generators/suspenders/setup_generator.rb +14 -0
- data/lib/generators/suspenders/styles_generator.rb +84 -0
- data/lib/generators/suspenders/tasks_generator.rb +20 -0
- data/lib/generators/suspenders/testing_generator.rb +113 -0
- data/lib/generators/suspenders/views_generator.rb +38 -0
- data/lib/generators/templates/ci/ci.yml.tt +148 -0
- data/lib/generators/templates/ci/dependabot.yml +7 -0
- data/lib/generators/templates/email/email_interceptor.rb +11 -0
- data/lib/generators/templates/factories/factories_spec.rb +7 -0
- data/lib/generators/templates/factories/factories_test.rb +9 -0
- data/lib/generators/templates/install/web/CONTRIBUTING.md +94 -0
- data/lib/generators/templates/lint/config_better_html.yml +2 -0
- data/lib/generators/templates/lint/config_initializers_better_html.rb +9 -0
- data/lib/generators/templates/lint/erb-lint.yml +63 -0
- data/lib/generators/templates/lint/erblint.rake +47 -0
- data/lib/generators/templates/lint/eslintrc.json +7 -0
- data/lib/generators/templates/lint/package.json +4 -0
- data/lib/generators/templates/lint/prettierignore +1 -0
- data/lib/generators/templates/lint/prettierrc +11 -0
- data/lib/generators/templates/lint/rubocop.yml.tt +7 -0
- data/lib/generators/templates/prerequisites/node-version.tt +1 -0
- data/lib/generators/templates/setup/bin_setup.rb +39 -0
- data/lib/generators/templates/styles/postcss.config.js +11 -0
- data/lib/generators/templates/testing/driver.rb +5 -0
- data/lib/generators/templates/views/flashes.html.erb +7 -0
- data/lib/install/web.rb +54 -0
- data/lib/suspenders/cleanup/generate_readme.rb +165 -0
- data/lib/suspenders/cleanup/organize_gemfile.rb +134 -0
- data/lib/suspenders/engine.rb +5 -0
- data/lib/suspenders/generators.rb +126 -0
- data/lib/suspenders/railtie.rb +4 -0
- data/lib/suspenders/version.rb +4 -6
- data/lib/suspenders.rb +9 -33
- data/lib/tasks/suspenders.rake +37 -0
- metadata +82 -173
- data/.ruby-version +0 -1
- data/CONTRIBUTING.md +0 -59
- data/GOALS.md +0 -65
- data/LICENSE +0 -21
- data/NEWS.md +0 -738
- data/RELEASING.md +0 -18
- data/bin/suspenders +0 -50
- data/docs/heroku_deploy.md +0 -19
- data/docs/rails_7.md +0 -5
- data/lib/suspenders/actions/strip_comments_action.rb +0 -254
- data/lib/suspenders/actions.rb +0 -106
- data/lib/suspenders/adapters/heroku.rb +0 -136
- data/lib/suspenders/app_builder.rb +0 -267
- data/lib/suspenders/exit_on_failure.rb +0 -19
- data/lib/suspenders/generators/accessibility_generator.rb +0 -12
- data/lib/suspenders/generators/advisories_generator.rb +0 -15
- data/lib/suspenders/generators/analytics_generator.rb +0 -24
- data/lib/suspenders/generators/app_generator.rb +0 -215
- data/lib/suspenders/generators/base.rb +0 -60
- data/lib/suspenders/generators/ci_generator.rb +0 -32
- data/lib/suspenders/generators/db_optimizations_generator.rb +0 -18
- data/lib/suspenders/generators/factories_generator.rb +0 -22
- data/lib/suspenders/generators/forms_generator.rb +0 -18
- data/lib/suspenders/generators/inline_svg_generator.rb +0 -14
- data/lib/suspenders/generators/jobs_generator.rb +0 -37
- data/lib/suspenders/generators/js_driver_generator.rb +0 -18
- data/lib/suspenders/generators/json_generator.rb +0 -14
- data/lib/suspenders/generators/lint_generator.rb +0 -14
- data/lib/suspenders/generators/production/compression_generator.rb +0 -14
- data/lib/suspenders/generators/production/deployment_generator.rb +0 -16
- data/lib/suspenders/generators/production/email_generator.rb +0 -34
- data/lib/suspenders/generators/production/force_tls_generator.rb +0 -11
- data/lib/suspenders/generators/production/manifest_generator.rb +0 -25
- data/lib/suspenders/generators/production/single_redirect.rb +0 -15
- data/lib/suspenders/generators/production/timeout_generator.rb +0 -22
- data/lib/suspenders/generators/profiler_generator.rb +0 -35
- data/lib/suspenders/generators/runner_generator.rb +0 -48
- data/lib/suspenders/generators/staging/pull_requests_generator.rb +0 -25
- data/lib/suspenders/generators/static_generator.rb +0 -14
- data/lib/suspenders/generators/stylelint_generator.rb +0 -71
- data/lib/suspenders/generators/stylesheet_base_generator.rb +0 -15
- data/lib/suspenders/generators/testing_generator.rb +0 -43
- data/lib/suspenders/generators/views_generator.rb +0 -25
- data/templates/Gemfile.erb +0 -49
- data/templates/Procfile +0 -2
- data/templates/README.md.erb +0 -28
- data/templates/_analytics.html.erb +0 -8
- data/templates/_css_overrides.html.erb +0 -7
- data/templates/_flashes.html.erb +0 -7
- data/templates/active_job.rb +0 -14
- data/templates/application.postcss.css +0 -1
- data/templates/bin_auto_migrate +0 -5
- data/templates/bin_deploy +0 -10
- data/templates/bin_setup +0 -28
- data/templates/bin_setup_review_app.erb +0 -21
- data/templates/bin_yarn +0 -18
- data/templates/bundler_audit.rake +0 -4
- data/templates/capybara_silence_puma.rb +0 -1
- data/templates/chromedriver.rb +0 -27
- data/templates/circle.yml.erb +0 -6
- data/templates/config_locales_en.yml.erb +0 -19
- data/templates/descriptions/advisories.md +0 -5
- data/templates/descriptions/analytics.md +0 -4
- data/templates/descriptions/ci.md +0 -4
- data/templates/descriptions/compression.md +0 -4
- data/templates/descriptions/db_optimizations.md +0 -2
- data/templates/descriptions/deployment.md +0 -5
- data/templates/descriptions/email.md +0 -9
- data/templates/descriptions/factories.md +0 -12
- data/templates/descriptions/force_tls.md +0 -1
- data/templates/descriptions/forms.md +0 -1
- data/templates/descriptions/inline_svg.md +0 -2
- data/templates/descriptions/jobs.md +0 -3
- data/templates/descriptions/js_driver.md +0 -4
- data/templates/descriptions/json.md +0 -1
- data/templates/descriptions/lint.md +0 -3
- data/templates/descriptions/manifest.md +0 -2
- data/templates/descriptions/profiler.md +0 -7
- data/templates/descriptions/pull_requests.md +0 -4
- data/templates/descriptions/runner.md +0 -10
- data/templates/descriptions/single_redirect.md +0 -1
- data/templates/descriptions/static.md +0 -5
- data/templates/descriptions/stylelint.md +0 -3
- data/templates/descriptions/stylesheet_base.md +0 -1
- data/templates/descriptions/testing.md +0 -9
- data/templates/descriptions/timeout.md +0 -4
- data/templates/descriptions/views.md +0 -8
- data/templates/email.rb +0 -3
- data/templates/errors.rb +0 -35
- data/templates/flashes_helper.rb +0 -5
- data/templates/hound.yml +0 -15
- data/templates/json_encoding.rb +0 -1
- data/templates/oj.rb +0 -3
- data/templates/partials/ci_simplecov.rb +0 -14
- data/templates/partials/db_optimizations_configuration.rb +0 -7
- data/templates/partials/deployment_readme.md +0 -8
- data/templates/partials/email_smtp.rb +0 -2
- data/templates/partials/profiler_readme.md +0 -8
- data/templates/partials/pull_requests_config.rb +0 -5
- data/templates/partials/runner_readme.md +0 -31
- data/templates/partials/runner_setup.rb +0 -2
- data/templates/postcss.config.js +0 -8
- data/templates/postgresql_database.yml.erb +0 -20
- data/templates/rack_mini_profiler.rb +0 -7
- data/templates/rails_helper.rb +0 -25
- data/templates/sample_env +0 -12
- data/templates/secrets.yml +0 -8
- data/templates/smtp.rb +0 -9
- data/templates/spec_helper.rb +0 -25
- data/templates/suspenders_gitignore +0 -18
- data/templates/suspenders_layout.html.erb.erb +0 -23
- /data/{templates → lib/generators/templates/factories}/factories.rb +0 -0
- /data/{templates → lib/generators/templates/factories}/factory_bot_rspec.rb +0 -0
- /data/{templates → lib/generators/templates/inline_svg}/inline_svg.rb +0 -0
- /data/{templates → lib/generators/templates/lint}/stylelintrc.json +0 -0
- /data/{templates → lib/generators/templates/tasks}/dev.rake +0 -0
- /data/{templates → lib/generators/templates/testing}/action_mailer.rb +0 -0
- /data/{templates → lib/generators/templates/testing}/i18n.rb +0 -0
- /data/{templates/shoulda_matchers_config_rspec.rb → lib/generators/templates/testing/shoulda_matchers.rb} +0 -0
data/templates/active_job.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require "active_job/logging"
|
2
|
-
require "active_job/log_subscriber"
|
3
|
-
|
4
|
-
ActiveSupport::Notifications.unsubscribe("enqueue.active_job")
|
5
|
-
|
6
|
-
module ActiveJob
|
7
|
-
module Logging
|
8
|
-
class EnqueueLogSubscriber < LogSubscriber
|
9
|
-
define_method :enqueue, instance_method(:enqueue)
|
10
|
-
end
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
ActiveJob::Logging::EnqueueLogSubscriber.attach_to(:active_job)
|
@@ -1 +0,0 @@
|
|
1
|
-
@import "normalize.css"
|
data/templates/bin_auto_migrate
DELETED
data/templates/bin_deploy
DELETED
data/templates/bin_setup
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
|
3
|
-
# Set up Rails app. Run this script immediately after cloning the codebase.
|
4
|
-
# https://github.com/thoughtbot/guides/tree/master/protocol
|
5
|
-
|
6
|
-
# Exit if any subcommand fails
|
7
|
-
set -e
|
8
|
-
|
9
|
-
# Set up Ruby dependencies via Bundler
|
10
|
-
gem install bundler --conservative
|
11
|
-
bundle check || bundle install
|
12
|
-
|
13
|
-
# Install JavaScript dependencies
|
14
|
-
bin/yarn
|
15
|
-
|
16
|
-
# Set up database and add any development seed data
|
17
|
-
bin/rails dev:prime
|
18
|
-
|
19
|
-
if [ ! -d .git/safe ] && echo $PATH | grep .git/safe > /dev/null; then
|
20
|
-
echo "-----------------------------------------------------------------------"
|
21
|
-
echo
|
22
|
-
echo "-> When you trust this repo, remember to run: mkdir -p .git/safe"
|
23
|
-
echo
|
24
|
-
fi
|
25
|
-
|
26
|
-
# Only if this isn't CI
|
27
|
-
if [ -z "$CI" ]; then
|
28
|
-
fi
|
@@ -1,21 +0,0 @@
|
|
1
|
-
#!/bin/sh
|
2
|
-
|
3
|
-
# Run this script to set up a review app's database and worker dyno
|
4
|
-
|
5
|
-
set -e
|
6
|
-
|
7
|
-
if [ -z "$1" ]; then
|
8
|
-
printf "You must provide a review app (same as the pull request) id.\n"
|
9
|
-
exit 64
|
10
|
-
fi
|
11
|
-
|
12
|
-
PARENT_APP_NAME=<%= app_name.dasherize %>-staging
|
13
|
-
APP_NAME=<%= app_name.dasherize %>-staging-pr-$1
|
14
|
-
|
15
|
-
heroku pg:backups:capture --app $PARENT_APP_NAME
|
16
|
-
|
17
|
-
URL=`heroku pg:backups public-url --app $PARENT_APP_NAME`
|
18
|
-
|
19
|
-
heroku pg:backups restore $URL DATABASE_URL --confirm $APP_NAME --app $APP_NAME
|
20
|
-
heroku ps:scale worker=1 --app $APP_NAME
|
21
|
-
heroku restart --app $APP_NAME
|
data/templates/bin_yarn
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
APP_ROOT = File.expand_path("..", __dir__)
|
4
|
-
Dir.chdir(APP_ROOT) do
|
5
|
-
yarn = ENV["PATH"].split(File::PATH_SEPARATOR)
|
6
|
-
.select { |dir| File.expand_path(dir) != __dir__ }
|
7
|
-
.product(["yarn", "yarnpkg", "yarn.cmd", "yarn.ps1"])
|
8
|
-
.map { |dir, file| File.expand_path(file, dir) }
|
9
|
-
.find { |file| File.executable?(file) }
|
10
|
-
|
11
|
-
if yarn
|
12
|
-
exec yarn, *ARGV
|
13
|
-
else
|
14
|
-
warn "Yarn executable was not detected in the system."
|
15
|
-
warn "Download Yarn at https://yarnpkg.com/en/docs/install"
|
16
|
-
exit 1
|
17
|
-
end
|
18
|
-
end
|
@@ -1 +0,0 @@
|
|
1
|
-
Capybara.server = :puma, {Silent: true}
|
data/templates/chromedriver.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
require "selenium/webdriver"
|
2
|
-
|
3
|
-
Capybara.register_driver :chrome do |app|
|
4
|
-
Capybara::Selenium::Driver.new(app, browser: :chrome)
|
5
|
-
end
|
6
|
-
|
7
|
-
Capybara.register_driver :headless_chrome do |app|
|
8
|
-
options = ::Selenium::WebDriver::Chrome::Options.new
|
9
|
-
options.headless!
|
10
|
-
options.add_argument "--window-size=1680,1050"
|
11
|
-
|
12
|
-
Capybara::Selenium::Driver.new app,
|
13
|
-
browser: :chrome,
|
14
|
-
options: options
|
15
|
-
end
|
16
|
-
|
17
|
-
Capybara.javascript_driver = :headless_chrome
|
18
|
-
|
19
|
-
RSpec.configure do |config|
|
20
|
-
config.before(:each, type: :system) do
|
21
|
-
driven_by :rack_test
|
22
|
-
end
|
23
|
-
|
24
|
-
config.before(:each, type: :system, js: true) do
|
25
|
-
driven_by Capybara.javascript_driver
|
26
|
-
end
|
27
|
-
end
|
data/templates/circle.yml.erb
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
Build test data with clarity and ease.
|
2
|
-
|
3
|
-
This uses FactoryBot to help you define dummy and test data for your test
|
4
|
-
suite. The `create`, `build`, and `build_stubbed` class methods are directly
|
5
|
-
available to all tests.
|
6
|
-
|
7
|
-
We recommend putting FactoryBot definitions in one `spec/factories.rb` file, at
|
8
|
-
least until it grows unwieldy. This helps reduce confusion around circular
|
9
|
-
dependencies and makes it easy to jump between definitions.
|
10
|
-
|
11
|
-
Outside of the tests, the `dev:prime` rake task can be used to insert initial
|
12
|
-
development data into the database. You can use FactoryBot here, too.
|
@@ -1 +0,0 @@
|
|
1
|
-
Redirect users to the HTTPS URL on the production Web site.
|
@@ -1 +0,0 @@
|
|
1
|
-
Make forms easier to make with form helpers. This mostly involves SimpleForm.
|
@@ -1 +0,0 @@
|
|
1
|
-
Use the fastest JSON parser available.
|
@@ -1,7 +0,0 @@
|
|
1
|
-
Show runtime profiling for your Rails app as you develop it.
|
2
|
-
|
3
|
-
This uses the `rack-mini-profiler` gem to show a speed badge on every page.
|
4
|
-
This is controlled by the `RACK_MINI_PROFILER` environment variable which
|
5
|
-
defaults to `0` in the `.sample.env`. Set it to `1` to enable profiling.
|
6
|
-
|
7
|
-
Updates your README.md to explain this environment variable.
|
@@ -1,10 +0,0 @@
|
|
1
|
-
Set up the app to run locally with ease.
|
2
|
-
|
3
|
-
Use Puma and Sidekiq to run the app. This can be done via either
|
4
|
-
`heroku local` or any Foreman-compatible project runner (e.g. `foreman start`).
|
5
|
-
|
6
|
-
Configure your app using `.env`. Installs a basic `.sample.env` that is meant
|
7
|
-
to be checked into git and used as a template for your `.env`. The `bin/setup`
|
8
|
-
script is modified to safely copy `.sample.env` to `.env` for you.
|
9
|
-
|
10
|
-
Document all of this in the README.
|
@@ -1 +0,0 @@
|
|
1
|
-
Canonicalize the URL by configuring the `Rack::CanonicalHost` middleware.
|
@@ -1 +0,0 @@
|
|
1
|
-
Adds PostCSS Normalize
|
@@ -1,9 +0,0 @@
|
|
1
|
-
Set up the project for an in-depth test-driven development workflow.
|
2
|
-
|
3
|
-
- Maintain the test DB schema.
|
4
|
-
- Clear mail deliveries between tests.
|
5
|
-
- Import i18n helpers for use in tests.
|
6
|
-
- Prepare for system tests in `spec/system`.
|
7
|
-
- Integrate Formulaic for easier form testing.
|
8
|
-
- RSpec infers the file type based on the directory name.
|
9
|
-
- Install and configure RSpec and shoulda-matchers.
|
@@ -1,8 +0,0 @@
|
|
1
|
-
View templates for flash, JavaScript, and CSS.
|
2
|
-
|
3
|
-
- Disable CSS animations in tests.
|
4
|
-
- Run JavaScript when the page has loaded.
|
5
|
-
- Use the `title` gem for controlling the page title via i18n.
|
6
|
-
- Insert one-off JavaScript into a `:javascript` content block.
|
7
|
-
- Creates the directory for storing generic, application-level partials.
|
8
|
-
- Render user-facing partials (alert, error, notice, success) on all pages.
|
data/templates/email.rb
DELETED
data/templates/errors.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
require "net/http"
|
2
|
-
require "net/smtp"
|
3
|
-
|
4
|
-
# Example:
|
5
|
-
# begin
|
6
|
-
# some http call
|
7
|
-
# rescue *HTTP_ERRORS => error
|
8
|
-
# notify_hoptoad error
|
9
|
-
# end
|
10
|
-
|
11
|
-
HTTP_ERRORS = [
|
12
|
-
EOFError,
|
13
|
-
Errno::ECONNRESET,
|
14
|
-
Errno::EINVAL,
|
15
|
-
Errno::ECONNREFUSED,
|
16
|
-
Net::HTTPBadResponse,
|
17
|
-
Net::HTTPHeaderSyntaxError,
|
18
|
-
Net::ProtocolError,
|
19
|
-
Timeout::Error
|
20
|
-
]
|
21
|
-
|
22
|
-
SMTP_SERVER_ERRORS = [
|
23
|
-
IOError,
|
24
|
-
Net::SMTPAuthenticationError,
|
25
|
-
Net::SMTPServerBusy,
|
26
|
-
Net::SMTPUnknownError,
|
27
|
-
Timeout::Error
|
28
|
-
]
|
29
|
-
|
30
|
-
SMTP_CLIENT_ERRORS = [
|
31
|
-
Net::SMTPFatalError,
|
32
|
-
Net::SMTPSyntaxError
|
33
|
-
]
|
34
|
-
|
35
|
-
SMTP_ERRORS = SMTP_SERVER_ERRORS + SMTP_CLIENT_ERRORS
|
data/templates/flashes_helper.rb
DELETED
data/templates/hound.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
# See https://houndci.com/configuration for help.
|
2
|
-
haml:
|
3
|
-
# config_file: .haml-style.yml
|
4
|
-
enabled: true
|
5
|
-
javascript:
|
6
|
-
# config_file: .javascript-style.json
|
7
|
-
enabled: true
|
8
|
-
# ignore_file: .javascript_ignore
|
9
|
-
ruby:
|
10
|
-
enabled: false
|
11
|
-
scss:
|
12
|
-
enabled: false
|
13
|
-
stylelint:
|
14
|
-
# config_file: .stylelintrc.json
|
15
|
-
enabled: true
|
data/templates/json_encoding.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
ActiveSupport::JSON::Encoding.time_precision = 0
|
data/templates/oj.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
if ENV.fetch("COVERAGE", false)
|
2
|
-
require "simplecov"
|
3
|
-
|
4
|
-
if ENV["CIRCLE_ARTIFACTS"]
|
5
|
-
dir = File.join(ENV["CIRCLE_ARTIFACTS"], "coverage")
|
6
|
-
SimpleCov.coverage_dir(dir)
|
7
|
-
end
|
8
|
-
|
9
|
-
SimpleCov.start "rails"
|
10
|
-
|
11
|
-
if defined?(Spring) && ENV["DISABLE_SPRING"].to_i == 1
|
12
|
-
Rails.application.eager_load!
|
13
|
-
end
|
14
|
-
end
|
@@ -1,31 +0,0 @@
|
|
1
|
-
## Configuration
|
2
|
-
|
3
|
-
Environment variables during local development are handled by the node-foreman
|
4
|
-
project runner. To provide environment variables, create a `.env` file at the
|
5
|
-
root of the project. In that file provide the environment variables listed in
|
6
|
-
`.sample.env`. The `bin/setup` script does this for you, but be careful about
|
7
|
-
overwriting your existing `.env` file.
|
8
|
-
|
9
|
-
`app.json` also contains a list of environment variables that are required for
|
10
|
-
the application. The `.sample.env` file provides either non-secret vars that
|
11
|
-
can be copied directly into your own `.env` file or instructions on where to
|
12
|
-
obtain secret values.
|
13
|
-
|
14
|
-
During development add any new environment variables needed by the application
|
15
|
-
to both `.sample.env` and `app.json`, providing either **public** default
|
16
|
-
values or brief instructions on where secret values may be found.
|
17
|
-
|
18
|
-
Do not commit the `.env` file to the git repo.
|
19
|
-
|
20
|
-
## Running the Application
|
21
|
-
|
22
|
-
Use the `heroku local` runner to run the app locally as it would run on Heroku.
|
23
|
-
This uses the node-forman runner, which reads from the `Procfile` file.
|
24
|
-
|
25
|
-
```sh
|
26
|
-
heroku local
|
27
|
-
```
|
28
|
-
|
29
|
-
Once the server is started the application is reachable at
|
30
|
-
`http://localhost:3000`.
|
31
|
-
|
data/templates/postcss.config.js
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
development: &default
|
2
|
-
adapter: postgresql
|
3
|
-
database: <%= app_name %>_development
|
4
|
-
encoding: utf8
|
5
|
-
min_messages: warning
|
6
|
-
pool: <%%= Integer(ENV.fetch("DB_POOL", 5)) %>
|
7
|
-
reaping_frequency: <%%= Integer(ENV.fetch("DB_REAPING_FREQUENCY", 10)) %>
|
8
|
-
timeout: 5000
|
9
|
-
url: <%%= ENV["DATABASE_URL"] %>
|
10
|
-
|
11
|
-
test:
|
12
|
-
<<: *default
|
13
|
-
database: <%= app_name %>_test
|
14
|
-
|
15
|
-
production: &deploy
|
16
|
-
encoding: utf8
|
17
|
-
min_messages: warning
|
18
|
-
pool: <%%= [Integer(ENV.fetch("MAX_THREADS", 5)), Integer(ENV.fetch("DB_POOL", 5))].max %>
|
19
|
-
timeout: 5000
|
20
|
-
url: <%%= ENV.fetch("DATABASE_URL", "") %>
|
data/templates/rails_helper.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
ENV["RACK_ENV"] = "test"
|
2
|
-
|
3
|
-
require File.expand_path("../../config/environment", __FILE__)
|
4
|
-
|
5
|
-
if Rails.env.production?
|
6
|
-
abort("The Rails environment is running in production mode!")
|
7
|
-
end
|
8
|
-
|
9
|
-
require "rspec/rails"
|
10
|
-
|
11
|
-
Dir[Rails.root.join("spec/support/**/*.rb")].sort.each { |file| require file }
|
12
|
-
|
13
|
-
module SystemTestHelper
|
14
|
-
# Extend this module in spec/support/system/*.rb
|
15
|
-
include Formulaic::Dsl
|
16
|
-
end
|
17
|
-
|
18
|
-
RSpec.configure do |config|
|
19
|
-
config.include SystemTestHelper, type: :system
|
20
|
-
config.infer_base_class_for_anonymous_controllers = false
|
21
|
-
config.infer_spec_type_from_file_location!
|
22
|
-
config.use_transactional_fixtures = true
|
23
|
-
end
|
24
|
-
|
25
|
-
ActiveRecord::Migration.maintain_test_schema!
|
data/templates/sample_env
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# https://github.com/ddollar/forego
|
2
|
-
ASSET_HOST=localhost:3000
|
3
|
-
APPLICATION_HOST=localhost:3000
|
4
|
-
PORT=3000
|
5
|
-
RACK_ENV=development
|
6
|
-
REDIS_URL=localhost:6379
|
7
|
-
SECRET_KEY_BASE=development_secret
|
8
|
-
SMTP_ADDRESS=smtp.example.com
|
9
|
-
SMTP_DOMAIN=example.com
|
10
|
-
SMTP_PASSWORD=password
|
11
|
-
SMTP_USERNAME=username
|
12
|
-
WEB_CONCURRENCY=1
|
data/templates/secrets.yml
DELETED
data/templates/smtp.rb
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
SMTP_SETTINGS = {
|
2
|
-
address: ENV.fetch("SMTP_ADDRESS"), # example: "smtp.sendgrid.net"
|
3
|
-
authentication: :plain,
|
4
|
-
domain: ENV.fetch("SMTP_DOMAIN"), # example: "heroku.com"
|
5
|
-
enable_starttls_auto: true,
|
6
|
-
password: ENV.fetch("SMTP_PASSWORD"),
|
7
|
-
port: "587",
|
8
|
-
user_name: ENV.fetch("SMTP_USERNAME")
|
9
|
-
}
|
data/templates/spec_helper.rb
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
require "webmock/rspec"
|
2
|
-
require "timecop"
|
3
|
-
|
4
|
-
# http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
5
|
-
RSpec.configure do |config|
|
6
|
-
config.expect_with :rspec do |expectations|
|
7
|
-
expectations.syntax = :expect
|
8
|
-
end
|
9
|
-
|
10
|
-
config.mock_with :rspec do |mocks|
|
11
|
-
mocks.syntax = :expect
|
12
|
-
mocks.verify_partial_doubles = true
|
13
|
-
end
|
14
|
-
|
15
|
-
config.example_status_persistence_file_path = "tmp/rspec_examples.txt"
|
16
|
-
config.order = :random
|
17
|
-
end
|
18
|
-
|
19
|
-
WebMock.disable_net_connect!(
|
20
|
-
allow_localhost: true,
|
21
|
-
allow: "chromedriver.storage.googleapis.com"
|
22
|
-
)
|
23
|
-
|
24
|
-
# Only allow Timecop with block syntax
|
25
|
-
Timecop.safe_mode = true
|