suspenders 1.35.0 → 1.36.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/LICENSE +1 -1
- data/NEWS.md +9 -0
- data/README.md +2 -2
- data/lib/suspenders/adapters/heroku.rb +11 -6
- data/lib/suspenders/app_builder.rb +19 -21
- data/lib/suspenders/generators/app_generator.rb +18 -7
- data/lib/suspenders/version.rb +1 -1
- data/spec/features/new_project_spec.rb +30 -0
- data/spec/support/fake_heroku.rb +1 -1
- data/suspenders.gemspec +1 -1
- data/templates/Gemfile.erb +5 -1
- data/templates/app.json.erb +7 -1
- data/templates/dotfiles/.env +1 -0
- data/templates/rack_mini_profiler.rb +5 -0
- metadata +5 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5d921beddd38f9bd970eadbdcc901a3818eb23cc
|
|
4
|
+
data.tar.gz: 9714376afdfe4d02c41e56358d8aeb59e2ad7129
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a8e513fe32ce4e817d6e4524d1082d089e5eac7b936dd68b6ed96fadb1278bba2f25df88d7a466c00053d6693016d1821d63bc231a1c07f93d876e86d612b0b1
|
|
7
|
+
data.tar.gz: 63a34852741cea8ae655e6be0889967e15816605b455059f3da0ee565c4d1dec1426c4b7f68831aac827f9a17cf16b11d32d09ed00591f6fb6adf3653b0ba064
|
data/LICENSE
CHANGED
data/NEWS.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
1.36.0 (February 26, 2016)
|
|
2
|
+
|
|
3
|
+
* Update Bitters to v1.2
|
|
4
|
+
* Remove deprecated `fix_i18n_deprecation_warning` method
|
|
5
|
+
* Switch from Airbrake to Honeybadger
|
|
6
|
+
* Generate applications with `rack_mini_profiler` (disabled by default, enabled
|
|
7
|
+
by setting `RACK_MINI_PROFILER=1`)
|
|
8
|
+
* Heroku Pipelines bug fixes
|
|
9
|
+
|
|
1
10
|
1.35.0 (December 30, 2015)
|
|
2
11
|
|
|
3
12
|
* Introduce Heroku Pipelines support
|
data/README.md
CHANGED
|
@@ -31,7 +31,6 @@ generated projectname/Gemfile.
|
|
|
31
31
|
|
|
32
32
|
It includes application gems like:
|
|
33
33
|
|
|
34
|
-
* [Airbrake](https://github.com/airbrake/airbrake) for exception notification
|
|
35
34
|
* [Autoprefixer Rails](https://github.com/ai/autoprefixer-rails) for CSS vendor prefixes
|
|
36
35
|
* [Bourbon](https://github.com/thoughtbot/bourbon) for Sass mixins
|
|
37
36
|
* [Bitters](https://github.com/thoughtbot/bitters) for scaffold application styles
|
|
@@ -40,6 +39,7 @@ It includes application gems like:
|
|
|
40
39
|
* [Flutie](https://github.com/thoughtbot/flutie) for `page_title` and `body_class` view
|
|
41
40
|
helpers
|
|
42
41
|
* [High Voltage](https://github.com/thoughtbot/high_voltage) for static pages
|
|
42
|
+
* [Honeybadger](https://honeybadger.io) for exception notification
|
|
43
43
|
* [jQuery Rails](https://github.com/rails/jquery-rails) for jQuery
|
|
44
44
|
* [Neat](https://github.com/thoughtbot/neat) for semantic grids
|
|
45
45
|
* [New Relic RPM](https://github.com/newrelic/rpm) for monitoring performance
|
|
@@ -212,7 +212,7 @@ Thank you, [contributors]!
|
|
|
212
212
|
|
|
213
213
|
## License
|
|
214
214
|
|
|
215
|
-
Suspenders is Copyright © 2008-
|
|
215
|
+
Suspenders is Copyright © 2008-2016 thoughtbot.
|
|
216
216
|
It is free software,
|
|
217
217
|
and may be redistributed under the terms specified in the [LICENSE] file.
|
|
218
218
|
|
|
@@ -68,12 +68,17 @@ module Suspenders
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
heroku_app_name = app_builder.app_name.dasherize
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
71
|
+
run_toolbelt_command(
|
|
72
|
+
"pipelines:create #{heroku_app_name} \
|
|
73
|
+
-a #{heroku_app_name}-staging --stage staging",
|
|
74
|
+
"staging",
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
run_toolbelt_command(
|
|
78
|
+
"pipelines:add #{heroku_app_name} \
|
|
79
|
+
-a #{heroku_app_name}-production --stage production",
|
|
80
|
+
"production",
|
|
81
|
+
)
|
|
77
82
|
end
|
|
78
83
|
|
|
79
84
|
def set_heroku_serve_static_files
|
|
@@ -20,6 +20,21 @@ module Suspenders
|
|
|
20
20
|
template 'README.md.erb', 'README.md'
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
+
def gitignore
|
|
24
|
+
copy_file "suspenders_gitignore", ".gitignore"
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def gemfile
|
|
28
|
+
template "Gemfile.erb", "Gemfile"
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def setup_rack_mini_profiler
|
|
32
|
+
copy_file(
|
|
33
|
+
"rack_mini_profiler.rb",
|
|
34
|
+
"config/initializers/rack_mini_profiler.rb",
|
|
35
|
+
)
|
|
36
|
+
end
|
|
37
|
+
|
|
23
38
|
def raise_on_missing_assets_in_test
|
|
24
39
|
inject_into_file(
|
|
25
40
|
"config/environments/test.rb",
|
|
@@ -231,11 +246,6 @@ end
|
|
|
231
246
|
bundle_command 'exec rake db:create db:migrate'
|
|
232
247
|
end
|
|
233
248
|
|
|
234
|
-
def replace_gemfile
|
|
235
|
-
remove_file 'Gemfile'
|
|
236
|
-
template 'Gemfile.erb', 'Gemfile'
|
|
237
|
-
end
|
|
238
|
-
|
|
239
249
|
def set_ruby_to_version_being_used
|
|
240
250
|
create_file '.ruby-version', "#{Suspenders::RUBY_VERSION}\n"
|
|
241
251
|
end
|
|
@@ -318,14 +328,6 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
|
|
|
318
328
|
configure_environment "test", "config.active_job.queue_adapter = :inline"
|
|
319
329
|
end
|
|
320
330
|
|
|
321
|
-
def fix_i18n_deprecation_warning
|
|
322
|
-
config = <<-RUBY
|
|
323
|
-
config.i18n.enforce_available_locales = true
|
|
324
|
-
RUBY
|
|
325
|
-
|
|
326
|
-
inject_into_class 'config/application.rb', 'Application', config
|
|
327
|
-
end
|
|
328
|
-
|
|
329
331
|
def generate_rspec
|
|
330
332
|
generate 'rspec:install'
|
|
331
333
|
end
|
|
@@ -345,18 +347,15 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
|
|
|
345
347
|
end
|
|
346
348
|
|
|
347
349
|
def install_refills
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
run "rmdir app/views/refills"
|
|
350
|
+
generate "refills:import", "flashes"
|
|
351
|
+
remove_dir "app/views/refills"
|
|
351
352
|
end
|
|
352
353
|
|
|
353
354
|
def install_bitters
|
|
354
355
|
run "bitters install --path app/assets/stylesheets"
|
|
355
356
|
end
|
|
356
357
|
|
|
357
|
-
def
|
|
358
|
-
remove_file '.gitignore'
|
|
359
|
-
copy_file 'suspenders_gitignore', '.gitignore'
|
|
358
|
+
def setup_default_directories
|
|
360
359
|
[
|
|
361
360
|
'app/views/pages',
|
|
362
361
|
'spec/lib',
|
|
@@ -366,8 +365,7 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
|
|
|
366
365
|
'spec/support/mixins',
|
|
367
366
|
'spec/support/shared_examples'
|
|
368
367
|
].each do |dir|
|
|
369
|
-
|
|
370
|
-
run "touch #{dir}/.keep"
|
|
368
|
+
empty_directory_with_keep_file dir
|
|
371
369
|
end
|
|
372
370
|
end
|
|
373
371
|
|
|
@@ -57,7 +57,6 @@ module Suspenders
|
|
|
57
57
|
end
|
|
58
58
|
|
|
59
59
|
def customize_gemfile
|
|
60
|
-
build :replace_gemfile
|
|
61
60
|
build :set_ruby_to_version_being_used
|
|
62
61
|
|
|
63
62
|
if options[:heroku]
|
|
@@ -143,10 +142,10 @@ module Suspenders
|
|
|
143
142
|
build :configure_active_job
|
|
144
143
|
build :configure_time_formats
|
|
145
144
|
build :disable_xml_params
|
|
146
|
-
build :fix_i18n_deprecation_warning
|
|
147
145
|
build :setup_default_rake_task
|
|
148
146
|
build :configure_puma
|
|
149
147
|
build :set_up_forego
|
|
148
|
+
build :setup_rack_mini_profiler
|
|
150
149
|
end
|
|
151
150
|
|
|
152
151
|
def setup_stylesheets
|
|
@@ -166,8 +165,8 @@ module Suspenders
|
|
|
166
165
|
|
|
167
166
|
def setup_git
|
|
168
167
|
if !options[:skip_git]
|
|
169
|
-
say
|
|
170
|
-
invoke :
|
|
168
|
+
say "Initializing git"
|
|
169
|
+
invoke :setup_default_directories
|
|
171
170
|
invoke :init_git
|
|
172
171
|
end
|
|
173
172
|
end
|
|
@@ -203,8 +202,8 @@ module Suspenders
|
|
|
203
202
|
build :copy_dotfiles
|
|
204
203
|
end
|
|
205
204
|
|
|
206
|
-
def
|
|
207
|
-
build :
|
|
205
|
+
def setup_default_directories
|
|
206
|
+
build :setup_default_directories
|
|
208
207
|
end
|
|
209
208
|
|
|
210
209
|
def setup_bundler_audit
|
|
@@ -241,7 +240,7 @@ module Suspenders
|
|
|
241
240
|
|
|
242
241
|
def outro
|
|
243
242
|
say 'Congratulations! You just pulled our suspenders.'
|
|
244
|
-
say
|
|
243
|
+
say honeybadger_outro
|
|
245
244
|
end
|
|
246
245
|
|
|
247
246
|
protected
|
|
@@ -253,5 +252,17 @@ module Suspenders
|
|
|
253
252
|
def using_active_record?
|
|
254
253
|
!options[:skip_active_record]
|
|
255
254
|
end
|
|
255
|
+
|
|
256
|
+
private
|
|
257
|
+
|
|
258
|
+
def honeybadger_outro
|
|
259
|
+
"Run 'bundle exec honeybadger heroku install' with your API key#{honeybadger_message_suffix}."
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
def honeybadger_message_suffix
|
|
263
|
+
if options[:heroku]
|
|
264
|
+
" unless you're using the Heroku Honeybadger add-on"
|
|
265
|
+
end
|
|
266
|
+
end
|
|
256
267
|
end
|
|
257
268
|
end
|
data/lib/suspenders/version.rb
CHANGED
|
@@ -7,6 +7,19 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
|
7
7
|
run_suspenders
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
+
it "uses custom Gemfile" do
|
|
11
|
+
gemfile_file = IO.read("#{project_path}/Gemfile")
|
|
12
|
+
expect(gemfile_file).to match(
|
|
13
|
+
/^ruby "#{Suspenders::RUBY_VERSION}"$/,
|
|
14
|
+
)
|
|
15
|
+
expect(gemfile_file).to match(
|
|
16
|
+
/^gem "autoprefixer-rails"$/,
|
|
17
|
+
)
|
|
18
|
+
expect(gemfile_file).to match(
|
|
19
|
+
/^gem "rails", "#{Suspenders::RAILS_VERSION}"$/,
|
|
20
|
+
)
|
|
21
|
+
end
|
|
22
|
+
|
|
10
23
|
it "ensures project specs pass" do
|
|
11
24
|
Dir.chdir(project_path) do
|
|
12
25
|
Bundler.with_clean_env do
|
|
@@ -69,6 +82,23 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
|
69
82
|
expect(hound_config_file).to include "enabled: true"
|
|
70
83
|
end
|
|
71
84
|
|
|
85
|
+
it "ensures Gemfile contains `rack-mini-profiler`" do
|
|
86
|
+
gemfile = IO.read("#{project_path}/Gemfile")
|
|
87
|
+
|
|
88
|
+
expect(gemfile).to include %{gem "rack-mini-profiler", require: false}
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
it "ensures .sample.env defaults to RACK_MINI_PROFILER=0" do
|
|
92
|
+
env = IO.read("#{project_path}/.env")
|
|
93
|
+
|
|
94
|
+
expect(env).to include "RACK_MINI_PROFILER=0"
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
it "creates a rack-mini-profiler initializer" do
|
|
98
|
+
expect(File).
|
|
99
|
+
to exist("#{project_path}/config/initializers/rack_mini_profiler.rb")
|
|
100
|
+
end
|
|
101
|
+
|
|
72
102
|
it "ensures newrelic.yml reads NewRelic license from env" do
|
|
73
103
|
newrelic_file = IO.read("#{project_path}/config/newrelic.yml")
|
|
74
104
|
|
data/spec/support/fake_heroku.rb
CHANGED
|
@@ -44,7 +44,7 @@ class FakeHeroku
|
|
|
44
44
|
|
|
45
45
|
def self.has_setup_pipeline_for?(app_name)
|
|
46
46
|
commands_ran =~ /^pipelines:create #{app_name} -a #{app_name}-staging --stage staging/ &&
|
|
47
|
-
commands_ran =~ /^pipelines:
|
|
47
|
+
commands_ran =~ /^pipelines:add #{app_name} -a #{app_name}-production --stage production/
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
def self.commands_ran
|
data/suspenders.gemspec
CHANGED
|
@@ -27,7 +27,7 @@ rush to build something amazing; don't use it if you like missing deadlines.
|
|
|
27
27
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
28
28
|
s.version = Suspenders::VERSION
|
|
29
29
|
|
|
30
|
-
s.add_dependency 'bitters', '~> 1.
|
|
30
|
+
s.add_dependency 'bitters', '~> 1.2'
|
|
31
31
|
s.add_dependency 'bundler', '~> 1.3'
|
|
32
32
|
s.add_dependency 'rails', Suspenders::RAILS_VERSION
|
|
33
33
|
|
data/templates/Gemfile.erb
CHANGED
|
@@ -2,13 +2,13 @@ source "https://rubygems.org"
|
|
|
2
2
|
|
|
3
3
|
ruby "<%= Suspenders::RUBY_VERSION %>"
|
|
4
4
|
|
|
5
|
-
gem "airbrake"
|
|
6
5
|
gem "autoprefixer-rails"
|
|
7
6
|
gem "bourbon", "~> 4.2.0"
|
|
8
7
|
gem "coffee-rails", "~> 4.1.0"
|
|
9
8
|
gem "delayed_job_active_record"
|
|
10
9
|
gem "flutie"
|
|
11
10
|
gem "high_voltage"
|
|
11
|
+
gem "honeybadger"
|
|
12
12
|
gem "jquery-rails"
|
|
13
13
|
gem "neat", "~> 1.7.0"
|
|
14
14
|
gem "newrelic_rpm", ">= 3.9.8"
|
|
@@ -42,6 +42,10 @@ group :development, :test do
|
|
|
42
42
|
gem "rspec-rails", "~> 3.4.0"
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
+
group :development, :staging do
|
|
46
|
+
gem "rack-mini-profiler", require: false
|
|
47
|
+
end
|
|
48
|
+
|
|
45
49
|
group :test do
|
|
46
50
|
gem "capybara-webkit"
|
|
47
51
|
gem "database_cleaner"
|
data/templates/app.json.erb
CHANGED
|
@@ -2,12 +2,18 @@
|
|
|
2
2
|
"name":"<%= app_name.dasherize %>",
|
|
3
3
|
"scripts":{},
|
|
4
4
|
"env":{
|
|
5
|
-
"
|
|
5
|
+
"APPLICATION_HOST":{
|
|
6
6
|
"required":true
|
|
7
7
|
},
|
|
8
8
|
"EMAIL_RECIPIENTS":{
|
|
9
9
|
"required":true
|
|
10
10
|
},
|
|
11
|
+
"HEROKU_APP_NAME": {
|
|
12
|
+
"required":true
|
|
13
|
+
},
|
|
14
|
+
"HEROKU_PARENT_APP_NAME": {
|
|
15
|
+
"required":true
|
|
16
|
+
},
|
|
11
17
|
"RACK_ENV":{
|
|
12
18
|
"required":true
|
|
13
19
|
},
|
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.36.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- thoughtbot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-02-26 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bitters
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 1.
|
|
19
|
+
version: '1.2'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 1.
|
|
26
|
+
version: '1.2'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -141,6 +141,7 @@ files:
|
|
|
141
141
|
- templates/newrelic.yml.erb
|
|
142
142
|
- templates/postgresql_database.yml.erb
|
|
143
143
|
- templates/puma.rb
|
|
144
|
+
- templates/rack_mini_profiler.rb
|
|
144
145
|
- templates/rails_helper.rb
|
|
145
146
|
- templates/secrets.yml
|
|
146
147
|
- templates/shoulda_matchers_config_rspec.rb
|