suspenders 1.40.0 → 1.41.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/NEWS.md +7 -0
- data/README.md +0 -2
- data/RELEASING.md +1 -1
- data/lib/suspenders/adapters/heroku.rb +0 -9
- data/lib/suspenders/app_builder.rb +4 -5
- data/lib/suspenders/generators/app_generator.rb +2 -12
- data/lib/suspenders/version.rb +2 -2
- data/spec/features/github_spec.rb +1 -1
- data/spec/features/new_project_spec.rb +28 -25
- data/templates/Gemfile.erb +3 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 72448ddabb6379077f02f41bc65d4dc8a112d4f0
|
|
4
|
+
data.tar.gz: 3c56de92f55a3d7984a6dd8a011dd9001934ba10
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bbc752c4b28b8b6dd86270c3d2986c58574fa684b8750ce854c2f7a981c076f5c9104b4b903a5322d04179412c68dab4b498d4a9dcc26eba4c05af678a2b67c7
|
|
7
|
+
data.tar.gz: 48226bb6d42963e7b0c6bd6bb39e8ab732c9455a2c619fea3618a785aedfea2b3f5b76f4242fbc3ebd7f3687a1510d91887371ebe2fbb5b040043954ada8e1ac
|
data/NEWS.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
master
|
|
2
2
|
|
|
3
|
+
1.41.0 (July 1, 2016)
|
|
4
|
+
|
|
5
|
+
* Update to Rails 5
|
|
6
|
+
* Drop quiet_assets
|
|
7
|
+
* Drop unneeded `suspenders` aliases: `--skip-test-unit`, `--skip-turbolinks`,
|
|
8
|
+
`--skip-bundle`. Drops `-G` that clashes with Rails’ `--skip-git` alias.
|
|
9
|
+
|
|
3
10
|
1.40.0 (June 25, 2016)
|
|
4
11
|
|
|
5
12
|
* Upgrade bourbon to 5.0.0.beta.6
|
data/README.md
CHANGED
|
@@ -74,8 +74,6 @@ And development gems like:
|
|
|
74
74
|
pre-loading
|
|
75
75
|
* [Web Console](https://github.com/rails/web-console) for better debugging via
|
|
76
76
|
in-browser IRB consoles.
|
|
77
|
-
* [Quiet Assets](https://github.com/evrone/quiet_assets) for muting assets
|
|
78
|
-
pipeline log messages
|
|
79
77
|
|
|
80
78
|
And testing gems like:
|
|
81
79
|
|
data/RELEASING.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
2. Update `NEWS.md` to reflect the changes since last release.
|
|
5
5
|
3. Commit changes. There shouldn't be code changes, and thus CI doesn't need to
|
|
6
6
|
run, you can then add `[ci skip]` to the commit message.
|
|
7
|
-
4. Tag the release: `git tag vVERSION -a`. The tag message should contain the
|
|
7
|
+
4. Tag the release: `git tag vVERSION -a -s`. The tag message should contain the
|
|
8
8
|
appropriate `NEWS.md` subsection.
|
|
9
9
|
5. Push changes: `git push --tags`
|
|
10
10
|
6. Build and publish to rubygems:
|
|
@@ -70,15 +70,6 @@ module Suspenders
|
|
|
70
70
|
)
|
|
71
71
|
end
|
|
72
72
|
|
|
73
|
-
def set_heroku_serve_static_files
|
|
74
|
-
%w(staging production).each do |environment|
|
|
75
|
-
run_toolbelt_command(
|
|
76
|
-
"config:add RAILS_SERVE_STATIC_FILES=true",
|
|
77
|
-
environment,
|
|
78
|
-
)
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
|
|
82
73
|
def set_heroku_application_host
|
|
83
74
|
%w(staging production).each do |environment|
|
|
84
75
|
run_toolbelt_command(
|
|
@@ -13,8 +13,7 @@ module Suspenders
|
|
|
13
13
|
:create_review_apps_setup_script,
|
|
14
14
|
:set_heroku_rails_secrets,
|
|
15
15
|
:set_heroku_remotes,
|
|
16
|
-
:set_heroku_application_host
|
|
17
|
-
:set_heroku_serve_static_files
|
|
16
|
+
:set_heroku_application_host
|
|
18
17
|
|
|
19
18
|
def readme
|
|
20
19
|
template 'README.md.erb', 'README.md'
|
|
@@ -79,7 +78,7 @@ module Suspenders
|
|
|
79
78
|
|
|
80
79
|
def configure_quiet_assets
|
|
81
80
|
config = <<-RUBY
|
|
82
|
-
config.
|
|
81
|
+
config.assets.quiet = true
|
|
83
82
|
RUBY
|
|
84
83
|
|
|
85
84
|
inject_into_class "config/application.rb", "Application", config
|
|
@@ -315,8 +314,8 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
|
|
|
315
314
|
generate 'rspec:install'
|
|
316
315
|
end
|
|
317
316
|
|
|
318
|
-
def
|
|
319
|
-
copy_file "puma.rb", "config/puma.rb"
|
|
317
|
+
def replace_default_puma_configuration
|
|
318
|
+
copy_file "puma.rb", "config/puma.rb", force: true
|
|
320
319
|
end
|
|
321
320
|
|
|
322
321
|
def set_up_forego
|
|
@@ -14,18 +14,9 @@ module Suspenders
|
|
|
14
14
|
class_option :heroku_flags, type: :string, default: "",
|
|
15
15
|
desc: "Set extra Heroku flags"
|
|
16
16
|
|
|
17
|
-
class_option :github, type: :string,
|
|
17
|
+
class_option :github, type: :string, default: nil,
|
|
18
18
|
desc: "Create Github repository and add remote origin pointed to repo"
|
|
19
19
|
|
|
20
|
-
class_option :skip_test_unit, type: :boolean, aliases: "-T", default: true,
|
|
21
|
-
desc: "Skip Test::Unit files"
|
|
22
|
-
|
|
23
|
-
class_option :skip_turbolinks, type: :boolean, default: true,
|
|
24
|
-
desc: "Skip turbolinks gem"
|
|
25
|
-
|
|
26
|
-
class_option :skip_bundle, type: :boolean, aliases: "-B", default: true,
|
|
27
|
-
desc: "Don't run bundle install"
|
|
28
|
-
|
|
29
20
|
class_option :version, type: :boolean, aliases: "-v", group: :suspenders,
|
|
30
21
|
desc: "Show Suspenders version number and quit"
|
|
31
22
|
|
|
@@ -145,7 +136,7 @@ module Suspenders
|
|
|
145
136
|
build :configure_active_job
|
|
146
137
|
build :configure_time_formats
|
|
147
138
|
build :setup_default_rake_task
|
|
148
|
-
build :
|
|
139
|
+
build :replace_default_puma_configuration
|
|
149
140
|
build :set_up_forego
|
|
150
141
|
build :setup_rack_mini_profiler
|
|
151
142
|
end
|
|
@@ -184,7 +175,6 @@ module Suspenders
|
|
|
184
175
|
if options[:heroku]
|
|
185
176
|
say "Creating Heroku apps"
|
|
186
177
|
build :create_heroku_apps, options[:heroku_flags]
|
|
187
|
-
build :set_heroku_serve_static_files
|
|
188
178
|
build :set_heroku_remotes
|
|
189
179
|
build :set_heroku_rails_secrets
|
|
190
180
|
build :set_heroku_application_host
|
data/lib/suspenders/version.rb
CHANGED
|
@@ -44,7 +44,8 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
|
44
44
|
it "loads secret_key_base from env" do
|
|
45
45
|
secrets_file = IO.read("#{project_path}/config/secrets.yml")
|
|
46
46
|
|
|
47
|
-
expect(secrets_file).
|
|
47
|
+
expect(secrets_file).
|
|
48
|
+
to match(/secret_key_base: <%= ENV\["SECRET_KEY_BASE"\] %>/)
|
|
48
49
|
end
|
|
49
50
|
|
|
50
51
|
it "adds bin/setup file" do
|
|
@@ -110,22 +111,17 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
|
110
111
|
it "adds explicit quiet_assets configuration" do
|
|
111
112
|
result = IO.read("#{project_path}/config/application.rb")
|
|
112
113
|
|
|
113
|
-
expect(result).to match(
|
|
114
|
-
/^ +config.quiet_assets = true$/
|
|
115
|
-
)
|
|
114
|
+
expect(result).to match(/^ +config.assets.quiet = true$/)
|
|
116
115
|
end
|
|
117
116
|
|
|
118
117
|
it "configures static_cache_control in production" do
|
|
119
|
-
|
|
120
|
-
expect(prod_env_file).to match(
|
|
118
|
+
expect(production_config).to match(
|
|
121
119
|
/config.static_cache_control = "public, max-age=.+"/,
|
|
122
120
|
)
|
|
123
121
|
end
|
|
124
122
|
|
|
125
123
|
it "raises on missing translations in development and test" do
|
|
126
|
-
|
|
127
|
-
environment_file =
|
|
128
|
-
IO.read("#{project_path}/config/environments/#{environment}.rb")
|
|
124
|
+
[development_config, test_config].each do |environment_file|
|
|
129
125
|
expect(environment_file).to match(
|
|
130
126
|
/^ +config.action_view.raise_on_missing_translations = true$/
|
|
131
127
|
)
|
|
@@ -143,15 +139,13 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
|
143
139
|
end
|
|
144
140
|
|
|
145
141
|
it "configs :test email delivery method for development" do
|
|
146
|
-
|
|
147
|
-
expect(dev_env_file).
|
|
142
|
+
expect(development_config).
|
|
148
143
|
to match(/^ +config.action_mailer.delivery_method = :file$/)
|
|
149
144
|
end
|
|
150
145
|
|
|
151
146
|
it "uses APPLICATION_HOST, not HOST in the production config" do
|
|
152
|
-
|
|
153
|
-
expect(
|
|
154
|
-
expect(prod_env_file).not_to match(/"HOST"/)
|
|
147
|
+
expect(production_config).to match(/"APPLICATION_HOST"/)
|
|
148
|
+
expect(production_config).not_to match(/"HOST"/)
|
|
155
149
|
end
|
|
156
150
|
|
|
157
151
|
it "configures email interceptor in smtp config" do
|
|
@@ -168,7 +162,6 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
|
168
162
|
|
|
169
163
|
it "configs active job queue adapter" do
|
|
170
164
|
application_config = IO.read("#{project_path}/config/application.rb")
|
|
171
|
-
test_config = IO.read("#{project_path}/config/environments/test.rb")
|
|
172
165
|
|
|
173
166
|
expect(application_config).to match(
|
|
174
167
|
/^ +config.active_job.queue_adapter = :delayed_job$/
|
|
@@ -179,16 +172,12 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
|
179
172
|
end
|
|
180
173
|
|
|
181
174
|
it "configs bullet gem in development" do
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
expect(
|
|
185
|
-
expect(test_config).to match /^ +Bullet.bullet_logger = true$/
|
|
186
|
-
expect(test_config).to match /^ +Bullet.rails_logger = true$/
|
|
175
|
+
expect(development_config).to match /^ +Bullet.enable = true$/
|
|
176
|
+
expect(development_config).to match /^ +Bullet.bullet_logger = true$/
|
|
177
|
+
expect(development_config).to match /^ +Bullet.rails_logger = true$/
|
|
187
178
|
end
|
|
188
179
|
|
|
189
180
|
it "configs missing assets to raise in test" do
|
|
190
|
-
test_config = IO.read("#{project_path}/config/environments/test.rb")
|
|
191
|
-
|
|
192
181
|
expect(test_config).to match(
|
|
193
182
|
/^ +config.assets.raise_runtime_errors = true$/,
|
|
194
183
|
)
|
|
@@ -207,9 +196,9 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
|
207
196
|
config_files = [
|
|
208
197
|
IO.read("#{project_path}/config/application.rb"),
|
|
209
198
|
IO.read("#{project_path}/config/environment.rb"),
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
199
|
+
development_config,
|
|
200
|
+
test_config,
|
|
201
|
+
production_config,
|
|
213
202
|
]
|
|
214
203
|
|
|
215
204
|
config_files.each do |file|
|
|
@@ -277,6 +266,20 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
|
277
266
|
expect(app_css).to match(/normalize-rails.*bourbon.*neat.*base.*refills/m)
|
|
278
267
|
end
|
|
279
268
|
|
|
269
|
+
def development_config
|
|
270
|
+
@_development_config ||=
|
|
271
|
+
read_project_file %w(config environments development.rb)
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
def test_config
|
|
275
|
+
@_test_config ||= read_project_file %w(config environments test.rb)
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
def production_config
|
|
279
|
+
@_production_config ||=
|
|
280
|
+
read_project_file %w(config environments production.rb)
|
|
281
|
+
end
|
|
282
|
+
|
|
280
283
|
def analytics_partial
|
|
281
284
|
IO.read("#{project_path}/app/views/application/_analytics.html.erb")
|
|
282
285
|
end
|
data/templates/Gemfile.erb
CHANGED
|
@@ -23,7 +23,7 @@ gem "title"
|
|
|
23
23
|
gem "uglifier"
|
|
24
24
|
|
|
25
25
|
group :development do
|
|
26
|
-
gem "
|
|
26
|
+
gem "listen"
|
|
27
27
|
gem "spring"
|
|
28
28
|
gem "spring-commands-rspec"
|
|
29
29
|
gem "web-console"
|
|
@@ -37,7 +37,8 @@ group :development, :test do
|
|
|
37
37
|
gem "factory_girl_rails"
|
|
38
38
|
gem "pry-byebug"
|
|
39
39
|
gem "pry-rails"
|
|
40
|
-
gem "
|
|
40
|
+
gem "refills"
|
|
41
|
+
gem "rspec-rails", "~> 3.5.0.beta4"
|
|
41
42
|
end
|
|
42
43
|
|
|
43
44
|
group :development, :staging do
|
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.41.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- thoughtbot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-07-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bitters
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
47
|
+
version: 5.0.0
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
54
|
+
version: 5.0.0
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rspec
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|