suspenders 1.9.3 → 1.10.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/Gemfile.lock +43 -37
- data/NEWS.md +6 -0
- data/README.md +3 -11
- data/lib/suspenders/app_builder.rb +4 -10
- data/lib/suspenders/generators/app_generator.rb +1 -2
- data/lib/suspenders/version.rb +1 -1
- data/spec/features/new_project_spec.rb +2 -2
- data/spec/support/suspenders.rb +0 -1
- data/suspenders.gemspec +2 -2
- data/templates/Gemfile.erb +2 -2
- data/templates/secrets.yml +14 -0
- data/templates/unicorn.rb +2 -1
- metadata +8 -8
- data/templates/secret_token.rb +0 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d11e413ba023fcf89b30a5673a23c52fd338093a
|
|
4
|
+
data.tar.gz: 924687edbeaf3fb28dcf213a77cd0173fa8c9edb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf5aa4110d4e855f12e9a0cd9b1c26fdd2900e3228b79a6152914315813d8d5e0861d0825459e8672c570d32714fb09b093c2deb9da0990834133295ae8efe56
|
|
7
|
+
data.tar.gz: 1eb883a7cd0f8e37c886a3ba1724bb47ad088cd201516c2d050e55e5007c0e58a59445e62172a47cda7647f7ec06129410d2d623bc8ec1a55f57445e1ea53b70
|
data/Gemfile.lock
CHANGED
|
@@ -1,38 +1,40 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
suspenders (1.
|
|
4
|
+
suspenders (1.10.0)
|
|
5
5
|
bundler (~> 1.3)
|
|
6
|
-
rails (
|
|
6
|
+
rails (~> 4.1.0)
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
actionmailer (4.0
|
|
12
|
-
actionpack (= 4.0
|
|
11
|
+
actionmailer (4.1.0)
|
|
12
|
+
actionpack (= 4.1.0)
|
|
13
|
+
actionview (= 4.1.0)
|
|
13
14
|
mail (~> 2.5.4)
|
|
14
|
-
actionpack (4.0
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
erubis (~> 2.7.0)
|
|
15
|
+
actionpack (4.1.0)
|
|
16
|
+
actionview (= 4.1.0)
|
|
17
|
+
activesupport (= 4.1.0)
|
|
18
18
|
rack (~> 1.5.2)
|
|
19
19
|
rack-test (~> 0.6.2)
|
|
20
|
-
|
|
21
|
-
activesupport (= 4.0
|
|
22
|
-
builder (~> 3.1
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
actionview (4.1.0)
|
|
21
|
+
activesupport (= 4.1.0)
|
|
22
|
+
builder (~> 3.1)
|
|
23
|
+
erubis (~> 2.7.0)
|
|
24
|
+
activemodel (4.1.0)
|
|
25
|
+
activesupport (= 4.1.0)
|
|
26
|
+
builder (~> 3.1)
|
|
27
|
+
activerecord (4.1.0)
|
|
28
|
+
activemodel (= 4.1.0)
|
|
29
|
+
activesupport (= 4.1.0)
|
|
30
|
+
arel (~> 5.0.0)
|
|
31
|
+
activesupport (4.1.0)
|
|
32
|
+
i18n (~> 0.6, >= 0.6.9)
|
|
33
|
+
json (~> 1.7, >= 1.7.7)
|
|
34
|
+
minitest (~> 5.1)
|
|
33
35
|
thread_safe (~> 0.1)
|
|
34
|
-
tzinfo (~>
|
|
35
|
-
arel (
|
|
36
|
+
tzinfo (~> 1.1)
|
|
37
|
+
arel (5.0.1.20140414130214)
|
|
36
38
|
aruba (0.5.3)
|
|
37
39
|
childprocess (>= 0.3.6)
|
|
38
40
|
cucumber (>= 1.1.1)
|
|
@@ -62,12 +64,13 @@ GEM
|
|
|
62
64
|
multi_json (~> 1.3)
|
|
63
65
|
hike (1.2.3)
|
|
64
66
|
i18n (0.6.9)
|
|
67
|
+
json (1.8.1)
|
|
65
68
|
mail (2.5.4)
|
|
66
69
|
mime-types (~> 1.16)
|
|
67
70
|
treetop (~> 1.4.8)
|
|
68
71
|
mime-types (1.25.1)
|
|
69
72
|
mini_portile (0.5.2)
|
|
70
|
-
minitest (
|
|
73
|
+
minitest (5.3.3)
|
|
71
74
|
multi_json (1.7.9)
|
|
72
75
|
multi_test (0.0.1)
|
|
73
76
|
nokogiri (1.6.1)
|
|
@@ -78,20 +81,22 @@ GEM
|
|
|
78
81
|
rack (1.5.2)
|
|
79
82
|
rack-test (0.6.2)
|
|
80
83
|
rack (>= 1.0)
|
|
81
|
-
rails (4.0
|
|
82
|
-
actionmailer (= 4.0
|
|
83
|
-
actionpack (= 4.0
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
rails (4.1.0)
|
|
85
|
+
actionmailer (= 4.1.0)
|
|
86
|
+
actionpack (= 4.1.0)
|
|
87
|
+
actionview (= 4.1.0)
|
|
88
|
+
activemodel (= 4.1.0)
|
|
89
|
+
activerecord (= 4.1.0)
|
|
90
|
+
activesupport (= 4.1.0)
|
|
86
91
|
bundler (>= 1.3.0, < 2.0)
|
|
87
|
-
railties (= 4.0
|
|
88
|
-
sprockets-rails (~> 2.0
|
|
89
|
-
railties (4.0
|
|
90
|
-
actionpack (= 4.0
|
|
91
|
-
activesupport (= 4.0
|
|
92
|
+
railties (= 4.1.0)
|
|
93
|
+
sprockets-rails (~> 2.0)
|
|
94
|
+
railties (4.1.0)
|
|
95
|
+
actionpack (= 4.1.0)
|
|
96
|
+
activesupport (= 4.1.0)
|
|
92
97
|
rake (>= 0.8.7)
|
|
93
98
|
thor (>= 0.18.1, < 2.0)
|
|
94
|
-
rake (10.
|
|
99
|
+
rake (10.3.1)
|
|
95
100
|
rspec (2.14.1)
|
|
96
101
|
rspec-core (~> 2.14.0)
|
|
97
102
|
rspec-expectations (~> 2.14.0)
|
|
@@ -105,7 +110,7 @@ GEM
|
|
|
105
110
|
multi_json (~> 1.0)
|
|
106
111
|
rack (~> 1.0)
|
|
107
112
|
tilt (~> 1.1, != 1.3.0)
|
|
108
|
-
sprockets-rails (2.
|
|
113
|
+
sprockets-rails (2.1.3)
|
|
109
114
|
actionpack (>= 3.0)
|
|
110
115
|
activesupport (>= 3.0)
|
|
111
116
|
sprockets (~> 2.8)
|
|
@@ -115,7 +120,8 @@ GEM
|
|
|
115
120
|
treetop (1.4.15)
|
|
116
121
|
polyglot
|
|
117
122
|
polyglot (>= 0.3.1)
|
|
118
|
-
tzinfo (
|
|
123
|
+
tzinfo (1.1.0)
|
|
124
|
+
thread_safe (~> 0.1)
|
|
119
125
|
xpath (2.0.0)
|
|
120
126
|
nokogiri (~> 1.3)
|
|
121
127
|
|
data/NEWS.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
1.10.0 (April 21, 2014)
|
|
2
|
+
|
|
3
|
+
* Generate a Rails 4.1 app.
|
|
4
|
+
* Generate a working .ruby-version for Ruby >= 2.1.0.
|
|
5
|
+
* Update Unicorn template to version now preferred by Heroku.
|
|
6
|
+
|
|
1
7
|
1.9.3 (April 13, 2014)
|
|
2
8
|
|
|
3
9
|
* Use FactoryGirl.lint instead of custom-generated factory-testing code.
|
data/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Then run:
|
|
|
15
15
|
|
|
16
16
|
suspenders projectname
|
|
17
17
|
|
|
18
|
-
This will create a Rails 4.
|
|
18
|
+
This will create a Rails 4.1 app in `projectname`.
|
|
19
19
|
|
|
20
20
|
By default this script creates a new git repository. See below if you
|
|
21
21
|
want to use it against an existing repo.
|
|
@@ -89,6 +89,8 @@ Suspenders also comes with:
|
|
|
89
89
|
* A [low database connection pool limit][pool]
|
|
90
90
|
* [Safe binstubs][binstub]
|
|
91
91
|
* [t() and l() in specs without prefixing with I18n][i18n]
|
|
92
|
+
* An automatically-created `SECRET_KEY_BASE` environment variable in all
|
|
93
|
+
environments.
|
|
92
94
|
|
|
93
95
|
[bin]: http://robots.thoughtbot.com/bin-setup
|
|
94
96
|
[compress]: http://robots.thoughtbot.com/content-compression-with-rack-deflater/
|
|
@@ -97,16 +99,6 @@ Suspenders also comes with:
|
|
|
97
99
|
[binstub]: https://github.com/thoughtbot/suspenders/pull/282
|
|
98
100
|
[i18n]: https://github.com/thoughtbot/suspenders/pull/304
|
|
99
101
|
|
|
100
|
-
Suspenders fixes several of Rails' [insecure defaults]:
|
|
101
|
-
|
|
102
|
-
* Suspenders uses Unicorn instead of WEBrick, allowing less verbose Server
|
|
103
|
-
headers.
|
|
104
|
-
* Suspenders is configured to pull your application secret key base from an
|
|
105
|
-
environment variable, which means you won't need to risk placing it in version
|
|
106
|
-
control.
|
|
107
|
-
|
|
108
|
-
[insecure defaults]: http://blog.codeclimate.com/blog/2013/03/27/rails-insecure-defaults/
|
|
109
|
-
|
|
110
102
|
Heroku
|
|
111
103
|
------
|
|
112
104
|
|
|
@@ -88,7 +88,7 @@ module Suspenders
|
|
|
88
88
|
|
|
89
89
|
config = <<-RUBY
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
Rails.application.configure do
|
|
92
92
|
# ...
|
|
93
93
|
end
|
|
94
94
|
RUBY
|
|
@@ -97,9 +97,7 @@ end
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
def setup_secret_token
|
|
100
|
-
template '
|
|
101
|
-
'config/initializers/secret_token.rb',
|
|
102
|
-
:force => true
|
|
100
|
+
template 'secrets.yml', 'config/secrets.yml', force: true
|
|
103
101
|
end
|
|
104
102
|
|
|
105
103
|
def create_partials_directory
|
|
@@ -171,10 +169,6 @@ end
|
|
|
171
169
|
copy_file 'i18n.rb', 'spec/support/i18n.rb'
|
|
172
170
|
end
|
|
173
171
|
|
|
174
|
-
def use_spring_binstubs
|
|
175
|
-
run 'bundle exec spring binstub --all'
|
|
176
|
-
end
|
|
177
|
-
|
|
178
172
|
def configure_background_jobs_for_rspec
|
|
179
173
|
copy_file 'background_jobs_rspec.rb', 'spec/support/background_jobs.rb'
|
|
180
174
|
run 'rails g delayed_job:active_record'
|
|
@@ -302,8 +296,8 @@ heroku join --app #{app_name}-production
|
|
|
302
296
|
|
|
303
297
|
def remove_routes_comment_lines
|
|
304
298
|
replace_in_file 'config/routes.rb',
|
|
305
|
-
/
|
|
306
|
-
"
|
|
299
|
+
/Rails\.application\.routes\.draw do.*end/m,
|
|
300
|
+
"Rails.application.routes.draw do\nend"
|
|
307
301
|
end
|
|
308
302
|
|
|
309
303
|
def disable_xml_params
|
|
@@ -76,7 +76,6 @@ module Suspenders
|
|
|
76
76
|
build :set_up_factory_girl_for_rspec
|
|
77
77
|
build :generate_rspec
|
|
78
78
|
build :configure_rspec
|
|
79
|
-
build :use_spring_binstubs
|
|
80
79
|
build :configure_background_jobs_for_rspec
|
|
81
80
|
build :enable_database_cleaner
|
|
82
81
|
build :configure_spec_support_features
|
|
@@ -201,7 +200,7 @@ module Suspenders
|
|
|
201
200
|
end
|
|
202
201
|
|
|
203
202
|
def patch_level
|
|
204
|
-
if
|
|
203
|
+
if RUBY_VERSION >= '2.1.0'
|
|
205
204
|
''
|
|
206
205
|
else
|
|
207
206
|
"-p#{RUBY_PATCHLEVEL}"
|
data/lib/suspenders/version.rb
CHANGED
|
@@ -15,12 +15,12 @@ feature 'Suspend a new project with default configuration' do
|
|
|
15
15
|
run_suspenders
|
|
16
16
|
|
|
17
17
|
staging_file = IO.read("#{project_path}/config/environments/staging.rb")
|
|
18
|
-
config_stub = "
|
|
18
|
+
config_stub = "Rails.application.configure do"
|
|
19
19
|
expect(staging_file).to match(/^require_relative 'production'/)
|
|
20
20
|
expect(staging_file).to match(/#{config_stub}/), staging_file
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
if
|
|
23
|
+
if RUBY_VERSION >= '2.1.0'
|
|
24
24
|
scenario '.ruby-version does not include patchlevel for Ruby 2.1.0+' do
|
|
25
25
|
run_suspenders
|
|
26
26
|
|
data/spec/support/suspenders.rb
CHANGED
data/suspenders.gemspec
CHANGED
|
@@ -4,9 +4,9 @@ require 'suspenders/version'
|
|
|
4
4
|
require 'date'
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
|
-
s.required_ruby_version = '>= 1.9.
|
|
7
|
+
s.required_ruby_version = '>= 1.9.3'
|
|
8
8
|
s.add_dependency 'bundler', '~> 1.3'
|
|
9
|
-
s.add_dependency 'rails', '4.0
|
|
9
|
+
s.add_dependency 'rails', '~> 4.1.0'
|
|
10
10
|
s.add_development_dependency 'aruba', '~> 0.5.2'
|
|
11
11
|
s.add_development_dependency 'cucumber', '~> 1.2'
|
|
12
12
|
s.authors = ['thoughtbot']
|
data/templates/Gemfile.erb
CHANGED
|
@@ -13,9 +13,9 @@ gem 'jquery-rails'
|
|
|
13
13
|
gem 'neat'
|
|
14
14
|
gem 'pg'
|
|
15
15
|
gem 'rack-timeout'
|
|
16
|
-
gem 'rails', '
|
|
16
|
+
gem 'rails', '~> 4.1.0'
|
|
17
17
|
gem 'recipient_interceptor'
|
|
18
|
-
gem 'sass-rails'
|
|
18
|
+
gem 'sass-rails'
|
|
19
19
|
gem 'simple_form'
|
|
20
20
|
gem 'title'
|
|
21
21
|
gem 'uglifier'
|
data/templates/unicorn.rb
CHANGED
|
@@ -21,7 +21,8 @@ after_fork do |server, worker|
|
|
|
21
21
|
end
|
|
22
22
|
|
|
23
23
|
if defined? ActiveRecord::Base
|
|
24
|
-
config =
|
|
24
|
+
config = ActiveRecord::Base.configurations[Rails.env] ||
|
|
25
|
+
Rails.application.config.database_configuration[Rails.env]
|
|
25
26
|
config['reaping_frequency'] = (ENV['DB_REAPING_FREQUENCY'] || 10).to_i
|
|
26
27
|
config['pool'] = (ENV['DB_POOL'] || 2).to_i
|
|
27
28
|
ActiveRecord::Base.establish_connection(config)
|
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.10.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- thoughtbot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-04-
|
|
11
|
+
date: 2014-04-21 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: 4.0
|
|
33
|
+
version: 4.1.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: 4.0
|
|
40
|
+
version: 4.1.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: aruba
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -151,7 +151,7 @@ files:
|
|
|
151
151
|
- templates/rack_timeout.rb
|
|
152
152
|
- templates/ruby-version.erb
|
|
153
153
|
- templates/sample.env
|
|
154
|
-
- templates/
|
|
154
|
+
- templates/secrets.yml
|
|
155
155
|
- templates/smtp.rb
|
|
156
156
|
- templates/spec_helper.rb
|
|
157
157
|
- templates/staging.rb
|
|
@@ -172,7 +172,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
172
172
|
requirements:
|
|
173
173
|
- - ">="
|
|
174
174
|
- !ruby/object:Gem::Version
|
|
175
|
-
version: 1.9.
|
|
175
|
+
version: 1.9.3
|
|
176
176
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
177
|
requirements:
|
|
178
178
|
- - ">="
|
data/templates/secret_token.rb
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
|
2
|
-
# If you change this key, all old signed cookies will become invalid!
|
|
3
|
-
|
|
4
|
-
# Make sure the secret is at least 30 characters and all random,
|
|
5
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
|
6
|
-
# You can use `rake secret` to generate a secure secret key.
|
|
7
|
-
|
|
8
|
-
# Make sure your secret_key_base is kept private
|
|
9
|
-
# if you're sharing your code publicly.
|
|
10
|
-
<%= app_const %>.config.secret_key_base = ENV['SECRET_KEY_BASE']
|