welaika-suspenders 2.3.0 → 2.4.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 +58 -36
- data/NEWS.md +9 -0
- data/README.md +3 -1
- data/lib/suspenders/app_builder.rb +39 -15
- data/lib/suspenders/generators/app_generator.rb +1 -0
- data/lib/suspenders/version.rb +2 -2
- data/spec/features/heroku_spec.rb +12 -11
- data/spec/features/new_project_spec.rb +6 -0
- data/templates/Gemfile.erb +4 -3
- data/templates/application.css.sass +7 -0
- metadata +7 -7
- data/templates/application.css.scss +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e515a2ae4181d07d0c7d6f8a70b1a7a7b12ce861
|
4
|
+
data.tar.gz: 4b194d1cf51111a88bc5cc5554a2a621dc02639f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96603f5bfc50773d45f19b01a098dfaab7e23d984bbf51a0371c735e1f2bf5bb7cb50360fed0f649c7177a33c9ad26a07f2c264c5d709d449aca8b9fc46ca759
|
7
|
+
data.tar.gz: bba6c405841e065de805c923ec72fcfc5a5de1acb3b8ea62a3e5b60392023aff104577f19b660175de0ba5b5ee8eb7dbe69da698f4ee68d6679c4a659f0e44cc
|
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
|
-
welaika-suspenders (2.
|
4
|
+
welaika-suspenders (2.4.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,34 +76,47 @@ 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
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
122
|
rake (10.4.2)
|
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
@@ -3,7 +3,6 @@
|
|
3
3
|
This is a [suspenders](https://github.com/thoughtbot/suspenders) fork in use at [weLaika](http://dev.welaika.com).
|
4
4
|
Big thanks to [thoughtbot](http://thoughtbot.com/community) for providing such a great starting point.
|
5
5
|
|
6
|
-
|
7
6
|
## Installation
|
8
7
|
|
9
8
|
First install the suspenders gem:
|
@@ -52,3 +51,6 @@ List of changes we made since [this is commit](https://github.com/thoughtbot/sus
|
|
52
51
|
- use pry-byebug instead of byebug
|
53
52
|
- use CDATA wrapper for javascript
|
54
53
|
- create a .ruby-gemset file with app name
|
54
|
+
- create common folders like `app/queries`, `app/services`, etc.
|
55
|
+
- use `application.css.sass` instead of `application.css.scss`
|
56
|
+
- do not use import refills/flashes
|
@@ -32,8 +32,8 @@ module Suspenders
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def provide_setup_script
|
35
|
-
template
|
36
|
-
run
|
35
|
+
template "bin_setup.erb", "bin/setup", port_number: port, force: true
|
36
|
+
run "chmod a+x bin/setup"
|
37
37
|
end
|
38
38
|
|
39
39
|
def provide_dev_prime_task
|
@@ -89,22 +89,27 @@ module Suspenders
|
|
89
89
|
config.middleware.use Rack::Deflater
|
90
90
|
RUBY
|
91
91
|
|
92
|
-
inject_into_file
|
93
|
-
|
92
|
+
inject_into_file(
|
93
|
+
"config/environments/production.rb",
|
94
|
+
config,
|
95
|
+
after: serve_static_files_line
|
96
|
+
)
|
94
97
|
end
|
95
98
|
|
96
99
|
def setup_asset_host
|
97
100
|
replace_in_file 'config/environments/production.rb',
|
98
|
-
|
101
|
+
"# config.action_controller.asset_host = 'http://assets.example.com'",
|
99
102
|
'config.action_controller.asset_host = ENV.fetch("ASSET_HOST")'
|
100
103
|
|
101
104
|
replace_in_file 'config/initializers/assets.rb',
|
102
105
|
"config.assets.version = '1.0'",
|
103
106
|
'config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")'
|
104
107
|
|
105
|
-
|
106
|
-
|
107
|
-
'config.static_cache_control = "public, max-age=#{1.year.to_i}"'
|
108
|
+
inject_into_file(
|
109
|
+
"config/environments/production.rb",
|
110
|
+
'config.static_cache_control = "public, max-age=#{1.year.to_i}"',
|
111
|
+
after: serve_static_files_line
|
112
|
+
)
|
108
113
|
end
|
109
114
|
|
110
115
|
def setup_staging_environment
|
@@ -173,8 +178,11 @@ end
|
|
173
178
|
end
|
174
179
|
|
175
180
|
def setup_heroku_specific_gems
|
176
|
-
inject_into_file
|
181
|
+
inject_into_file(
|
182
|
+
"Gemfile",
|
183
|
+
%{\n\s\sgem "rails_stdout_logging"},
|
177
184
|
after: /group :staging, :production do/
|
185
|
+
)
|
178
186
|
end
|
179
187
|
|
180
188
|
def enable_database_cleaner
|
@@ -241,8 +249,12 @@ end
|
|
241
249
|
copy_file 'slim.rb', 'config/initializers/slim.rb'
|
242
250
|
end
|
243
251
|
|
252
|
+
def configure_simple_form
|
253
|
+
bundle_command "exec rails generate simple_form:install"
|
254
|
+
end
|
255
|
+
|
244
256
|
def configure_action_mailer
|
245
|
-
action_mailer_host 'development', "localhost:#{
|
257
|
+
action_mailer_host 'development', "localhost:#{port}"
|
246
258
|
action_mailer_host 'test', 'www.example.com'
|
247
259
|
action_mailer_host 'staging', "staging.#{app_name}.com"
|
248
260
|
action_mailer_host 'production', "#{app_name}.com"
|
@@ -279,8 +291,8 @@ end
|
|
279
291
|
|
280
292
|
def setup_stylesheets
|
281
293
|
remove_file 'app/assets/stylesheets/application.css'
|
282
|
-
copy_file 'application.css.
|
283
|
-
'app/assets/stylesheets/application.css.
|
294
|
+
copy_file 'application.css.sass',
|
295
|
+
'app/assets/stylesheets/application.css.sass'
|
284
296
|
end
|
285
297
|
|
286
298
|
def install_bitters
|
@@ -291,10 +303,18 @@ end
|
|
291
303
|
remove_file '.gitignore'
|
292
304
|
copy_file 'suspenders_gitignore', '.gitignore'
|
293
305
|
[
|
306
|
+
'app/forms',
|
307
|
+
'app/presenters',
|
308
|
+
'app/queries',
|
309
|
+
'app/services',
|
294
310
|
'app/views/pages',
|
295
|
-
'spec/lib',
|
296
311
|
'spec/controllers',
|
312
|
+
'spec/forms',
|
297
313
|
'spec/helpers',
|
314
|
+
'spec/lib',
|
315
|
+
'spec/presenters',
|
316
|
+
'spec/queries',
|
317
|
+
'spec/services',
|
298
318
|
'spec/support/matchers',
|
299
319
|
'spec/support/mixins',
|
300
320
|
'spec/support/shared_examples'
|
@@ -447,8 +467,12 @@ end
|
|
447
467
|
SecureRandom.hex(64)
|
448
468
|
end
|
449
469
|
|
450
|
-
def
|
451
|
-
@
|
470
|
+
def port
|
471
|
+
@port ||= [3000, 4000, 5000, 7000, 8000, 9000].sample
|
472
|
+
end
|
473
|
+
|
474
|
+
def serve_static_files_line
|
475
|
+
"config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?\n"
|
452
476
|
end
|
453
477
|
end
|
454
478
|
end
|
data/lib/suspenders/version.rb
CHANGED
@@ -1,14 +1,15 @@
|
|
1
|
-
require
|
2
|
-
|
3
|
-
feature
|
4
|
-
scenario
|
5
|
-
run_suspenders(
|
6
|
-
|
7
|
-
expect(FakeHeroku).
|
8
|
-
|
9
|
-
expect(FakeHeroku).to have_created_app_for(
|
10
|
-
expect(FakeHeroku).to
|
11
|
-
expect(FakeHeroku).to have_configured_vars(
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
feature "Heroku" do
|
4
|
+
scenario "Suspend a project with --heroku=true" do
|
5
|
+
run_suspenders("--heroku=true")
|
6
|
+
|
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
|
@@ -120,4 +120,10 @@ feature 'Suspend a new project with default configuration' do
|
|
120
120
|
expect(locales_en_file).to match(/application: #{app_name.humanize}/)
|
121
121
|
end
|
122
122
|
|
123
|
+
scenario "config simple_form" do
|
124
|
+
run_suspenders
|
125
|
+
|
126
|
+
expect(File).to exist("#{project_path}/config/initializers/simple_form.rb")
|
127
|
+
end
|
128
|
+
|
123
129
|
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"
|
@@ -19,7 +19,7 @@ gem "rack-timeout"
|
|
19
19
|
gem "rails", "<%= Suspenders::RAILS_VERSION %>"
|
20
20
|
gem "rails-i18n"
|
21
21
|
gem "recipient_interceptor"
|
22
|
-
gem "sass-rails", "~>
|
22
|
+
gem "sass-rails", "~> 5.0"
|
23
23
|
gem "slim-rails"
|
24
24
|
gem "simple_form"
|
25
25
|
gem "title"
|
@@ -28,13 +28,14 @@ gem "unicorn"
|
|
28
28
|
|
29
29
|
group :development do
|
30
30
|
gem "letter_opener"
|
31
|
-
gem "bundler-audit"
|
32
31
|
gem "spring"
|
33
32
|
gem "spring-commands-rspec"
|
33
|
+
gem "web-console"
|
34
34
|
end
|
35
35
|
|
36
36
|
group :development, :test do
|
37
37
|
gem "awesome_print"
|
38
|
+
gem "bundler-audit", require: false
|
38
39
|
gem "dotenv-rails"
|
39
40
|
gem "faker"
|
40
41
|
gem "factory_girl_rails"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: welaika-suspenders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thoughtbot
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-01-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bitters
|
@@ -45,14 +45,14 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - '='
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 4.
|
48
|
+
version: 4.2.0
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - '='
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 4.
|
55
|
+
version: 4.2.0
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: aruba
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -160,7 +160,7 @@ files:
|
|
160
160
|
- templates/_flashes.html.slim
|
161
161
|
- templates/_javascript.html.slim
|
162
162
|
- templates/action_mailer.rb
|
163
|
-
- templates/application.css.
|
163
|
+
- templates/application.css.sass
|
164
164
|
- templates/background_jobs_rspec.rb
|
165
165
|
- templates/bin_deploy
|
166
166
|
- templates/bin_setup.erb
|
@@ -201,7 +201,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
201
201
|
requirements:
|
202
202
|
- - ">="
|
203
203
|
- !ruby/object:Gem::Version
|
204
|
-
version: 2.
|
204
|
+
version: 2.2.0
|
205
205
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
206
206
|
requirements:
|
207
207
|
- - ">="
|
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
209
|
version: '0'
|
210
210
|
requirements: []
|
211
211
|
rubyforge_project:
|
212
|
-
rubygems_version: 2.4.
|
212
|
+
rubygems_version: 2.4.5
|
213
213
|
signing_key:
|
214
214
|
specification_version: 4
|
215
215
|
summary: Generate a Rails app using thoughtbot's best practices.
|