welaika-suspenders 2.21.0 → 2.22.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/NEWS.md +7 -1
- data/README.md +3 -2
- data/bin/setup +1 -1
- data/lib/suspenders/adapters/heroku.rb +54 -2
- data/lib/suspenders/app_builder.rb +14 -37
- data/lib/suspenders/generators/app_generator.rb +3 -1
- data/lib/suspenders/version.rb +1 -1
- data/spec/features/heroku_spec.rb +20 -0
- data/spec/features/new_project_spec.rb +16 -11
- data/spec/support/fake_heroku.rb +8 -0
- data/templates/Gemfile.erb +1 -3
- data/templates/app.json.erb +39 -0
- data/templates/{bin_setup.erb → bin_setup} +1 -1
- data/templates/bin_setup_review_app.erb +19 -0
- data/templates/circle.yml.erb +0 -3
- data/templates/errors.rb +3 -3
- data/templates/factory_girl_rspec.rb +9 -0
- data/templates/i18n.rb +1 -1
- data/templates/rails_helper.rb +4 -0
- data/templates/rubocop.yml +0 -1
- data/templates/spec_helper.rb +2 -0
- metadata +11 -8
- data/templates/config_i18n_tasks.yml +0 -80
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f224ab95618cdbe16370496df9b772230d8a87a
|
4
|
+
data.tar.gz: bb92d352d3bec26429c5a9b442eac8577059a1f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5911bb8e7d7cd04dbb2715b925ffedd063ff3d68fecf1b5700afe9f3a6a39a35909d803756c53527c4d3da01e3558c0a228a6af39171f8ef944c2174f7c4486
|
7
|
+
data.tar.gz: b07fabfc77bfacfc74b7bcefb3935c41ded52426192d3df1ce8a61931aa504bbf2fcf1d136b96520ab88ba56ea00bd404354b7e1cfbe4389072a1983bd806362
|
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--color
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3.0
|
data/.travis.yml
CHANGED
data/NEWS.md
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
-
|
1
|
+
1.35.0 (December 30, 2015)
|
2
2
|
|
3
|
+
* Introduce Heroku Pipelines support
|
4
|
+
* Update to Ruby 2.3.0
|
5
|
+
* Heroku commands run on staging by default
|
6
|
+
* Git ignore `.env.local` instead of `.env`
|
3
7
|
* Add ability to use byebug navigation commands inside of Pry using the
|
4
8
|
`pry-byebug` gem
|
9
|
+
* Remove `i18n-tasks` from generated Gemfile
|
10
|
+
* Accessibility: Add `lang` attribute to `html` element in layout
|
5
11
|
|
6
12
|
1.34.0 (November 15, 2015)
|
7
13
|
|
data/README.md
CHANGED
@@ -54,7 +54,6 @@ We merge commits from thoughbot's [suspenders](https://github.com/thoughtbot/sus
|
|
54
54
|
List of changes we made since [this is commit](https://github.com/thoughtbot/suspenders/tree/d24d6eab4cc254f8bebfd73fd2b26fbbd2647e86):
|
55
55
|
- remove `host` key in database.yml
|
56
56
|
- add [priscilla](https://github.com/Arkham/priscilla) gem
|
57
|
-
- add [pry-bloodline](https://github.com/Arkham/pry-bloodline) gem
|
58
57
|
- add [rails-i18n](https://github.com/svenfuchs/rails-i18n) gem and use italian, english as available locales
|
59
58
|
- add [letter_opener](https://github.com/ryanb/letter_opener) gem
|
60
59
|
- add [faker](https://github.com/stympy/faker) gem
|
@@ -77,7 +76,7 @@ List of changes we made since [this is commit](https://github.com/thoughtbot/sus
|
|
77
76
|
- configure asset host for capybara
|
78
77
|
- add helpers for capybara (`page!`, `screenshot!`)
|
79
78
|
- drop support for IE 9 in AutoPrefixer
|
80
|
-
-
|
79
|
+
- remove [hound](https://houndci.com) configuration
|
81
80
|
- add [draper](https://github.com/drapergem/draper) gem and rename `presenters` folder to `decorators`
|
82
81
|
- add [rubocop](https://github.com/bbatsov/rubocop) and a template of `.rubocop.yml`
|
83
82
|
- change rake default task: now includes rubocop and brakeman too
|
@@ -86,3 +85,5 @@ List of changes we made since [this is commit](https://github.com/thoughtbot/sus
|
|
86
85
|
- add [email-validator](https://github.com/balexand/email_validator) gem
|
87
86
|
- remove circle-ci
|
88
87
|
- remove bitters and refills
|
88
|
+
- lint factory girl's factories
|
89
|
+
- remove automatic deployment
|
data/bin/setup
CHANGED
@@ -7,10 +7,9 @@ module Suspenders
|
|
7
7
|
|
8
8
|
def set_heroku_remotes
|
9
9
|
remotes = <<-SHELL.strip_heredoc
|
10
|
-
|
11
|
-
# Set up the staging and production apps.
|
12
10
|
#{command_to_join_heroku_app('staging')}
|
13
11
|
#{command_to_join_heroku_app('production')}
|
12
|
+
|
14
13
|
git config heroku.remote staging
|
15
14
|
SHELL
|
16
15
|
|
@@ -25,6 +24,20 @@ module Suspenders
|
|
25
24
|
)
|
26
25
|
end
|
27
26
|
|
27
|
+
def create_staging_heroku_app(flags)
|
28
|
+
rack_env = "RACK_ENV=staging RAILS_ENV=staging"
|
29
|
+
app_name = heroku_app_name_for("staging")
|
30
|
+
|
31
|
+
run_toolbelt_command "create #{app_name} #{flags}", "staging"
|
32
|
+
run_toolbelt_command "config:add #{rack_env}", "staging"
|
33
|
+
end
|
34
|
+
|
35
|
+
def create_production_heroku_app(flags)
|
36
|
+
app_name = heroku_app_name_for("production")
|
37
|
+
|
38
|
+
run_toolbelt_command "create #{app_name} #{flags}", "production"
|
39
|
+
end
|
40
|
+
|
28
41
|
def set_heroku_rails_secrets
|
29
42
|
%w(staging production).each do |environment|
|
30
43
|
run_toolbelt_command(
|
@@ -34,6 +47,44 @@ module Suspenders
|
|
34
47
|
end
|
35
48
|
end
|
36
49
|
|
50
|
+
def provide_review_apps_setup_script
|
51
|
+
app_builder.template(
|
52
|
+
"bin_setup_review_app.erb",
|
53
|
+
"bin/setup_review_app",
|
54
|
+
force: true,
|
55
|
+
)
|
56
|
+
app_builder.run "chmod a+x bin/setup_review_app"
|
57
|
+
end
|
58
|
+
|
59
|
+
def create_heroku_pipelines_config_file
|
60
|
+
app_builder.template "app.json.erb", "app.json"
|
61
|
+
end
|
62
|
+
|
63
|
+
def create_heroku_pipeline
|
64
|
+
pipelines_plugin = `heroku plugins | grep pipelines`
|
65
|
+
if pipelines_plugin.empty?
|
66
|
+
puts "You need heroku pipelines plugin. Run: heroku plugins:install heroku-pipelines"
|
67
|
+
exit 1
|
68
|
+
end
|
69
|
+
|
70
|
+
heroku_app_name = app_builder.app_name.dasherize
|
71
|
+
%w(staging production).each do |environment|
|
72
|
+
run_toolbelt_command(
|
73
|
+
"pipelines:create #{heroku_app_name} -a #{heroku_app_name}-#{environment} --stage #{environment}",
|
74
|
+
environment,
|
75
|
+
)
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def set_heroku_serve_static_files
|
80
|
+
%w(staging production).each do |environment|
|
81
|
+
run_toolbelt_command(
|
82
|
+
"config:add RAILS_SERVE_STATIC_FILES=true",
|
83
|
+
environment,
|
84
|
+
)
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
37
88
|
private
|
38
89
|
|
39
90
|
attr_reader :app_builder
|
@@ -41,6 +92,7 @@ module Suspenders
|
|
41
92
|
def command_to_join_heroku_app(environment)
|
42
93
|
heroku_app_name = heroku_app_name_for(environment)
|
43
94
|
<<-SHELL
|
95
|
+
|
44
96
|
if heroku join --app #{heroku_app_name} &> /dev/null; then
|
45
97
|
git remote add #{environment} git@heroku.com:#{heroku_app_name}.git || true
|
46
98
|
printf 'You are a collaborator on the "#{heroku_app_name}" Heroku app\n'
|
@@ -6,9 +6,15 @@ module Suspenders
|
|
6
6
|
extend Forwardable
|
7
7
|
|
8
8
|
def_delegators :heroku_adapter,
|
9
|
+
:create_heroku_pipelines_config_file,
|
10
|
+
:create_heroku_pipeline,
|
11
|
+
:create_production_heroku_app,
|
12
|
+
:create_staging_heroku_app,
|
13
|
+
:provide_review_apps_setup_script,
|
14
|
+
:set_heroku_rails_secrets,
|
9
15
|
:set_heroku_remotes,
|
10
|
-
:
|
11
|
-
:
|
16
|
+
:set_heroku_serve_static_files,
|
17
|
+
:set_up_heroku_specific_gems
|
12
18
|
|
13
19
|
def readme
|
14
20
|
template 'README.md.erb', 'README.md'
|
@@ -69,7 +75,7 @@ module Suspenders
|
|
69
75
|
end
|
70
76
|
|
71
77
|
def provide_setup_script
|
72
|
-
template "bin_setup
|
78
|
+
template "bin_setup", "bin/setup", force: true
|
73
79
|
run "chmod a+x bin/setup"
|
74
80
|
end
|
75
81
|
|
@@ -127,6 +133,10 @@ module Suspenders
|
|
127
133
|
def enable_rack_canonical_host
|
128
134
|
config = <<-RUBY
|
129
135
|
|
136
|
+
if ENV.fetch("HEROKU_APP_NAME", "").include?("staging-pr-")
|
137
|
+
ENV["APPLICATION_HOST"] = ENV["HEROKU_APP_NAME"] + ".herokuapp.com"
|
138
|
+
end
|
139
|
+
|
130
140
|
# Ensure requests are only served from one, canonical host name
|
131
141
|
config.middleware.use Rack::CanonicalHost, ENV.fetch("APPLICATION_HOST")
|
132
142
|
RUBY
|
@@ -134,7 +144,7 @@ module Suspenders
|
|
134
144
|
inject_into_file(
|
135
145
|
"config/environments/production.rb",
|
136
146
|
config,
|
137
|
-
after:
|
147
|
+
after: "Rails.application.configure do",
|
138
148
|
)
|
139
149
|
end
|
140
150
|
|
@@ -264,11 +274,6 @@ end
|
|
264
274
|
raise_on_missing_translations_in("test")
|
265
275
|
end
|
266
276
|
|
267
|
-
def configure_i18n_tasks
|
268
|
-
run "cp $(i18n-tasks gem-path)/templates/rspec/i18n_spec.rb spec/"
|
269
|
-
copy_file "config_i18n_tasks.yml", "config/i18n-tasks.yml"
|
270
|
-
end
|
271
|
-
|
272
277
|
def configure_background_jobs_for_rspec
|
273
278
|
run 'rails g delayed_job:active_record'
|
274
279
|
end
|
@@ -391,31 +396,11 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
|
|
391
396
|
run 'git init'
|
392
397
|
end
|
393
398
|
|
394
|
-
def create_staging_heroku_app(flags)
|
395
|
-
rack_env = "RACK_ENV=staging RAILS_ENV=staging"
|
396
|
-
app_name = heroku_app_name_for("staging")
|
397
|
-
|
398
|
-
run_heroku "create #{app_name} #{flags}", "staging"
|
399
|
-
run_heroku "config:add #{rack_env}", "staging"
|
400
|
-
end
|
401
|
-
|
402
|
-
def create_production_heroku_app(flags)
|
403
|
-
app_name = heroku_app_name_for("production")
|
404
|
-
|
405
|
-
run_heroku "create #{app_name} #{flags}", "production"
|
406
|
-
end
|
407
|
-
|
408
399
|
def create_heroku_apps(flags)
|
409
400
|
create_staging_heroku_app(flags)
|
410
401
|
create_production_heroku_app(flags)
|
411
402
|
end
|
412
403
|
|
413
|
-
def set_heroku_serve_static_files
|
414
|
-
%w(staging production).each do |environment|
|
415
|
-
run_heroku "config:add RAILS_SERVE_STATIC_FILES=true", environment
|
416
|
-
end
|
417
|
-
end
|
418
|
-
|
419
404
|
def provide_deploy_script
|
420
405
|
copy_file "bin_deploy", "bin/deploy"
|
421
406
|
|
@@ -540,10 +525,6 @@ task default: "bundler:audit"
|
|
540
525
|
uncomment_lines("config/environments/#{environment}.rb", config)
|
541
526
|
end
|
542
527
|
|
543
|
-
def run_heroku(command, environment)
|
544
|
-
run "heroku #{command} --remote #{environment}"
|
545
|
-
end
|
546
|
-
|
547
528
|
def heroku_adapter
|
548
529
|
@heroku_adapter ||= Adapters::Heroku.new(self)
|
549
530
|
end
|
@@ -551,9 +532,5 @@ task default: "bundler:audit"
|
|
551
532
|
def serve_static_files_line
|
552
533
|
"config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?\n"
|
553
534
|
end
|
554
|
-
|
555
|
-
def heroku_app_name_for(environment)
|
556
|
-
"#{app_name.dasherize}-#{environment}"
|
557
|
-
end
|
558
535
|
end
|
559
536
|
end
|
@@ -106,7 +106,6 @@ module Suspenders
|
|
106
106
|
build :provide_shoulda_matchers_config
|
107
107
|
build :configure_spec_support_features
|
108
108
|
build :configure_i18n_for_test_environment
|
109
|
-
build :configure_i18n_tasks
|
110
109
|
build :configure_action_mailer_in_specs
|
111
110
|
build :set_up_faker
|
112
111
|
build :configure_capybara_webkit
|
@@ -170,9 +169,12 @@ module Suspenders
|
|
170
169
|
if options[:heroku]
|
171
170
|
say "Creating Heroku apps"
|
172
171
|
build :create_heroku_apps, options[:heroku_flags]
|
172
|
+
build :provide_review_apps_setup_script
|
173
173
|
build :set_heroku_serve_static_files
|
174
174
|
build :set_heroku_remotes
|
175
175
|
build :set_heroku_rails_secrets
|
176
|
+
build :create_heroku_pipelines_config_file
|
177
|
+
build :create_heroku_pipeline
|
176
178
|
build :provide_deploy_script
|
177
179
|
end
|
178
180
|
end
|
data/lib/suspenders/version.rb
CHANGED
@@ -20,6 +20,7 @@ RSpec.describe "Heroku" do
|
|
20
20
|
"production",
|
21
21
|
"SECRET_KEY_BASE",
|
22
22
|
)
|
23
|
+
expect(FakeHeroku).to have_setup_pipeline_for(app_name)
|
23
24
|
|
24
25
|
bin_setup_path = "#{project_path}/bin/setup"
|
25
26
|
bin_setup = IO.read(bin_setup_path)
|
@@ -29,6 +30,14 @@ RSpec.describe "Heroku" do
|
|
29
30
|
expect(bin_setup).to include("git config heroku.remote staging")
|
30
31
|
expect(File.stat(bin_setup_path)).to be_executable
|
31
32
|
|
33
|
+
bin_setup_path = "#{project_path}/bin/setup_review_app"
|
34
|
+
bin_setup = IO.read(bin_setup_path)
|
35
|
+
|
36
|
+
expect(bin_setup).to include("heroku run rake db:migrate --app #{app_name}-staging-pr-$1")
|
37
|
+
expect(bin_setup).to include("heroku ps:scale worker=1 --app #{app_name}-staging-pr-$1")
|
38
|
+
expect(bin_setup).to include("heroku restart --app #{app_name}-staging-pr-$1")
|
39
|
+
expect(File.stat(bin_setup_path)).to be_executable
|
40
|
+
|
32
41
|
bin_deploy_path = "#{project_path}/bin/deploy"
|
33
42
|
bin_deploy = IO.read(bin_deploy_path)
|
34
43
|
|
@@ -40,6 +49,17 @@ RSpec.describe "Heroku" do
|
|
40
49
|
expect(readme).to include("./bin/deploy staging")
|
41
50
|
expect(readme).to include("./bin/deploy production")
|
42
51
|
end
|
52
|
+
|
53
|
+
it "adds app.json file" do
|
54
|
+
expect(File).to exist("#{project_path}/app.json")
|
55
|
+
end
|
56
|
+
|
57
|
+
it "includes application name in app.json file" do
|
58
|
+
app_json_file = IO.read("#{project_path}/app.json")
|
59
|
+
app_name = SuspendersTestHelpers::APP_NAME.dasherize
|
60
|
+
|
61
|
+
expect(app_json_file).to match(/"name":"#{app_name}"/)
|
62
|
+
end
|
43
63
|
end
|
44
64
|
|
45
65
|
context "--heroku with region flag" do
|
@@ -32,7 +32,7 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
32
32
|
it 'creates .ruby-gemset from app name' do
|
33
33
|
ruby_gemset_file = IO.read("#{project_path}/.ruby-gemset")
|
34
34
|
|
35
|
-
expect(ruby_gemset_file).to eq
|
35
|
+
expect(ruby_gemset_file).to eq("#{app_name}\n")
|
36
36
|
end
|
37
37
|
|
38
38
|
it "copies dotfiles" do
|
@@ -47,6 +47,16 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
47
47
|
expect(secrets_file).to match(/secret_key_base: <%= ENV\["SECRET_KEY_BASE"\] %>/)
|
48
48
|
end
|
49
49
|
|
50
|
+
it "adds bin/setup file" do
|
51
|
+
expect(File).to exist("#{project_path}/bin/setup")
|
52
|
+
end
|
53
|
+
|
54
|
+
it "makes bin/setup executable" do
|
55
|
+
bin_setup_path = "#{project_path}/bin/setup"
|
56
|
+
|
57
|
+
expect(File.stat(bin_setup_path)).to be_executable
|
58
|
+
end
|
59
|
+
|
50
60
|
it "adds support file for action mailer" do
|
51
61
|
expect(File).to exist("#{project_path}/spec/support/action_mailer.rb")
|
52
62
|
end
|
@@ -107,17 +117,8 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
107
117
|
end
|
108
118
|
end
|
109
119
|
|
110
|
-
it "
|
111
|
-
expect(File).to exist("#{project_path}/spec/i18n_spec.rb")
|
112
|
-
end
|
113
|
-
|
114
|
-
it "configs i18n-tasks" do
|
115
|
-
expect(File).to exist("#{project_path}/config/i18n-tasks.yml")
|
116
|
-
end
|
117
|
-
|
118
|
-
it "evaluates en.yml.erb" do
|
120
|
+
it "evaluates it.yml.erb" do
|
119
121
|
locales_it_file = IO.read("#{project_path}/config/locales/it.yml")
|
120
|
-
app_name = SuspendersTestHelpers::APP_NAME
|
121
122
|
expect(locales_it_file).to match(/application: #{app_name.humanize}/)
|
122
123
|
end
|
123
124
|
|
@@ -214,4 +215,8 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
214
215
|
expect(file).not_to match(/^$\n/)
|
215
216
|
end
|
216
217
|
end
|
218
|
+
|
219
|
+
def app_name
|
220
|
+
SuspendersTestHelpers::APP_NAME
|
221
|
+
end
|
217
222
|
end
|
data/spec/support/fake_heroku.rb
CHANGED
@@ -6,6 +6,9 @@ class FakeHeroku
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def run!
|
9
|
+
if @args.first == "plugins"
|
10
|
+
puts "heroku-pipelines@0.29.0"
|
11
|
+
end
|
9
12
|
File.open(RECORDER, 'a') do |file|
|
10
13
|
file.puts @args.join(' ')
|
11
14
|
end
|
@@ -39,6 +42,11 @@ class FakeHeroku
|
|
39
42
|
commands_ran =~ /^config:add #{var}=.+ --remote #{remote_name}\n/
|
40
43
|
end
|
41
44
|
|
45
|
+
def self.has_setup_pipeline_for?(app_name)
|
46
|
+
commands_ran =~ /^pipelines:create #{app_name} -a #{app_name}-staging --stage staging/ &&
|
47
|
+
commands_ran =~ /^pipelines:create #{app_name} -a #{app_name}-production --stage production/
|
48
|
+
end
|
49
|
+
|
42
50
|
def self.commands_ran
|
43
51
|
@commands_ran ||= File.read(RECORDER)
|
44
52
|
end
|
data/templates/Gemfile.erb
CHANGED
@@ -42,12 +42,10 @@ group :development, :test do
|
|
42
42
|
gem "dotenv-rails"
|
43
43
|
gem "factory_girl_rails"
|
44
44
|
gem "faker"
|
45
|
-
gem "i18n-tasks"
|
46
45
|
gem "priscilla"
|
47
|
-
gem "pry-bloodline"
|
48
46
|
gem "pry-byebug"
|
49
47
|
gem "pry-rails"
|
50
|
-
gem "rspec-rails", "~> 3.
|
48
|
+
gem "rspec-rails", "~> 3.4.0"
|
51
49
|
gem "rubocop", require: false
|
52
50
|
end
|
53
51
|
|
@@ -0,0 +1,39 @@
|
|
1
|
+
{
|
2
|
+
"name":"<%= app_name.dasherize %>",
|
3
|
+
"scripts":{},
|
4
|
+
"env":{
|
5
|
+
"AIRBRAKE_API_KEY":{
|
6
|
+
"required":true
|
7
|
+
},
|
8
|
+
"EMAIL_RECIPIENTS":{
|
9
|
+
"required":true
|
10
|
+
},
|
11
|
+
"RACK_ENV":{
|
12
|
+
"required":true
|
13
|
+
},
|
14
|
+
"RAILS_ENV":{
|
15
|
+
"required":true
|
16
|
+
},
|
17
|
+
"SECRET_KEY_BASE":{
|
18
|
+
"generator":"secret"
|
19
|
+
},
|
20
|
+
"SMTP_ADDRESS":{
|
21
|
+
"required":true
|
22
|
+
},
|
23
|
+
"SMTP_DOMAIN":{
|
24
|
+
"required":true
|
25
|
+
},
|
26
|
+
"SMTP_PASSWORD":{
|
27
|
+
"required":true
|
28
|
+
},
|
29
|
+
"SMTP_USERNAME":{
|
30
|
+
"required":true
|
31
|
+
},
|
32
|
+
"WEB_CONCURRENCY":{
|
33
|
+
"required":true
|
34
|
+
}
|
35
|
+
},
|
36
|
+
"addons":[
|
37
|
+
"heroku-postgresql"
|
38
|
+
]
|
39
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
# Run this script to set up a review app's database and worker dyno
|
4
|
+
|
5
|
+
set -e
|
6
|
+
|
7
|
+
if [ -z "$1" ]; then
|
8
|
+
printf "You must provide a review app (same as the pull request) id.\n"
|
9
|
+
exit 64
|
10
|
+
fi
|
11
|
+
|
12
|
+
heroku pg:backups restore \
|
13
|
+
`heroku pg:backups public-url -a <%= app_name.dasherize %>-staging` \
|
14
|
+
DATABASE_URL \
|
15
|
+
--confirm <%= app_name.dasherize %>-staging-pr-$1 \
|
16
|
+
--app <%= app_name.dasherize %>-staging-pr-$1
|
17
|
+
heroku run rake db:migrate --app <%= app_name.dasherize %>-staging-pr-$1
|
18
|
+
heroku ps:scale worker=1 --app <%= app_name.dasherize %>-staging-pr-$1
|
19
|
+
heroku restart --app <%= app_name.dasherize %>-staging-pr-$1
|
data/templates/circle.yml.erb
CHANGED
data/templates/errors.rb
CHANGED
@@ -15,7 +15,7 @@ HTTP_ERRORS = [
|
|
15
15
|
Net::HTTPBadResponse,
|
16
16
|
Net::HTTPHeaderSyntaxError,
|
17
17
|
Net::ProtocolError,
|
18
|
-
Timeout::Error
|
18
|
+
Timeout::Error,
|
19
19
|
]
|
20
20
|
|
21
21
|
SMTP_SERVER_ERRORS = [
|
@@ -23,12 +23,12 @@ SMTP_SERVER_ERRORS = [
|
|
23
23
|
Net::SMTPAuthenticationError,
|
24
24
|
Net::SMTPServerBusy,
|
25
25
|
Net::SMTPUnknownError,
|
26
|
-
|
26
|
+
Timeout::Error,
|
27
27
|
]
|
28
28
|
|
29
29
|
SMTP_CLIENT_ERRORS = [
|
30
30
|
Net::SMTPFatalError,
|
31
|
-
Net::SMTPSyntaxError
|
31
|
+
Net::SMTPSyntaxError,
|
32
32
|
]
|
33
33
|
|
34
34
|
SMTP_ERRORS = SMTP_SERVER_ERRORS + SMTP_CLIENT_ERRORS
|
data/templates/i18n.rb
CHANGED
data/templates/rails_helper.rb
CHANGED
@@ -17,6 +17,10 @@ RSpec.configure do |config|
|
|
17
17
|
config.infer_base_class_for_anonymous_controllers = false
|
18
18
|
config.infer_spec_type_from_file_location!
|
19
19
|
config.use_transactional_fixtures = false
|
20
|
+
|
21
|
+
config.filter_rails_from_backtrace!
|
22
|
+
# arbitrary gems may also be filtered via:
|
23
|
+
# config.filter_gems_from_backtrace("gem name")
|
20
24
|
end
|
21
25
|
|
22
26
|
ActiveRecord::Migration.maintain_test_schema!
|
data/templates/rubocop.yml
CHANGED
data/templates/spec_helper.rb
CHANGED
@@ -20,6 +20,8 @@ RSpec.configure do |config|
|
|
20
20
|
|
21
21
|
config.example_status_persistence_file_path = "tmp/rspec_examples.txt"
|
22
22
|
config.order = :random
|
23
|
+
|
24
|
+
config.default_formatter = 'doc' if config.files_to_run.one?
|
23
25
|
end
|
24
26
|
|
25
27
|
WebMock.disable_net_connect!(allow_localhost: true)
|
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.22.0
|
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:
|
12
|
+
date: 2016-01-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -67,8 +67,9 @@ dependencies:
|
|
67
67
|
- - ">="
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
|
-
description:
|
71
|
-
|
70
|
+
description: 'weLaika''s fork of the famous thoughbot suspenders gem.
|
71
|
+
|
72
|
+
'
|
72
73
|
email: info@welaika.com
|
73
74
|
executables:
|
74
75
|
- welaika-suspenders
|
@@ -78,6 +79,7 @@ extra_rdoc_files:
|
|
78
79
|
- LICENSE
|
79
80
|
files:
|
80
81
|
- ".gitignore"
|
82
|
+
- ".rspec"
|
81
83
|
- ".ruby-gemset"
|
82
84
|
- ".ruby-version"
|
83
85
|
- ".travis.yml"
|
@@ -115,15 +117,16 @@ files:
|
|
115
117
|
- templates/_flashes.html.slim
|
116
118
|
- templates/_javascript.html.slim
|
117
119
|
- templates/action_mailer.rb
|
120
|
+
- templates/app.json.erb
|
118
121
|
- templates/application.sass
|
119
122
|
- templates/bin_deploy
|
120
|
-
- templates/bin_setup
|
123
|
+
- templates/bin_setup
|
124
|
+
- templates/bin_setup_review_app.erb
|
121
125
|
- templates/brakeman.rake
|
122
126
|
- templates/browserslist
|
123
127
|
- templates/bundler_audit.rake
|
124
128
|
- templates/capybara_webkit.rb
|
125
129
|
- templates/circle.yml.erb
|
126
|
-
- templates/config_i18n_tasks.yml
|
127
130
|
- templates/config_locales_it.yml.erb
|
128
131
|
- templates/database_cleaner_rspec.rb
|
129
132
|
- templates/dev.rake
|
@@ -165,7 +168,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
165
168
|
requirements:
|
166
169
|
- - ">="
|
167
170
|
- !ruby/object:Gem::Version
|
168
|
-
version: 2.
|
171
|
+
version: 2.3.0
|
169
172
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
170
173
|
requirements:
|
171
174
|
- - ">="
|
@@ -173,7 +176,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
173
176
|
version: '0'
|
174
177
|
requirements: []
|
175
178
|
rubyforge_project:
|
176
|
-
rubygems_version: 2.5.
|
179
|
+
rubygems_version: 2.5.1
|
177
180
|
signing_key:
|
178
181
|
specification_version: 4
|
179
182
|
summary: Generate a Rails app using thoughtbot's best practices.
|
@@ -1,80 +0,0 @@
|
|
1
|
-
base_locale: it
|
2
|
-
locales: [it]
|
3
|
-
|
4
|
-
# Read and write locale data
|
5
|
-
data:
|
6
|
-
# Locale files to read from
|
7
|
-
read:
|
8
|
-
- config/locales/%{locale}.yml
|
9
|
-
- config/locales/*.%{locale}.yml
|
10
|
-
- config/locales/**/*.%{locale}.yml
|
11
|
-
|
12
|
-
# key => file routes, matched top to bottom
|
13
|
-
write:
|
14
|
-
## E.g., write devise and simple form keys to their respective files
|
15
|
-
- ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml']
|
16
|
-
# Catch-all
|
17
|
-
- config/locales/%{locale}.yml
|
18
|
-
# `i18n-tasks normalize -p` will force move the keys according to these rules
|
19
|
-
|
20
|
-
# YAML / JSON serializer options, passed to load / dump / parse / serialize
|
21
|
-
yaml:
|
22
|
-
write:
|
23
|
-
# do not wrap lines at 80 characters
|
24
|
-
line_width: -1
|
25
|
-
json:
|
26
|
-
write:
|
27
|
-
# pretty print JSON
|
28
|
-
indent: ' '
|
29
|
-
space: ' '
|
30
|
-
object_nl: "\n"
|
31
|
-
array_nl: "\n"
|
32
|
-
|
33
|
-
# Find translate calls
|
34
|
-
search:
|
35
|
-
## Default scanner finds t() and I18n.t() calls
|
36
|
-
# scanner: I18n::Tasks::Scanners::PatternWithScopeScanner
|
37
|
-
|
38
|
-
## Paths to search in, passed to File.find
|
39
|
-
paths:
|
40
|
-
- app/
|
41
|
-
|
42
|
-
## Root for resolving relative keys (default)
|
43
|
-
# relative_roots:
|
44
|
-
# - app/views
|
45
|
-
|
46
|
-
## File.fnmatch patterns to exclude from search (default)
|
47
|
-
# exclude: ["*.jpg", "*.png", "*.gif", "*.svg", "*.ico", "*.eot", "*.ttf", "*.woff", "*.pdf"]
|
48
|
-
|
49
|
-
## Or, File.fnmatch patterns to include
|
50
|
-
# include: ["*.rb", "*.html.slim"]
|
51
|
-
|
52
|
-
## Google Translate
|
53
|
-
# translation:
|
54
|
-
# # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
|
55
|
-
# api_key: "AbC-dEf5"
|
56
|
-
|
57
|
-
## Consider these keys not missing
|
58
|
-
# ignore_missing:
|
59
|
-
# - 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
|
60
|
-
# - '{devise,simple_form}.*'
|
61
|
-
|
62
|
-
## Consider these keys used
|
63
|
-
ignore_unused:
|
64
|
-
- 'activerecord.*'
|
65
|
-
- '{devise,kaminari,will_paginate,simple_form}.*'
|
66
|
-
- 'date.*'
|
67
|
-
- 'time.*'
|
68
|
-
- 'titles.*'
|
69
|
-
- 'helpers.page_entries_info.*'
|
70
|
-
|
71
|
-
## Exclude these keys from `i18n-tasks eq-base' report
|
72
|
-
# ignore_eq_base:
|
73
|
-
# all:
|
74
|
-
# - common.ok
|
75
|
-
# fr,es:
|
76
|
-
# - common.brand
|
77
|
-
|
78
|
-
## Exclude these keys from all of the reports
|
79
|
-
# ignore:
|
80
|
-
# - kaminari.*
|