suspenders 1.20.0 → 1.21.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/Gemfile.lock +61 -39
- data/NEWS.md +9 -0
- data/README.md +24 -26
- data/lib/suspenders/app_builder.rb +48 -12
- data/lib/suspenders/generators/app_generator.rb +8 -0
- data/lib/suspenders/version.rb +2 -2
- data/spec/features/heroku_spec.rb +19 -9
- data/spec/features/new_project_spec.rb +6 -0
- data/templates/Gemfile.erb +5 -3
- data/templates/README.md.erb +3 -6
- data/templates/_flashes.html.erb +1 -1
- data/templates/application.css.scss +7 -6
- data/templates/bin_deploy +12 -0
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d91d5e12afab40037b308b168125a44e3d8f447e
|
4
|
+
data.tar.gz: 3b61d62c10c86a8c7d6287de1f38f78962bcddf8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d12faf4cf825d7691647cb4b744c41624f698e11ec07701112eed749e16f9c9fbdcb81b812141627585032de3a7ab6c42ebdde1834cf232b0a5980ed60e52792
|
7
|
+
data.tar.gz: 9fa487b16c3ea508e44bb4a3071ea19566cc5755c15268ffb9d60fd63a8da23df3509f1d4a0fad369d67bf12acd477654e774c048fec284898c6ba0acabaa7dc
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.2.0
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,41 +1,50 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
suspenders (1.
|
4
|
+
suspenders (1.21.0)
|
5
5
|
bitters (~> 0.10.0)
|
6
6
|
bundler (~> 1.3)
|
7
|
-
rails (= 4.
|
7
|
+
rails (= 4.2.0)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actionmailer (4.
|
13
|
-
actionpack (= 4.
|
14
|
-
actionview (= 4.
|
12
|
+
actionmailer (4.2.0)
|
13
|
+
actionpack (= 4.2.0)
|
14
|
+
actionview (= 4.2.0)
|
15
|
+
activejob (= 4.2.0)
|
15
16
|
mail (~> 2.5, >= 2.5.4)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
17
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
18
|
+
actionpack (4.2.0)
|
19
|
+
actionview (= 4.2.0)
|
20
|
+
activesupport (= 4.2.0)
|
21
|
+
rack (~> 1.6.0)
|
20
22
|
rack-test (~> 0.6.2)
|
21
|
-
|
22
|
-
|
23
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
24
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
25
|
+
actionview (4.2.0)
|
26
|
+
activesupport (= 4.2.0)
|
23
27
|
builder (~> 3.1)
|
24
28
|
erubis (~> 2.7.0)
|
25
|
-
|
26
|
-
|
29
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
30
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
31
|
+
activejob (4.2.0)
|
32
|
+
activesupport (= 4.2.0)
|
33
|
+
globalid (>= 0.3.0)
|
34
|
+
activemodel (4.2.0)
|
35
|
+
activesupport (= 4.2.0)
|
27
36
|
builder (~> 3.1)
|
28
|
-
activerecord (4.
|
29
|
-
activemodel (= 4.
|
30
|
-
activesupport (= 4.
|
31
|
-
arel (~>
|
32
|
-
activesupport (4.
|
33
|
-
i18n (~> 0.
|
37
|
+
activerecord (4.2.0)
|
38
|
+
activemodel (= 4.2.0)
|
39
|
+
activesupport (= 4.2.0)
|
40
|
+
arel (~> 6.0)
|
41
|
+
activesupport (4.2.0)
|
42
|
+
i18n (~> 0.7)
|
34
43
|
json (~> 1.7, >= 1.7.7)
|
35
44
|
minitest (~> 5.1)
|
36
|
-
thread_safe (~> 0.
|
45
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
37
46
|
tzinfo (~> 1.1)
|
38
|
-
arel (
|
47
|
+
arel (6.0.0)
|
39
48
|
aruba (0.5.4)
|
40
49
|
childprocess (>= 0.3.6)
|
41
50
|
cucumber (>= 1.1.1)
|
@@ -67,37 +76,50 @@ GEM
|
|
67
76
|
ffi (1.9.3)
|
68
77
|
gherkin (2.12.2)
|
69
78
|
multi_json (~> 1.3)
|
79
|
+
globalid (0.3.0)
|
80
|
+
activesupport (>= 4.1.0)
|
70
81
|
hike (1.2.3)
|
71
|
-
i18n (0.
|
82
|
+
i18n (0.7.0)
|
72
83
|
json (1.8.1)
|
84
|
+
loofah (2.0.1)
|
85
|
+
nokogiri (>= 1.5.9)
|
73
86
|
mail (2.6.3)
|
74
87
|
mime-types (>= 1.16, < 3)
|
75
|
-
mime-types (
|
88
|
+
mime-types (2.4.3)
|
76
89
|
mini_portile (0.6.0)
|
77
|
-
minitest (5.
|
90
|
+
minitest (5.5.0)
|
78
91
|
multi_json (1.10.1)
|
79
92
|
multi_test (0.1.1)
|
80
93
|
nokogiri (1.6.2.1)
|
81
94
|
mini_portile (= 0.6.0)
|
82
|
-
rack (1.
|
95
|
+
rack (1.6.0)
|
83
96
|
rack-test (0.6.2)
|
84
97
|
rack (>= 1.0)
|
85
|
-
rails (4.
|
86
|
-
actionmailer (= 4.
|
87
|
-
actionpack (= 4.
|
88
|
-
actionview (= 4.
|
89
|
-
|
90
|
-
|
91
|
-
|
98
|
+
rails (4.2.0)
|
99
|
+
actionmailer (= 4.2.0)
|
100
|
+
actionpack (= 4.2.0)
|
101
|
+
actionview (= 4.2.0)
|
102
|
+
activejob (= 4.2.0)
|
103
|
+
activemodel (= 4.2.0)
|
104
|
+
activerecord (= 4.2.0)
|
105
|
+
activesupport (= 4.2.0)
|
92
106
|
bundler (>= 1.3.0, < 2.0)
|
93
|
-
railties (= 4.
|
94
|
-
sprockets-rails
|
95
|
-
|
96
|
-
|
97
|
-
|
107
|
+
railties (= 4.2.0)
|
108
|
+
sprockets-rails
|
109
|
+
rails-deprecated_sanitizer (1.0.3)
|
110
|
+
activesupport (>= 4.2.0.alpha)
|
111
|
+
rails-dom-testing (1.0.5)
|
112
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
113
|
+
nokogiri (~> 1.6.0)
|
114
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
115
|
+
rails-html-sanitizer (1.0.1)
|
116
|
+
loofah (~> 2.0)
|
117
|
+
railties (4.2.0)
|
118
|
+
actionpack (= 4.2.0)
|
119
|
+
activesupport (= 4.2.0)
|
98
120
|
rake (>= 0.8.7)
|
99
121
|
thor (>= 0.18.1, < 2.0)
|
100
|
-
rake (10.4.
|
122
|
+
rake (10.4.2)
|
101
123
|
rspec (2.99.0)
|
102
124
|
rspec-core (~> 2.99.0)
|
103
125
|
rspec-expectations (~> 2.99.0)
|
@@ -112,7 +134,7 @@ GEM
|
|
112
134
|
multi_json (~> 1.0)
|
113
135
|
rack (~> 1.0)
|
114
136
|
tilt (~> 1.1, != 1.3.0)
|
115
|
-
sprockets-rails (2.2.
|
137
|
+
sprockets-rails (2.2.2)
|
116
138
|
actionpack (>= 3.0)
|
117
139
|
activesupport (>= 3.0)
|
118
140
|
sprockets (>= 2.8, < 4.0)
|
data/NEWS.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
1.21.0 (January 4, 2015)
|
2
|
+
|
3
|
+
* Use Ruby 2.2.0.
|
4
|
+
* Use Rails 4.2.0.
|
5
|
+
* Install [Refills] and Refills' "flashes" component.
|
6
|
+
* Add `bin/deploy` script.
|
7
|
+
|
8
|
+
[Refills]: http://refills.bourbon.io/components/#flashes
|
9
|
+
|
1
10
|
1.20.0 (November 25, 2014)
|
2
11
|
|
3
12
|
* Use Ruby 2.1.5.
|
data/README.md
CHANGED
@@ -5,8 +5,7 @@ Suspenders is the base Rails application used at
|
|
5
5
|
|
6
6
|
![Suspenders boy](http://media.tumblr.com/1TEAMALpseh5xzf0Jt6bcwSMo1_400.png)
|
7
7
|
|
8
|
-
Installation
|
9
|
-
------------
|
8
|
+
## Installation
|
10
9
|
|
11
10
|
First install the suspenders gem:
|
12
11
|
|
@@ -18,8 +17,7 @@ Then run:
|
|
18
17
|
|
19
18
|
This will create a Rails app in `projectname` using the latest version of Rails.
|
20
19
|
|
21
|
-
Gemfile
|
22
|
-
-------
|
20
|
+
## Gemfile
|
23
21
|
|
24
22
|
To see the latest and greatest gems, look at Suspenders'
|
25
23
|
[Gemfile](templates/Gemfile.erb), which will be appended to the default
|
@@ -46,6 +44,8 @@ It includes application gems like:
|
|
46
44
|
taking too long
|
47
45
|
* [Recipient Interceptor](https://github.com/croaky/recipient_interceptor) to
|
48
46
|
avoid accidentally sending emails to real people from staging
|
47
|
+
* [Refills](https://github.com/thoughtbot/refills) for “copy-paste” components
|
48
|
+
and patterns based on Bourbon, Neat and Bitters
|
49
49
|
* [Simple Form](https://github.com/plataformatec/simple_form) for form markup
|
50
50
|
and style
|
51
51
|
* [Title](https://github.com/calebthompson/title) for storing titles in
|
@@ -63,6 +63,8 @@ And development gems like:
|
|
63
63
|
Gemfile for insecure dependencies based on published CVEs
|
64
64
|
* [Spring](https://github.com/rails/spring) for fast Rails actions via
|
65
65
|
pre-loading
|
66
|
+
* [Web Console](https://github.com/rails/web-console) for better debugging via
|
67
|
+
in-browser IRB consoles.
|
66
68
|
|
67
69
|
And testing gems like:
|
68
70
|
|
@@ -78,12 +80,12 @@ And testing gems like:
|
|
78
80
|
RSpec matchers
|
79
81
|
* [Timecop](https://github.com/jtrupiano/timecop-console) for testing time
|
80
82
|
|
81
|
-
Other goodies
|
82
|
-
-------------
|
83
|
+
## Other goodies
|
83
84
|
|
84
85
|
Suspenders also comes with:
|
85
86
|
|
86
|
-
* The [`./bin/setup`][
|
87
|
+
* The [`./bin/setup`][setup] convention for new developer setup
|
88
|
+
* The `./bin/deploy` convention for deploying to Heroku
|
87
89
|
* Rails' flashes set up and in application layout
|
88
90
|
* A few nice time formats set up for localization
|
89
91
|
* `Rack::Deflater` to [compress responses with Gzip][compress]
|
@@ -96,7 +98,7 @@ Suspenders also comes with:
|
|
96
98
|
* The analytics adapter [Segment][segment] (and therefore config for Google
|
97
99
|
Analytics, Intercom, Facebook Ads, Twitter Ads, etc.)
|
98
100
|
|
99
|
-
[
|
101
|
+
[setup]: http://robots.thoughtbot.com/bin-setup
|
100
102
|
[compress]: http://robots.thoughtbot.com/content-compression-with-rack-deflater/
|
101
103
|
[pool]: https://devcenter.heroku.com/articles/concurrency-and-database-connections
|
102
104
|
[binstub]: https://github.com/thoughtbot/suspenders/pull/282
|
@@ -104,8 +106,7 @@ Suspenders also comes with:
|
|
104
106
|
[travis]: http://docs.travis-ci.com/user/travis-pro/
|
105
107
|
[segment]: https://segment.io
|
106
108
|
|
107
|
-
Heroku
|
108
|
-
------
|
109
|
+
## Heroku
|
109
110
|
|
110
111
|
You can optionally create Heroku staging and production apps:
|
111
112
|
|
@@ -117,19 +118,21 @@ This:
|
|
117
118
|
* Sets them as `staging` and `production` Git remotes
|
118
119
|
* Configures staging with `RACK_ENV` and `RAILS_ENV` environment variables set
|
119
120
|
to `staging`
|
120
|
-
* Adds the [Rails
|
121
|
-
to
|
121
|
+
* Adds the [Rails Stdout Logging][logging-gem] gem
|
122
|
+
to configure the app to log to standard out,
|
123
|
+
which is how [Heroku's logging][heroku-logging] works.
|
122
124
|
|
123
|
-
|
124
|
-
|
125
|
+
[logging-gem]: https://github.com/heroku/rails_stdout_logging
|
126
|
+
[heroku-logging]: https://devcenter.heroku.com/articles/logging#writing-to-your-log
|
127
|
+
|
128
|
+
## Git
|
125
129
|
|
126
130
|
This will initialize a new git repository for your Rails app. You can
|
127
131
|
bypass this with the `--skip-git` option:
|
128
132
|
|
129
133
|
suspenders app --skip-git true
|
130
134
|
|
131
|
-
GitHub
|
132
|
-
------
|
135
|
+
## GitHub
|
133
136
|
|
134
137
|
You can optionally create a GitHub repository for the suspended Rails app. It
|
135
138
|
requires that you have [Hub](https://github.com/github/hub) on your system:
|
@@ -141,8 +144,7 @@ This has the same effect as running:
|
|
141
144
|
|
142
145
|
hub create organization/project
|
143
146
|
|
144
|
-
Dependencies
|
145
|
-
------------
|
147
|
+
## Dependencies
|
146
148
|
|
147
149
|
Suspenders requires the latest version of Ruby.
|
148
150
|
|
@@ -162,21 +164,18 @@ installing QT are
|
|
162
164
|
|
163
165
|
PostgreSQL needs to be installed and running for the `db:create` rake task.
|
164
166
|
|
165
|
-
Issues
|
166
|
-
------
|
167
|
+
## Issues
|
167
168
|
|
168
169
|
If you have problems, please create a
|
169
170
|
[GitHub Issue](https://github.com/thoughtbot/suspenders/issues).
|
170
171
|
|
171
|
-
Contributing
|
172
|
-
------------
|
172
|
+
## Contributing
|
173
173
|
|
174
174
|
To update Suspenders' Ruby version, change `.ruby-version` and `.travis.yml`.
|
175
175
|
|
176
176
|
Please see [CONTRIBUTING.md](CONTRIBUTING.md) for further details.
|
177
177
|
|
178
|
-
Credits
|
179
|
-
-------
|
178
|
+
## Credits
|
180
179
|
|
181
180
|
![thoughtbot](http://thoughtbot.com/images/tm/logo.png)
|
182
181
|
|
@@ -185,8 +184,7 @@ Suspenders is maintained and funded by
|
|
185
184
|
|
186
185
|
The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
187
186
|
|
188
|
-
License
|
189
|
-
-------
|
187
|
+
## License
|
190
188
|
|
191
189
|
Suspenders is Copyright © 2008-2014 thoughtbot. It is free software, and may be
|
192
190
|
redistributed under the terms specified in the LICENSE file.
|
@@ -20,8 +20,8 @@ module Suspenders
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def provide_setup_script
|
23
|
-
template
|
24
|
-
run
|
23
|
+
template "bin_setup.erb", "bin/setup", port_number: port, force: true
|
24
|
+
run "chmod a+x bin/setup"
|
25
25
|
end
|
26
26
|
|
27
27
|
def provide_dev_prime_task
|
@@ -77,22 +77,27 @@ module Suspenders
|
|
77
77
|
config.middleware.use Rack::Deflater
|
78
78
|
RUBY
|
79
79
|
|
80
|
-
inject_into_file
|
81
|
-
|
80
|
+
inject_into_file(
|
81
|
+
"config/environments/production.rb",
|
82
|
+
config,
|
83
|
+
after: serve_static_files_line
|
84
|
+
)
|
82
85
|
end
|
83
86
|
|
84
87
|
def setup_asset_host
|
85
88
|
replace_in_file 'config/environments/production.rb',
|
86
|
-
|
89
|
+
"# config.action_controller.asset_host = 'http://assets.example.com'",
|
87
90
|
'config.action_controller.asset_host = ENV.fetch("ASSET_HOST")'
|
88
91
|
|
89
92
|
replace_in_file 'config/initializers/assets.rb',
|
90
93
|
"config.assets.version = '1.0'",
|
91
94
|
'config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")'
|
92
95
|
|
93
|
-
|
94
|
-
|
95
|
-
'config.static_cache_control = "public, max-age=#{1.year.to_i}"'
|
96
|
+
inject_into_file(
|
97
|
+
"config/environments/production.rb",
|
98
|
+
'config.static_cache_control = "public, max-age=#{1.year.to_i}"',
|
99
|
+
after: serve_static_files_line
|
100
|
+
)
|
96
101
|
end
|
97
102
|
|
98
103
|
def setup_staging_environment
|
@@ -156,8 +161,11 @@ end
|
|
156
161
|
end
|
157
162
|
|
158
163
|
def setup_heroku_specific_gems
|
159
|
-
inject_into_file
|
164
|
+
inject_into_file(
|
165
|
+
"Gemfile",
|
166
|
+
%{\n\s\sgem "rails_stdout_logging"},
|
160
167
|
after: /group :staging, :production do/
|
168
|
+
)
|
161
169
|
end
|
162
170
|
|
163
171
|
def enable_database_cleaner
|
@@ -220,8 +228,12 @@ end
|
|
220
228
|
copy_file 'rack_timeout.rb', 'config/initializers/rack_timeout.rb'
|
221
229
|
end
|
222
230
|
|
231
|
+
def configure_simple_form
|
232
|
+
bundle_command "exec rails generate simple_form:install"
|
233
|
+
end
|
234
|
+
|
223
235
|
def configure_action_mailer
|
224
|
-
action_mailer_host 'development', "localhost:#{
|
236
|
+
action_mailer_host 'development', "localhost:#{port}"
|
225
237
|
action_mailer_host 'test', 'www.example.com'
|
226
238
|
action_mailer_host 'staging', "staging.#{app_name}.com"
|
227
239
|
action_mailer_host 'production', "#{app_name}.com"
|
@@ -258,6 +270,10 @@ end
|
|
258
270
|
run "bitters install --path app/assets/stylesheets"
|
259
271
|
end
|
260
272
|
|
273
|
+
def install_refills
|
274
|
+
run "rails generate refills:import flashes"
|
275
|
+
end
|
276
|
+
|
261
277
|
def gitignore_files
|
262
278
|
remove_file '.gitignore'
|
263
279
|
copy_file 'suspenders_gitignore', '.gitignore'
|
@@ -320,6 +336,22 @@ fi
|
|
320
336
|
end
|
321
337
|
end
|
322
338
|
|
339
|
+
def provide_deploy_script
|
340
|
+
copy_file "bin_deploy", "bin/deploy"
|
341
|
+
|
342
|
+
instructions = <<-MARKDOWN
|
343
|
+
## Deploying
|
344
|
+
|
345
|
+
If you have previously run the `./bin/setup` script,
|
346
|
+
you can deploy to staging and production with:
|
347
|
+
|
348
|
+
$ ./bin/deploy staging
|
349
|
+
$ ./bin/deploy production
|
350
|
+
MARKDOWN
|
351
|
+
|
352
|
+
append_file "README.md", instructions
|
353
|
+
end
|
354
|
+
|
323
355
|
def create_github_repo(repo_name)
|
324
356
|
path_addition = override_path_for_tests
|
325
357
|
run "#{path_addition} hub create #{repo_name}"
|
@@ -407,8 +439,12 @@ end
|
|
407
439
|
SecureRandom.hex(64)
|
408
440
|
end
|
409
441
|
|
410
|
-
def
|
411
|
-
@
|
442
|
+
def port
|
443
|
+
@port ||= [3000, 4000, 5000, 7000, 8000, 9000].sample
|
444
|
+
end
|
445
|
+
|
446
|
+
def serve_static_files_line
|
447
|
+
"config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?\n"
|
412
448
|
end
|
413
449
|
end
|
414
450
|
end
|
@@ -32,6 +32,7 @@ module Suspenders
|
|
32
32
|
invoke :configure_app
|
33
33
|
invoke :setup_stylesheets
|
34
34
|
invoke :install_bitters
|
35
|
+
invoke :install_refills
|
35
36
|
invoke :copy_miscellaneous_files
|
36
37
|
invoke :customize_error_pages
|
37
38
|
invoke :remove_routes_comment_lines
|
@@ -126,6 +127,7 @@ module Suspenders
|
|
126
127
|
build :configure_time_zone
|
127
128
|
build :configure_time_formats
|
128
129
|
build :configure_rack_timeout
|
130
|
+
build :configure_simple_form
|
129
131
|
build :disable_xml_params
|
130
132
|
build :fix_i18n_deprecation_warning
|
131
133
|
build :setup_default_rake_task
|
@@ -143,6 +145,11 @@ module Suspenders
|
|
143
145
|
build :install_bitters
|
144
146
|
end
|
145
147
|
|
148
|
+
def install_refills
|
149
|
+
say "Install Refills"
|
150
|
+
build :install_refills
|
151
|
+
end
|
152
|
+
|
146
153
|
def setup_git
|
147
154
|
if !options[:skip_git]
|
148
155
|
say 'Initializing git'
|
@@ -158,6 +165,7 @@ module Suspenders
|
|
158
165
|
build :set_heroku_remotes
|
159
166
|
build :set_heroku_rails_secrets
|
160
167
|
build :set_memory_management_variable
|
168
|
+
build :provide_deploy_script
|
161
169
|
end
|
162
170
|
end
|
163
171
|
|
data/lib/suspenders/version.rb
CHANGED
@@ -1,19 +1,29 @@
|
|
1
|
-
require
|
1
|
+
require "spec_helper"
|
2
2
|
|
3
|
-
feature
|
4
|
-
scenario
|
5
|
-
run_suspenders(
|
3
|
+
feature "Heroku" do
|
4
|
+
scenario "Suspend a project with --heroku=true" do
|
5
|
+
run_suspenders("--heroku=true")
|
6
6
|
|
7
|
-
expect(FakeHeroku).
|
8
|
-
|
9
|
-
expect(FakeHeroku).to have_created_app_for(
|
10
|
-
expect(FakeHeroku).to
|
11
|
-
expect(FakeHeroku).to have_configured_vars(
|
7
|
+
expect(FakeHeroku).
|
8
|
+
to have_gem_included(project_path, "rails_stdout_logging")
|
9
|
+
expect(FakeHeroku).to have_created_app_for("staging")
|
10
|
+
expect(FakeHeroku).to have_created_app_for("production")
|
11
|
+
expect(FakeHeroku).to have_configured_vars("staging", "SECRET_KEY_BASE")
|
12
|
+
expect(FakeHeroku).to have_configured_vars("production", "SECRET_KEY_BASE")
|
12
13
|
|
13
14
|
bin_setup = IO.read("#{project_path}/bin/setup")
|
14
15
|
app_name = SuspendersTestHelpers::APP_NAME
|
15
16
|
|
16
17
|
expect(bin_setup).to include("heroku join --app #{app_name}-staging")
|
17
18
|
expect(bin_setup).to include("heroku join --app #{app_name}-production")
|
19
|
+
|
20
|
+
bin_deploy = IO.read("#{project_path}/bin/deploy")
|
21
|
+
|
22
|
+
expect(bin_deploy).to include("heroku run rake db:migrate")
|
23
|
+
|
24
|
+
readme = IO.read("#{project_path}/README.md")
|
25
|
+
|
26
|
+
expect(readme).to include("./bin/deploy staging")
|
27
|
+
expect(readme).to include("./bin/deploy production")
|
18
28
|
end
|
19
29
|
end
|
@@ -111,6 +111,12 @@ feature 'Suspend a new project with default configuration' do
|
|
111
111
|
expect(locales_en_file).to match(/application: #{app_name.humanize}/)
|
112
112
|
end
|
113
113
|
|
114
|
+
scenario "config simple_form" do
|
115
|
+
run_suspenders
|
116
|
+
|
117
|
+
expect(File).to exist("#{project_path}/config/initializers/simple_form.rb")
|
118
|
+
end
|
119
|
+
|
114
120
|
def analytics_partial
|
115
121
|
IO.read("#{project_path}/app/views/application/_analytics.html.erb")
|
116
122
|
end
|
data/templates/Gemfile.erb
CHANGED
@@ -4,7 +4,7 @@ ruby "<%= Suspenders::RUBY_VERSION %>"
|
|
4
4
|
|
5
5
|
gem "airbrake"
|
6
6
|
gem "bourbon", "~> 3.2.1"
|
7
|
-
gem "coffee-rails"
|
7
|
+
gem "coffee-rails", "~> 4.1.0"
|
8
8
|
gem "delayed_job_active_record"
|
9
9
|
gem "email_validator"
|
10
10
|
gem "flutie"
|
@@ -18,20 +18,22 @@ gem "pg"
|
|
18
18
|
gem "rack-timeout"
|
19
19
|
gem "rails", "<%= Suspenders::RAILS_VERSION %>"
|
20
20
|
gem "recipient_interceptor"
|
21
|
-
gem "
|
21
|
+
gem "refills"
|
22
|
+
gem "sass-rails", "~> 5.0"
|
22
23
|
gem "simple_form"
|
23
24
|
gem "title"
|
24
25
|
gem "uglifier"
|
25
26
|
gem "unicorn"
|
26
27
|
|
27
28
|
group :development do
|
28
|
-
gem "bundler-audit"
|
29
29
|
gem "spring"
|
30
30
|
gem "spring-commands-rspec"
|
31
|
+
gem "web-console"
|
31
32
|
end
|
32
33
|
|
33
34
|
group :development, :test do
|
34
35
|
gem "awesome_print"
|
36
|
+
gem "bundler-audit", require: false
|
35
37
|
gem "byebug"
|
36
38
|
gem "dotenv-rails"
|
37
39
|
gem "factory_girl_rails"
|
data/templates/README.md.erb
CHANGED
@@ -1,8 +1,6 @@
|
|
1
|
-
<%= app_name.humanize %>
|
2
|
-
<%= '=' * app_name.humanize.length %>
|
1
|
+
# <%= app_name.humanize %>
|
3
2
|
|
4
|
-
Getting Started
|
5
|
-
---------------
|
3
|
+
## Getting Started
|
6
4
|
|
7
5
|
After you have cloned this repo, run this setup script to set up your machine
|
8
6
|
with the necessary dependencies to run and test this app:
|
@@ -24,8 +22,7 @@ is [purposefully excluded from the project's `Gemfile`][exclude].
|
|
24
22
|
[foreman]: https://github.com/ddollar/foreman
|
25
23
|
[exclude]: https://github.com/ddollar/foreman/pull/437#issuecomment-41110407
|
26
24
|
|
27
|
-
Guidelines
|
28
|
-
----------
|
25
|
+
## Guidelines
|
29
26
|
|
30
27
|
Use the following guides for getting things done, programming well, and
|
31
28
|
programming in style.
|
data/templates/_flashes.html.erb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
-
@charset
|
1
|
+
@charset "utf-8";
|
2
2
|
|
3
|
-
@import
|
4
|
-
@import
|
5
|
-
@import
|
6
|
-
@import
|
7
|
-
@import
|
3
|
+
@import "normalize-rails";
|
4
|
+
@import "bourbon";
|
5
|
+
@import "base/grid-settings";
|
6
|
+
@import "neat";
|
7
|
+
@import "base/base";
|
8
|
+
@import "refills/flashes";
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
|
3
|
+
# Run this script to deploy the app to Heroku.
|
4
|
+
|
5
|
+
set -e
|
6
|
+
|
7
|
+
branch="$(git symbolic-ref HEAD --short)"
|
8
|
+
target="${1:-staging}"
|
9
|
+
|
10
|
+
git push "$target" "$branch:master"
|
11
|
+
heroku run rake db:migrate --remote "$target"
|
12
|
+
heroku restart --remote "$target"
|
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.21.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoughtbot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bitters
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.
|
47
|
+
version: 4.2.0
|
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: 4.
|
54
|
+
version: 4.2.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: aruba
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -164,6 +164,7 @@ files:
|
|
164
164
|
- templates/action_mailer.rb
|
165
165
|
- templates/application.css.scss
|
166
166
|
- templates/background_jobs_rspec.rb
|
167
|
+
- templates/bin_deploy
|
167
168
|
- templates/bin_setup.erb
|
168
169
|
- templates/bundler_audit.rake
|
169
170
|
- templates/config_i18n_tasks.yml
|
@@ -201,7 +202,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
201
202
|
requirements:
|
202
203
|
- - ">="
|
203
204
|
- !ruby/object:Gem::Version
|
204
|
-
version: 2.
|
205
|
+
version: 2.2.0
|
205
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
207
|
requirements:
|
207
208
|
- - ">="
|
@@ -209,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
210
|
version: '0'
|
210
211
|
requirements: []
|
211
212
|
rubyforge_project:
|
212
|
-
rubygems_version: 2.4.
|
213
|
+
rubygems_version: 2.4.5
|
213
214
|
signing_key:
|
214
215
|
specification_version: 4
|
215
216
|
summary: Generate a Rails app using thoughtbot's best practices.
|