welaika-suspenders 2.13.0 → 2.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/NEWS.md +13 -0
- data/README.md +1 -2
- data/lib/suspenders/app_builder.rb +12 -8
- data/lib/suspenders/generators/app_generator.rb +7 -2
- data/lib/suspenders/version.rb +1 -1
- data/spec/features/new_project_spec.rb +4 -0
- data/templates/Gemfile.erb +2 -2
- data/templates/Procfile +1 -1
- data/templates/circle.yml.erb +8 -0
- data/templates/{development_seeds.rb → dev.rake} +1 -1
- data/templates/dotfiles/.ctags +2 -0
- data/templates/postgresql_database.yml.erb +11 -1
- data/templates/puma.rb +19 -0
- data/templates/sample.env +1 -1
- data/templates/slim.rb +1 -1
- metadata +8 -8
- data/Gemfile.lock +0 -146
- data/templates/travis.yml.erb +0 -21
- data/templates/unicorn.rb +0 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32b1ee32dac41983cbb70817bf429c893f136674
|
4
|
+
data.tar.gz: 8224c27cb278bb1049ddf2ae2ccb6c806a49ed7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b582b01e1360810da4674157134bea4e826eedde48b786ca5ea88fbbbd9dba4dec435882caa71632c679d4dba7faf28a356452a5f35e6306214b654b10e6257
|
7
|
+
data.tar.gz: 7792bf665153ca578d702db6051be4ab853a0ac7faaa52330c38b8cce6d6f552b1554465464a2ac039e483599233ba57b6c062b535819fec1c27b28cde0499ae
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.
|
1
|
+
2.2.3
|
data/.travis.yml
CHANGED
data/NEWS.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
1.31.0 (unreleased)
|
2
|
+
|
3
|
+
* Update to Ruby 2.2.3
|
4
|
+
|
5
|
+
1.30.0 (July 30, 2015)
|
6
|
+
|
7
|
+
* Update to RSpec 3.3
|
8
|
+
* Replace TravisCI with CircleCI
|
9
|
+
* Rename development data concept to avoid confusion with db/seeds
|
10
|
+
* Remove Unicorn in favor of Puma, as [recommended by Heroku]
|
11
|
+
|
12
|
+
[recommended by Heroku]: https://devcenter.heroku.com/changelog-items/594
|
13
|
+
|
1
14
|
1.29.0 (June 16, 2015)
|
2
15
|
|
3
16
|
* Generate rake, rails and rspec binstubs with Spring
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ First install the suspenders gem:
|
|
9
9
|
|
10
10
|
gem install welaika-suspenders
|
11
11
|
|
12
|
-
If you are using RVM, please create a new gemset named like `projectname`:
|
12
|
+
If you are using RVM, please before create a new gemset named like `projectname`:
|
13
13
|
|
14
14
|
rvm gemset create projectname
|
15
15
|
rvm gemset use projectname
|
@@ -83,4 +83,3 @@ List of changes we made since [this is commit](https://github.com/thoughtbot/sus
|
|
83
83
|
- drop support for IE 9 in AutoPrefixer
|
84
84
|
- removed [hound](https://houndci.com) configuration
|
85
85
|
- add [bullet](https://github.com/flyerhzm/bullet)
|
86
|
-
- set `unicorn` workers to 1 for `webconsole`
|
@@ -46,7 +46,7 @@ module Suspenders
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def provide_dev_prime_task
|
49
|
-
copy_file '
|
49
|
+
copy_file 'dev.rake', 'lib/tasks/dev.rake'
|
50
50
|
end
|
51
51
|
|
52
52
|
def configure_generators
|
@@ -101,7 +101,7 @@ module Suspenders
|
|
101
101
|
RUBY
|
102
102
|
|
103
103
|
inject_into_file 'config/environments/production.rb', config,
|
104
|
-
:
|
104
|
+
after: "config.action_mailer.raise_delivery_errors = false"
|
105
105
|
end
|
106
106
|
|
107
107
|
def enable_rack_canonical_host
|
@@ -135,7 +135,7 @@ module Suspenders
|
|
135
135
|
def setup_asset_host
|
136
136
|
replace_in_file 'config/environments/production.rb',
|
137
137
|
"# config.action_controller.asset_host = 'http://assets.example.com'",
|
138
|
-
'config.action_controller.asset_host = ENV.fetch("ASSET_HOST", ENV.fetch("
|
138
|
+
'config.action_controller.asset_host = ENV.fetch("ASSET_HOST", ENV.fetch("APPLICATION_HOST"))'
|
139
139
|
|
140
140
|
replace_in_file 'config/initializers/assets.rb',
|
141
141
|
"config.assets.version = '1.0'",
|
@@ -236,8 +236,8 @@ end
|
|
236
236
|
copy_file "spec_helper.rb", "spec/spec_helper.rb"
|
237
237
|
end
|
238
238
|
|
239
|
-
def
|
240
|
-
template
|
239
|
+
def configure_ci
|
240
|
+
template "circle.yml.erb", "circle.yml"
|
241
241
|
end
|
242
242
|
|
243
243
|
def configure_i18n_for_test_environment
|
@@ -325,8 +325,8 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
|
|
325
325
|
generate 'rspec:install'
|
326
326
|
end
|
327
327
|
|
328
|
-
def
|
329
|
-
copy_file
|
328
|
+
def configure_puma
|
329
|
+
copy_file "puma.rb", "config/puma.rb"
|
330
330
|
end
|
331
331
|
|
332
332
|
def setup_foreman
|
@@ -376,6 +376,10 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
|
|
376
376
|
end
|
377
377
|
end
|
378
378
|
|
379
|
+
def copy_dotfiles
|
380
|
+
directory("dotfiles", ".")
|
381
|
+
end
|
382
|
+
|
379
383
|
def init_git
|
380
384
|
run 'git init'
|
381
385
|
end
|
@@ -484,7 +488,7 @@ you can deploy to staging and production with:
|
|
484
488
|
EOS
|
485
489
|
|
486
490
|
%w(500 404 422).each do |page|
|
487
|
-
inject_into_file "public/#{page}.html", meta_tags, :
|
491
|
+
inject_into_file "public/#{page}.html", meta_tags, after: "<head>\n"
|
488
492
|
replace_in_file "public/#{page}.html", /<!--.+-->\n/, ''
|
489
493
|
end
|
490
494
|
end
|
@@ -44,6 +44,7 @@ module Suspenders
|
|
44
44
|
invoke :copy_miscellaneous_files
|
45
45
|
invoke :customize_error_pages
|
46
46
|
invoke :remove_routes_comment_lines
|
47
|
+
invoke :setup_dotfiles
|
47
48
|
invoke :setup_git
|
48
49
|
invoke :setup_database
|
49
50
|
invoke :create_heroku_apps
|
@@ -98,7 +99,7 @@ module Suspenders
|
|
98
99
|
build :configure_background_jobs_for_rspec
|
99
100
|
build :enable_database_cleaner
|
100
101
|
build :configure_spec_support_features
|
101
|
-
build :
|
102
|
+
build :configure_ci
|
102
103
|
build :configure_i18n_for_test_environment
|
103
104
|
build :configure_i18n_tasks
|
104
105
|
build :configure_action_mailer_in_specs
|
@@ -146,7 +147,7 @@ module Suspenders
|
|
146
147
|
build :configure_available_locales
|
147
148
|
build :fix_i18n_deprecation_warning
|
148
149
|
build :setup_default_rake_task
|
149
|
-
build :
|
150
|
+
build :configure_puma
|
150
151
|
build :setup_foreman
|
151
152
|
end
|
152
153
|
|
@@ -191,6 +192,10 @@ module Suspenders
|
|
191
192
|
end
|
192
193
|
end
|
193
194
|
|
195
|
+
def setup_dotfiles
|
196
|
+
build :copy_dotfiles
|
197
|
+
end
|
198
|
+
|
194
199
|
def setup_gitignore
|
195
200
|
build :gitignore_files
|
196
201
|
end
|
data/lib/suspenders/version.rb
CHANGED
@@ -35,6 +35,10 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
35
35
|
expect(ruby_gemset_file).to eq "#{SuspendersTestHelpers::APP_NAME}\n"
|
36
36
|
end
|
37
37
|
|
38
|
+
it "copies dotfiles" do
|
39
|
+
expect(File).to exist("#{project_path}/.ctags")
|
40
|
+
end
|
41
|
+
|
38
42
|
it "loads secret_key_base from env" do
|
39
43
|
secrets_file = IO.read("#{project_path}/config/secrets.yml")
|
40
44
|
|
data/templates/Gemfile.erb
CHANGED
@@ -16,6 +16,7 @@ gem "neat", "~> 1.7.0"
|
|
16
16
|
gem "newrelic_rpm", ">= 3.9.8"
|
17
17
|
gem "normalize-rails", "~> 3.0.0"
|
18
18
|
gem "pg"
|
19
|
+
gem "puma"
|
19
20
|
gem "rack-canonical-host"
|
20
21
|
gem "rails", "<%= Suspenders::RAILS_VERSION %>"
|
21
22
|
gem "rails-i18n"
|
@@ -26,7 +27,6 @@ gem "slim-rails"
|
|
26
27
|
gem "simple_form"
|
27
28
|
gem "title"
|
28
29
|
gem "uglifier"
|
29
|
-
gem "unicorn"
|
30
30
|
|
31
31
|
group :development do
|
32
32
|
gem "letter_opener"
|
@@ -38,7 +38,7 @@ end
|
|
38
38
|
|
39
39
|
group :development, :test do
|
40
40
|
gem "awesome_print"
|
41
|
-
gem "brakeman", require:false
|
41
|
+
gem "brakeman", require: false
|
42
42
|
gem "bullet"
|
43
43
|
gem "bundler-audit", require: false
|
44
44
|
gem "dotenv-rails"
|
data/templates/Procfile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
web: bundle exec
|
1
|
+
web: bundle exec puma -p $PORT -C ./config/puma.rb
|
2
2
|
worker: bundle exec rake jobs:work
|
@@ -3,9 +3,19 @@ development: &default
|
|
3
3
|
database: <%= app_name %>_development
|
4
4
|
encoding: utf8
|
5
5
|
min_messages: warning
|
6
|
-
pool:
|
6
|
+
pool: <%%= ENV.fetch("DB_POOL", 5) %>
|
7
|
+
reaping_frequency: <%%= ENV.fetch("DB_REAPING_FREQUENCY", 10) %>
|
7
8
|
timeout: 5000
|
8
9
|
|
9
10
|
test:
|
10
11
|
<<: *default
|
11
12
|
database: <%= app_name %>_test
|
13
|
+
|
14
|
+
production: &deploy
|
15
|
+
encoding: utf8
|
16
|
+
min_messages: warning
|
17
|
+
pool: <%%= [ENV.fetch("MAX_THREADS", 5), ENV.fetch("DB_POOL", 5)].max %>
|
18
|
+
timeout: 5000
|
19
|
+
url: <%%= ENV.fetch("DATABASE_URL", "") %>
|
20
|
+
|
21
|
+
staging: *deploy
|
data/templates/puma.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server
|
2
|
+
|
3
|
+
# The environment variable WEB_CONCURRENCY may be set to a default value based
|
4
|
+
# on dyno size. To manually configure this value use heroku config:set
|
5
|
+
# WEB_CONCURRENCY.
|
6
|
+
workers Integer(ENV.fetch("WEB_CONCURRENCY", 3))
|
7
|
+
threads_count = Integer(ENV.fetch("MAX_THREADS", 5))
|
8
|
+
threads(threads_count, threads_count)
|
9
|
+
|
10
|
+
preload_app!
|
11
|
+
|
12
|
+
rackup DefaultRackup
|
13
|
+
environment ENV.fetch("RACK_ENV", "development")
|
14
|
+
|
15
|
+
on_worker_boot do
|
16
|
+
# Worker specific setup for Rails 4.1+
|
17
|
+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
|
18
|
+
ActiveRecord::Base.establish_connection
|
19
|
+
end
|
data/templates/sample.env
CHANGED
data/templates/slim.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Slim::Engine.set_options(
|
1
|
+
Slim::Engine.set_options(js_wrapper: :cdata)
|
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.15.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: 2015-
|
12
|
+
date: 2015-08-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bitters
|
@@ -97,7 +97,6 @@ files:
|
|
97
97
|
- ".travis.yml"
|
98
98
|
- CONTRIBUTING.md
|
99
99
|
- Gemfile
|
100
|
-
- Gemfile.lock
|
101
100
|
- LICENSE
|
102
101
|
- NEWS.md
|
103
102
|
- README.md
|
@@ -133,11 +132,13 @@ files:
|
|
133
132
|
- templates/browserslist
|
134
133
|
- templates/bundler_audit.rake
|
135
134
|
- templates/capybara_rspec.rb.erb
|
135
|
+
- templates/circle.yml.erb
|
136
136
|
- templates/config_i18n_tasks.yml
|
137
137
|
- templates/config_locales_it.yml.erb
|
138
138
|
- templates/database_cleaner_rspec.rb
|
139
|
-
- templates/
|
139
|
+
- templates/dev.rake
|
140
140
|
- templates/disable_xml_params.rb
|
141
|
+
- templates/dotfiles/.ctags
|
141
142
|
- templates/errors.rb
|
142
143
|
- templates/factory_girl_rspec.rb
|
143
144
|
- templates/faker_rspec.rb
|
@@ -147,6 +148,7 @@ files:
|
|
147
148
|
- templates/json_encoding.rb
|
148
149
|
- templates/newrelic.yml.erb
|
149
150
|
- templates/postgresql_database.yml.erb
|
151
|
+
- templates/puma.rb
|
150
152
|
- templates/queries_helper_rspec.rb
|
151
153
|
- templates/rails_helper.rb
|
152
154
|
- templates/sample.env
|
@@ -157,8 +159,6 @@ files:
|
|
157
159
|
- templates/staging.rb
|
158
160
|
- templates/suspenders_gitignore
|
159
161
|
- templates/suspenders_layout.html.slim
|
160
|
-
- templates/travis.yml.erb
|
161
|
-
- templates/unicorn.rb
|
162
162
|
homepage: http://github.com/welaika/welaika-suspenders
|
163
163
|
licenses:
|
164
164
|
- MIT
|
@@ -172,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
172
172
|
requirements:
|
173
173
|
- - ">="
|
174
174
|
- !ruby/object:Gem::Version
|
175
|
-
version: 2.2.
|
175
|
+
version: 2.2.3
|
176
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
177
177
|
requirements:
|
178
178
|
- - ">="
|
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
180
180
|
version: '0'
|
181
181
|
requirements: []
|
182
182
|
rubyforge_project:
|
183
|
-
rubygems_version: 2.4.
|
183
|
+
rubygems_version: 2.4.5.1
|
184
184
|
signing_key:
|
185
185
|
specification_version: 4
|
186
186
|
summary: Generate a Rails app using thoughtbot's best practices.
|
data/Gemfile.lock
DELETED
@@ -1,146 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
welaika-suspenders (2.13.0)
|
5
|
-
bitters (~> 1.0.0)
|
6
|
-
bundler (~> 1.3)
|
7
|
-
rails (~> 4.2.0)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
actionmailer (4.2.3)
|
13
|
-
actionpack (= 4.2.3)
|
14
|
-
actionview (= 4.2.3)
|
15
|
-
activejob (= 4.2.3)
|
16
|
-
mail (~> 2.5, >= 2.5.4)
|
17
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
18
|
-
actionpack (4.2.3)
|
19
|
-
actionview (= 4.2.3)
|
20
|
-
activesupport (= 4.2.3)
|
21
|
-
rack (~> 1.6)
|
22
|
-
rack-test (~> 0.6.2)
|
23
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
24
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
25
|
-
actionview (4.2.3)
|
26
|
-
activesupport (= 4.2.3)
|
27
|
-
builder (~> 3.1)
|
28
|
-
erubis (~> 2.7.0)
|
29
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
30
|
-
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
31
|
-
activejob (4.2.3)
|
32
|
-
activesupport (= 4.2.3)
|
33
|
-
globalid (>= 0.3.0)
|
34
|
-
activemodel (4.2.3)
|
35
|
-
activesupport (= 4.2.3)
|
36
|
-
builder (~> 3.1)
|
37
|
-
activerecord (4.2.3)
|
38
|
-
activemodel (= 4.2.3)
|
39
|
-
activesupport (= 4.2.3)
|
40
|
-
arel (~> 6.0)
|
41
|
-
activesupport (4.2.3)
|
42
|
-
i18n (~> 0.7)
|
43
|
-
json (~> 1.7, >= 1.7.7)
|
44
|
-
minitest (~> 5.1)
|
45
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
46
|
-
tzinfo (~> 1.1)
|
47
|
-
arel (6.0.2)
|
48
|
-
bitters (1.0.0)
|
49
|
-
bourbon (>= 3.2)
|
50
|
-
sass (>= 3.2)
|
51
|
-
thor
|
52
|
-
bourbon (4.2.3)
|
53
|
-
sass (~> 3.4)
|
54
|
-
thor
|
55
|
-
builder (3.2.2)
|
56
|
-
byebug (4.0.5)
|
57
|
-
columnize (= 0.9.0)
|
58
|
-
coderay (1.1.0)
|
59
|
-
columnize (0.9.0)
|
60
|
-
diff-lcs (1.2.5)
|
61
|
-
erubis (2.7.0)
|
62
|
-
globalid (0.3.5)
|
63
|
-
activesupport (>= 4.1.0)
|
64
|
-
i18n (0.7.0)
|
65
|
-
json (1.8.3)
|
66
|
-
loofah (2.0.2)
|
67
|
-
nokogiri (>= 1.5.9)
|
68
|
-
mail (2.6.3)
|
69
|
-
mime-types (>= 1.16, < 3)
|
70
|
-
method_source (0.8.2)
|
71
|
-
mime-types (2.6.1)
|
72
|
-
mini_portile (0.6.2)
|
73
|
-
minitest (5.7.0)
|
74
|
-
nokogiri (1.6.6.2)
|
75
|
-
mini_portile (~> 0.6.0)
|
76
|
-
pry (0.10.1)
|
77
|
-
coderay (~> 1.1.0)
|
78
|
-
method_source (~> 0.8.1)
|
79
|
-
slop (~> 3.4)
|
80
|
-
pry-byebug (3.1.0)
|
81
|
-
byebug (~> 4.0)
|
82
|
-
pry (~> 0.10)
|
83
|
-
rack (1.6.4)
|
84
|
-
rack-test (0.6.3)
|
85
|
-
rack (>= 1.0)
|
86
|
-
rails (4.2.3)
|
87
|
-
actionmailer (= 4.2.3)
|
88
|
-
actionpack (= 4.2.3)
|
89
|
-
actionview (= 4.2.3)
|
90
|
-
activejob (= 4.2.3)
|
91
|
-
activemodel (= 4.2.3)
|
92
|
-
activerecord (= 4.2.3)
|
93
|
-
activesupport (= 4.2.3)
|
94
|
-
bundler (>= 1.3.0, < 2.0)
|
95
|
-
railties (= 4.2.3)
|
96
|
-
sprockets-rails
|
97
|
-
rails-deprecated_sanitizer (1.0.3)
|
98
|
-
activesupport (>= 4.2.0.alpha)
|
99
|
-
rails-dom-testing (1.0.6)
|
100
|
-
activesupport (>= 4.2.0.beta, < 5.0)
|
101
|
-
nokogiri (~> 1.6.0)
|
102
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
103
|
-
rails-html-sanitizer (1.0.2)
|
104
|
-
loofah (~> 2.0)
|
105
|
-
railties (4.2.3)
|
106
|
-
actionpack (= 4.2.3)
|
107
|
-
activesupport (= 4.2.3)
|
108
|
-
rake (>= 0.8.7)
|
109
|
-
thor (>= 0.18.1, < 2.0)
|
110
|
-
rake (10.4.2)
|
111
|
-
rspec (3.3.0)
|
112
|
-
rspec-core (~> 3.3.0)
|
113
|
-
rspec-expectations (~> 3.3.0)
|
114
|
-
rspec-mocks (~> 3.3.0)
|
115
|
-
rspec-core (3.3.1)
|
116
|
-
rspec-support (~> 3.3.0)
|
117
|
-
rspec-expectations (3.3.0)
|
118
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
119
|
-
rspec-support (~> 3.3.0)
|
120
|
-
rspec-mocks (3.3.1)
|
121
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
122
|
-
rspec-support (~> 3.3.0)
|
123
|
-
rspec-support (3.3.0)
|
124
|
-
sass (3.4.16)
|
125
|
-
slop (3.6.0)
|
126
|
-
sprockets (3.2.0)
|
127
|
-
rack (~> 1.0)
|
128
|
-
sprockets-rails (2.3.2)
|
129
|
-
actionpack (>= 3.0)
|
130
|
-
activesupport (>= 3.0)
|
131
|
-
sprockets (>= 2.8, < 4.0)
|
132
|
-
thor (0.19.1)
|
133
|
-
thread_safe (0.3.5)
|
134
|
-
tzinfo (1.2.2)
|
135
|
-
thread_safe (~> 0.1)
|
136
|
-
|
137
|
-
PLATFORMS
|
138
|
-
ruby
|
139
|
-
|
140
|
-
DEPENDENCIES
|
141
|
-
pry-byebug
|
142
|
-
rspec (~> 3.2)
|
143
|
-
welaika-suspenders!
|
144
|
-
|
145
|
-
BUNDLED WITH
|
146
|
-
1.10.5
|
data/templates/travis.yml.erb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
before_install:
|
2
|
-
- "echo '--colour' > ~/.rspec"
|
3
|
-
- "echo 'gem: --no-document' > ~/.gemrc"
|
4
|
-
- export DISPLAY=:99.0
|
5
|
-
- sh -e /etc/init.d/xvfb start
|
6
|
-
install:
|
7
|
-
- bin/setup
|
8
|
-
branches:
|
9
|
-
only:
|
10
|
-
- master
|
11
|
-
cache:
|
12
|
-
- bundler
|
13
|
-
language:
|
14
|
-
- ruby
|
15
|
-
notifications:
|
16
|
-
email: false
|
17
|
-
rvm:
|
18
|
-
- <%= Suspenders::RUBY_VERSION %>
|
19
|
-
addons:
|
20
|
-
postgresql: "9.3"
|
21
|
-
sudo: false
|
data/templates/unicorn.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
# https://devcenter.heroku.com/articles/rails-unicorn
|
2
|
-
|
3
|
-
worker_processes (ENV["UNICORN_WORKERS"] || 3).to_i
|
4
|
-
timeout (ENV["UNICORN_TIMEOUT"] || 15).to_i
|
5
|
-
preload_app true
|
6
|
-
|
7
|
-
before_fork do |_server, _worker|
|
8
|
-
Signal.trap "TERM" do
|
9
|
-
puts "Unicorn master intercepting TERM, sending myself QUIT instead"
|
10
|
-
Process.kill "QUIT", Process.pid
|
11
|
-
end
|
12
|
-
|
13
|
-
if defined? ActiveRecord::Base
|
14
|
-
ActiveRecord::Base.connection.disconnect!
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
after_fork do |_server, _worker|
|
19
|
-
Signal.trap "TERM" do
|
20
|
-
puts "Unicorn worker intercepting TERM, waiting for master to send QUIT"
|
21
|
-
end
|
22
|
-
|
23
|
-
if defined? ActiveRecord::Base
|
24
|
-
config = ActiveRecord::Base.configurations[Rails.env] ||
|
25
|
-
Rails.application.config.database_configuration[Rails.env]
|
26
|
-
config["reaping_frequency"] = (ENV["DB_REAPING_FREQUENCY"] || 10).to_i
|
27
|
-
config["pool"] = (ENV["DB_POOL"] || 2).to_i
|
28
|
-
ActiveRecord::Base.establish_connection(config)
|
29
|
-
end
|
30
|
-
end
|