welaika-suspenders 2.34 → 2.35
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG_WELAIKA.md +5 -0
- data/lib/suspenders/adapters/heroku.rb +1 -1
- data/lib/suspenders/app_builder.rb +14 -1
- data/lib/suspenders/generators/app_generator.rb +6 -1
- data/lib/suspenders/generators/autoprefixer_generator.rb +31 -0
- data/lib/suspenders/version.rb +1 -1
- data/lib/suspenders.rb +1 -0
- data/spec/adapters/heroku_spec.rb +26 -0
- data/templates/Gemfile.erb +0 -3
- data/templates/rubocop.yml +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6dc5c70cb98579f63e22680ad0b1d522117eb65b1492d50bba5de23d7f0a662c
|
4
|
+
data.tar.gz: c97e53c5a59374b48b0331e470a1684e20dae53d3e70983a370c2a96211d3f29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7880528eeedca62eb57f65612351aa057e0cb0177932fc285547516c05253fe8c4c9986c0657b3cc2466863351901ca7c0234db492653fceb53ad6e9d9a4410f
|
7
|
+
data.tar.gz: 417d84ca0b5b64439a0b6fc8d089ab4a24b5f23e7bc056b645c370809929dcf10bde6cdc5225e8affef781e38793efbc609f46ce78481a238e1c75991f45d467
|
data/CHANGELOG_WELAIKA.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
2.35 (October 20th, 2019)
|
2
|
+
* Change: add more exclusion to rubocop (from the default configuration on github)
|
3
|
+
* Change: configure autoprefixer browsers list
|
4
|
+
* Feature: add sass sourcemaps (but they won't work if autoprefixer is present...)
|
5
|
+
|
1
6
|
2.34 (October 19th, 2019)
|
2
7
|
* Change: gitlab ci steps from prepare -> quality -> test to prepare -> test -> quality. We already run some quality checks with overcommit
|
3
8
|
* Change: use :login instead of :plain as smtp authentication system
|
@@ -16,7 +16,7 @@ module Suspenders
|
|
16
16
|
:set_heroku_remotes,
|
17
17
|
:set_heroku_sentry_configuration,
|
18
18
|
:set_heroku_smtp_settings,
|
19
|
-
:
|
19
|
+
:set_heroku_buildpacks,
|
20
20
|
)
|
21
21
|
|
22
22
|
def readme
|
@@ -300,6 +300,19 @@ config.public_file_server.headers = {
|
|
300
300
|
copy_file 'rakefile_template.rb', 'Rakefile', force: true
|
301
301
|
end
|
302
302
|
|
303
|
+
def configure_sourcemaps_for_sass
|
304
|
+
config = [
|
305
|
+
" config.sass.inline_source_maps = true\n",
|
306
|
+
" config.sass.line_comments = true\n"
|
307
|
+
].join
|
308
|
+
|
309
|
+
inject_into_file(
|
310
|
+
"config/environments/development.rb",
|
311
|
+
config,
|
312
|
+
after: " config.assets.debug = true\n"
|
313
|
+
)
|
314
|
+
end
|
315
|
+
|
303
316
|
private
|
304
317
|
|
305
318
|
def raise_on_missing_translations_in(environment)
|
@@ -103,6 +103,7 @@ module Suspenders
|
|
103
103
|
build :configure_action_mailer
|
104
104
|
build :configure_locales_and_time_zone
|
105
105
|
build :configure_time_formats
|
106
|
+
build :configure_sourcemaps_for_sass
|
106
107
|
build :setup_rakefile
|
107
108
|
build :replace_default_puma_configuration
|
108
109
|
build :set_up_forego
|
@@ -119,7 +120,7 @@ module Suspenders
|
|
119
120
|
build :set_heroku_backup_schedule
|
120
121
|
build :set_heroku_sentry_configuration
|
121
122
|
build :set_heroku_smtp_settings
|
122
|
-
build :
|
123
|
+
build :set_heroku_buildpacks
|
123
124
|
build :create_heroku_pipeline
|
124
125
|
build :configure_automatic_deployment
|
125
126
|
end
|
@@ -180,6 +181,10 @@ module Suspenders
|
|
180
181
|
generate("suspenders:views")
|
181
182
|
end
|
182
183
|
|
184
|
+
def generate_autoprefixer
|
185
|
+
generate("suspenders:autoprefixer")
|
186
|
+
end
|
187
|
+
|
183
188
|
def generate_outro
|
184
189
|
build :run_rubocop_autocorrect
|
185
190
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative "base"
|
2
|
+
|
3
|
+
module Suspenders
|
4
|
+
class AutoprefixerGenerator < Generators::Base
|
5
|
+
def add_autoprefixer_rails
|
6
|
+
gem 'autoprefixer-rails'
|
7
|
+
Bundler.with_clean_env { run "bundle install" }
|
8
|
+
end
|
9
|
+
|
10
|
+
def copy_browserslistrc
|
11
|
+
if behavior == :invoke
|
12
|
+
list = <<~TEXT
|
13
|
+
last 1 version
|
14
|
+
> 5%
|
15
|
+
not IE 11
|
16
|
+
TEXT
|
17
|
+
in_root do
|
18
|
+
File.open('.browserslistrc', 'w') do |file|
|
19
|
+
file << list
|
20
|
+
end
|
21
|
+
end
|
22
|
+
else
|
23
|
+
in_root do
|
24
|
+
File.open('.browserslistrc', 'w') do |file|
|
25
|
+
file << 'defaults'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/lib/suspenders/version.rb
CHANGED
data/lib/suspenders.rb
CHANGED
@@ -17,6 +17,7 @@ require "suspenders/generators/security_generator"
|
|
17
17
|
require "suspenders/generators/import_dump_generator"
|
18
18
|
require "suspenders/generators/jobs_generator"
|
19
19
|
require "suspenders/generators/inline_svg_generator"
|
20
|
+
require "suspenders/generators/autoprefixer_generator"
|
20
21
|
require "suspenders/generators/production/force_tls_generator"
|
21
22
|
require "suspenders/generators/production/email_generator"
|
22
23
|
require "suspenders/generators/production/timeout_generator"
|
@@ -55,6 +55,26 @@ module Suspenders
|
|
55
55
|
)
|
56
56
|
end
|
57
57
|
|
58
|
+
it "configures nodejs and ruby packs" do
|
59
|
+
app_builder = double(app_name: app_name)
|
60
|
+
allow(app_builder).to receive(:run)
|
61
|
+
|
62
|
+
Heroku.new(app_builder).set_heroku_buildpacks
|
63
|
+
|
64
|
+
%w(staging production).each do |remote|
|
65
|
+
expect(app_builder).to(
|
66
|
+
have_configured_buildpack(
|
67
|
+
remote_name: remote, index: 1, packname: "heroku/nodejs"
|
68
|
+
)
|
69
|
+
)
|
70
|
+
expect(app_builder).to(
|
71
|
+
have_configured_buildpack(
|
72
|
+
remote_name: remote, index: 2, packname: "heroku/ruby"
|
73
|
+
)
|
74
|
+
)
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
58
78
|
def app_name
|
59
79
|
SuspendersTestHelpers::APP_NAME
|
60
80
|
end
|
@@ -67,6 +87,12 @@ module Suspenders
|
|
67
87
|
def have_configured_var(remote_name, var)
|
68
88
|
have_received(:run).with(/config:add #{var}=.+ --remote #{remote_name}/)
|
69
89
|
end
|
90
|
+
|
91
|
+
def have_configured_buildpack(remote_name:, index:, packname:)
|
92
|
+
have_received(:run).with(
|
93
|
+
/buildpacks:add --index #{index} #{packname} --remote #{remote_name}/
|
94
|
+
)
|
95
|
+
end
|
70
96
|
end
|
71
97
|
end
|
72
98
|
end
|
data/templates/Gemfile.erb
CHANGED
data/templates/rubocop.yml
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: welaika-suspenders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '2.
|
4
|
+
version: '2.35'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoughtbot
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-10-
|
12
|
+
date: 2019-10-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -116,6 +116,7 @@ files:
|
|
116
116
|
- lib/suspenders/adapters/heroku.rb
|
117
117
|
- lib/suspenders/app_builder.rb
|
118
118
|
- lib/suspenders/generators/app_generator.rb
|
119
|
+
- lib/suspenders/generators/autoprefixer_generator.rb
|
119
120
|
- lib/suspenders/generators/base.rb
|
120
121
|
- lib/suspenders/generators/ci_generator.rb
|
121
122
|
- lib/suspenders/generators/db_optimizations_generator.rb
|