suspenders 1.51.0 → 1.55.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +6 -3
- data/CONTRIBUTING.md +15 -15
- data/GOALS.md +65 -0
- data/Gemfile +1 -1
- data/NEWS.md +52 -0
- data/README.md +5 -4
- data/Rakefile +6 -5
- data/docs/heroku_deploy.md +19 -0
- data/lib/suspenders.rb +7 -0
- data/lib/suspenders/actions.rb +2 -2
- data/lib/suspenders/adapters/heroku.rb +27 -14
- data/lib/suspenders/app_builder.rb +42 -111
- data/lib/suspenders/generators/advisories_generator.rb +15 -0
- data/lib/suspenders/generators/analytics_generator.rb +1 -1
- data/lib/suspenders/generators/app_generator.rb +36 -58
- data/lib/suspenders/generators/base.rb +40 -1
- data/lib/suspenders/generators/ci_generator.rb +19 -9
- data/lib/suspenders/generators/db_optimizations_generator.rb +5 -17
- data/lib/suspenders/generators/factories_generator.rb +2 -2
- data/lib/suspenders/generators/forms_generator.rb +1 -1
- data/lib/suspenders/generators/inline_svg_generator.rb +14 -0
- data/lib/suspenders/generators/jobs_generator.rb +4 -4
- data/lib/suspenders/generators/js_driver_generator.rb +7 -4
- data/lib/suspenders/generators/json_generator.rb +1 -1
- data/lib/suspenders/generators/lint_generator.rb +5 -0
- data/lib/suspenders/generators/preloader_generator.rb +122 -0
- data/lib/suspenders/generators/production/compression_generator.rb +14 -0
- data/lib/suspenders/generators/production/deployment_generator.rb +1 -12
- data/lib/suspenders/generators/production/email_generator.rb +9 -12
- data/lib/suspenders/generators/production/manifest_generator.rb +8 -7
- data/lib/suspenders/generators/production/single_redirect.rb +15 -0
- data/lib/suspenders/generators/production/timeout_generator.rb +3 -2
- data/lib/suspenders/generators/profiler_generator.rb +35 -0
- data/lib/suspenders/generators/runner_generator.rb +48 -0
- data/lib/suspenders/generators/staging/pull_requests_generator.rb +4 -12
- data/lib/suspenders/generators/static_generator.rb +5 -1
- data/lib/suspenders/generators/stylelint_generator.rb +2 -1
- data/lib/suspenders/generators/stylesheet_base_generator.rb +7 -8
- data/lib/suspenders/generators/testing_generator.rb +6 -17
- data/lib/suspenders/version.rb +6 -6
- data/spec/adapters/heroku_spec.rb +36 -10
- data/spec/expand_json_spec.rb +89 -0
- data/spec/fakes/bin/heroku +1 -1
- data/spec/fakes/bin/hub +1 -1
- data/spec/features/advisories_spec.rb +24 -0
- data/spec/features/api_spec.rb +1 -1
- data/spec/features/ci_spec.rb +31 -0
- data/spec/features/cli_help_spec.rb +4 -4
- data/spec/features/db_optimizations_spec.rb +19 -0
- data/spec/features/heroku_spec.rb +9 -16
- data/spec/features/inline_svg_spec.rb +10 -0
- data/spec/features/lint_spec.rb +26 -0
- data/spec/features/new_project_spec.rb +38 -60
- data/spec/features/preloader_spec.rb +25 -0
- data/spec/features/production/compression_spec.rb +23 -0
- data/spec/features/production/email_spec.rb +10 -10
- data/spec/features/production/manifest_spec.rb +16 -14
- data/spec/features/production/single_redirect_spec.rb +25 -0
- data/spec/features/profiler_spec.rb +20 -0
- data/spec/features/runner_spec.rb +30 -0
- data/spec/features/staging/pull_requests_spec.rb +1 -1
- data/spec/features/static_spec.rb +17 -0
- data/spec/features/stylelint_spec.rb +7 -7
- data/spec/spec_helper.rb +3 -3
- data/spec/support/contain_json_matcher.rb +16 -10
- data/spec/support/fake_github.rb +3 -3
- data/spec/support/fake_heroku.rb +8 -8
- data/spec/support/project_files.rb +12 -0
- data/spec/support/rails_template.rb +1 -0
- data/spec/support/suspenders.rb +21 -19
- data/suspenders.gemspec +20 -20
- data/templates/Gemfile.erb +2 -10
- data/templates/_javascript.html.erb +1 -1
- data/templates/application.scss +0 -1
- data/templates/bin_auto_migrate +5 -0
- data/templates/bin_deploy +0 -2
- data/templates/bin_setup +2 -2
- data/templates/bin_setup_review_app.erb +0 -1
- data/templates/capybara_silence_puma.rb +1 -0
- data/templates/chromedriver.rb +14 -4
- data/templates/descriptions/advisories.md +5 -0
- data/templates/descriptions/analytics.md +4 -0
- data/templates/descriptions/ci.md +4 -0
- data/templates/descriptions/compression.md +4 -0
- data/templates/descriptions/db_optimizations.md +2 -0
- data/templates/descriptions/deployment.md +5 -0
- data/templates/descriptions/email.md +9 -0
- data/templates/descriptions/factories.md +12 -0
- data/templates/descriptions/force_tls.md +1 -0
- data/templates/descriptions/forms.md +1 -0
- data/templates/descriptions/inline_svg.md +2 -0
- data/templates/descriptions/jobs.md +3 -0
- data/templates/descriptions/js_driver.md +4 -0
- data/templates/descriptions/json.md +1 -0
- data/templates/descriptions/lint.md +3 -0
- data/templates/descriptions/manifest.md +2 -0
- data/templates/descriptions/preloader.md +3 -0
- data/templates/descriptions/profiler.md +7 -0
- data/templates/descriptions/pull_requests.md +4 -0
- data/templates/descriptions/runner.md +10 -0
- data/templates/descriptions/single_redirect.md +1 -0
- data/templates/descriptions/static.md +5 -0
- data/templates/descriptions/stylelint.md +3 -0
- data/templates/descriptions/stylesheet_base.md +4 -0
- data/templates/descriptions/testing.md +9 -0
- data/templates/descriptions/timeout.md +4 -0
- data/templates/descriptions/views.md +8 -0
- data/templates/errors.rb +3 -3
- data/templates/hound.yml +1 -2
- data/templates/inline_svg.rb +3 -0
- data/templates/partials/ci_simplecov.rb +14 -0
- data/templates/partials/db_optimizations_configuration.rb +5 -0
- data/templates/partials/deployment_readme.md +8 -0
- data/templates/partials/email_smtp.rb +2 -0
- data/templates/partials/profiler_readme.md +8 -0
- data/templates/partials/pull_requests_config.rb +4 -0
- data/templates/partials/runner_readme.md +31 -0
- data/templates/partials/runner_setup.rb +2 -0
- data/templates/rack_mini_profiler.rb +2 -0
- data/templates/rails_helper.rb +7 -4
- data/templates/{dotfiles/.env → sample_env} +0 -2
- data/templates/spec_helper.rb +4 -7
- data/templates/spring.rb +6 -0
- data/templates/suspenders_gitignore +1 -1
- metadata +99 -14
- data/templates/browserslist +0 -3
- data/templates/dotfiles/.ctags +0 -2
- data/templates/puma.rb +0 -28
@@ -1,6 +1,6 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
RSpec.describe "suspenders:staging:pull_requests", type: :
|
3
|
+
RSpec.describe "suspenders:staging:pull_requests", type: :generator do
|
4
4
|
it "generates the configuration for Heroku pipeline review apps" do
|
5
5
|
with_app { generate("suspenders:staging:pull_requests") }
|
6
6
|
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe "suspenders:static", type: :generator do
|
4
|
+
it "adds the gem and pages directory" do
|
5
|
+
with_app { generate("suspenders:static") }
|
6
|
+
|
7
|
+
expect("Gemfile").to match_contents(/high_voltage/)
|
8
|
+
expect("app/views/pages/.keep").to exist_as_a_file
|
9
|
+
end
|
10
|
+
|
11
|
+
it "removes the gem and pages directory" do
|
12
|
+
with_app { destroy("suspenders:static") }
|
13
|
+
|
14
|
+
expect("app/views/pages/.keep").not_to exist_as_a_file
|
15
|
+
expect("Gemfile").not_to match_contents(/high_voltage/)
|
16
|
+
end
|
17
|
+
end
|
@@ -5,8 +5,8 @@ RSpec.describe "suspenders:stylelint", type: :generator do
|
|
5
5
|
it "creates .stylelintrc.json" do
|
6
6
|
with_app { generate("suspenders:stylelint") }
|
7
7
|
|
8
|
-
expect(".stylelintrc.json")
|
9
|
-
to match_contents(%r{"extends": "@thoughtbot/stylelint-config"})
|
8
|
+
expect(".stylelintrc.json")
|
9
|
+
.to match_contents(%r{"extends": "@thoughtbot/stylelint-config"})
|
10
10
|
end
|
11
11
|
|
12
12
|
it "adds stylelint and @thoughtbot/stylelint-config to the package.json" do
|
@@ -21,7 +21,7 @@ RSpec.describe "suspenders:stylelint", type: :generator do
|
|
21
21
|
with_app { generate("suspenders:stylelint") }
|
22
22
|
|
23
23
|
expect(".hound.yml").to(
|
24
|
-
match_contents(/^ config_file: \.stylelintrc\.json/)
|
24
|
+
match_contents(/^ config_file: \.stylelintrc\.json/)
|
25
25
|
)
|
26
26
|
end
|
27
27
|
end
|
@@ -43,8 +43,8 @@ RSpec.describe "suspenders:stylelint", type: :generator do
|
|
43
43
|
end
|
44
44
|
|
45
45
|
expect("package.json").not_to match_contents(/stylelint/)
|
46
|
-
expect("package.json")
|
47
|
-
not_to match_contents(%r{@thoughtbot/stylelint-config})
|
46
|
+
expect("package.json")
|
47
|
+
.not_to match_contents(%r{@thoughtbot/stylelint-config})
|
48
48
|
end
|
49
49
|
|
50
50
|
it "comments in the hound config_file option" do
|
@@ -53,8 +53,8 @@ RSpec.describe "suspenders:stylelint", type: :generator do
|
|
53
53
|
destroy("suspenders:stylelint")
|
54
54
|
end
|
55
55
|
|
56
|
-
expect(".hound.yml")
|
57
|
-
to match_contents(/^ # config_file: \.stylelintrc\.json/)
|
56
|
+
expect(".hound.yml")
|
57
|
+
.to match_contents(/^ # config_file: \.stylelintrc\.json/)
|
58
58
|
end
|
59
59
|
end
|
60
60
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
require
|
1
|
+
require "bundler/setup"
|
2
2
|
|
3
3
|
Bundler.require(:default, :test)
|
4
4
|
|
5
|
-
require (Pathname.new(__FILE__).dirname +
|
5
|
+
require (Pathname.new(__FILE__).dirname + "../lib/suspenders").expand_path
|
6
6
|
|
7
|
-
Dir[
|
7
|
+
Dir["./spec/support/**/*.rb"].sort.each { |file| require file }
|
8
8
|
|
9
9
|
RSpec.configure do |config|
|
10
10
|
config.include SuspendersTestHelpers
|
@@ -4,21 +4,27 @@ require "json"
|
|
4
4
|
|
5
5
|
RSpec::Matchers.define :contain_json do
|
6
6
|
match do
|
7
|
-
sub_json = expected
|
8
|
-
filename = actual
|
7
|
+
@sub_json = expected
|
8
|
+
@filename = actual
|
9
9
|
|
10
|
-
filepath = File.join(project_path, filename)
|
11
|
-
json = JSON.parse(IO.read(filepath), symbolize_names: true)
|
12
|
-
|
10
|
+
@filepath = File.join(project_path, @filename)
|
11
|
+
@json = JSON.parse(IO.read(@filepath), symbolize_names: true)
|
12
|
+
|
13
|
+
subhash?(@sub_json, @json)
|
13
14
|
end
|
14
15
|
|
15
16
|
failure_message do
|
16
|
-
|
17
|
-
|
17
|
+
"in #{@filename}, expected to find\n#{@sub_json.inspect}\n" \
|
18
|
+
"in\n#{@json.inspect}"
|
19
|
+
end
|
18
20
|
|
19
|
-
|
20
|
-
json = JSON.parse(IO.read(filepath), symbolize_names: true)
|
21
|
+
private
|
21
22
|
|
22
|
-
|
23
|
+
def subhash?(inner, outer)
|
24
|
+
if inner.is_a?(Hash) && outer.is_a?(Hash)
|
25
|
+
inner.all? { |key, value| subhash?(value, outer[key]) }
|
26
|
+
else
|
27
|
+
inner == outer
|
28
|
+
end
|
23
29
|
end
|
24
30
|
end
|
data/spec/support/fake_github.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
class FakeGithub
|
2
|
-
RECORDER = File.expand_path(File.join(
|
2
|
+
RECORDER = File.expand_path(File.join("..", "..", "tmp", "hub_commands"), File.dirname(__FILE__))
|
3
3
|
|
4
4
|
def initialize(args)
|
5
5
|
@args = args
|
6
6
|
end
|
7
7
|
|
8
8
|
def run!
|
9
|
-
File.open(RECORDER,
|
10
|
-
file.write @args.join(
|
9
|
+
File.open(RECORDER, "a") do |file|
|
10
|
+
file.write @args.join(" ")
|
11
11
|
end
|
12
12
|
end
|
13
13
|
|
data/spec/support/fake_heroku.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
class FakeHeroku
|
2
|
-
RECORDER = File.expand_path(File.join(
|
2
|
+
RECORDER = File.expand_path(File.join("..", "..", "tmp", "heroku_commands"), File.dirname(__FILE__))
|
3
3
|
|
4
4
|
def initialize(args)
|
5
5
|
@args = args
|
@@ -9,8 +9,8 @@ class FakeHeroku
|
|
9
9
|
if @args.first == "help"
|
10
10
|
puts "pipelines # manage collections of apps in pipelines"
|
11
11
|
end
|
12
|
-
File.open(RECORDER,
|
13
|
-
file.puts @args.join(
|
12
|
+
File.open(RECORDER, "a") do |file|
|
13
|
+
file.puts @args.join(" ")
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -19,7 +19,7 @@ class FakeHeroku
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def self.has_gem_included?(project_path, gem_name)
|
22
|
-
gemfile = File.open(File.join(project_path,
|
22
|
+
gemfile = File.open(File.join(project_path, "Gemfile"), "a")
|
23
23
|
|
24
24
|
File.foreach(gemfile).any? do |line|
|
25
25
|
line.match(/#{Regexp.quote(gem_name)}/)
|
@@ -30,10 +30,10 @@ class FakeHeroku
|
|
30
30
|
app_name = "#{SuspendersTestHelpers::APP_NAME.dasherize}-#{environment}"
|
31
31
|
|
32
32
|
command = if flags
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
33
|
+
"create #{app_name} #{flags} --remote #{environment}\n"
|
34
|
+
else
|
35
|
+
"create #{app_name} --remote #{environment}\n"
|
36
|
+
end
|
37
37
|
|
38
38
|
File.foreach(RECORDER).any? { |line| line == command }
|
39
39
|
end
|
@@ -10,4 +10,16 @@ module ProjectFiles
|
|
10
10
|
path = File.join(project_path, filename)
|
11
11
|
FileUtils.rm_rf(path)
|
12
12
|
end
|
13
|
+
|
14
|
+
def copy_file(from_in_templates, to_in_project)
|
15
|
+
destination = File.join(project_path, to_in_project)
|
16
|
+
destination_dirname = File.dirname(destination)
|
17
|
+
|
18
|
+
FileUtils.mkdir_p(destination_dirname)
|
19
|
+
|
20
|
+
FileUtils.cp(
|
21
|
+
File.join(root_path, "templates", from_in_templates),
|
22
|
+
destination
|
23
|
+
)
|
24
|
+
end
|
13
25
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
gem "suspenders", path: File.expand_path("../..", __dir__)
|
data/spec/support/suspenders.rb
CHANGED
@@ -19,10 +19,7 @@ module SuspendersTestHelpers
|
|
19
19
|
end
|
20
20
|
|
21
21
|
Dir.chdir(APP_NAME) do
|
22
|
-
|
23
|
-
debug `git add .`
|
24
|
-
debug `git commit -m 'Initial commit'`
|
25
|
-
end
|
22
|
+
commit_all
|
26
23
|
end
|
27
24
|
end
|
28
25
|
end
|
@@ -41,18 +38,11 @@ module SuspendersTestHelpers
|
|
41
38
|
add_fakes_to_path
|
42
39
|
|
43
40
|
with_revision_for_honeybadger do
|
44
|
-
debug `#{system_rails_bin} new #{APP_NAME}`
|
41
|
+
debug `#{system_rails_bin} new #{APP_NAME} -m #{rails_template_path}`
|
45
42
|
end
|
46
43
|
|
47
44
|
Dir.chdir(APP_NAME) do
|
48
|
-
|
49
|
-
file.puts %{gem "suspenders", path: #{root_path.inspect}}
|
50
|
-
end
|
51
|
-
|
52
|
-
with_env("HOME", tmp_path) do
|
53
|
-
debug `git add .`
|
54
|
-
debug `git commit -m 'Initial commit'`
|
55
|
-
end
|
45
|
+
commit_all
|
56
46
|
end
|
57
47
|
end
|
58
48
|
end
|
@@ -98,7 +88,7 @@ module SuspendersTestHelpers
|
|
98
88
|
end
|
99
89
|
|
100
90
|
def add_fakes_to_path
|
101
|
-
ENV["PATH"] = "#{support_bin}:#{ENV[
|
91
|
+
ENV["PATH"] = "#{support_bin}:#{ENV["PATH"]}"
|
102
92
|
end
|
103
93
|
|
104
94
|
def project_path
|
@@ -116,7 +106,7 @@ module SuspendersTestHelpers
|
|
116
106
|
end
|
117
107
|
|
118
108
|
def suspenders_bin
|
119
|
-
File.join(root_path,
|
109
|
+
File.join(root_path, "bin", "suspenders")
|
120
110
|
end
|
121
111
|
|
122
112
|
def system_rails_bin
|
@@ -132,7 +122,20 @@ module SuspendersTestHelpers
|
|
132
122
|
end
|
133
123
|
|
134
124
|
def root_path
|
135
|
-
File.expand_path(
|
125
|
+
File.expand_path("../../../", __FILE__)
|
126
|
+
end
|
127
|
+
|
128
|
+
def rails_template_path
|
129
|
+
File.join(root_path, "spec", "support", "rails_template.rb")
|
130
|
+
end
|
131
|
+
|
132
|
+
def commit_all
|
133
|
+
with_env("HOME", tmp_path) do
|
134
|
+
debug `git config user.email suspenders@example.com`
|
135
|
+
debug `git config user.name "Suspenders Boy"`
|
136
|
+
debug `git add .`
|
137
|
+
debug `git commit -m 'Initial commit'`
|
138
|
+
end
|
136
139
|
end
|
137
140
|
|
138
141
|
def with_env(name, new_value)
|
@@ -141,7 +144,6 @@ module SuspendersTestHelpers
|
|
141
144
|
ENV[name] = new_value.to_s
|
142
145
|
|
143
146
|
yield
|
144
|
-
|
145
147
|
ensure
|
146
148
|
ENV.delete(name)
|
147
149
|
|
@@ -158,7 +160,7 @@ module SuspendersTestHelpers
|
|
158
160
|
|
159
161
|
def run_in_tmp
|
160
162
|
Dir.chdir(tmp_path) do
|
161
|
-
Bundler.
|
163
|
+
Bundler.with_unbundled_env do
|
162
164
|
yield
|
163
165
|
end
|
164
166
|
end
|
@@ -166,7 +168,7 @@ module SuspendersTestHelpers
|
|
166
168
|
|
167
169
|
def run_in_project
|
168
170
|
Dir.chdir(project_path) do
|
169
|
-
Bundler.
|
171
|
+
Bundler.with_unbundled_env do
|
170
172
|
yield
|
171
173
|
end
|
172
174
|
end
|
data/suspenders.gemspec
CHANGED
@@ -1,35 +1,35 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require
|
4
|
-
require 'date'
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
require "suspenders/version"
|
3
|
+
require "date"
|
5
4
|
|
6
5
|
Gem::Specification.new do |s|
|
7
6
|
s.required_ruby_version = ">= #{Suspenders::RUBY_VERSION}"
|
8
7
|
s.required_rubygems_version = ">= 2.7.4"
|
9
|
-
s.authors = [
|
10
|
-
s.date = Date.today.strftime(
|
8
|
+
s.authors = ["thoughtbot"]
|
9
|
+
s.date = Date.today.strftime("%Y-%m-%d")
|
11
10
|
|
12
|
-
s.description =
|
13
|
-
Suspenders is a base Rails project that you can upgrade. It is used by
|
14
|
-
thoughtbot to get a jump start on a working app. Use Suspenders if you're in a
|
15
|
-
rush to build something amazing; don't use it if you like missing deadlines.
|
11
|
+
s.description = <<~HERE
|
12
|
+
Suspenders is a base Rails project that you can upgrade. It is used by
|
13
|
+
thoughtbot to get a jump start on a working app. Use Suspenders if you're in a
|
14
|
+
rush to build something amazing; don't use it if you like missing deadlines.
|
16
15
|
HERE
|
17
16
|
|
18
|
-
s.email =
|
19
|
-
s.executables = [
|
17
|
+
s.email = "support@thoughtbot.com"
|
18
|
+
s.executables = ["suspenders"]
|
20
19
|
s.extra_rdoc_files = %w[README.md LICENSE]
|
21
20
|
s.files = `git ls-files`.split("\n")
|
22
|
-
s.homepage =
|
23
|
-
s.license =
|
24
|
-
s.name =
|
25
|
-
s.rdoc_options = [
|
26
|
-
s.require_paths = [
|
21
|
+
s.homepage = "http://github.com/thoughtbot/suspenders"
|
22
|
+
s.license = "MIT"
|
23
|
+
s.name = "suspenders"
|
24
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
25
|
+
s.require_paths = ["lib"]
|
27
26
|
s.summary = "Generate a Rails app using thoughtbot's best practices."
|
28
27
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
29
28
|
s.version = Suspenders::VERSION
|
30
29
|
|
31
|
-
s.add_dependency
|
32
|
-
s.add_dependency
|
30
|
+
s.add_dependency "bitters", ">= 2.0.4"
|
31
|
+
s.add_dependency "rails", Suspenders::RAILS_VERSION
|
33
32
|
|
34
|
-
s.add_development_dependency
|
33
|
+
s.add_development_dependency "rspec", "~> 3.2"
|
34
|
+
s.add_development_dependency "standard"
|
35
35
|
end
|
data/templates/Gemfile.erb
CHANGED
@@ -10,6 +10,7 @@ ruby "<%= Suspenders::RUBY_VERSION %>"
|
|
10
10
|
<% unless options[:api] %>
|
11
11
|
gem "autoprefixer-rails"
|
12
12
|
<% end %>
|
13
|
+
gem "bootsnap", require: false
|
13
14
|
gem "honeybadger"
|
14
15
|
gem "pg"
|
15
16
|
gem "puma"
|
@@ -18,26 +19,18 @@ gem "rails", "<%= Suspenders::RAILS_VERSION %>"
|
|
18
19
|
gem "recipient_interceptor"
|
19
20
|
gem "sassc-rails"
|
20
21
|
gem "skylight"
|
21
|
-
gem "sprockets", "
|
22
|
+
gem "sprockets", "< 4"
|
22
23
|
gem "title"
|
23
24
|
gem "tzinfo-data", platforms: [:mingw, :x64_mingw, :mswin, :jruby]
|
24
|
-
gem "uglifier"
|
25
|
-
gem "bootsnap", require: false
|
26
|
-
<% if options[:webpack] %>
|
27
25
|
gem "webpacker"
|
28
|
-
<% end %>
|
29
26
|
|
30
27
|
group :development do
|
31
28
|
gem "listen"
|
32
|
-
gem "rack-mini-profiler", require: false
|
33
|
-
gem "spring"
|
34
29
|
gem "web-console"
|
35
30
|
end
|
36
31
|
|
37
32
|
group :development, :test do
|
38
33
|
gem "awesome_print"
|
39
|
-
gem "bundler-audit", ">= 0.5.0", require: false
|
40
|
-
gem "dotenv-rails"
|
41
34
|
gem "pry-byebug"
|
42
35
|
gem "pry-rails"
|
43
36
|
end
|
@@ -45,7 +38,6 @@ end
|
|
45
38
|
group :test do
|
46
39
|
gem "formulaic"
|
47
40
|
gem "launchy"
|
48
|
-
gem "simplecov", require: false
|
49
41
|
gem "timecop"
|
50
42
|
gem "webmock"
|
51
43
|
end
|
data/templates/application.scss
CHANGED
data/templates/bin_deploy
CHANGED
data/templates/bin_setup
CHANGED
@@ -17,6 +17,5 @@ heroku pg:backups:capture --app $PARENT_APP_NAME
|
|
17
17
|
URL=`heroku pg:backups public-url --app $PARENT_APP_NAME`
|
18
18
|
|
19
19
|
heroku pg:backups restore $URL DATABASE_URL --confirm $APP_NAME --app $APP_NAME
|
20
|
-
heroku run rails db:migrate --exit-code --app $APP_NAME
|
21
20
|
heroku ps:scale worker=1 --app $APP_NAME
|
22
21
|
heroku restart --app $APP_NAME
|
@@ -0,0 +1 @@
|
|
1
|
+
Capybara.server = :puma, {Silent: true}
|
data/templates/chromedriver.rb
CHANGED
@@ -5,13 +5,23 @@ Capybara.register_driver :chrome do |app|
|
|
5
5
|
end
|
6
6
|
|
7
7
|
Capybara.register_driver :headless_chrome do |app|
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
options = ::Selenium::WebDriver::Chrome::Options.new
|
9
|
+
options.headless!
|
10
|
+
options.add_argument "--window-size=1680,1050"
|
11
11
|
|
12
12
|
Capybara::Selenium::Driver.new app,
|
13
13
|
browser: :chrome,
|
14
|
-
|
14
|
+
options: options
|
15
15
|
end
|
16
16
|
|
17
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
|