suspenders 1.49.0 → 1.54.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/.travis.yml +6 -4
  4. data/CONTRIBUTING.md +15 -15
  5. data/GOALS.md +65 -0
  6. data/NEWS.md +60 -0
  7. data/README.md +8 -7
  8. data/docs/heroku_deploy.md +19 -0
  9. data/lib/suspenders.rb +12 -0
  10. data/lib/suspenders/actions.rb +2 -2
  11. data/lib/suspenders/adapters/heroku.rb +14 -14
  12. data/lib/suspenders/app_builder.rb +3 -97
  13. data/lib/suspenders/generators/advisories_generator.rb +19 -0
  14. data/lib/suspenders/generators/analytics_generator.rb +2 -7
  15. data/lib/suspenders/generators/app_generator.rb +18 -44
  16. data/lib/suspenders/generators/base.rb +59 -0
  17. data/lib/suspenders/generators/ci_generator.rb +20 -14
  18. data/lib/suspenders/generators/db_optimizations_generator.rb +5 -17
  19. data/lib/suspenders/generators/factories_generator.rb +2 -7
  20. data/lib/suspenders/generators/forms_generator.rb +2 -2
  21. data/lib/suspenders/generators/inline_svg_generator.rb +14 -0
  22. data/lib/suspenders/generators/jobs_generator.rb +2 -12
  23. data/lib/suspenders/generators/js_driver_generator.rb +8 -10
  24. data/lib/suspenders/generators/json_generator.rb +10 -0
  25. data/lib/suspenders/generators/lint_generator.rb +2 -7
  26. data/lib/suspenders/generators/preloader_generator.rb +122 -0
  27. data/lib/suspenders/generators/production/compression_generator.rb +14 -0
  28. data/lib/suspenders/generators/production/deployment_generator.rb +16 -0
  29. data/lib/suspenders/generators/production/email_generator.rb +7 -18
  30. data/lib/suspenders/generators/production/force_tls_generator.rb +2 -5
  31. data/lib/suspenders/generators/production/manifest_generator.rb +25 -0
  32. data/lib/suspenders/generators/production/single_redirect.rb +15 -0
  33. data/lib/suspenders/generators/production/timeout_generator.rb +3 -2
  34. data/lib/suspenders/generators/profiler_generator.rb +35 -0
  35. data/lib/suspenders/generators/runner_generator.rb +48 -0
  36. data/lib/suspenders/generators/staging/pull_requests_generator.rb +25 -0
  37. data/lib/suspenders/generators/static_generator.rb +6 -2
  38. data/lib/suspenders/generators/stylelint_generator.rb +70 -0
  39. data/lib/suspenders/generators/stylesheet_base_generator.rb +7 -12
  40. data/lib/suspenders/generators/testing_generator.rb +5 -21
  41. data/lib/suspenders/generators/views_generator.rb +2 -7
  42. data/lib/suspenders/version.rb +2 -2
  43. data/spec/adapters/heroku_spec.rb +28 -2
  44. data/spec/expand_json_spec.rb +89 -0
  45. data/spec/features/advisories_spec.rb +24 -0
  46. data/spec/features/ci_spec.rb +31 -0
  47. data/spec/features/db_optimizations_spec.rb +19 -0
  48. data/spec/features/heroku_spec.rb +7 -14
  49. data/spec/features/inline_svg_spec.rb +10 -0
  50. data/spec/features/json_spec.rb +15 -0
  51. data/spec/features/new_project_spec.rb +18 -35
  52. data/spec/features/preloader_spec.rb +25 -0
  53. data/spec/features/production/compression_spec.rb +23 -0
  54. data/spec/features/production/deployment_spec.rb +22 -0
  55. data/spec/features/production/email_spec.rb +1 -1
  56. data/spec/features/production/manifest_spec.rb +37 -0
  57. data/spec/features/production/single_redirect_spec.rb +25 -0
  58. data/spec/features/profiler_spec.rb +20 -0
  59. data/spec/features/runner_spec.rb +30 -0
  60. data/spec/features/staging/pull_requests_spec.rb +22 -0
  61. data/spec/features/static_spec.rb +17 -0
  62. data/spec/features/stylelint_spec.rb +60 -0
  63. data/spec/spec_helper.rb +1 -0
  64. data/spec/support/be_executable_matcher.rb +7 -0
  65. data/spec/support/contain_json_matcher.rb +16 -10
  66. data/spec/support/generators.rb +5 -0
  67. data/spec/support/project_files.rb +25 -0
  68. data/spec/support/rails_template.rb +1 -0
  69. data/spec/support/suspenders.rb +16 -13
  70. data/suspenders.gemspec +1 -1
  71. data/templates/Gemfile.erb +6 -12
  72. data/templates/_javascript.html.erb +1 -8
  73. data/templates/application.scss +0 -1
  74. data/templates/bin_auto_migrate +5 -0
  75. data/templates/bin_deploy +0 -2
  76. data/templates/bin_setup +2 -2
  77. data/templates/bin_setup_review_app.erb +0 -1
  78. data/templates/capybara_silence_puma.rb +1 -0
  79. data/templates/chromedriver.rb +14 -4
  80. data/templates/descriptions/advisories.md +5 -0
  81. data/templates/descriptions/analytics.md +4 -0
  82. data/templates/descriptions/ci.md +4 -0
  83. data/templates/descriptions/compression.md +4 -0
  84. data/templates/descriptions/db_optimizations.md +2 -0
  85. data/templates/descriptions/deployment.md +5 -0
  86. data/templates/descriptions/email.md +9 -0
  87. data/templates/descriptions/factories.md +12 -0
  88. data/templates/descriptions/force_tls.md +1 -0
  89. data/templates/descriptions/forms.md +1 -0
  90. data/templates/descriptions/inline_svg.md +2 -0
  91. data/templates/descriptions/jobs.md +3 -0
  92. data/templates/descriptions/js_driver.md +4 -0
  93. data/templates/descriptions/json.md +1 -0
  94. data/templates/descriptions/lint.md +3 -0
  95. data/templates/descriptions/manifest.md +2 -0
  96. data/templates/descriptions/preloader.md +3 -0
  97. data/templates/descriptions/profiler.md +7 -0
  98. data/templates/descriptions/pull_requests.md +4 -0
  99. data/templates/descriptions/runner.md +10 -0
  100. data/templates/descriptions/single_redirect.md +1 -0
  101. data/templates/descriptions/static.md +5 -0
  102. data/templates/descriptions/stylelint.md +3 -0
  103. data/templates/descriptions/stylesheet_base.md +4 -0
  104. data/templates/descriptions/testing.md +9 -0
  105. data/templates/descriptions/timeout.md +4 -0
  106. data/templates/descriptions/views.md +8 -0
  107. data/templates/factory_bot_rspec.rb +2 -0
  108. data/templates/hound.yml +3 -1
  109. data/templates/inline_svg.rb +3 -0
  110. data/templates/partials/ci_simplecov.rb +16 -0
  111. data/templates/partials/db_optimizations_configuration.rb +7 -0
  112. data/templates/partials/deployment_readme.md +8 -0
  113. data/templates/partials/email_smtp.rb +3 -0
  114. data/templates/partials/profiler_readme.md +8 -0
  115. data/templates/partials/pull_requests_config.rb +5 -0
  116. data/templates/partials/runner_readme.md +31 -0
  117. data/templates/partials/runner_setup.rb +3 -0
  118. data/templates/rack_mini_profiler.rb +2 -0
  119. data/templates/rails_helper.rb +7 -4
  120. data/templates/{dotfiles/.env → sample_env} +0 -2
  121. data/templates/spec_helper.rb +4 -7
  122. data/templates/spring.rb +6 -0
  123. data/templates/stylelintrc.json +3 -0
  124. data/templates/suspenders_gitignore +1 -1
  125. metadata +106 -16
  126. data/templates/app.json.erb +0 -27
  127. data/templates/browserslist +0 -3
  128. data/templates/dotfiles/.ctags +0 -2
  129. data/templates/puma.rb +0 -28
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "@thoughtbot/stylelint-config"
3
+ }
@@ -4,7 +4,7 @@
4
4
  *.swp
5
5
  .byebug_history
6
6
  /.bundle
7
- /.env.local
7
+ /.env
8
8
  /coverage/*
9
9
  /db/*.sqlite3
10
10
  /db/*.sqlite3-journal
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suspenders
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.49.0
4
+ version: 1.54.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoughtbot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-19 00:00:00.000000000 Z
11
+ date: 2020-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bitters
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '1.7'
19
+ version: 2.0.4
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '1.7'
26
+ version: 2.0.4
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 5.2.0
33
+ version: 6.0.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 5.2.0
40
+ version: 6.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -68,6 +68,7 @@ files:
68
68
  - ".ruby-version"
69
69
  - ".travis.yml"
70
70
  - CONTRIBUTING.md
71
+ - GOALS.md
71
72
  - Gemfile
72
73
  - LICENSE
73
74
  - NEWS.md
@@ -79,42 +80,76 @@ files:
79
80
  - bin/rspec
80
81
  - bin/setup
81
82
  - bin/suspenders
83
+ - docs/heroku_deploy.md
82
84
  - lib/suspenders.rb
83
85
  - lib/suspenders/actions.rb
84
86
  - lib/suspenders/adapters/heroku.rb
85
87
  - lib/suspenders/app_builder.rb
88
+ - lib/suspenders/generators/advisories_generator.rb
86
89
  - lib/suspenders/generators/analytics_generator.rb
87
90
  - lib/suspenders/generators/app_generator.rb
91
+ - lib/suspenders/generators/base.rb
88
92
  - lib/suspenders/generators/ci_generator.rb
89
93
  - lib/suspenders/generators/db_optimizations_generator.rb
90
94
  - lib/suspenders/generators/factories_generator.rb
91
95
  - lib/suspenders/generators/forms_generator.rb
96
+ - lib/suspenders/generators/inline_svg_generator.rb
92
97
  - lib/suspenders/generators/jobs_generator.rb
93
98
  - lib/suspenders/generators/js_driver_generator.rb
99
+ - lib/suspenders/generators/json_generator.rb
94
100
  - lib/suspenders/generators/lint_generator.rb
101
+ - lib/suspenders/generators/preloader_generator.rb
102
+ - lib/suspenders/generators/production/compression_generator.rb
103
+ - lib/suspenders/generators/production/deployment_generator.rb
95
104
  - lib/suspenders/generators/production/email_generator.rb
96
105
  - lib/suspenders/generators/production/force_tls_generator.rb
106
+ - lib/suspenders/generators/production/manifest_generator.rb
107
+ - lib/suspenders/generators/production/single_redirect.rb
97
108
  - lib/suspenders/generators/production/timeout_generator.rb
109
+ - lib/suspenders/generators/profiler_generator.rb
110
+ - lib/suspenders/generators/runner_generator.rb
111
+ - lib/suspenders/generators/staging/pull_requests_generator.rb
98
112
  - lib/suspenders/generators/static_generator.rb
113
+ - lib/suspenders/generators/stylelint_generator.rb
99
114
  - lib/suspenders/generators/stylesheet_base_generator.rb
100
115
  - lib/suspenders/generators/testing_generator.rb
101
116
  - lib/suspenders/generators/views_generator.rb
102
117
  - lib/suspenders/version.rb
103
118
  - spec/adapters/heroku_spec.rb
119
+ - spec/expand_json_spec.rb
104
120
  - spec/fakes/bin/heroku
105
121
  - spec/fakes/bin/hub
122
+ - spec/features/advisories_spec.rb
106
123
  - spec/features/api_spec.rb
124
+ - spec/features/ci_spec.rb
107
125
  - spec/features/cli_help_spec.rb
126
+ - spec/features/db_optimizations_spec.rb
108
127
  - spec/features/github_spec.rb
109
128
  - spec/features/heroku_spec.rb
129
+ - spec/features/inline_svg_spec.rb
130
+ - spec/features/json_spec.rb
110
131
  - spec/features/new_project_spec.rb
132
+ - spec/features/preloader_spec.rb
133
+ - spec/features/production/compression_spec.rb
134
+ - spec/features/production/deployment_spec.rb
111
135
  - spec/features/production/email_spec.rb
136
+ - spec/features/production/manifest_spec.rb
137
+ - spec/features/production/single_redirect_spec.rb
138
+ - spec/features/profiler_spec.rb
139
+ - spec/features/runner_spec.rb
140
+ - spec/features/staging/pull_requests_spec.rb
141
+ - spec/features/static_spec.rb
142
+ - spec/features/stylelint_spec.rb
112
143
  - spec/spec_helper.rb
144
+ - spec/support/be_executable_matcher.rb
113
145
  - spec/support/contain_json_matcher.rb
114
146
  - spec/support/exist_as_a_file_matcher.rb
115
147
  - spec/support/fake_github.rb
116
148
  - spec/support/fake_heroku.rb
149
+ - spec/support/generators.rb
117
150
  - spec/support/match_contents_matcher.rb
151
+ - spec/support/project_files.rb
152
+ - spec/support/rails_template.rb
118
153
  - spec/support/suspenders.rb
119
154
  - suspenders.gemspec
120
155
  - templates/Gemfile.erb
@@ -126,19 +161,44 @@ files:
126
161
  - templates/_javascript.html.erb
127
162
  - templates/action_mailer.rb
128
163
  - templates/active_job.rb
129
- - templates/app.json.erb
130
164
  - templates/application.scss
165
+ - templates/bin_auto_migrate
131
166
  - templates/bin_deploy
132
167
  - templates/bin_setup
133
168
  - templates/bin_setup_review_app.erb
134
- - templates/browserslist
135
169
  - templates/bundler_audit.rake
170
+ - templates/capybara_silence_puma.rb
136
171
  - templates/chromedriver.rb
137
172
  - templates/circle.yml.erb
138
173
  - templates/config_locales_en.yml.erb
174
+ - templates/descriptions/advisories.md
175
+ - templates/descriptions/analytics.md
176
+ - templates/descriptions/ci.md
177
+ - templates/descriptions/compression.md
178
+ - templates/descriptions/db_optimizations.md
179
+ - templates/descriptions/deployment.md
180
+ - templates/descriptions/email.md
181
+ - templates/descriptions/factories.md
182
+ - templates/descriptions/force_tls.md
183
+ - templates/descriptions/forms.md
184
+ - templates/descriptions/inline_svg.md
185
+ - templates/descriptions/jobs.md
186
+ - templates/descriptions/js_driver.md
187
+ - templates/descriptions/json.md
188
+ - templates/descriptions/lint.md
189
+ - templates/descriptions/manifest.md
190
+ - templates/descriptions/preloader.md
191
+ - templates/descriptions/profiler.md
192
+ - templates/descriptions/pull_requests.md
193
+ - templates/descriptions/runner.md
194
+ - templates/descriptions/single_redirect.md
195
+ - templates/descriptions/static.md
196
+ - templates/descriptions/stylelint.md
197
+ - templates/descriptions/stylesheet_base.md
198
+ - templates/descriptions/testing.md
199
+ - templates/descriptions/timeout.md
200
+ - templates/descriptions/views.md
139
201
  - templates/dev.rake
140
- - templates/dotfiles/.ctags
141
- - templates/dotfiles/.env
142
202
  - templates/email.rb
143
203
  - templates/errors.rb
144
204
  - templates/factories.rb
@@ -146,15 +206,26 @@ files:
146
206
  - templates/flashes_helper.rb
147
207
  - templates/hound.yml
148
208
  - templates/i18n.rb
209
+ - templates/inline_svg.rb
149
210
  - templates/json_encoding.rb
211
+ - templates/partials/ci_simplecov.rb
212
+ - templates/partials/db_optimizations_configuration.rb
213
+ - templates/partials/deployment_readme.md
214
+ - templates/partials/email_smtp.rb
215
+ - templates/partials/profiler_readme.md
216
+ - templates/partials/pull_requests_config.rb
217
+ - templates/partials/runner_readme.md
218
+ - templates/partials/runner_setup.rb
150
219
  - templates/postgresql_database.yml.erb
151
- - templates/puma.rb
152
220
  - templates/rack_mini_profiler.rb
153
221
  - templates/rails_helper.rb
222
+ - templates/sample_env
154
223
  - templates/secrets.yml
155
224
  - templates/shoulda_matchers_config_rspec.rb
156
225
  - templates/smtp.rb
157
226
  - templates/spec_helper.rb
227
+ - templates/spring.rb
228
+ - templates/stylelintrc.json
158
229
  - templates/suspenders_gitignore
159
230
  - templates/suspenders_layout.html.erb.erb
160
231
  homepage: http://github.com/thoughtbot/suspenders
@@ -170,32 +241,51 @@ required_ruby_version: !ruby/object:Gem::Requirement
170
241
  requirements:
171
242
  - - ">="
172
243
  - !ruby/object:Gem::Version
173
- version: 2.5.1
244
+ version: 2.6.6
174
245
  required_rubygems_version: !ruby/object:Gem::Requirement
175
246
  requirements:
176
247
  - - ">="
177
248
  - !ruby/object:Gem::Version
178
249
  version: 2.7.4
179
250
  requirements: []
180
- rubyforge_project:
181
- rubygems_version: 2.7.7
251
+ rubygems_version: 3.1.2
182
252
  signing_key:
183
253
  specification_version: 4
184
254
  summary: Generate a Rails app using thoughtbot's best practices.
185
255
  test_files:
186
256
  - spec/adapters/heroku_spec.rb
257
+ - spec/expand_json_spec.rb
187
258
  - spec/fakes/bin/heroku
188
259
  - spec/fakes/bin/hub
260
+ - spec/features/advisories_spec.rb
189
261
  - spec/features/api_spec.rb
262
+ - spec/features/ci_spec.rb
190
263
  - spec/features/cli_help_spec.rb
264
+ - spec/features/db_optimizations_spec.rb
191
265
  - spec/features/github_spec.rb
192
266
  - spec/features/heroku_spec.rb
267
+ - spec/features/inline_svg_spec.rb
268
+ - spec/features/json_spec.rb
193
269
  - spec/features/new_project_spec.rb
270
+ - spec/features/preloader_spec.rb
271
+ - spec/features/production/compression_spec.rb
272
+ - spec/features/production/deployment_spec.rb
194
273
  - spec/features/production/email_spec.rb
274
+ - spec/features/production/manifest_spec.rb
275
+ - spec/features/production/single_redirect_spec.rb
276
+ - spec/features/profiler_spec.rb
277
+ - spec/features/runner_spec.rb
278
+ - spec/features/staging/pull_requests_spec.rb
279
+ - spec/features/static_spec.rb
280
+ - spec/features/stylelint_spec.rb
195
281
  - spec/spec_helper.rb
282
+ - spec/support/be_executable_matcher.rb
196
283
  - spec/support/contain_json_matcher.rb
197
284
  - spec/support/exist_as_a_file_matcher.rb
198
285
  - spec/support/fake_github.rb
199
286
  - spec/support/fake_heroku.rb
287
+ - spec/support/generators.rb
200
288
  - spec/support/match_contents_matcher.rb
289
+ - spec/support/project_files.rb
290
+ - spec/support/rails_template.rb
201
291
  - spec/support/suspenders.rb
@@ -1,27 +0,0 @@
1
- {
2
- "name":"<%= app_name.dasherize %>",
3
- "scripts":{},
4
- "env":{
5
- "APPLICATION_HOST":{
6
- "required":true
7
- },
8
- "EMAIL_RECIPIENTS":{
9
- "required":true
10
- },
11
- "HEROKU_APP_NAME": {
12
- "required":true
13
- },
14
- "HEROKU_PARENT_APP_NAME": {
15
- "required":true
16
- },
17
- "RACK_ENV":{
18
- "required":true
19
- },
20
- "SECRET_KEY_BASE":{
21
- "generator":"secret"
22
- }
23
- },
24
- "addons":[
25
- "heroku-postgresql"
26
- ]
27
- }
@@ -1,3 +0,0 @@
1
- Last 2 versions
2
- Explorer >= 11
3
- Android >= 4.4
@@ -1,2 +0,0 @@
1
- --recurse=yes
2
- --exclude=vendor
@@ -1,28 +0,0 @@
1
- # https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server
2
-
3
- # The environment variable WEB_CONCURRENCY may be set to a default value based
4
- # on dyno size. To manually configure this value use heroku config:set
5
- # WEB_CONCURRENCY.
6
- #
7
- # Increasing the number of workers will increase the amount of resting memory
8
- # your dynos use. Increasing the number of threads will increase the amount of
9
- # potential bloat added to your dynos when they are responding to heavy
10
- # requests.
11
- #
12
- # Starting with a low number of workers and threads provides adequate
13
- # performance for most applications, even under load, while maintaining a low
14
- # risk of overusing memory.
15
- workers Integer(ENV.fetch("WEB_CONCURRENCY", 2))
16
- threads_count = Integer(ENV.fetch("MAX_THREADS", 2))
17
- threads(threads_count, threads_count)
18
-
19
- preload_app!
20
-
21
- rackup DefaultRackup
22
- environment ENV.fetch("RACK_ENV", "development")
23
-
24
- on_worker_boot do
25
- # Worker specific setup for Rails 4.1+
26
- # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
27
- ActiveRecord::Base.establish_connection
28
- end