suspenders 1.14.0 → 1.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +29 -29
- data/NEWS.md +10 -0
- data/README.md +4 -1
- data/lib/suspenders/app_builder.rb +8 -8
- data/lib/suspenders/version.rb +2 -2
- data/spec/features/new_project_spec.rb +5 -5
- data/templates/Gemfile.erb +37 -36
- data/templates/_analytics.html.erb +2 -2
- data/templates/_javascript.html.erb +1 -1
- data/templates/bin_setup +0 -8
- data/templates/config_locales_en.yml +10 -5
- data/templates/development_seeds.rb +4 -4
- data/templates/errors.rb +22 -16
- data/templates/newrelic.yml.erb +4 -4
- data/templates/rack_timeout.rb +1 -1
- data/templates/secrets.yml +1 -1
- data/templates/smtp.rb +5 -5
- data/templates/spec_helper.rb +7 -8
- data/templates/staging.rb +2 -2
- data/templates/suspenders_layout.html.erb.erb +3 -3
- data/templates/travis.yml.erb +1 -8
- data/templates/unicorn.rb +9 -9
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 27340b81e493ade21202e7a1b247dd548e61c453
|
4
|
+
data.tar.gz: 8cc95ce37937ae93471c04be89a1aac784bd91a0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35f830ebbfdfa1bb83feb5f7a02aa13f540134efaee0e5226b277dedb1660a425f780e4c221a41e9453a387c28e587ced29daab641bc3d155b25054c943574a5
|
7
|
+
data.tar.gz: f4d537d591b6e01d3d4c2d015fd1128ca4f8369bf0116ca51b2ab06ed4724f4bd50fea6960af64ebca7d82f229ce49ab5fc7e1d2ec7c19e7de3783d3b8c312d1
|
data/Gemfile.lock
CHANGED
@@ -1,35 +1,35 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
suspenders (1.
|
4
|
+
suspenders (1.15.0)
|
5
5
|
bitters
|
6
6
|
bundler (~> 1.3)
|
7
|
-
rails (= 4.1.
|
7
|
+
rails (= 4.1.4)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
actionmailer (4.1.
|
13
|
-
actionpack (= 4.1.
|
14
|
-
actionview (= 4.1.
|
12
|
+
actionmailer (4.1.4)
|
13
|
+
actionpack (= 4.1.4)
|
14
|
+
actionview (= 4.1.4)
|
15
15
|
mail (~> 2.5.4)
|
16
|
-
actionpack (4.1.
|
17
|
-
actionview (= 4.1.
|
18
|
-
activesupport (= 4.1.
|
16
|
+
actionpack (4.1.4)
|
17
|
+
actionview (= 4.1.4)
|
18
|
+
activesupport (= 4.1.4)
|
19
19
|
rack (~> 1.5.2)
|
20
20
|
rack-test (~> 0.6.2)
|
21
|
-
actionview (4.1.
|
22
|
-
activesupport (= 4.1.
|
21
|
+
actionview (4.1.4)
|
22
|
+
activesupport (= 4.1.4)
|
23
23
|
builder (~> 3.1)
|
24
24
|
erubis (~> 2.7.0)
|
25
|
-
activemodel (4.1.
|
26
|
-
activesupport (= 4.1.
|
25
|
+
activemodel (4.1.4)
|
26
|
+
activesupport (= 4.1.4)
|
27
27
|
builder (~> 3.1)
|
28
|
-
activerecord (4.1.
|
29
|
-
activemodel (= 4.1.
|
30
|
-
activesupport (= 4.1.
|
28
|
+
activerecord (4.1.4)
|
29
|
+
activemodel (= 4.1.4)
|
30
|
+
activesupport (= 4.1.4)
|
31
31
|
arel (~> 5.0.0)
|
32
|
-
activesupport (4.1.
|
32
|
+
activesupport (4.1.4)
|
33
33
|
i18n (~> 0.6, >= 0.6.9)
|
34
34
|
json (~> 1.7, >= 1.7.7)
|
35
35
|
minitest (~> 5.1)
|
@@ -75,7 +75,7 @@ GEM
|
|
75
75
|
treetop (~> 1.4.8)
|
76
76
|
mime-types (1.25.1)
|
77
77
|
mini_portile (0.6.0)
|
78
|
-
minitest (5.
|
78
|
+
minitest (5.4.0)
|
79
79
|
multi_json (1.10.1)
|
80
80
|
multi_test (0.1.1)
|
81
81
|
nokogiri (1.6.2.1)
|
@@ -84,19 +84,19 @@ GEM
|
|
84
84
|
rack (1.5.2)
|
85
85
|
rack-test (0.6.2)
|
86
86
|
rack (>= 1.0)
|
87
|
-
rails (4.1.
|
88
|
-
actionmailer (= 4.1.
|
89
|
-
actionpack (= 4.1.
|
90
|
-
actionview (= 4.1.
|
91
|
-
activemodel (= 4.1.
|
92
|
-
activerecord (= 4.1.
|
93
|
-
activesupport (= 4.1.
|
87
|
+
rails (4.1.4)
|
88
|
+
actionmailer (= 4.1.4)
|
89
|
+
actionpack (= 4.1.4)
|
90
|
+
actionview (= 4.1.4)
|
91
|
+
activemodel (= 4.1.4)
|
92
|
+
activerecord (= 4.1.4)
|
93
|
+
activesupport (= 4.1.4)
|
94
94
|
bundler (>= 1.3.0, < 2.0)
|
95
|
-
railties (= 4.1.
|
95
|
+
railties (= 4.1.4)
|
96
96
|
sprockets-rails (~> 2.0)
|
97
|
-
railties (4.1.
|
98
|
-
actionpack (= 4.1.
|
99
|
-
activesupport (= 4.1.
|
97
|
+
railties (4.1.4)
|
98
|
+
actionpack (= 4.1.4)
|
99
|
+
activesupport (= 4.1.4)
|
100
100
|
rake (>= 0.8.7)
|
101
101
|
thor (>= 0.18.1, < 2.0)
|
102
102
|
rake (10.3.2)
|
@@ -108,7 +108,7 @@ GEM
|
|
108
108
|
rspec-expectations (2.99.0)
|
109
109
|
diff-lcs (>= 1.1.3, < 2.0)
|
110
110
|
rspec-mocks (2.99.0)
|
111
|
-
sass (3.3.
|
111
|
+
sass (3.3.9)
|
112
112
|
sprockets (2.12.1)
|
113
113
|
hike (~> 1.2)
|
114
114
|
multi_json (~> 1.0)
|
data/NEWS.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
1.15.0 (July 9, 2014)
|
2
|
+
|
3
|
+
* Use Rails 4.1.4.
|
4
|
+
* Use latest thoughtbot style guidelines in generated code so that
|
5
|
+
https://houndci.com will approve the initial commit.
|
6
|
+
* Remove Campfire in favor of Slack.
|
7
|
+
* Remove Pow in bin/setup.
|
8
|
+
* Upgrade Capybara Webkit to support Capybara 2.3 API.
|
9
|
+
* Add byebug.
|
10
|
+
|
1
11
|
1.14.0 (June 11, 2014)
|
2
12
|
|
3
13
|
* Set up Bitters during Suspenders setup. http://bitters.bourbon.io/
|
data/README.md
CHANGED
@@ -61,7 +61,10 @@ And gems only for staging and production like:
|
|
61
61
|
And development gems like:
|
62
62
|
|
63
63
|
* [Dotenv](https://github.com/bkeepers/dotenv) for loading environment variables
|
64
|
-
* [Pry Rails](https://github.com/rweng/pry-rails) for
|
64
|
+
* [Pry Rails](https://github.com/rweng/pry-rails) for interactively exploring
|
65
|
+
objects
|
66
|
+
* [ByeBug](https://github.com/deivid-rodriguez/byebug) for interactively
|
67
|
+
debugging behavior
|
65
68
|
* [Spring](https://github.com/rails/spring) for fast Rails actions via
|
66
69
|
pre-loading
|
67
70
|
|
@@ -63,7 +63,7 @@ module Suspenders
|
|
63
63
|
copy_file 'smtp.rb', 'config/smtp.rb'
|
64
64
|
|
65
65
|
prepend_file 'config/environments/production.rb',
|
66
|
-
|
66
|
+
%{require Rails.root.join("config/smtp")\n}
|
67
67
|
|
68
68
|
config = <<-RUBY
|
69
69
|
|
@@ -89,11 +89,11 @@ module Suspenders
|
|
89
89
|
def setup_asset_host
|
90
90
|
replace_in_file 'config/environments/production.rb',
|
91
91
|
'# config.action_controller.asset_host = "http://assets.example.com"',
|
92
|
-
|
92
|
+
'config.action_controller.asset_host = ENV.fetch("ASSET_HOST")'
|
93
93
|
|
94
|
-
replace_in_file 'config/
|
94
|
+
replace_in_file 'config/initializers/assets.rb',
|
95
95
|
"config.assets.version = '1.0'",
|
96
|
-
|
96
|
+
'config.assets.version = (ENV["ASSETS_VERSION"] || "1.0")'
|
97
97
|
|
98
98
|
replace_in_file 'config/environments/production.rb',
|
99
99
|
'config.serve_static_assets = false',
|
@@ -327,9 +327,9 @@ fi
|
|
327
327
|
|
328
328
|
def customize_error_pages
|
329
329
|
meta_tags =<<-EOS
|
330
|
-
<meta charset=
|
331
|
-
<meta name=
|
332
|
-
<meta name=
|
330
|
+
<meta charset="utf-8" />
|
331
|
+
<meta name="ROBOTS" content="NOODP" />
|
332
|
+
<meta name="viewport" content="initial-scale=1" />
|
333
333
|
EOS
|
334
334
|
|
335
335
|
%w(500 404 422).each do |page|
|
@@ -350,7 +350,7 @@ fi
|
|
350
350
|
|
351
351
|
def setup_default_rake_task
|
352
352
|
append_file 'Rakefile' do
|
353
|
-
"task(:default).clear\ntask :
|
353
|
+
"task(:default).clear\ntask default: [:spec]\n"
|
354
354
|
end
|
355
355
|
end
|
356
356
|
|
data/lib/suspenders/version.rb
CHANGED
@@ -17,7 +17,7 @@ feature 'Suspend a new project with default configuration' do
|
|
17
17
|
staging_file = IO.read("#{project_path}/config/environments/staging.rb")
|
18
18
|
config_stub = "Rails.application.configure do"
|
19
19
|
|
20
|
-
expect(staging_file).to match(/^require_relative
|
20
|
+
expect(staging_file).to match(/^require_relative "production"/)
|
21
21
|
expect(staging_file).to match(/#{config_stub}/), staging_file
|
22
22
|
end
|
23
23
|
|
@@ -34,7 +34,7 @@ feature 'Suspend a new project with default configuration' do
|
|
34
34
|
|
35
35
|
secrets_file = IO.read("#{project_path}/config/secrets.yml")
|
36
36
|
|
37
|
-
expect(secrets_file).to match(/secret_key_base: <%= ENV\[
|
37
|
+
expect(secrets_file).to match(/secret_key_base: <%= ENV\["SECRET_KEY_BASE"\] %>/)
|
38
38
|
end
|
39
39
|
|
40
40
|
scenario 'action mailer support file is added' do
|
@@ -49,7 +49,7 @@ feature 'Suspend a new project with default configuration' do
|
|
49
49
|
newrelic_file = IO.read("#{project_path}/config/newrelic.yml")
|
50
50
|
|
51
51
|
expect(newrelic_file).to match(
|
52
|
-
/license_key:
|
52
|
+
/license_key: "<%= ENV\["NEW_RELIC_LICENSE_KEY"\] %>"/
|
53
53
|
)
|
54
54
|
end
|
55
55
|
|
@@ -57,9 +57,9 @@ feature 'Suspend a new project with default configuration' do
|
|
57
57
|
run_suspenders
|
58
58
|
|
59
59
|
expect(analytics_partial).
|
60
|
-
to include(
|
60
|
+
to include(%{<% if ENV["SEGMENT_IO_KEY"] %>})
|
61
61
|
expect(analytics_partial).
|
62
|
-
to include(
|
62
|
+
to include(%{window.analytics.load("<%= ENV["SEGMENT_IO_KEY"] %>");})
|
63
63
|
end
|
64
64
|
|
65
65
|
def analytics_partial
|
data/templates/Gemfile.erb
CHANGED
@@ -1,50 +1,51 @@
|
|
1
|
-
source
|
1
|
+
source "https://rubygems.org"
|
2
2
|
|
3
|
-
ruby
|
3
|
+
ruby "<%= Suspenders::RUBY_VERSION %>"
|
4
4
|
|
5
|
-
gem
|
6
|
-
gem
|
7
|
-
gem
|
8
|
-
gem
|
9
|
-
gem
|
10
|
-
gem
|
11
|
-
gem
|
12
|
-
gem
|
13
|
-
gem
|
14
|
-
gem
|
15
|
-
gem
|
16
|
-
gem
|
17
|
-
gem
|
18
|
-
gem
|
19
|
-
gem
|
20
|
-
gem
|
21
|
-
gem
|
22
|
-
gem
|
5
|
+
gem "airbrake"
|
6
|
+
gem "bourbon", "~> 3.2.1"
|
7
|
+
gem "coffee-rails"
|
8
|
+
gem "delayed_job_active_record"
|
9
|
+
gem "email_validator"
|
10
|
+
gem "flutie"
|
11
|
+
gem "high_voltage"
|
12
|
+
gem "jquery-rails"
|
13
|
+
gem "neat", "~> 1.5.1"
|
14
|
+
gem "pg"
|
15
|
+
gem "rack-timeout"
|
16
|
+
gem "rails", "<%= Suspenders::RAILS_VERSION %>"
|
17
|
+
gem "recipient_interceptor"
|
18
|
+
gem "sass-rails", "~> 4.0.3"
|
19
|
+
gem "simple_form"
|
20
|
+
gem "title"
|
21
|
+
gem "uglifier"
|
22
|
+
gem "unicorn"
|
23
23
|
|
24
24
|
group :development do
|
25
|
-
gem
|
26
|
-
gem
|
27
|
-
gem
|
25
|
+
gem "foreman"
|
26
|
+
gem "spring"
|
27
|
+
gem "spring-commands-rspec"
|
28
28
|
end
|
29
29
|
|
30
30
|
group :development, :test do
|
31
|
-
gem
|
32
|
-
gem
|
33
|
-
gem
|
34
|
-
gem
|
35
|
-
gem
|
31
|
+
gem "awesome_print"
|
32
|
+
gem "byebug"
|
33
|
+
gem "dotenv-rails"
|
34
|
+
gem "factory_girl_rails"
|
35
|
+
gem "pry-rails"
|
36
|
+
gem "rspec-rails", "~> 2.14.0"
|
36
37
|
end
|
37
38
|
|
38
39
|
group :test do
|
39
|
-
gem
|
40
|
-
gem
|
41
|
-
gem
|
42
|
-
gem
|
43
|
-
gem
|
44
|
-
gem
|
45
|
-
gem
|
40
|
+
gem "capybara-webkit", ">= 1.2.0"
|
41
|
+
gem "database_cleaner"
|
42
|
+
gem "formulaic"
|
43
|
+
gem "launchy"
|
44
|
+
gem "shoulda-matchers", require: false
|
45
|
+
gem "timecop"
|
46
|
+
gem "webmock"
|
46
47
|
end
|
47
48
|
|
48
49
|
group :staging, :production do
|
49
|
-
gem
|
50
|
+
gem "newrelic_rpm", ">= 3.7.3"
|
50
51
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
<% if ENV[
|
1
|
+
<% if ENV["SEGMENT_IO_KEY"] %>
|
2
2
|
<script type="text/javascript">
|
3
3
|
window.analytics=window.analytics||[],window.analytics.methods=["identify","group","track","page","pageview","alias","ready","on","once","off","trackLink","trackForm","trackClick","trackSubmit"],window.analytics.factory=function(t){return function(){var a=Array.prototype.slice.call(arguments);return a.unshift(t),window.analytics.push(a),window.analytics}};for(var i=0;i<window.analytics.methods.length;i++){var key=window.analytics.methods[i];window.analytics[key]=window.analytics.factory(key)}window.analytics.load=function(t){if(!document.getElementById("analytics-js")){var a=document.createElement("script");a.type="text/javascript",a.id="analytics-js",a.async=!0,a.src=("https:"===document.location.protocol?"https://":"http://")+"cdn.segment.io/analytics.js/v1/"+t+"/analytics.min.js";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(a,n)}},window.analytics.SNIPPET_VERSION="2.0.9",
|
4
|
-
window.analytics.load(
|
4
|
+
window.analytics.load("<%= ENV["SEGMENT_IO_KEY"] %>");
|
5
5
|
window.analytics.page();
|
6
6
|
</script>
|
7
7
|
<% end %>
|
data/templates/bin_setup
CHANGED
@@ -22,11 +22,3 @@ mkdir -p .git/safe
|
|
22
22
|
|
23
23
|
# Pick a port for Foreman
|
24
24
|
echo "port: 7000" > .foreman
|
25
|
-
|
26
|
-
# Set up DNS via Pow
|
27
|
-
if [ -d ~/.pow ]
|
28
|
-
then
|
29
|
-
echo 7000 > ~/.pow/`basename $PWD`
|
30
|
-
else
|
31
|
-
echo "Pow not set up but the team uses it for this project. Setup: http://goo.gl/RaDPO"
|
32
|
-
fi
|
@@ -1,11 +1,16 @@
|
|
1
1
|
en:
|
2
2
|
date:
|
3
3
|
formats:
|
4
|
-
default:
|
5
|
-
|
4
|
+
default:
|
5
|
+
"%m/%d/%Y"
|
6
|
+
with_weekday:
|
7
|
+
"%a %m/%d/%y"
|
6
8
|
|
7
9
|
time:
|
8
10
|
formats:
|
9
|
-
default:
|
10
|
-
|
11
|
-
|
11
|
+
default:
|
12
|
+
"%a, %b %-d, %Y at %r"
|
13
|
+
date:
|
14
|
+
"%b %-d, %Y"
|
15
|
+
short:
|
16
|
+
"%B %d"
|
@@ -1,13 +1,13 @@
|
|
1
1
|
if Rails.env.development?
|
2
|
-
require
|
2
|
+
require "factory_girl"
|
3
3
|
|
4
4
|
namespace :dev do
|
5
|
-
desc
|
6
|
-
task prime:
|
5
|
+
desc "Seed data for development environment"
|
6
|
+
task prime: "db:setup" do
|
7
7
|
FactoryGirl.find_definitions
|
8
8
|
include FactoryGirl::Syntax::Methods
|
9
9
|
|
10
|
-
# create(:user, email:
|
10
|
+
# create(:user, email: "user@example.com", password: "password")
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
data/templates/errors.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
require
|
2
|
-
require
|
1
|
+
require "net/http"
|
2
|
+
require "net/smtp"
|
3
3
|
|
4
4
|
# Example:
|
5
5
|
# begin
|
@@ -8,21 +8,27 @@ require 'net/smtp'
|
|
8
8
|
# notify_hoptoad error
|
9
9
|
# end
|
10
10
|
|
11
|
-
HTTP_ERRORS = [
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
11
|
+
HTTP_ERRORS = [
|
12
|
+
EOFError,
|
13
|
+
Errno::ECONNRESET,
|
14
|
+
Errno::EINVAL,
|
15
|
+
Net::HTTPBadResponse,
|
16
|
+
Net::HTTPHeaderSyntaxError,
|
17
|
+
Net::ProtocolError,
|
18
|
+
Timeout::Error
|
19
|
+
]
|
18
20
|
|
19
|
-
SMTP_SERVER_ERRORS = [
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
SMTP_SERVER_ERRORS = [
|
22
|
+
IOError,
|
23
|
+
Net::SMTPAuthenticationError,
|
24
|
+
Net::SMTPServerBusy,
|
25
|
+
Net::SMTPUnknownError,
|
26
|
+
TimeoutError
|
27
|
+
]
|
24
28
|
|
25
|
-
SMTP_CLIENT_ERRORS = [
|
26
|
-
|
29
|
+
SMTP_CLIENT_ERRORS = [
|
30
|
+
Net::SMTPFatalError,
|
31
|
+
Net::SMTPSyntaxError
|
32
|
+
]
|
27
33
|
|
28
34
|
SMTP_ERRORS = SMTP_SERVER_ERRORS + SMTP_CLIENT_ERRORS
|
data/templates/newrelic.yml.erb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
common: &default_settings
|
2
|
-
app_name:
|
2
|
+
app_name: "<%= app_name %>"
|
3
3
|
audit_log:
|
4
4
|
enabled: false
|
5
5
|
browser_monitoring:
|
@@ -9,8 +9,8 @@ common: &default_settings
|
|
9
9
|
error_collector:
|
10
10
|
capture_source: true
|
11
11
|
enabled: true
|
12
|
-
ignore_errors:
|
13
|
-
license_key:
|
12
|
+
ignore_errors: "ActionController::RoutingError,Sinatra::NotFound"
|
13
|
+
license_key: "<%%= ENV["NEW_RELIC_LICENSE_KEY"] %>"
|
14
14
|
log_level: info
|
15
15
|
monitor_mode: true
|
16
16
|
transaction_tracer:
|
@@ -30,5 +30,5 @@ production:
|
|
30
30
|
monitor_mode: true
|
31
31
|
staging:
|
32
32
|
<<: *default_settings
|
33
|
-
app_name:
|
33
|
+
app_name: "<%= app_name %> (Staging)"
|
34
34
|
monitor_mode: true
|
data/templates/rack_timeout.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
Rack::Timeout.timeout = (ENV[
|
1
|
+
Rack::Timeout.timeout = (ENV["TIMEOUT_IN_SECONDS"] || 5).to_i
|
data/templates/secrets.yml
CHANGED
data/templates/smtp.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
SMTP_SETTINGS = {
|
2
|
-
address: ENV.fetch(
|
2
|
+
address: ENV.fetch("SMTP_ADDRESS"), # example: "smtp.sendgrid.net"
|
3
3
|
authentication: :plain,
|
4
|
-
domain: ENV.fetch(
|
4
|
+
domain: ENV.fetch("SMTP_DOMAIN"), # example: "this-app.com"
|
5
5
|
enable_starttls_auto: true,
|
6
|
-
password: ENV.fetch(
|
7
|
-
port:
|
8
|
-
user_name: ENV.fetch(
|
6
|
+
password: ENV.fetch("SMTP_PASSWORD"),
|
7
|
+
port: "587",
|
8
|
+
user_name: ENV.fetch("SMTP_USERNAME")
|
9
9
|
}
|
data/templates/spec_helper.rb
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
ENV[
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
2
|
|
3
|
-
require File.expand_path(
|
3
|
+
require File.expand_path("../../config/environment", __FILE__)
|
4
4
|
|
5
|
-
require
|
6
|
-
require
|
7
|
-
require
|
5
|
+
require "rspec/rails"
|
6
|
+
require "shoulda/matchers"
|
7
|
+
require "webmock/rspec"
|
8
8
|
|
9
|
-
Dir[Rails.root.join(
|
9
|
+
Dir[Rails.root.join("spec/support/**/*.rb")].each { |file| require file }
|
10
10
|
|
11
11
|
module Features
|
12
12
|
# Extend this module in spec/support/features/*.rb
|
@@ -19,9 +19,8 @@ RSpec.configure do |config|
|
|
19
19
|
|
20
20
|
config.include Features, type: :feature
|
21
21
|
config.include Formulaic::Dsl, type: :feature
|
22
|
-
|
23
22
|
config.infer_base_class_for_anonymous_controllers = false
|
24
|
-
config.order =
|
23
|
+
config.order = "random"
|
25
24
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
26
25
|
config.use_transactional_fixtures = false
|
27
26
|
end
|
data/templates/staging.rb
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
<meta name="ROBOTS" content="NOODP" />
|
6
6
|
<meta name="viewport" content="initial-scale=1" />
|
7
7
|
<title><%%= title %></title>
|
8
|
-
<%%= stylesheet_link_tag :application, :
|
8
|
+
<%%= stylesheet_link_tag :application, media: "all" %>
|
9
9
|
<%%= csrf_meta_tags %>
|
10
10
|
</head>
|
11
11
|
<body class="<%%= body_class %>">
|
12
|
-
<%%= render
|
12
|
+
<%%= render "flashes" -%>
|
13
13
|
<%%= yield %>
|
14
|
-
<%%= render
|
14
|
+
<%%= render "javascript" %>
|
15
15
|
</body>
|
16
16
|
</html>
|
data/templates/travis.yml.erb
CHANGED
@@ -5,7 +5,7 @@ before_install:
|
|
5
5
|
- sh -e /etc/init.d/xvfb start
|
6
6
|
before_script:
|
7
7
|
- cp .sample.env .env
|
8
|
-
<% if options[:database] ==
|
8
|
+
<% if options[:database] == "postgresql" %>
|
9
9
|
- psql -c 'create database "<%= app_name %>_test";' -U postgres
|
10
10
|
<% end %>
|
11
11
|
branches:
|
@@ -16,13 +16,6 @@ cache:
|
|
16
16
|
language:
|
17
17
|
- ruby
|
18
18
|
notifications:
|
19
|
-
campfire:
|
20
|
-
on_failure:
|
21
|
-
- always
|
22
|
-
on_success:
|
23
|
-
- change
|
24
|
-
template:
|
25
|
-
- '(%{branch} - %{author}): %{message} - %{build_url}'
|
26
19
|
email:
|
27
20
|
- false
|
28
21
|
rvm:
|
data/templates/unicorn.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# https://devcenter.heroku.com/articles/rails-unicorn
|
2
2
|
|
3
|
-
worker_processes (ENV[
|
4
|
-
timeout (ENV[
|
3
|
+
worker_processes (ENV["WEB_CONCURRENCY"] || 3).to_i
|
4
|
+
timeout (ENV["WEB_TIMEOUT"] || 5).to_i
|
5
5
|
preload_app true
|
6
6
|
|
7
7
|
before_fork do |server, worker|
|
8
|
-
Signal.trap
|
9
|
-
puts
|
10
|
-
Process.kill
|
8
|
+
Signal.trap "TERM" do
|
9
|
+
puts "Unicorn master intercepting TERM and sending myself QUIT instead"
|
10
|
+
Process.kill "QUIT", Process.pid
|
11
11
|
end
|
12
12
|
|
13
13
|
if defined? ActiveRecord::Base
|
@@ -16,15 +16,15 @@ before_fork do |server, worker|
|
|
16
16
|
end
|
17
17
|
|
18
18
|
after_fork do |server, worker|
|
19
|
-
Signal.trap
|
20
|
-
puts
|
19
|
+
Signal.trap "TERM" do
|
20
|
+
puts "Unicorn worker intercepting TERM and doing nothing. Wait for master to send QUIT"
|
21
21
|
end
|
22
22
|
|
23
23
|
if defined? ActiveRecord::Base
|
24
24
|
config = ActiveRecord::Base.configurations[Rails.env] ||
|
25
25
|
Rails.application.config.database_configuration[Rails.env]
|
26
|
-
config[
|
27
|
-
config[
|
26
|
+
config["reaping_frequency"] = (ENV["DB_REAPING_FREQUENCY"] || 10).to_i
|
27
|
+
config["pool"] = (ENV["DB_POOL"] || 2).to_i
|
28
28
|
ActiveRecord::Base.establish_connection(config)
|
29
29
|
end
|
30
30
|
end
|
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.15.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-
|
11
|
+
date: 2014-07-09 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.1.
|
47
|
+
version: 4.1.4
|
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.1.
|
54
|
+
version: 4.1.4
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: aruba
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|