suspenders 1.30.0 → 1.31.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/.gitignore +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/NEWS.md +9 -0
- data/lib/suspenders/app_builder.rb +29 -3
- data/lib/suspenders/generators/app_generator.rb +10 -0
- data/lib/suspenders/version.rb +1 -1
- data/spec/features/new_project_spec.rb +19 -0
- data/suspenders.gemspec +1 -1
- data/templates/Gemfile.erb +1 -1
- data/templates/circle.yml.erb +6 -5
- data/templates/disable_xml_params.rb +0 -2
- data/templates/dotfiles/.ctags +2 -0
- data/templates/rails_helper.rb +1 -0
- data/templates/sample.env +1 -1
- metadata +7 -8
- data/Gemfile.lock +0 -132
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bc097cf89da27e8006356a8716c702f400b76631
|
|
4
|
+
data.tar.gz: 474d6fe3b9dd0b81dfa4be406e30fc7a2f38b991
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 48f0762028d843e9a95d3e1c8c718ed557d0cf3cf38f8f54983f7e6b89c2799947007fa5a52840e6d975a52d1a405e333b4e827d597c235324305ea54dbf5a83
|
|
7
|
+
data.tar.gz: 9359e82fa9095de86f5c8940699f13cee98096d2c51bf80871c4609f0dd7223f8ac4e61ef35451df14e0780b98353f0efc3cab403e3d82697da098c6f5f1df0c
|
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.2.
|
|
1
|
+
2.2.3
|
data/.travis.yml
CHANGED
data/NEWS.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
1.31.0 (September 3, 2015)
|
|
2
|
+
|
|
3
|
+
* Update to Ruby 2.2.3
|
|
4
|
+
* Add ctags configuration dotfile
|
|
5
|
+
* Rename `$HOST` to `$APPLICATION_HOST` for zsh compatibility
|
|
6
|
+
* Update Bitters to 1.1
|
|
7
|
+
* Remove comments and newlines in config files
|
|
8
|
+
* Abort tests run if `DATABASE_URL` env variable is set
|
|
9
|
+
|
|
1
10
|
1.30.0 (July 30, 2015)
|
|
2
11
|
|
|
3
12
|
* Update to RSpec 3.3
|
|
@@ -79,7 +79,7 @@ module Suspenders
|
|
|
79
79
|
RUBY
|
|
80
80
|
|
|
81
81
|
inject_into_file 'config/environments/production.rb', config,
|
|
82
|
-
:
|
|
82
|
+
after: "config.action_mailer.raise_delivery_errors = false"
|
|
83
83
|
end
|
|
84
84
|
|
|
85
85
|
def enable_rack_canonical_host
|
|
@@ -113,7 +113,7 @@ module Suspenders
|
|
|
113
113
|
def setup_asset_host
|
|
114
114
|
replace_in_file 'config/environments/production.rb',
|
|
115
115
|
"# config.action_controller.asset_host = 'http://assets.example.com'",
|
|
116
|
-
'config.action_controller.asset_host = ENV.fetch("ASSET_HOST", ENV.fetch("
|
|
116
|
+
'config.action_controller.asset_host = ENV.fetch("ASSET_HOST", ENV.fetch("APPLICATION_HOST"))'
|
|
117
117
|
|
|
118
118
|
replace_in_file 'config/initializers/assets.rb',
|
|
119
119
|
"config.assets.version = '1.0'",
|
|
@@ -320,6 +320,10 @@ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
|
|
|
320
320
|
end
|
|
321
321
|
end
|
|
322
322
|
|
|
323
|
+
def copy_dotfiles
|
|
324
|
+
directory("dotfiles", ".")
|
|
325
|
+
end
|
|
326
|
+
|
|
323
327
|
def init_git
|
|
324
328
|
run 'git init'
|
|
325
329
|
end
|
|
@@ -429,11 +433,33 @@ you can deploy to staging and production with:
|
|
|
429
433
|
EOS
|
|
430
434
|
|
|
431
435
|
%w(500 404 422).each do |page|
|
|
432
|
-
inject_into_file "public/#{page}.html", meta_tags, :
|
|
436
|
+
inject_into_file "public/#{page}.html", meta_tags, after: "<head>\n"
|
|
433
437
|
replace_in_file "public/#{page}.html", /<!--.+-->\n/, ''
|
|
434
438
|
end
|
|
435
439
|
end
|
|
436
440
|
|
|
441
|
+
def remove_config_comment_lines
|
|
442
|
+
config_files = [
|
|
443
|
+
"application.rb",
|
|
444
|
+
"environment.rb",
|
|
445
|
+
"environments/development.rb",
|
|
446
|
+
"environments/production.rb",
|
|
447
|
+
"environments/test.rb",
|
|
448
|
+
]
|
|
449
|
+
|
|
450
|
+
config_files.each do |config_file|
|
|
451
|
+
path = File.join(destination_root, "config/#{config_file}")
|
|
452
|
+
|
|
453
|
+
accepted_content = File.readlines(path).reject do |line|
|
|
454
|
+
line =~ /^.*#.*$/ || line =~ /^$\n/
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
File.open(path, "w") do |file|
|
|
458
|
+
accepted_content.each { |line| file.puts line }
|
|
459
|
+
end
|
|
460
|
+
end
|
|
461
|
+
end
|
|
462
|
+
|
|
437
463
|
def remove_routes_comment_lines
|
|
438
464
|
replace_in_file 'config/routes.rb',
|
|
439
465
|
/Rails\.application\.routes\.draw do.*end/m,
|
|
@@ -43,7 +43,9 @@ module Suspenders
|
|
|
43
43
|
invoke :install_refills
|
|
44
44
|
invoke :copy_miscellaneous_files
|
|
45
45
|
invoke :customize_error_pages
|
|
46
|
+
invoke :remove_config_comment_lines
|
|
46
47
|
invoke :remove_routes_comment_lines
|
|
48
|
+
invoke :setup_dotfiles
|
|
47
49
|
invoke :setup_git
|
|
48
50
|
invoke :setup_database
|
|
49
51
|
invoke :create_heroku_apps
|
|
@@ -188,6 +190,10 @@ module Suspenders
|
|
|
188
190
|
build :setup_segment
|
|
189
191
|
end
|
|
190
192
|
|
|
193
|
+
def setup_dotfiles
|
|
194
|
+
build :copy_dotfiles
|
|
195
|
+
end
|
|
196
|
+
|
|
191
197
|
def setup_gitignore
|
|
192
198
|
build :gitignore_files
|
|
193
199
|
end
|
|
@@ -216,6 +222,10 @@ module Suspenders
|
|
|
216
222
|
build :customize_error_pages
|
|
217
223
|
end
|
|
218
224
|
|
|
225
|
+
def remove_config_comment_lines
|
|
226
|
+
build :remove_config_comment_lines
|
|
227
|
+
end
|
|
228
|
+
|
|
219
229
|
def remove_routes_comment_lines
|
|
220
230
|
build :remove_routes_comment_lines
|
|
221
231
|
end
|
data/lib/suspenders/version.rb
CHANGED
|
@@ -29,6 +29,10 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
|
29
29
|
expect(ruby_version_file).to eq "#{RUBY_VERSION}\n"
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
+
it "copies dotfiles" do
|
|
33
|
+
expect(File).to exist("#{project_path}/.ctags")
|
|
34
|
+
end
|
|
35
|
+
|
|
32
36
|
it "loads secret_key_base from env" do
|
|
33
37
|
secrets_file = IO.read("#{project_path}/config/secrets.yml")
|
|
34
38
|
|
|
@@ -129,6 +133,21 @@ RSpec.describe "Suspend a new project with default configuration" do
|
|
|
129
133
|
end
|
|
130
134
|
end
|
|
131
135
|
|
|
136
|
+
it "removes comments and extra newlines from config files" do
|
|
137
|
+
config_files = [
|
|
138
|
+
IO.read("#{project_path}/config/application.rb"),
|
|
139
|
+
IO.read("#{project_path}/config/environment.rb"),
|
|
140
|
+
IO.read("#{project_path}/config/environments/development.rb"),
|
|
141
|
+
IO.read("#{project_path}/config/environments/production.rb"),
|
|
142
|
+
IO.read("#{project_path}/config/environments/test.rb"),
|
|
143
|
+
]
|
|
144
|
+
|
|
145
|
+
config_files.each do |file|
|
|
146
|
+
expect(file).not_to match(/.*#.*/)
|
|
147
|
+
expect(file).not_to match(/^$\n/)
|
|
148
|
+
end
|
|
149
|
+
end
|
|
150
|
+
|
|
132
151
|
def analytics_partial
|
|
133
152
|
IO.read("#{project_path}/app/views/application/_analytics.html.erb")
|
|
134
153
|
end
|
data/suspenders.gemspec
CHANGED
|
@@ -27,7 +27,7 @@ rush to build something amazing; don't use it if you like missing deadlines.
|
|
|
27
27
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
|
28
28
|
s.version = Suspenders::VERSION
|
|
29
29
|
|
|
30
|
-
s.add_dependency 'bitters', '~> 1.
|
|
30
|
+
s.add_dependency 'bitters', '~> 1.1.0'
|
|
31
31
|
s.add_dependency 'bundler', '~> 1.3'
|
|
32
32
|
s.add_dependency 'rails', Suspenders::RAILS_VERSION
|
|
33
33
|
|
data/templates/Gemfile.erb
CHANGED
|
@@ -16,8 +16,8 @@ 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 "rack-canonical-host"
|
|
20
19
|
gem "puma"
|
|
20
|
+
gem "rack-canonical-host"
|
|
21
21
|
gem "rails", "<%= Suspenders::RAILS_VERSION %>"
|
|
22
22
|
gem "recipient_interceptor"
|
|
23
23
|
gem "refills"
|
data/templates/circle.yml.erb
CHANGED
data/templates/rails_helper.rb
CHANGED
data/templates/sample.env
CHANGED
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.31.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- thoughtbot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bitters
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 1.
|
|
19
|
+
version: 1.1.0
|
|
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: 1.
|
|
26
|
+
version: 1.1.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: bundler
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -83,7 +83,6 @@ files:
|
|
|
83
83
|
- ".travis.yml"
|
|
84
84
|
- CONTRIBUTING.md
|
|
85
85
|
- Gemfile
|
|
86
|
-
- Gemfile.lock
|
|
87
86
|
- LICENSE
|
|
88
87
|
- NEWS.md
|
|
89
88
|
- README.md
|
|
@@ -125,6 +124,7 @@ files:
|
|
|
125
124
|
- templates/database_cleaner_rspec.rb
|
|
126
125
|
- templates/dev.rake
|
|
127
126
|
- templates/disable_xml_params.rb
|
|
127
|
+
- templates/dotfiles/.ctags
|
|
128
128
|
- templates/errors.rb
|
|
129
129
|
- templates/factory_girl_rspec.rb
|
|
130
130
|
- templates/flashes_helper.rb
|
|
@@ -155,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
155
155
|
requirements:
|
|
156
156
|
- - ">="
|
|
157
157
|
- !ruby/object:Gem::Version
|
|
158
|
-
version: 2.2.
|
|
158
|
+
version: 2.2.3
|
|
159
159
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
requirements:
|
|
161
161
|
- - ">="
|
|
@@ -163,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
163
163
|
version: '0'
|
|
164
164
|
requirements: []
|
|
165
165
|
rubyforge_project:
|
|
166
|
-
rubygems_version: 2.4.5
|
|
166
|
+
rubygems_version: 2.4.5.1
|
|
167
167
|
signing_key:
|
|
168
168
|
specification_version: 4
|
|
169
169
|
summary: Generate a Rails app using thoughtbot's best practices.
|
|
@@ -177,4 +177,3 @@ test_files:
|
|
|
177
177
|
- spec/support/fake_github.rb
|
|
178
178
|
- spec/support/fake_heroku.rb
|
|
179
179
|
- spec/support/suspenders.rb
|
|
180
|
-
has_rdoc:
|
data/Gemfile.lock
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
PATH
|
|
2
|
-
remote: .
|
|
3
|
-
specs:
|
|
4
|
-
suspenders (1.29.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.2)
|
|
13
|
-
actionpack (= 4.2.2)
|
|
14
|
-
actionview (= 4.2.2)
|
|
15
|
-
activejob (= 4.2.2)
|
|
16
|
-
mail (~> 2.5, >= 2.5.4)
|
|
17
|
-
rails-dom-testing (~> 1.0, >= 1.0.5)
|
|
18
|
-
actionpack (4.2.2)
|
|
19
|
-
actionview (= 4.2.2)
|
|
20
|
-
activesupport (= 4.2.2)
|
|
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.1)
|
|
25
|
-
actionview (4.2.2)
|
|
26
|
-
activesupport (= 4.2.2)
|
|
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.1)
|
|
31
|
-
activejob (4.2.2)
|
|
32
|
-
activesupport (= 4.2.2)
|
|
33
|
-
globalid (>= 0.3.0)
|
|
34
|
-
activemodel (4.2.2)
|
|
35
|
-
activesupport (= 4.2.2)
|
|
36
|
-
builder (~> 3.1)
|
|
37
|
-
activerecord (4.2.2)
|
|
38
|
-
activemodel (= 4.2.2)
|
|
39
|
-
activesupport (= 4.2.2)
|
|
40
|
-
arel (~> 6.0)
|
|
41
|
-
activesupport (4.2.2)
|
|
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.0)
|
|
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
|
-
diff-lcs (1.2.5)
|
|
57
|
-
erubis (2.7.0)
|
|
58
|
-
globalid (0.3.5)
|
|
59
|
-
activesupport (>= 4.1.0)
|
|
60
|
-
i18n (0.7.0)
|
|
61
|
-
json (1.8.3)
|
|
62
|
-
loofah (2.0.2)
|
|
63
|
-
nokogiri (>= 1.5.9)
|
|
64
|
-
mail (2.6.3)
|
|
65
|
-
mime-types (>= 1.16, < 3)
|
|
66
|
-
mime-types (2.6.1)
|
|
67
|
-
mini_portile (0.6.2)
|
|
68
|
-
minitest (5.7.0)
|
|
69
|
-
nokogiri (1.6.6.2)
|
|
70
|
-
mini_portile (~> 0.6.0)
|
|
71
|
-
rack (1.6.2)
|
|
72
|
-
rack-test (0.6.3)
|
|
73
|
-
rack (>= 1.0)
|
|
74
|
-
rails (4.2.2)
|
|
75
|
-
actionmailer (= 4.2.2)
|
|
76
|
-
actionpack (= 4.2.2)
|
|
77
|
-
actionview (= 4.2.2)
|
|
78
|
-
activejob (= 4.2.2)
|
|
79
|
-
activemodel (= 4.2.2)
|
|
80
|
-
activerecord (= 4.2.2)
|
|
81
|
-
activesupport (= 4.2.2)
|
|
82
|
-
bundler (>= 1.3.0, < 2.0)
|
|
83
|
-
railties (= 4.2.2)
|
|
84
|
-
sprockets-rails
|
|
85
|
-
rails-deprecated_sanitizer (1.0.3)
|
|
86
|
-
activesupport (>= 4.2.0.alpha)
|
|
87
|
-
rails-dom-testing (1.0.6)
|
|
88
|
-
activesupport (>= 4.2.0.beta, < 5.0)
|
|
89
|
-
nokogiri (~> 1.6.0)
|
|
90
|
-
rails-deprecated_sanitizer (>= 1.0.1)
|
|
91
|
-
rails-html-sanitizer (1.0.2)
|
|
92
|
-
loofah (~> 2.0)
|
|
93
|
-
railties (4.2.2)
|
|
94
|
-
actionpack (= 4.2.2)
|
|
95
|
-
activesupport (= 4.2.2)
|
|
96
|
-
rake (>= 0.8.7)
|
|
97
|
-
thor (>= 0.18.1, < 2.0)
|
|
98
|
-
rake (10.4.2)
|
|
99
|
-
rspec (3.2.0)
|
|
100
|
-
rspec-core (~> 3.2.0)
|
|
101
|
-
rspec-expectations (~> 3.2.0)
|
|
102
|
-
rspec-mocks (~> 3.2.0)
|
|
103
|
-
rspec-core (3.2.3)
|
|
104
|
-
rspec-support (~> 3.2.0)
|
|
105
|
-
rspec-expectations (3.2.1)
|
|
106
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
107
|
-
rspec-support (~> 3.2.0)
|
|
108
|
-
rspec-mocks (3.2.1)
|
|
109
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
|
110
|
-
rspec-support (~> 3.2.0)
|
|
111
|
-
rspec-support (3.2.2)
|
|
112
|
-
sass (3.4.14)
|
|
113
|
-
sprockets (3.2.0)
|
|
114
|
-
rack (~> 1.0)
|
|
115
|
-
sprockets-rails (2.3.1)
|
|
116
|
-
actionpack (>= 3.0)
|
|
117
|
-
activesupport (>= 3.0)
|
|
118
|
-
sprockets (>= 2.8, < 4.0)
|
|
119
|
-
thor (0.19.1)
|
|
120
|
-
thread_safe (0.3.5)
|
|
121
|
-
tzinfo (1.2.2)
|
|
122
|
-
thread_safe (~> 0.1)
|
|
123
|
-
|
|
124
|
-
PLATFORMS
|
|
125
|
-
ruby
|
|
126
|
-
|
|
127
|
-
DEPENDENCIES
|
|
128
|
-
rspec (~> 3.2)
|
|
129
|
-
suspenders!
|
|
130
|
-
|
|
131
|
-
BUNDLED WITH
|
|
132
|
-
1.10.4
|