suspenders 1.2.2 → 1.3.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 +6 -14
- data/.gitignore +9 -0
- data/.travis.yml +6 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +59 -68
- data/NEWS.md +9 -0
- data/README.md +2 -0
- data/lib/suspenders/actions.rb +7 -2
- data/lib/suspenders/app_builder.rb +16 -1
- data/lib/suspenders/generators/app_generator.rb +21 -18
- data/lib/suspenders/version.rb +1 -1
- data/suspenders.gemspec +19 -23
- data/templates/Gemfile_clean +2 -2
- data/templates/Procfile +2 -1
- data/templates/background_jobs_rspec.rb +19 -0
- data/templates/unicorn.rb +26 -0
- metadata +34 -34
checksums.yaml
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
metadata.gz: !binary |-
|
|
9
|
-
YmMzZTBiNmU1MmQ5NzRjZTk5ZDdhNGUwMmM5YTkzZmE5NDZjYTc0MDBiY2Ni
|
|
10
|
-
ZTc5MjVjMmE1YjNjNWQ0MDdjNjYxZmJkNDc3OTNjOThjYTk1NTZjZTIxMjhk
|
|
11
|
-
NDI2Mzk0Njk0ODdmODVkMWExYmZjZmE3ODE2M2QyMTE4ZDIzNmM=
|
|
12
|
-
data.tar.gz: !binary |-
|
|
13
|
-
N2ZlYjRjZjA1ZTEyMjE3ZDBlMzQ1ZTFhYWQzYjQ1ZGRmZTcwMzEzMjNmZDY4
|
|
14
|
-
MzQwZDMzNGRlNjE5Y2UwMzg3YWZlZTBhYmI4ZWVmMzA2YTkwNzJjY2ZjOGIy
|
|
15
|
-
NWNmMTMxZGI1MjQ5ZGMyMDI3ZGQ1YmJkMWQ4M2Q0YTI1Nzg3M2E=
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: ccf239065a250f45823c0f9f23fa1295af9549e0
|
|
4
|
+
data.tar.gz: e806e2ee722a789d4bdf741dd9feaee3867771a3
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: deff8d09578f7515690f06823b8502f4ca253f579828e7f6fde1bd11c939f5222a45f8f372f86c281d9f604783342318ffcbacfc147ce1a4d7eaf5a004bfe663
|
|
7
|
+
data.tar.gz: 165e1e2db48cd56e4c6917588fe80967254b82621efc096e073e5263c4bed12e3fb41133b5bedba95bb061a39ef979d149ab70424b5f242a8cb1584f1e51769a
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
suspenders (1.
|
|
5
|
-
bundler (
|
|
6
|
-
hub (~> 1.10
|
|
7
|
-
rails (= 3.2.
|
|
4
|
+
suspenders (1.3.0)
|
|
5
|
+
bundler (~> 1.3)
|
|
6
|
+
hub (~> 1.10)
|
|
7
|
+
rails (= 3.2.13)
|
|
8
8
|
|
|
9
9
|
GEM
|
|
10
|
-
remote:
|
|
10
|
+
remote: https://rubygems.org/
|
|
11
11
|
specs:
|
|
12
|
-
actionmailer (3.2.
|
|
13
|
-
actionpack (= 3.2.
|
|
14
|
-
mail (~> 2.
|
|
15
|
-
actionpack (3.2.
|
|
16
|
-
activemodel (= 3.2.
|
|
17
|
-
activesupport (= 3.2.
|
|
12
|
+
actionmailer (3.2.13)
|
|
13
|
+
actionpack (= 3.2.13)
|
|
14
|
+
mail (~> 2.5.3)
|
|
15
|
+
actionpack (3.2.13)
|
|
16
|
+
activemodel (= 3.2.13)
|
|
17
|
+
activesupport (= 3.2.13)
|
|
18
18
|
builder (~> 3.0.0)
|
|
19
19
|
erubis (~> 2.7.0)
|
|
20
20
|
journey (~> 1.0.4)
|
|
@@ -22,51 +22,49 @@ GEM
|
|
|
22
22
|
rack-cache (~> 1.2)
|
|
23
23
|
rack-test (~> 0.6.1)
|
|
24
24
|
sprockets (~> 2.2.1)
|
|
25
|
-
activemodel (3.2.
|
|
26
|
-
activesupport (= 3.2.
|
|
25
|
+
activemodel (3.2.13)
|
|
26
|
+
activesupport (= 3.2.13)
|
|
27
27
|
builder (~> 3.0.0)
|
|
28
|
-
activerecord (3.2.
|
|
29
|
-
activemodel (= 3.2.
|
|
30
|
-
activesupport (= 3.2.
|
|
28
|
+
activerecord (3.2.13)
|
|
29
|
+
activemodel (= 3.2.13)
|
|
30
|
+
activesupport (= 3.2.13)
|
|
31
31
|
arel (~> 3.0.2)
|
|
32
32
|
tzinfo (~> 0.3.29)
|
|
33
|
-
activeresource (3.2.
|
|
34
|
-
activemodel (= 3.2.
|
|
35
|
-
activesupport (= 3.2.
|
|
36
|
-
activesupport (3.2.
|
|
37
|
-
i18n (
|
|
33
|
+
activeresource (3.2.13)
|
|
34
|
+
activemodel (= 3.2.13)
|
|
35
|
+
activesupport (= 3.2.13)
|
|
36
|
+
activesupport (3.2.13)
|
|
37
|
+
i18n (= 0.6.1)
|
|
38
38
|
multi_json (~> 1.0)
|
|
39
39
|
arel (3.0.2)
|
|
40
|
-
aruba (0.
|
|
41
|
-
childprocess (
|
|
40
|
+
aruba (0.5.1)
|
|
41
|
+
childprocess (~> 0.3.6)
|
|
42
42
|
cucumber (>= 1.1.1)
|
|
43
|
-
|
|
44
|
-
rspec (>= 2.7.0)
|
|
43
|
+
rspec-expectations (>= 2.7.0)
|
|
45
44
|
builder (3.0.4)
|
|
46
|
-
childprocess (0.3.
|
|
47
|
-
ffi (~> 1.0, >= 1.0.
|
|
48
|
-
cucumber (1.
|
|
45
|
+
childprocess (0.3.9)
|
|
46
|
+
ffi (~> 1.0, >= 1.0.11)
|
|
47
|
+
cucumber (1.2.3)
|
|
49
48
|
builder (>= 2.1.2)
|
|
50
|
-
diff-lcs (>= 1.1.
|
|
51
|
-
gherkin (~> 2.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
diff-lcs (1.1.3)
|
|
49
|
+
diff-lcs (>= 1.1.3)
|
|
50
|
+
gherkin (~> 2.11.6)
|
|
51
|
+
multi_json (~> 1.3)
|
|
52
|
+
diff-lcs (1.2.2)
|
|
55
53
|
erubis (2.7.0)
|
|
56
|
-
ffi (1.
|
|
57
|
-
gherkin (2.
|
|
58
|
-
json (>= 1.
|
|
59
|
-
hike (1.2.
|
|
60
|
-
hub (1.10.
|
|
54
|
+
ffi (1.6.0)
|
|
55
|
+
gherkin (2.11.6)
|
|
56
|
+
json (>= 1.7.6)
|
|
57
|
+
hike (1.2.2)
|
|
58
|
+
hub (1.10.6)
|
|
61
59
|
i18n (0.6.1)
|
|
62
60
|
journey (1.0.4)
|
|
63
|
-
json (1.7.
|
|
64
|
-
mail (2.
|
|
61
|
+
json (1.7.7)
|
|
62
|
+
mail (2.5.3)
|
|
65
63
|
i18n (>= 0.4.0)
|
|
66
64
|
mime-types (~> 1.16)
|
|
67
65
|
treetop (~> 1.4.8)
|
|
68
|
-
mime-types (1.
|
|
69
|
-
multi_json (1.
|
|
66
|
+
mime-types (1.23)
|
|
67
|
+
multi_json (1.7.2)
|
|
70
68
|
polyglot (0.3.3)
|
|
71
69
|
rack (1.4.5)
|
|
72
70
|
rack-cache (1.2)
|
|
@@ -75,49 +73,42 @@ GEM
|
|
|
75
73
|
rack
|
|
76
74
|
rack-test (0.6.2)
|
|
77
75
|
rack (>= 1.0)
|
|
78
|
-
rails (3.2.
|
|
79
|
-
actionmailer (= 3.2.
|
|
80
|
-
actionpack (= 3.2.
|
|
81
|
-
activerecord (= 3.2.
|
|
82
|
-
activeresource (= 3.2.
|
|
83
|
-
activesupport (= 3.2.
|
|
76
|
+
rails (3.2.13)
|
|
77
|
+
actionmailer (= 3.2.13)
|
|
78
|
+
actionpack (= 3.2.13)
|
|
79
|
+
activerecord (= 3.2.13)
|
|
80
|
+
activeresource (= 3.2.13)
|
|
81
|
+
activesupport (= 3.2.13)
|
|
84
82
|
bundler (~> 1.0)
|
|
85
|
-
railties (= 3.2.
|
|
86
|
-
railties (3.2.
|
|
87
|
-
actionpack (= 3.2.
|
|
88
|
-
activesupport (= 3.2.
|
|
83
|
+
railties (= 3.2.13)
|
|
84
|
+
railties (3.2.13)
|
|
85
|
+
actionpack (= 3.2.13)
|
|
86
|
+
activesupport (= 3.2.13)
|
|
89
87
|
rack-ssl (~> 1.3.2)
|
|
90
88
|
rake (>= 0.8.7)
|
|
91
89
|
rdoc (~> 3.4)
|
|
92
90
|
thor (>= 0.14.6, < 2.0)
|
|
93
|
-
rake (10.0.
|
|
94
|
-
rdoc (3.12.
|
|
91
|
+
rake (10.0.4)
|
|
92
|
+
rdoc (3.12.2)
|
|
95
93
|
json (~> 1.4)
|
|
96
|
-
rspec (2.
|
|
97
|
-
|
|
98
|
-
rspec-expectations (~> 2.12.0)
|
|
99
|
-
rspec-mocks (~> 2.12.0)
|
|
100
|
-
rspec-core (2.12.2)
|
|
101
|
-
rspec-expectations (2.12.1)
|
|
102
|
-
diff-lcs (~> 1.1.3)
|
|
103
|
-
rspec-mocks (2.12.1)
|
|
94
|
+
rspec-expectations (2.13.0)
|
|
95
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
|
104
96
|
sprockets (2.2.2)
|
|
105
97
|
hike (~> 1.2)
|
|
106
98
|
multi_json (~> 1.0)
|
|
107
99
|
rack (~> 1.0)
|
|
108
100
|
tilt (~> 1.1, != 1.3.0)
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
tilt (1.3.3)
|
|
101
|
+
thor (0.18.1)
|
|
102
|
+
tilt (1.4.1)
|
|
112
103
|
treetop (1.4.12)
|
|
113
104
|
polyglot
|
|
114
105
|
polyglot (>= 0.3.1)
|
|
115
|
-
tzinfo (0.3.
|
|
106
|
+
tzinfo (0.3.37)
|
|
116
107
|
|
|
117
108
|
PLATFORMS
|
|
118
109
|
ruby
|
|
119
110
|
|
|
120
111
|
DEPENDENCIES
|
|
121
|
-
aruba (~> 0.
|
|
122
|
-
cucumber (~> 1.
|
|
112
|
+
aruba (~> 0.5)
|
|
113
|
+
cucumber (~> 1.2)
|
|
123
114
|
suspenders!
|
data/NEWS.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
1.3.0 (May 13, 2013)
|
|
2
|
+
|
|
3
|
+
* Switch web server from Thin to Unicorn
|
|
4
|
+
* Set up database before setting up RSpec so that the rspec:install task works
|
|
5
|
+
* Add Delayed::Job
|
|
6
|
+
* Clean up cruft from ActionMailer delivery configuration
|
|
7
|
+
* strong_parameters now raises an error in development
|
|
8
|
+
* Enforce Ruby 1.9.2+ in the gemspec
|
|
9
|
+
|
|
1
10
|
1.2.2 (March 14, 2013)
|
|
2
11
|
|
|
3
12
|
* Fix Syntax error in staging/production environment config files.
|
data/README.md
CHANGED
|
@@ -81,6 +81,8 @@ This has the same effect as running:
|
|
|
81
81
|
Dependencies
|
|
82
82
|
------------
|
|
83
83
|
|
|
84
|
+
Suspenders requires Ruby 1.9.2 or greater.
|
|
85
|
+
|
|
84
86
|
Some gems included in Suspenders have native extensions. You should have GCC
|
|
85
87
|
installed on your machine before generating an app with Suspenders.
|
|
86
88
|
|
data/lib/suspenders/actions.rb
CHANGED
|
@@ -15,10 +15,15 @@ module Suspenders
|
|
|
15
15
|
end
|
|
16
16
|
|
|
17
17
|
def action_mailer_host(rails_env, host)
|
|
18
|
+
host_config = "config.action_mailer.default_url_option = { host: '#{host}' }"
|
|
19
|
+
configure_environment(rails_env, host_config)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def configure_environment(rails_env, config)
|
|
18
23
|
inject_into_file(
|
|
19
24
|
"config/environments/#{rails_env}.rb",
|
|
20
|
-
"\n\n
|
|
21
|
-
:
|
|
25
|
+
"\n\n #{config}",
|
|
26
|
+
before: "\nend"
|
|
22
27
|
)
|
|
23
28
|
end
|
|
24
29
|
|
|
@@ -14,11 +14,16 @@ module Suspenders
|
|
|
14
14
|
remove_file 'app/assets/images/rails.png'
|
|
15
15
|
end
|
|
16
16
|
|
|
17
|
-
def
|
|
17
|
+
def raise_on_delivery_errors
|
|
18
18
|
replace_in_file 'config/environments/development.rb',
|
|
19
19
|
'raise_delivery_errors = false', 'raise_delivery_errors = true'
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
def raise_on_unpermitted_parameters
|
|
23
|
+
configure_environment 'development',
|
|
24
|
+
'config.action_controller.action_on_unpermitted_parameters = :raise'
|
|
25
|
+
end
|
|
26
|
+
|
|
22
27
|
def provide_setup_script
|
|
23
28
|
copy_file 'bin_setup', 'bin/setup'
|
|
24
29
|
run 'chmod a+x bin/setup'
|
|
@@ -40,6 +45,7 @@ module Suspenders
|
|
|
40
45
|
"require Rails.root.join('config/initializers/smtp')\n"
|
|
41
46
|
|
|
42
47
|
config = <<-RUBY
|
|
48
|
+
|
|
43
49
|
config.action_mailer.delivery_method = :smtp
|
|
44
50
|
config.action_mailer.smtp_settings = SMTP_SETTINGS
|
|
45
51
|
RUBY
|
|
@@ -147,6 +153,11 @@ module Suspenders
|
|
|
147
153
|
inject_into_class 'config/application.rb', 'Application', config
|
|
148
154
|
end
|
|
149
155
|
|
|
156
|
+
def configure_background_jobs_for_rspec
|
|
157
|
+
copy_file 'background_jobs_rspec.rb', 'spec/support/background_jobs.rb'
|
|
158
|
+
run 'rails g delayed_job:active_record'
|
|
159
|
+
end
|
|
160
|
+
|
|
150
161
|
def blacklist_active_record_attributes
|
|
151
162
|
replace_in_file 'config/application.rb',
|
|
152
163
|
'config.active_record.whitelist_attributes = true',
|
|
@@ -195,6 +206,10 @@ module Suspenders
|
|
|
195
206
|
generate 'clearance:install'
|
|
196
207
|
end
|
|
197
208
|
|
|
209
|
+
def configure_unicorn
|
|
210
|
+
copy_file 'unicorn.rb', 'config/unicorn.rb'
|
|
211
|
+
end
|
|
212
|
+
|
|
198
213
|
def setup_foreman
|
|
199
214
|
copy_file 'sample.env', '.sample.env'
|
|
200
215
|
copy_file 'Procfile', 'Procfile'
|
|
@@ -23,6 +23,7 @@ module Suspenders
|
|
|
23
23
|
def suspenders_customization
|
|
24
24
|
invoke :remove_files_we_dont_need
|
|
25
25
|
invoke :customize_gemfile
|
|
26
|
+
invoke :setup_database
|
|
26
27
|
invoke :setup_development_environment
|
|
27
28
|
invoke :setup_test_environment
|
|
28
29
|
invoke :setup_production_environment
|
|
@@ -30,7 +31,6 @@ module Suspenders
|
|
|
30
31
|
invoke :create_suspenders_views
|
|
31
32
|
invoke :create_common_javascripts
|
|
32
33
|
invoke :add_jquery_ui
|
|
33
|
-
invoke :setup_database
|
|
34
34
|
invoke :configure_app
|
|
35
35
|
invoke :setup_stylesheets
|
|
36
36
|
invoke :copy_miscellaneous_files
|
|
@@ -47,9 +47,26 @@ module Suspenders
|
|
|
47
47
|
build :remove_rails_logo_image
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
def customize_gemfile
|
|
51
|
+
build :replace_gemfile
|
|
52
|
+
build :set_ruby_to_version_being_used
|
|
53
|
+
bundle_command 'install --binstubs=bin/stubs'
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def setup_database
|
|
57
|
+
say 'Setting up database'
|
|
58
|
+
|
|
59
|
+
if 'postgresql' == options[:database]
|
|
60
|
+
build :use_postgres_config_template
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
build :create_database
|
|
64
|
+
end
|
|
65
|
+
|
|
50
66
|
def setup_development_environment
|
|
51
67
|
say 'Setting up the development environment'
|
|
52
|
-
build :
|
|
68
|
+
build :raise_on_delivery_errors
|
|
69
|
+
build :raise_on_unpermitted_parameters
|
|
53
70
|
build :provide_setup_script
|
|
54
71
|
end
|
|
55
72
|
|
|
@@ -59,6 +76,7 @@ module Suspenders
|
|
|
59
76
|
build :test_factories_first
|
|
60
77
|
build :generate_rspec
|
|
61
78
|
build :configure_rspec
|
|
79
|
+
build :configure_background_jobs_for_rspec
|
|
62
80
|
build :enable_database_cleaner
|
|
63
81
|
build :configure_capybara_webkit
|
|
64
82
|
build :setup_guard_spork
|
|
@@ -93,22 +111,6 @@ module Suspenders
|
|
|
93
111
|
build :add_jquery_ui
|
|
94
112
|
end
|
|
95
113
|
|
|
96
|
-
def customize_gemfile
|
|
97
|
-
build :replace_gemfile
|
|
98
|
-
build :set_ruby_to_version_being_used
|
|
99
|
-
bundle_command 'install --binstubs=bin/stubs'
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
def setup_database
|
|
103
|
-
say 'Setting up database'
|
|
104
|
-
|
|
105
|
-
if 'postgresql' == options[:database]
|
|
106
|
-
build :use_postgres_config_template
|
|
107
|
-
end
|
|
108
|
-
|
|
109
|
-
build :create_database
|
|
110
|
-
end
|
|
111
|
-
|
|
112
114
|
def configure_app
|
|
113
115
|
say 'Configuring app'
|
|
114
116
|
build :configure_action_mailer
|
|
@@ -120,6 +122,7 @@ module Suspenders
|
|
|
120
122
|
build :disable_xml_params
|
|
121
123
|
build :add_email_validator
|
|
122
124
|
build :setup_default_rake_task
|
|
125
|
+
build :configure_unicorn
|
|
123
126
|
build :setup_foreman
|
|
124
127
|
end
|
|
125
128
|
|
data/lib/suspenders/version.rb
CHANGED
data/suspenders.gemspec
CHANGED
|
@@ -1,37 +1,33 @@
|
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
|
2
|
-
$:.push File.expand_path(
|
|
2
|
+
$:.push File.expand_path('../lib', __FILE__)
|
|
3
3
|
require 'suspenders/version'
|
|
4
4
|
require 'date'
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
|
-
s.
|
|
8
|
-
s.
|
|
9
|
-
s.
|
|
10
|
-
s.
|
|
11
|
-
s.
|
|
12
|
-
s.
|
|
7
|
+
s.required_ruby_version = '>= 1.9.2'
|
|
8
|
+
s.add_dependency 'bundler', '~> 1.3'
|
|
9
|
+
s.add_dependency 'hub', '~> 1.10'
|
|
10
|
+
s.add_dependency 'rails', '3.2.13'
|
|
11
|
+
s.add_development_dependency 'aruba', '~> 0.5'
|
|
12
|
+
s.add_development_dependency 'cucumber', '~> 1.2'
|
|
13
|
+
s.authors = ['thoughtbot']
|
|
14
|
+
s.date = Date.today.strftime('%Y-%m-%d')
|
|
13
15
|
|
|
14
|
-
s.summary = "Generate a Rails app using thoughtbot's best practices."
|
|
15
16
|
s.description = <<-HERE
|
|
16
17
|
Suspenders is a base Rails project that you can upgrade. It is used by
|
|
17
18
|
thoughtbot to get a jump start on a working app. Use Suspenders if you're in a
|
|
18
19
|
rush to build something amazing; don't use it if you like missing deadlines.
|
|
19
20
|
HERE
|
|
20
21
|
|
|
21
|
-
s.
|
|
22
|
-
|
|
23
|
-
reject { |file| file =~ /^(rdoc|pkg)/ }
|
|
24
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
25
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
|
26
|
-
s.require_paths = ["lib"]
|
|
27
|
-
|
|
28
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
|
22
|
+
s.email = 'support@thoughtbot.com'
|
|
23
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |file| File.basename(file) }
|
|
29
24
|
s.extra_rdoc_files = %w[README.md LICENSE]
|
|
30
|
-
|
|
31
|
-
s.
|
|
32
|
-
s.
|
|
33
|
-
s.
|
|
34
|
-
|
|
35
|
-
s.
|
|
36
|
-
s.
|
|
25
|
+
s.files = `git ls-files`.split("\n")
|
|
26
|
+
s.homepage = 'http://github.com/thoughtbot/suspenders'
|
|
27
|
+
s.name = 'suspenders'
|
|
28
|
+
s.rdoc_options = ['--charset=UTF-8']
|
|
29
|
+
s.require_paths = ['lib']
|
|
30
|
+
s.summary = "Generate a Rails app using thoughtbot's best practices."
|
|
31
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
32
|
+
s.version = Suspenders::VERSION
|
|
37
33
|
end
|
data/templates/Gemfile_clean
CHANGED
|
@@ -2,17 +2,17 @@ source 'https://rubygems.org'
|
|
|
2
2
|
|
|
3
3
|
gem 'airbrake'
|
|
4
4
|
gem 'bourbon'
|
|
5
|
+
gem 'delayed_job_active_record', '>= 4.0.0.beta2'
|
|
5
6
|
gem 'flutie'
|
|
6
7
|
gem 'high_voltage'
|
|
7
8
|
gem 'jquery-rails'
|
|
8
9
|
gem 'pg'
|
|
9
|
-
gem 'psych'
|
|
10
10
|
gem 'rack-timeout'
|
|
11
11
|
gem 'rails', '>= 3.2.11'
|
|
12
12
|
gem 'recipient_interceptor'
|
|
13
13
|
gem 'simple_form'
|
|
14
14
|
gem 'strong_parameters'
|
|
15
|
-
gem '
|
|
15
|
+
gem 'unicorn'
|
|
16
16
|
|
|
17
17
|
group :assets do
|
|
18
18
|
gem 'coffee-rails'
|
data/templates/Procfile
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
web: bundle exec
|
|
1
|
+
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
|
|
2
|
+
worker: bundle exec rake jobs:work
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module BackgroundJobs
|
|
2
|
+
def run_background_jobs_immediately
|
|
3
|
+
delay_jobs = Delayed::Worker.delay_jobs
|
|
4
|
+
Delayed::Worker.delay_jobs = false
|
|
5
|
+
yield
|
|
6
|
+
ensure
|
|
7
|
+
Delayed::Worker.delay_jobs = delay_jobs
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
RSpec.configure do |config|
|
|
12
|
+
config.around(:each, type: :feature) do |example|
|
|
13
|
+
run_background_jobs_immediately do
|
|
14
|
+
example.run
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
config.include BackgroundJobs
|
|
19
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# https://devcenter.heroku.com/articles/rails-unicorn
|
|
2
|
+
|
|
3
|
+
worker_processes (ENV['WEB_CONCURRENCY'] || 3).to_i
|
|
4
|
+
timeout (ENV['WEB_TIMEOUT'] || 5).to_i
|
|
5
|
+
preload_app true
|
|
6
|
+
|
|
7
|
+
before_fork do |server, worker|
|
|
8
|
+
Signal.trap 'TERM' do
|
|
9
|
+
puts 'Unicorn master intercepting TERM and 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 and doing nothing. Wait for master to sent QUIT'
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
if defined? ActiveRecord::Base
|
|
24
|
+
ActiveRecord::Base.establish_connection
|
|
25
|
+
end
|
|
26
|
+
end
|
metadata
CHANGED
|
@@ -1,93 +1,89 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: suspenders
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- thoughtbot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-05-13 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: bundler
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- -
|
|
17
|
+
- - ~>
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3
|
|
19
|
+
version: '1.3'
|
|
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: 3
|
|
26
|
+
version: '1.3'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: hub
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
|
-
- -
|
|
31
|
+
- - ~>
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '1.
|
|
33
|
+
version: '1.10'
|
|
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: '1.
|
|
40
|
+
version: '1.10'
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name:
|
|
42
|
+
name: rails
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
|
-
- -
|
|
45
|
+
- - '='
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version:
|
|
47
|
+
version: 3.2.13
|
|
48
48
|
type: :runtime
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
|
-
- -
|
|
52
|
+
- - '='
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version:
|
|
54
|
+
version: 3.2.13
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name:
|
|
56
|
+
name: aruba
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - ~>
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version:
|
|
61
|
+
version: '0.5'
|
|
62
62
|
type: :development
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - ~>
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version:
|
|
68
|
+
version: '0.5'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name:
|
|
70
|
+
name: cucumber
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - ~>
|
|
74
74
|
- !ruby/object:Gem::Version
|
|
75
|
-
version:
|
|
75
|
+
version: '1.2'
|
|
76
76
|
type: :development
|
|
77
77
|
prerelease: false
|
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
|
79
79
|
requirements:
|
|
80
80
|
- - ~>
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
|
-
version:
|
|
83
|
-
description:
|
|
84
|
-
by
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
rush to build something amazing; don''t use it if you like missing deadlines.
|
|
89
|
-
|
|
90
|
-
'
|
|
82
|
+
version: '1.2'
|
|
83
|
+
description: |
|
|
84
|
+
Suspenders is a base Rails project that you can upgrade. It is used by
|
|
85
|
+
thoughtbot to get a jump start on a working app. Use Suspenders if you're in a
|
|
86
|
+
rush to build something amazing; don't use it if you like missing deadlines.
|
|
91
87
|
email: support@thoughtbot.com
|
|
92
88
|
executables:
|
|
93
89
|
- suspenders
|
|
@@ -96,6 +92,8 @@ extra_rdoc_files:
|
|
|
96
92
|
- README.md
|
|
97
93
|
- LICENSE
|
|
98
94
|
files:
|
|
95
|
+
- .gitignore
|
|
96
|
+
- .travis.yml
|
|
99
97
|
- CONTRIBUTING.md
|
|
100
98
|
- Gemfile
|
|
101
99
|
- Gemfile.lock
|
|
@@ -123,6 +121,7 @@ files:
|
|
|
123
121
|
- templates/README.md.erb
|
|
124
122
|
- templates/_flashes.html.erb
|
|
125
123
|
- templates/_javascript.html.erb
|
|
124
|
+
- templates/background_jobs_rspec.rb
|
|
126
125
|
- templates/bin_setup
|
|
127
126
|
- templates/config_locales_en.yml
|
|
128
127
|
- templates/database_cleaner_rspec.rb
|
|
@@ -143,6 +142,7 @@ files:
|
|
|
143
142
|
- templates/strong_parameters.rb
|
|
144
143
|
- templates/suspenders_gitignore
|
|
145
144
|
- templates/suspenders_layout.html.erb.erb
|
|
145
|
+
- templates/unicorn.rb
|
|
146
146
|
homepage: http://github.com/thoughtbot/suspenders
|
|
147
147
|
licenses: []
|
|
148
148
|
metadata: {}
|
|
@@ -153,12 +153,12 @@ require_paths:
|
|
|
153
153
|
- lib
|
|
154
154
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
155
|
requirements:
|
|
156
|
-
- -
|
|
156
|
+
- - '>='
|
|
157
157
|
- !ruby/object:Gem::Version
|
|
158
|
-
version:
|
|
158
|
+
version: 1.9.2
|
|
159
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
requirements:
|
|
161
|
-
- -
|
|
161
|
+
- - '>='
|
|
162
162
|
- !ruby/object:Gem::Version
|
|
163
163
|
version: '0'
|
|
164
164
|
requirements: []
|