philosophies-suspenders 2.1.2 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +70 -62
- data/README.md +1 -1
- data/lib/suspenders/app_builder.rb +13 -9
- data/lib/suspenders/generators/app_generator.rb +2 -2
- data/lib/suspenders/version.rb +2 -2
- data/templates/Gemfile.erb +8 -12
- data/templates/Procfile +1 -1
- data/templates/puma.rb +28 -0
- metadata +7 -8
- data/templates/disable_xml_params.rb +0 -3
- 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: b762897a1fe6b3c5b01f1d68440f0ffa2d9d9642
|
4
|
+
data.tar.gz: 116fcd2581179059b4af0a3688f58b699229a0b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e708c7ab5ad9aae89e7b9e3b4cf1055749cbf02133ff76175403e9a996de6382d702ba6abd36fe5924d79a8d2f04158349c0463cf9c2b1ab51a16f059fbc3be
|
7
|
+
data.tar.gz: db02e7eb9b1817a8734601172181ccfcbf4b876ec43e1948dee2067c96ca14adfd039c3cdaf25c5123baa21bc0db8153b254e19a418977c5a99d7d9dc413ff64
|
data/Gemfile.lock
CHANGED
@@ -1,71 +1,77 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
philosophies-suspenders (2.
|
4
|
+
philosophies-suspenders (2.2.0)
|
5
5
|
bundler (~> 1.3)
|
6
|
-
rails (
|
6
|
+
rails (~> 5.0.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
|
12
|
-
actionpack (=
|
13
|
-
|
14
|
-
|
11
|
+
actioncable (5.0.0)
|
12
|
+
actionpack (= 5.0.0)
|
13
|
+
nio4r (~> 1.2)
|
14
|
+
websocket-driver (~> 0.6.1)
|
15
|
+
actionmailer (5.0.0)
|
16
|
+
actionpack (= 5.0.0)
|
17
|
+
actionview (= 5.0.0)
|
18
|
+
activejob (= 5.0.0)
|
15
19
|
mail (~> 2.5, >= 2.5.4)
|
16
|
-
rails-dom-testing (~>
|
17
|
-
actionpack (
|
18
|
-
actionview (=
|
19
|
-
activesupport (=
|
20
|
-
rack (~>
|
21
|
-
rack-test (~> 0.6.
|
22
|
-
rails-dom-testing (~>
|
20
|
+
rails-dom-testing (~> 2.0)
|
21
|
+
actionpack (5.0.0)
|
22
|
+
actionview (= 5.0.0)
|
23
|
+
activesupport (= 5.0.0)
|
24
|
+
rack (~> 2.0)
|
25
|
+
rack-test (~> 0.6.3)
|
26
|
+
rails-dom-testing (~> 2.0)
|
23
27
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
24
|
-
actionview (
|
25
|
-
activesupport (=
|
28
|
+
actionview (5.0.0)
|
29
|
+
activesupport (= 5.0.0)
|
26
30
|
builder (~> 3.1)
|
27
31
|
erubis (~> 2.7.0)
|
28
|
-
rails-dom-testing (~>
|
32
|
+
rails-dom-testing (~> 2.0)
|
29
33
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
30
|
-
activejob (
|
31
|
-
activesupport (=
|
32
|
-
globalid (>= 0.3.
|
33
|
-
activemodel (
|
34
|
-
activesupport (=
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
34
|
+
activejob (5.0.0)
|
35
|
+
activesupport (= 5.0.0)
|
36
|
+
globalid (>= 0.3.6)
|
37
|
+
activemodel (5.0.0)
|
38
|
+
activesupport (= 5.0.0)
|
39
|
+
activerecord (5.0.0)
|
40
|
+
activemodel (= 5.0.0)
|
41
|
+
activesupport (= 5.0.0)
|
42
|
+
arel (~> 7.0)
|
43
|
+
activesupport (5.0.0)
|
44
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
41
45
|
i18n (~> 0.7)
|
42
|
-
json (~> 1.7, >= 1.7.7)
|
43
46
|
minitest (~> 5.1)
|
44
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
45
47
|
tzinfo (~> 1.1)
|
46
|
-
arel (
|
48
|
+
arel (7.0.0)
|
47
49
|
builder (3.2.2)
|
48
50
|
byebug (4.0.5)
|
49
51
|
columnize (= 0.9.0)
|
50
52
|
coderay (1.1.0)
|
51
53
|
columnize (0.9.0)
|
52
|
-
concurrent-ruby (1.0.
|
54
|
+
concurrent-ruby (1.0.2)
|
53
55
|
diff-lcs (1.2.5)
|
54
56
|
erubis (2.7.0)
|
55
57
|
globalid (0.3.6)
|
56
58
|
activesupport (>= 4.1.0)
|
57
59
|
i18n (0.7.0)
|
58
|
-
json (1.8.3)
|
59
60
|
loofah (2.0.3)
|
60
61
|
nokogiri (>= 1.5.9)
|
61
|
-
mail (2.6.
|
62
|
-
mime-types (>= 1.16, <
|
62
|
+
mail (2.6.4)
|
63
|
+
mime-types (>= 1.16, < 4)
|
63
64
|
method_source (0.8.2)
|
64
|
-
mime-types (
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
65
|
+
mime-types (3.1)
|
66
|
+
mime-types-data (~> 3.2015)
|
67
|
+
mime-types-data (3.2016.0521)
|
68
|
+
mini_portile2 (2.1.0)
|
69
|
+
minitest (5.9.0)
|
70
|
+
nio4r (1.2.1)
|
71
|
+
nokogiri (1.6.8)
|
72
|
+
mini_portile2 (~> 2.1.0)
|
73
|
+
pkg-config (~> 1.1.7)
|
74
|
+
pkg-config (1.1.7)
|
69
75
|
pry (0.10.1)
|
70
76
|
coderay (~> 1.1.0)
|
71
77
|
method_source (~> 0.8.1)
|
@@ -73,34 +79,33 @@ GEM
|
|
73
79
|
pry-byebug (3.1.0)
|
74
80
|
byebug (~> 4.0)
|
75
81
|
pry (~> 0.10)
|
76
|
-
rack (
|
82
|
+
rack (2.0.1)
|
77
83
|
rack-test (0.6.3)
|
78
84
|
rack (>= 1.0)
|
79
|
-
rails (
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
85
|
+
rails (5.0.0)
|
86
|
+
actioncable (= 5.0.0)
|
87
|
+
actionmailer (= 5.0.0)
|
88
|
+
actionpack (= 5.0.0)
|
89
|
+
actionview (= 5.0.0)
|
90
|
+
activejob (= 5.0.0)
|
91
|
+
activemodel (= 5.0.0)
|
92
|
+
activerecord (= 5.0.0)
|
93
|
+
activesupport (= 5.0.0)
|
87
94
|
bundler (>= 1.3.0, < 2.0)
|
88
|
-
railties (=
|
89
|
-
sprockets-rails
|
90
|
-
rails-
|
91
|
-
activesupport (>= 4.2.0.
|
92
|
-
rails-dom-testing (1.0.7)
|
93
|
-
activesupport (>= 4.2.0.beta, < 5.0)
|
95
|
+
railties (= 5.0.0)
|
96
|
+
sprockets-rails (>= 2.0.0)
|
97
|
+
rails-dom-testing (2.0.1)
|
98
|
+
activesupport (>= 4.2.0, < 6.0)
|
94
99
|
nokogiri (~> 1.6.0)
|
95
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
96
100
|
rails-html-sanitizer (1.0.3)
|
97
101
|
loofah (~> 2.0)
|
98
|
-
railties (
|
99
|
-
actionpack (=
|
100
|
-
activesupport (=
|
102
|
+
railties (5.0.0)
|
103
|
+
actionpack (= 5.0.0)
|
104
|
+
activesupport (= 5.0.0)
|
105
|
+
method_source
|
101
106
|
rake (>= 0.8.7)
|
102
107
|
thor (>= 0.18.1, < 2.0)
|
103
|
-
rake (
|
108
|
+
rake (11.2.2)
|
104
109
|
rspec (3.3.0)
|
105
110
|
rspec-core (~> 3.3.0)
|
106
111
|
rspec-expectations (~> 3.3.0)
|
@@ -115,10 +120,10 @@ GEM
|
|
115
120
|
rspec-support (~> 3.3.0)
|
116
121
|
rspec-support (3.3.0)
|
117
122
|
slop (3.6.0)
|
118
|
-
sprockets (3.
|
123
|
+
sprockets (3.6.3)
|
119
124
|
concurrent-ruby (~> 1.0)
|
120
125
|
rack (> 1, < 3)
|
121
|
-
sprockets-rails (3.
|
126
|
+
sprockets-rails (3.1.1)
|
122
127
|
actionpack (>= 4.0)
|
123
128
|
activesupport (>= 4.0)
|
124
129
|
sprockets (>= 3.0.0)
|
@@ -126,6 +131,9 @@ GEM
|
|
126
131
|
thread_safe (0.3.5)
|
127
132
|
tzinfo (1.2.2)
|
128
133
|
thread_safe (~> 0.1)
|
134
|
+
websocket-driver (0.6.4)
|
135
|
+
websocket-extensions (>= 0.1.0)
|
136
|
+
websocket-extensions (0.1.2)
|
129
137
|
|
130
138
|
PLATFORMS
|
131
139
|
ruby
|
@@ -137,4 +145,4 @@ DEPENDENCIES
|
|
137
145
|
rspec (~> 3.2)
|
138
146
|
|
139
147
|
BUNDLED WITH
|
140
|
-
1.
|
148
|
+
1.12.5
|
data/README.md
CHANGED
@@ -52,7 +52,7 @@ It includes application gems like:
|
|
52
52
|
and style
|
53
53
|
* [Title](https://github.com/calebthompson/title) for storing titles in
|
54
54
|
translations
|
55
|
-
* [
|
55
|
+
* [Puma](http://puma.io) to serve HTTP requests
|
56
56
|
* [rails_12factor](https://github.com/heroku/rails_12factor) for easier Heroku
|
57
57
|
deploys
|
58
58
|
|
@@ -126,7 +126,7 @@ module Suspenders
|
|
126
126
|
|
127
127
|
inject_into_file(
|
128
128
|
"config/environments/production.rb",
|
129
|
-
' config.
|
129
|
+
' config.public_file_server.headers = { \'Cache-Control\' => "public, max-age=#{1.year.to_i}" }',
|
130
130
|
after: serve_static_files_line
|
131
131
|
)
|
132
132
|
end
|
@@ -292,8 +292,8 @@ end
|
|
292
292
|
generate 'rspec:install'
|
293
293
|
end
|
294
294
|
|
295
|
-
def
|
296
|
-
copy_file '
|
295
|
+
def configure_puma
|
296
|
+
copy_file 'puma.rb', 'config/puma.rb', force: true
|
297
297
|
end
|
298
298
|
|
299
299
|
def setup_foreman
|
@@ -486,7 +486,7 @@ end
|
|
486
486
|
|
487
487
|
def set_heroku_serve_static_files
|
488
488
|
%w(staging production).each do |environment|
|
489
|
-
run_heroku "config:add RAILS_SERVE_STATIC_FILES=true", environment
|
489
|
+
run_heroku "config:add RAILS_SERVE_STATIC_FILES=true RAILS_LOG_TO_STDOUT=true", environment
|
490
490
|
end
|
491
491
|
end
|
492
492
|
|
@@ -532,10 +532,6 @@ end
|
|
532
532
|
"Rails.application.routes.draw do\nend"
|
533
533
|
end
|
534
534
|
|
535
|
-
def disable_xml_params
|
536
|
-
copy_file 'disable_xml_params.rb', 'config/initializers/disable_xml_params.rb'
|
537
|
-
end
|
538
|
-
|
539
535
|
def setup_default_rake_task
|
540
536
|
append_file 'Rakefile' do
|
541
537
|
<<-EOS
|
@@ -566,6 +562,14 @@ end
|
|
566
562
|
bundle_command 'exec stairs --use-defaults'
|
567
563
|
end
|
568
564
|
|
565
|
+
def configure_quiet_assets
|
566
|
+
config = <<-RUBY
|
567
|
+
config.assets.quiet = true
|
568
|
+
RUBY
|
569
|
+
|
570
|
+
inject_into_class "config/application.rb", "Application", config
|
571
|
+
end
|
572
|
+
|
569
573
|
private
|
570
574
|
|
571
575
|
def raise_on_missing_translations_in(environment)
|
@@ -591,7 +595,7 @@ end
|
|
591
595
|
end
|
592
596
|
|
593
597
|
def serve_static_files_line
|
594
|
-
"config.
|
598
|
+
"config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?\n"
|
595
599
|
end
|
596
600
|
|
597
601
|
def heroku_app_name_for(environment)
|
@@ -99,6 +99,7 @@ module Suspenders
|
|
99
99
|
build :configure_generators
|
100
100
|
build :configure_i18n_for_missing_translations
|
101
101
|
build :configure_rubocop
|
102
|
+
build :configure_quiet_assets
|
102
103
|
end
|
103
104
|
|
104
105
|
def setup_test_environment
|
@@ -147,10 +148,9 @@ module Suspenders
|
|
147
148
|
build :configure_active_job
|
148
149
|
build :configure_time_formats
|
149
150
|
build :configure_simple_form
|
150
|
-
build :disable_xml_params
|
151
151
|
build :fix_i18n_deprecation_warning
|
152
152
|
build :setup_default_rake_task
|
153
|
-
build :
|
153
|
+
build :configure_puma
|
154
154
|
build :setup_foreman
|
155
155
|
build :configure_airbrake
|
156
156
|
end
|
data/lib/suspenders/version.rb
CHANGED
data/templates/Gemfile.erb
CHANGED
@@ -5,21 +5,20 @@ gem "rails", "<%= Suspenders::RAILS_VERSION %>"
|
|
5
5
|
|
6
6
|
gem "airbrake", require: false
|
7
7
|
gem "autoprefixer-rails"
|
8
|
-
gem "bundler"
|
9
|
-
gem "coffee-rails"
|
8
|
+
gem "bundler"
|
9
|
+
gem "coffee-rails"
|
10
10
|
gem "flutie"
|
11
11
|
gem "i18n-tasks"
|
12
|
-
gem "newrelic_rpm"
|
12
|
+
gem "newrelic_rpm"
|
13
13
|
gem "pg"
|
14
|
-
gem "quiet_assets"
|
15
14
|
gem "rack-canonical-host"
|
16
15
|
gem "recipient_interceptor"
|
17
|
-
gem "sass-rails"
|
16
|
+
gem "sass-rails"
|
18
17
|
gem "sidekiq"
|
19
18
|
gem "simple_form"
|
20
19
|
gem "title"
|
21
20
|
gem "uglifier"
|
22
|
-
gem "
|
21
|
+
gem "puma"
|
23
22
|
|
24
23
|
source "https://rails-assets.org" do
|
25
24
|
gem "rails-assets-jquery"
|
@@ -35,24 +34,21 @@ group :development do
|
|
35
34
|
end
|
36
35
|
|
37
36
|
group :development, :test do
|
37
|
+
gem "listen"
|
38
38
|
gem "bundler-audit", require: false
|
39
39
|
gem "dotenv-rails"
|
40
40
|
gem "factory_girl_rails"
|
41
41
|
gem "pry-byebug"
|
42
42
|
gem "pry-rails"
|
43
|
-
gem "rspec-rails"
|
43
|
+
gem "rspec-rails"
|
44
44
|
gem "rubocop"
|
45
45
|
end
|
46
46
|
|
47
47
|
group :test do
|
48
|
-
gem "capybara-webkit"
|
48
|
+
gem "capybara-webkit"
|
49
49
|
gem "database_cleaner"
|
50
50
|
gem "launchy"
|
51
51
|
gem "rspec-sidekiq"
|
52
52
|
gem "shoulda-matchers", require: false
|
53
53
|
gem "timecop"
|
54
54
|
end
|
55
|
-
|
56
|
-
group :staging, :production do
|
57
|
-
gem "rails_12factor"
|
58
|
-
end
|
data/templates/Procfile
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
web: bundle exec
|
1
|
+
web: bundle exec puma -C config/puma.rb
|
2
2
|
worker: bundle exec sidekiq
|
data/templates/puma.rb
ADDED
@@ -0,0 +1,28 @@
|
|
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
|
+
#
|
7
|
+
# Increasing the number of workers will increase the amount of resting memory
|
8
|
+
# your dynos use. Increasing the number of threads will increase the amount of
|
9
|
+
# potential bloat added to your dynos when they are responding to heavy
|
10
|
+
# requests.
|
11
|
+
#
|
12
|
+
# Starting with a low number of workers and threads provides adequate
|
13
|
+
# performance for most applications, even under load, while maintaining a low
|
14
|
+
# risk of overusing memory.
|
15
|
+
workers Integer(ENV.fetch("WEB_CONCURRENCY", 2))
|
16
|
+
threads_count = Integer(ENV.fetch("MAX_THREADS", 2))
|
17
|
+
threads(threads_count, threads_count)
|
18
|
+
|
19
|
+
preload_app!
|
20
|
+
|
21
|
+
rackup DefaultRackup
|
22
|
+
environment ENV.fetch("RACK_ENV", "development")
|
23
|
+
|
24
|
+
on_worker_boot do
|
25
|
+
# Worker specific setup for Rails 4.1+
|
26
|
+
# See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
|
27
|
+
ActiveRecord::Base.establish_connection
|
28
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: philosophies-suspenders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philosophie
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,16 +28,16 @@ dependencies:
|
|
28
28
|
name: rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 5.0.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 5.0.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pry
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,7 +134,6 @@ files:
|
|
134
134
|
- templates/config_i18n_tasks.yml
|
135
135
|
- templates/config_locales_en.yml.erb
|
136
136
|
- templates/database_cleaner_rspec.rb
|
137
|
-
- templates/disable_xml_params.rb
|
138
137
|
- templates/errors.rb
|
139
138
|
- templates/factory_girl_rspec.rb
|
140
139
|
- templates/flashes_helper.rb
|
@@ -142,6 +141,7 @@ files:
|
|
142
141
|
- templates/json_encoding.rb
|
143
142
|
- templates/newrelic.yml.erb
|
144
143
|
- templates/postgresql_database.yml.erb
|
144
|
+
- templates/puma.rb
|
145
145
|
- templates/rails_helper.rb
|
146
146
|
- templates/secrets.yml
|
147
147
|
- templates/setup.rb
|
@@ -150,7 +150,6 @@ files:
|
|
150
150
|
- templates/staging.rb
|
151
151
|
- templates/suspenders_gitignore
|
152
152
|
- templates/suspenders_layout.html.erb.erb
|
153
|
-
- templates/unicorn.rb
|
154
153
|
homepage: https://github.com/philosophie/suspenders
|
155
154
|
licenses:
|
156
155
|
- MIT
|
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
|