suspenders 1.52.0 → 1.53.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/NEWS.md +8 -0
- data/README.md +3 -0
- data/docs/heroku_deploy.md +22 -0
- data/lib/suspenders.rb +1 -0
- data/lib/suspenders/app_builder.rb +1 -2
- data/lib/suspenders/generators/app_generator.rb +5 -1
- data/lib/suspenders/generators/base.rb +1 -1
- data/lib/suspenders/generators/inline_svg_generator.rb +14 -0
- data/lib/suspenders/generators/js_driver_generator.rb +5 -1
- data/lib/suspenders/version.rb +2 -2
- data/spec/features/inline_svg_spec.rb +10 -0
- data/spec/features/new_project_spec.rb +1 -1
- data/spec/features/staging/pull_requests_spec.rb +1 -1
- data/suspenders.gemspec +1 -0
- data/templates/Gemfile.erb +1 -4
- data/templates/_javascript.html.erb +1 -1
- data/templates/capybara_silence_puma.rb +1 -0
- data/templates/chromedriver.rb +4 -4
- data/templates/dotfiles/.env +0 -1
- data/templates/inline_svg.rb +3 -0
- metadata +24 -5
- data/templates/browserslist +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8aa31ed704361dcb4c7c5dae040f6000a65e958f436038df81a74fa719ccdd47
|
4
|
+
data.tar.gz: ceb17403f61961694b1b08298c4100188c26d1d64abc6b5db0f97216f7a9093e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54d43d08ed81085648996f38127d960bffa732ae61735e40bfd19de93f5593b7e71a9bdc5c42e69f20410eaa0f8d79fcface14285158494510d9f231c422b45d
|
7
|
+
data.tar.gz: '083ab7ad3e0a0a473d78f01e5d542ac15462a2965d0179b56dcd98b7ab32ff62d504251e359e907a5ac0e333eb3eb1127e4f0dfc2bbe265422f9ddd6aeb674c0'
|
data/.travis.yml
CHANGED
data/NEWS.md
CHANGED
@@ -1,3 +1,11 @@
|
|
1
|
+
1.53.0 (August 23, 2019)
|
2
|
+
* Upgraded: Rails 6.0.
|
3
|
+
* New generator: `suspenders:inline_svg` for setting up the inline_svg gem.
|
4
|
+
* Changed: silence Puma's startup messages in JS specs.
|
5
|
+
* Changed: improve chromedriver configuration.
|
6
|
+
* Added: documentation for deploying to Heroku.
|
7
|
+
* Fixed: indentation in production config file.
|
8
|
+
|
1
9
|
1.52.0 (June 7, 2019)
|
2
10
|
* Changed: Setup system tests instead of feature specs
|
3
11
|
* Upgraded: Rails 5.2.3
|
data/README.md
CHANGED
@@ -117,6 +117,8 @@ Suspenders also comes with:
|
|
117
117
|
|
118
118
|
## Heroku
|
119
119
|
|
120
|
+
Read the documentation on [deploying to Heroku][heroku deploy]
|
121
|
+
|
120
122
|
You can optionally create Heroku staging and production apps:
|
121
123
|
|
122
124
|
suspenders app --heroku true
|
@@ -131,6 +133,7 @@ This:
|
|
131
133
|
* Schedules automated backups for 10AM UTC for both `staging` and `production`
|
132
134
|
|
133
135
|
[Heroku Pipeline]: https://devcenter.heroku.com/articles/pipelines
|
136
|
+
[heroku deploy]: https://github.com/thoughtbot/suspenders/blob/master/docs/heroku_deploy.md
|
134
137
|
|
135
138
|
You can optionally specify alternate Heroku flags:
|
136
139
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# Deploying to Heroku
|
2
|
+
|
3
|
+
## Setup
|
4
|
+
|
5
|
+
Deploying to Heroku requires two additional steps:
|
6
|
+
|
7
|
+
1. Manually add buildpacks `node.js` and `ruby` (in that order) to your Heroku
|
8
|
+
app. This is necessary because build order is important and Heroku's
|
9
|
+
auto-detection will add them in the wrong order.
|
10
|
+
|
11
|
+
2. Set the following environment variables:
|
12
|
+
|
13
|
+
- `ASSET_HOST`: `siteURL.herokuapp.com`
|
14
|
+
- `APPLICATION_HOST`: `siteURL.herokuapp.com`
|
15
|
+
- `SMTP_ADDRESS`: `smtp.example.com`
|
16
|
+
- `SMTP_DOMAIN`: `example.com`
|
17
|
+
- `SMTP_USERNAME`: `username`
|
18
|
+
- `SMTP_PASSWORD`: `password`
|
19
|
+
|
20
|
+
## Execution
|
21
|
+
|
22
|
+
- Use the `./bin/deploy` convention for deploying to Heroku
|
data/lib/suspenders.rb
CHANGED
@@ -14,6 +14,7 @@ require "suspenders/generators/views_generator"
|
|
14
14
|
require "suspenders/generators/js_driver_generator"
|
15
15
|
require "suspenders/generators/json_generator"
|
16
16
|
require "suspenders/generators/testing_generator"
|
17
|
+
require "suspenders/generators/inline_svg_generator"
|
17
18
|
require "suspenders/generators/production/force_tls_generator"
|
18
19
|
require "suspenders/generators/production/email_generator"
|
19
20
|
require "suspenders/generators/production/timeout_generator"
|
@@ -98,7 +98,7 @@ module Suspenders
|
|
98
98
|
|
99
99
|
def enable_rack_canonical_host
|
100
100
|
config = <<-RUBY
|
101
|
-
|
101
|
+
config.middleware.use Rack::CanonicalHost, ENV.fetch("APPLICATION_HOST")
|
102
102
|
RUBY
|
103
103
|
|
104
104
|
configure_environment "production", config
|
@@ -242,7 +242,6 @@ config.public_file_server.headers = {
|
|
242
242
|
end
|
243
243
|
|
244
244
|
def copy_miscellaneous_files
|
245
|
-
copy_file "browserslist", "browserslist"
|
246
245
|
copy_file "errors.rb", "config/initializers/errors.rb"
|
247
246
|
copy_file "json_encoding.rb", "config/initializers/json_encoding.rb"
|
248
247
|
end
|
@@ -185,7 +185,7 @@ module Suspenders
|
|
185
185
|
generate("suspenders:lint")
|
186
186
|
generate("suspenders:jobs")
|
187
187
|
generate("suspenders:analytics")
|
188
|
-
generate("suspenders:
|
188
|
+
generate("suspenders:inline_svg")
|
189
189
|
end
|
190
190
|
|
191
191
|
def generate_deployment_default
|
@@ -197,6 +197,10 @@ module Suspenders
|
|
197
197
|
generate("suspenders:production:manifest")
|
198
198
|
end
|
199
199
|
|
200
|
+
def generate_views
|
201
|
+
generate("suspenders:views")
|
202
|
+
end
|
203
|
+
|
200
204
|
def outro
|
201
205
|
say 'Congratulations! You just pulled our suspenders.'
|
202
206
|
say honeybadger_outro
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require_relative "base"
|
2
|
+
|
3
|
+
module Suspenders
|
4
|
+
class InlineSvgGenerator < Generators::Base
|
5
|
+
def add_inline_svg
|
6
|
+
gem "inline_svg"
|
7
|
+
Bundler.with_clean_env { run "bundle install" }
|
8
|
+
end
|
9
|
+
|
10
|
+
def configure_inline_svg
|
11
|
+
copy_file "inline_svg.rb", "config/initializers/inline_svg.rb"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -8,8 +8,12 @@ module Suspenders
|
|
8
8
|
Bundler.with_clean_env { run "bundle install" }
|
9
9
|
end
|
10
10
|
|
11
|
-
def
|
11
|
+
def configure_capybara
|
12
12
|
copy_file "chromedriver.rb", "spec/support/chromedriver.rb"
|
13
|
+
copy_file(
|
14
|
+
"capybara_silence_puma.rb",
|
15
|
+
"spec/support/capybara_silence_puma.rb",
|
16
|
+
)
|
13
17
|
end
|
14
18
|
end
|
15
19
|
end
|
data/lib/suspenders/version.rb
CHANGED
@@ -0,0 +1,10 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
RSpec.describe "suspenders:inline_svg", type: :generator do
|
4
|
+
it "generates the configuration for inline_svg" do
|
5
|
+
with_app { generate("suspenders:inline_svg") }
|
6
|
+
|
7
|
+
expect("config/initializers/inline_svg.rb").to match_contents(/InlineSvg/)
|
8
|
+
expect("Gemfile").to match_contents(/inline_svg/)
|
9
|
+
end
|
10
|
+
end
|
@@ -308,7 +308,7 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
308
308
|
end
|
309
309
|
|
310
310
|
it "doesn't use turbolinks" do
|
311
|
-
app_js = read_project_file(%w(app
|
311
|
+
app_js = read_project_file(%w(app javascript packs application.js))
|
312
312
|
expect(app_js).not_to match(/turbolinks/)
|
313
313
|
end
|
314
314
|
|
@@ -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
|
|
data/suspenders.gemspec
CHANGED
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"
|
@@ -21,11 +22,7 @@ gem "skylight"
|
|
21
22
|
gem "sprockets", ">= 3.0.0"
|
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"
|
@@ -0,0 +1 @@
|
|
1
|
+
Capybara.server = :puma, { Silent: true }
|
data/templates/chromedriver.rb
CHANGED
@@ -5,13 +5,13 @@ 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
|
data/templates/dotfiles/.env
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: suspenders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.53.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoughtbot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bitters
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
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:
|
40
|
+
version: 6.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.2'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rack-timeout
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
description: |
|
56
70
|
Suspenders is a base Rails project that you can upgrade. It is used by
|
57
71
|
thoughtbot to get a jump start on a working app. Use Suspenders if you're in a
|
@@ -79,6 +93,7 @@ files:
|
|
79
93
|
- bin/rspec
|
80
94
|
- bin/setup
|
81
95
|
- bin/suspenders
|
96
|
+
- docs/heroku_deploy.md
|
82
97
|
- lib/suspenders.rb
|
83
98
|
- lib/suspenders/actions.rb
|
84
99
|
- lib/suspenders/adapters/heroku.rb
|
@@ -90,6 +105,7 @@ files:
|
|
90
105
|
- lib/suspenders/generators/db_optimizations_generator.rb
|
91
106
|
- lib/suspenders/generators/factories_generator.rb
|
92
107
|
- lib/suspenders/generators/forms_generator.rb
|
108
|
+
- lib/suspenders/generators/inline_svg_generator.rb
|
93
109
|
- lib/suspenders/generators/jobs_generator.rb
|
94
110
|
- lib/suspenders/generators/js_driver_generator.rb
|
95
111
|
- lib/suspenders/generators/json_generator.rb
|
@@ -113,6 +129,7 @@ files:
|
|
113
129
|
- spec/features/cli_help_spec.rb
|
114
130
|
- spec/features/github_spec.rb
|
115
131
|
- spec/features/heroku_spec.rb
|
132
|
+
- spec/features/inline_svg_spec.rb
|
116
133
|
- spec/features/json_spec.rb
|
117
134
|
- spec/features/new_project_spec.rb
|
118
135
|
- spec/features/production/deployment_spec.rb
|
@@ -144,8 +161,8 @@ files:
|
|
144
161
|
- templates/bin_deploy
|
145
162
|
- templates/bin_setup
|
146
163
|
- templates/bin_setup_review_app.erb
|
147
|
-
- templates/browserslist
|
148
164
|
- templates/bundler_audit.rake
|
165
|
+
- templates/capybara_silence_puma.rb
|
149
166
|
- templates/chromedriver.rb
|
150
167
|
- templates/circle.yml.erb
|
151
168
|
- templates/config_locales_en.yml.erb
|
@@ -159,6 +176,7 @@ files:
|
|
159
176
|
- templates/flashes_helper.rb
|
160
177
|
- templates/hound.yml
|
161
178
|
- templates/i18n.rb
|
179
|
+
- templates/inline_svg.rb
|
162
180
|
- templates/json_encoding.rb
|
163
181
|
- templates/postgresql_database.yml.erb
|
164
182
|
- templates/puma.rb
|
@@ -203,6 +221,7 @@ test_files:
|
|
203
221
|
- spec/features/cli_help_spec.rb
|
204
222
|
- spec/features/github_spec.rb
|
205
223
|
- spec/features/heroku_spec.rb
|
224
|
+
- spec/features/inline_svg_spec.rb
|
206
225
|
- spec/features/json_spec.rb
|
207
226
|
- spec/features/new_project_spec.rb
|
208
227
|
- spec/features/production/deployment_spec.rb
|
data/templates/browserslist
DELETED