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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ac150f675b3270f914eb84e55db71e6572b28739664d1deae487d5032ca15efb
4
- data.tar.gz: 3fe1ff01eec2e5e65ec5d36fd9f3393d31ba293b1c03c05a459bcaa763b78695
3
+ metadata.gz: 8aa31ed704361dcb4c7c5dae040f6000a65e958f436038df81a74fa719ccdd47
4
+ data.tar.gz: ceb17403f61961694b1b08298c4100188c26d1d64abc6b5db0f97216f7a9093e
5
5
  SHA512:
6
- metadata.gz: c29d991bc59425305115fb9e8bb1f41cf7ed7fcd61db8ee47c138fabfc82ab03700bdc087cd2d9b9663550ec26610fef5dd91f089511428db8379bd03b4605d7
7
- data.tar.gz: 168f752abb44cad62c016ce5c801cf0f72e891adee72910522c4498f832d558842e8dba055c703c44dcaf66d95dfafd790c8a74ee2c4b4b50ee193a2c211398f
6
+ metadata.gz: 54d43d08ed81085648996f38127d960bffa732ae61735e40bfd19de93f5593b7e71a9bdc5c42e69f20410eaa0f8d79fcface14285158494510d9f231c422b45d
7
+ data.tar.gz: '083ab7ad3e0a0a473d78f01e5d542ac15462a2965d0179b56dcd98b7ab32ff62d504251e359e907a5ac0e333eb3eb1127e4f0dfc2bbe265422f9ddd6aeb674c0'
data/.travis.yml CHANGED
@@ -10,3 +10,5 @@ before_install:
10
10
  install: bundle install
11
11
  notifications:
12
12
  email: false
13
+ services:
14
+ - postgresql
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
- config.middleware.use Rack::CanonicalHost, ENV.fetch("APPLICATION_HOST")
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:views")
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
@@ -13,7 +13,7 @@ module Suspenders
13
13
  private
14
14
 
15
15
  def app_name
16
- Rails.app_class.parent_name.demodulize.underscore.dasherize
16
+ Rails.app_class.module_parent_name.demodulize.underscore.dasherize
17
17
  end
18
18
  end
19
19
  end
@@ -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 configure_chromedriver
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
@@ -1,8 +1,8 @@
1
1
  module Suspenders
2
- RAILS_VERSION = "~> 5.2.3".freeze
2
+ RAILS_VERSION = "~> 6.0.0".freeze
3
3
  RUBY_VERSION = IO.
4
4
  read("#{File.dirname(__FILE__)}/../../.ruby-version").
5
5
  strip.
6
6
  freeze
7
- VERSION = "1.52.0".freeze
7
+ VERSION = "1.53.0".freeze
8
8
  end
@@ -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 assets javascripts application.js))
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: :generators do
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
@@ -32,4 +32,5 @@ rush to build something amazing; don't use it if you like missing deadlines.
32
32
  s.add_dependency 'rails', Suspenders::RAILS_VERSION
33
33
 
34
34
  s.add_development_dependency 'rspec', '~> 3.2'
35
+ s.add_development_dependency 'rack-timeout'
35
36
  end
@@ -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"
@@ -1,3 +1,3 @@
1
- <%= javascript_include_tag :application %>
1
+ <%= javascript_pack_tag :application %>
2
2
 
3
3
  <%= yield :javascript %>
@@ -0,0 +1 @@
1
+ Capybara.server = :puma, { Silent: true }
@@ -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
- capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
9
- chromeOptions: { args: %w(headless disable-gpu) },
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
- desired_capabilities: capabilities
14
+ options: options
15
15
  end
16
16
 
17
17
  Capybara.javascript_driver = :headless_chrome
@@ -5,7 +5,6 @@ PORT=3000
5
5
  RACK_ENV=development
6
6
  RACK_MINI_PROFILER=0
7
7
  SECRET_KEY_BASE=development_secret
8
- EXECJS_RUNTIME=Node
9
8
  SMTP_ADDRESS=smtp.example.com
10
9
  SMTP_DOMAIN=example.com
11
10
  SMTP_PASSWORD=password
@@ -0,0 +1,3 @@
1
+ InlineSvg.configure do |config|
2
+ config.raise_on_file_not_found = true
3
+ end
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.52.0
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-06-07 00:00:00.000000000 Z
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: 5.2.3
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.3
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
@@ -1,3 +0,0 @@
1
- Last 2 versions
2
- Explorer >= 11
3
- Android >= 4.4