suspenders 1.41.0 → 1.42.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/NEWS.md +7 -0
- data/lib/suspenders/app_builder.rb +15 -13
- data/lib/suspenders/generators/app_generator.rb +1 -21
- data/lib/suspenders/generators/static_generator.rb +1 -0
- data/lib/suspenders/generators/stylesheet_base_generator.rb +10 -0
- data/lib/suspenders/version.rb +1 -1
- data/spec/features/new_project_spec.rb +11 -2
- data/templates/Gemfile.erb +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e05970d5749f52683a2dfdfa61a235ad491d845
|
4
|
+
data.tar.gz: dc6f0b8a74087e93f439d58201403b054ac750cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4037ab32f9b62c91360f7eac64c0de6a2e9e9ad90dea32ed13f2abd5b8964c5dbde5260d4845f713880d6c4e40a65d5e5ea13187a5f99dd65aa850c535d3e97e
|
7
|
+
data.tar.gz: db11125739ae1d52c4edf0be9b49baa8a531824dbc2c4510e87c0be9a8b4cf2512f1208a5641c2fb13d4091d4c34f3eba98ce499df7104478c268f61df93293b
|
data/NEWS.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
master
|
2
2
|
|
3
|
+
1.42.0 (July 23, 2016)
|
4
|
+
|
5
|
+
* [#784] Require refills once
|
6
|
+
* [#790] Ensure stylesheet_base generator runs with a clean bundle
|
7
|
+
* [#791] Use Rails' 5 syntax for `public_file_server.headers`
|
8
|
+
* [#792] Remove turbolinks from application.js file
|
9
|
+
|
3
10
|
1.41.0 (July 1, 2016)
|
4
11
|
|
5
12
|
* Update to Rails 5
|
@@ -43,6 +43,14 @@ module Suspenders
|
|
43
43
|
'raise_delivery_errors = false', 'raise_delivery_errors = true'
|
44
44
|
end
|
45
45
|
|
46
|
+
def remove_turbolinks
|
47
|
+
replace_in_file(
|
48
|
+
"app/assets/javascripts/application.js",
|
49
|
+
"//= require turbolinks",
|
50
|
+
""
|
51
|
+
)
|
52
|
+
end
|
53
|
+
|
46
54
|
def set_test_delivery_method
|
47
55
|
inject_into_file(
|
48
56
|
"config/environments/development.rb",
|
@@ -169,10 +177,13 @@ module Suspenders
|
|
169
177
|
"config.assets.version = '1.0'",
|
170
178
|
'config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")'
|
171
179
|
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
180
|
+
config = <<-EOD
|
181
|
+
config.public_file_server.headers = {
|
182
|
+
"Cache-Control" => "public, max-age=31557600",
|
183
|
+
}
|
184
|
+
EOD
|
185
|
+
|
186
|
+
configure_environment("production", config)
|
176
187
|
end
|
177
188
|
|
178
189
|
def setup_secret_token
|
@@ -322,15 +333,6 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
|
|
322
333
|
copy_file "Procfile", "Procfile"
|
323
334
|
end
|
324
335
|
|
325
|
-
def install_refills
|
326
|
-
generate "refills:import", "flashes"
|
327
|
-
remove_dir "app/views/refills"
|
328
|
-
end
|
329
|
-
|
330
|
-
def install_bitters
|
331
|
-
run "bitters install --path app/assets/stylesheets"
|
332
|
-
end
|
333
|
-
|
334
336
|
def setup_default_directories
|
335
337
|
[
|
336
338
|
'app/views/pages',
|
@@ -39,9 +39,6 @@ module Suspenders
|
|
39
39
|
invoke :setup_secret_token
|
40
40
|
invoke :create_suspenders_views
|
41
41
|
invoke :configure_app
|
42
|
-
invoke :setup_stylesheets
|
43
|
-
invoke :install_bitters
|
44
|
-
invoke :install_refills
|
45
42
|
invoke :copy_miscellaneous_files
|
46
43
|
invoke :customize_error_pages
|
47
44
|
invoke :remove_config_comment_lines
|
@@ -80,6 +77,7 @@ module Suspenders
|
|
80
77
|
say 'Setting up the development environment'
|
81
78
|
build :raise_on_missing_assets_in_test
|
82
79
|
build :raise_on_delivery_errors
|
80
|
+
build :remove_turbolinks
|
83
81
|
build :set_test_delivery_method
|
84
82
|
build :add_bullet_gem_configuration
|
85
83
|
build :raise_on_unpermitted_parameters
|
@@ -141,21 +139,6 @@ module Suspenders
|
|
141
139
|
build :setup_rack_mini_profiler
|
142
140
|
end
|
143
141
|
|
144
|
-
def setup_stylesheets
|
145
|
-
say 'Set up stylesheets'
|
146
|
-
build :setup_stylesheets
|
147
|
-
end
|
148
|
-
|
149
|
-
def install_bitters
|
150
|
-
say 'Install Bitters'
|
151
|
-
build :install_bitters
|
152
|
-
end
|
153
|
-
|
154
|
-
def install_refills
|
155
|
-
say "Install Refills"
|
156
|
-
build :install_refills
|
157
|
-
end
|
158
|
-
|
159
142
|
def setup_git
|
160
143
|
if !options[:skip_git]
|
161
144
|
say "Initializing git"
|
@@ -237,11 +220,8 @@ module Suspenders
|
|
237
220
|
|
238
221
|
def generate_default
|
239
222
|
run("spring stop")
|
240
|
-
|
241
223
|
generate("suspenders:static")
|
242
224
|
generate("suspenders:stylesheet_base")
|
243
|
-
|
244
|
-
bundle_command "install"
|
245
225
|
end
|
246
226
|
|
247
227
|
def outro
|
@@ -10,6 +10,7 @@ module Suspenders
|
|
10
10
|
gem "bourbon", "5.0.0.beta.6"
|
11
11
|
gem "neat", "~> 1.8.0"
|
12
12
|
gem "refills", group: [:development, :test]
|
13
|
+
Bundler.with_clean_env { run "bundle install" }
|
13
14
|
end
|
14
15
|
|
15
16
|
def add_css_config
|
@@ -23,5 +24,14 @@ module Suspenders
|
|
23
24
|
def remove_prior_config
|
24
25
|
remove_file "app/assets/stylesheets/application.css"
|
25
26
|
end
|
27
|
+
|
28
|
+
def install_refills
|
29
|
+
generate "refills:import", "flashes"
|
30
|
+
remove_dir "app/views/refills"
|
31
|
+
end
|
32
|
+
|
33
|
+
def install_bitters
|
34
|
+
run "bitters install --path app/assets/stylesheets"
|
35
|
+
end
|
26
36
|
end
|
27
37
|
end
|
data/lib/suspenders/version.rb
CHANGED
@@ -114,9 +114,10 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
114
114
|
expect(result).to match(/^ +config.assets.quiet = true$/)
|
115
115
|
end
|
116
116
|
|
117
|
-
it "configures
|
117
|
+
it "configures public_file_server.headers in production" do
|
118
|
+
IO.write("production_config.rb", production_config)
|
118
119
|
expect(production_config).to match(
|
119
|
-
|
120
|
+
/^ +config.public_file_server.headers = {\n +"Cache-Control" => "public,/,
|
120
121
|
)
|
121
122
|
end
|
122
123
|
|
@@ -262,10 +263,18 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
262
263
|
end
|
263
264
|
|
264
265
|
it "configures bourbon, neat, and refills" do
|
266
|
+
flashes_path = %w(app assets stylesheets refills _flashes.scss)
|
267
|
+
expect(read_project_file(flashes_path)).to match(/mixin/m)
|
268
|
+
|
265
269
|
app_css = read_project_file(%w(app assets stylesheets application.scss))
|
266
270
|
expect(app_css).to match(/normalize-rails.*bourbon.*neat.*base.*refills/m)
|
267
271
|
end
|
268
272
|
|
273
|
+
it "doesn't use turbolinks" do
|
274
|
+
app_js = read_project_file(%w(app assets javascripts application.js))
|
275
|
+
expect(app_js).not_to match(/turbolinks/)
|
276
|
+
end
|
277
|
+
|
269
278
|
def development_config
|
270
279
|
@_development_config ||=
|
271
280
|
read_project_file %w(config environments development.rb)
|
data/templates/Gemfile.erb
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.42.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-07-
|
11
|
+
date: 2016-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bitters
|