suspenders 1.18.0 → 1.19.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ed82bbed26013b10a8da6e00c1bbfd20ae852bd
4
- data.tar.gz: dbbb9f4dd43bf2311392125b8739a4672b5e51b9
3
+ metadata.gz: 5f8164830fb3ff981e7d5a410cf0edbebb99dd3b
4
+ data.tar.gz: 339126a56d93d04c8962ccfb76c745c5006a3d99
5
5
  SHA512:
6
- metadata.gz: a730d820d42a75b9e30825e3a8a6f429fd83bd0f89a39074117ec03f1bc7d6092235cb2feef9b9d114e7f61d9fd10b4536189df32c8aa9091f3cd249e63d2bd9
7
- data.tar.gz: 2ef3565187f9ba9503679df275bfc4dc1323ce4ae29700750bd3c8ccb5451196e1a6799862f56603f1459e361778a484b1c3e3109e1a35a0627ce80aefef21c4
6
+ metadata.gz: 0da7e5681330e072141c4d9786aaca5fe7d2799dc6ac2aedce374871b48bf89f63ccaabcb79d5bbe4818500b94458145d4731fa949687f5cbb2a38d7a4d9f8b5
7
+ data.tar.gz: be69aea7445300aadd43dba59237fcd1963b1b20c7b19d63d83ebcb0e57457ff61e345e5754557eb1831f9aca69aaacbb52dcb2885e0749509fbc254b7509bba
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.1.3
1
+ 2.1.4
data/.travis.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.3
3
+ - 2.1.4
4
4
  before_install:
5
5
  - "echo '--colour' > ~/.rspec"
6
6
  - git config --global user.name 'Travis CI'
data/Gemfile.lock CHANGED
@@ -1,35 +1,35 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- suspenders (1.18.0)
4
+ suspenders (1.19.0)
5
5
  bitters (~> 0.10.0)
6
6
  bundler (~> 1.3)
7
- rails (= 4.1.6)
7
+ rails (= 4.1.8)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionmailer (4.1.6)
13
- actionpack (= 4.1.6)
14
- actionview (= 4.1.6)
12
+ actionmailer (4.1.8)
13
+ actionpack (= 4.1.8)
14
+ actionview (= 4.1.8)
15
15
  mail (~> 2.5, >= 2.5.4)
16
- actionpack (4.1.6)
17
- actionview (= 4.1.6)
18
- activesupport (= 4.1.6)
16
+ actionpack (4.1.8)
17
+ actionview (= 4.1.8)
18
+ activesupport (= 4.1.8)
19
19
  rack (~> 1.5.2)
20
20
  rack-test (~> 0.6.2)
21
- actionview (4.1.6)
22
- activesupport (= 4.1.6)
21
+ actionview (4.1.8)
22
+ activesupport (= 4.1.8)
23
23
  builder (~> 3.1)
24
24
  erubis (~> 2.7.0)
25
- activemodel (4.1.6)
26
- activesupport (= 4.1.6)
25
+ activemodel (4.1.8)
26
+ activesupport (= 4.1.8)
27
27
  builder (~> 3.1)
28
- activerecord (4.1.6)
29
- activemodel (= 4.1.6)
30
- activesupport (= 4.1.6)
28
+ activerecord (4.1.8)
29
+ activemodel (= 4.1.8)
30
+ activesupport (= 4.1.8)
31
31
  arel (~> 5.0.0)
32
- activesupport (4.1.6)
32
+ activesupport (4.1.8)
33
33
  i18n (~> 0.6, >= 0.6.9)
34
34
  json (~> 1.7, >= 1.7.7)
35
35
  minitest (~> 5.1)
@@ -70,11 +70,11 @@ GEM
70
70
  hike (1.2.3)
71
71
  i18n (0.6.11)
72
72
  json (1.8.1)
73
- mail (2.6.1)
73
+ mail (2.6.3)
74
74
  mime-types (>= 1.16, < 3)
75
75
  mime-types (1.25.1)
76
76
  mini_portile (0.6.0)
77
- minitest (5.4.2)
77
+ minitest (5.4.3)
78
78
  multi_json (1.10.1)
79
79
  multi_test (0.1.1)
80
80
  nokogiri (1.6.2.1)
@@ -82,19 +82,19 @@ GEM
82
82
  rack (1.5.2)
83
83
  rack-test (0.6.2)
84
84
  rack (>= 1.0)
85
- rails (4.1.6)
86
- actionmailer (= 4.1.6)
87
- actionpack (= 4.1.6)
88
- actionview (= 4.1.6)
89
- activemodel (= 4.1.6)
90
- activerecord (= 4.1.6)
91
- activesupport (= 4.1.6)
85
+ rails (4.1.8)
86
+ actionmailer (= 4.1.8)
87
+ actionpack (= 4.1.8)
88
+ actionview (= 4.1.8)
89
+ activemodel (= 4.1.8)
90
+ activerecord (= 4.1.8)
91
+ activesupport (= 4.1.8)
92
92
  bundler (>= 1.3.0, < 2.0)
93
- railties (= 4.1.6)
93
+ railties (= 4.1.8)
94
94
  sprockets-rails (~> 2.0)
95
- railties (4.1.6)
96
- actionpack (= 4.1.6)
97
- activesupport (= 4.1.6)
95
+ railties (4.1.8)
96
+ actionpack (= 4.1.8)
97
+ activesupport (= 4.1.8)
98
98
  rake (>= 0.8.7)
99
99
  thor (>= 0.18.1, < 2.0)
100
100
  rake (10.3.2)
@@ -106,8 +106,8 @@ GEM
106
106
  rspec-expectations (2.99.0)
107
107
  diff-lcs (>= 1.1.3, < 2.0)
108
108
  rspec-mocks (2.99.0)
109
- sass (3.4.6)
110
- sprockets (2.12.2)
109
+ sass (3.4.8)
110
+ sprockets (2.12.3)
111
111
  hike (~> 1.2)
112
112
  multi_json (~> 1.0)
113
113
  rack (~> 1.0)
data/NEWS.md CHANGED
@@ -1,3 +1,15 @@
1
+ 1.19.0 (November 23, 2014)
2
+
3
+ * Use Ruby 2.1.4.
4
+ * Use Rails 4.1.8.
5
+ * Add Bundler Audit gem for scanning the Gemfile
6
+ for insecure dependencies based on published CVEs.
7
+ * Use Heroku-recommended timeout numbers.
8
+ * [Improve memory] of app on Heroku with New Relic.
9
+ * Turn off RSpec verbose mode by default.
10
+
11
+ [Improve memory]: http://forum.upcase.com/t/how-to-free-up-swap-space-heroku/3017/13?u=croaky
12
+
1
13
  1.18.0 (October 23, 2014)
2
14
 
3
15
  * Use Ruby 2.1.3.
data/README.md CHANGED
@@ -59,6 +59,8 @@ And development gems like:
59
59
  objects
60
60
  * [ByeBug](https://github.com/deivid-rodriguez/byebug) for interactively
61
61
  debugging behavior
62
+ * [Bundler Audit](https://github.com/rubysec/bundler-audit) for scanning the
63
+ Gemfile for insecure dependencies based on published CVEs
62
64
  * [Spring](https://github.com/rails/spring) for fast Rails actions via
63
65
  pre-loading
64
66
 
@@ -85,19 +87,17 @@ Suspenders also comes with:
85
87
  * Rails' flashes set up and in application layout
86
88
  * A few nice time formats set up for localization
87
89
  * `Rack::Deflater` to [compress responses with Gzip][compress]
88
- * [Fast-failing factories][fast]
89
90
  * A [low database connection pool limit][pool]
90
91
  * [Safe binstubs][binstub]
91
92
  * [t() and l() in specs without prefixing with I18n][i18n]
92
93
  * An automatically-created `SECRET_KEY_BASE` environment variable in all
93
- environments.
94
- * Configuration for [Travis Pro][travis] continuous integration.
95
- * The analytics adapter [Segment.io][segment] (and therefore config for Google
96
- Analytics, Intercom, Facebook Ads, Twitter Ads, etc.).
94
+ environments
95
+ * Configuration for [Travis Pro][travis] continuous integration
96
+ * The analytics adapter [Segment][segment] (and therefore config for Google
97
+ Analytics, Intercom, Facebook Ads, Twitter Ads, etc.)
97
98
 
98
99
  [bin]: http://robots.thoughtbot.com/bin-setup
99
100
  [compress]: http://robots.thoughtbot.com/content-compression-with-rack-deflater/
100
- [fast]: http://robots.thoughtbot.com/testing-your-factories-first
101
101
  [pool]: https://devcenter.heroku.com/articles/concurrency-and-database-connections
102
102
  [binstub]: https://github.com/thoughtbot/suspenders/pull/282
103
103
  [i18n]: https://github.com/thoughtbot/suspenders/pull/304
@@ -280,10 +280,9 @@ end
280
280
  end
281
281
 
282
282
  def create_heroku_apps
283
- path_addition = override_path_for_tests
284
- run "#{path_addition} heroku create #{app_name}-production --remote=production"
285
- run "#{path_addition} heroku create #{app_name}-staging --remote=staging"
286
- run "#{path_addition} heroku config:add RACK_ENV=staging RAILS_ENV=staging --remote=staging"
283
+ run_heroku "create #{app_name}-production", "production"
284
+ run_heroku "create #{app_name}-staging", "staging"
285
+ run_heroku "config:add RACK_ENV=staging RAILS_ENV=staging", "staging"
287
286
  end
288
287
 
289
288
  def set_heroku_remotes
@@ -310,9 +309,15 @@ fi
310
309
  end
311
310
 
312
311
  def set_heroku_rails_secrets
313
- path_addition = override_path_for_tests
314
- run "#{path_addition} heroku config:add SECRET_KEY_BASE=#{generate_secret} --remote=staging"
315
- run "#{path_addition} heroku config:add SECRET_KEY_BASE=#{generate_secret} --remote=production"
312
+ %w(staging production).each do |environment|
313
+ run_heroku "config:add SECRET_KEY_BASE=#{generate_secret}", environment
314
+ end
315
+ end
316
+
317
+ def set_memory_management_variable
318
+ %w(staging production).each do |environment|
319
+ run_heroku "config:add NEW_RELIC_AGGRESSIVE_KEEPALIVE=1", environment
320
+ end
316
321
  end
317
322
 
318
323
  def create_github_repo(repo_name)
@@ -325,6 +330,11 @@ fi
325
330
  'app/views/application/_analytics.html.erb'
326
331
  end
327
332
 
333
+ def setup_bundler_audit
334
+ copy_file "bundler_audit.rake", "lib/tasks/bundler_audit.rake"
335
+ append_file "Rakefile", %{\ntask default: "bundler:audit"\n}
336
+ end
337
+
328
338
  def copy_miscellaneous_files
329
339
  copy_file 'errors.rb', 'config/initializers/errors.rb'
330
340
  end
@@ -354,7 +364,17 @@ fi
354
364
 
355
365
  def setup_default_rake_task
356
366
  append_file 'Rakefile' do
357
- "task(:default).clear\ntask default: [:spec]\n"
367
+ <<-EOS
368
+ task(:default).clear
369
+ task default: [:spec]
370
+
371
+ if defined? RSpec
372
+ task(:spec).clear
373
+ RSpec::Core::RakeTask.new(:spec) do |t|
374
+ t.verbose = false
375
+ end
376
+ end
377
+ EOS
358
378
  end
359
379
  end
360
380
 
@@ -373,6 +393,11 @@ fi
373
393
  end
374
394
  end
375
395
 
396
+ def run_heroku(command, environment)
397
+ path_addition = override_path_for_tests
398
+ run "#{path_addition} heroku #{command} --remote #{environment}"
399
+ end
400
+
376
401
  def factories_spec_rake_task
377
402
  IO.read find_in_source_paths('factories_spec_rake_task.rb')
378
403
  end
@@ -40,6 +40,7 @@ module Suspenders
40
40
  invoke :create_heroku_apps
41
41
  invoke :create_github_repo
42
42
  invoke :setup_segment_io
43
+ invoke :setup_bundler_audit
43
44
  invoke :outro
44
45
  end
45
46
 
@@ -156,6 +157,7 @@ module Suspenders
156
157
  build :create_heroku_apps
157
158
  build :set_heroku_remotes
158
159
  build :set_heroku_rails_secrets
160
+ build :set_memory_management_variable
159
161
  end
160
162
  end
161
163
 
@@ -175,6 +177,11 @@ module Suspenders
175
177
  build :gitignore_files
176
178
  end
177
179
 
180
+ def setup_bundler_audit
181
+ say "Setting up bundler-audit"
182
+ build :setup_bundler_audit
183
+ end
184
+
178
185
  def init_git
179
186
  build :init_git
180
187
  end
@@ -1,5 +1,5 @@
1
1
  module Suspenders
2
- RAILS_VERSION = "4.1.6"
2
+ RAILS_VERSION = "4.1.8"
3
3
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
4
- VERSION = "1.18.0"
4
+ VERSION = "1.19.0"
5
5
  end
@@ -25,14 +25,14 @@ class FakeHeroku
25
25
 
26
26
  def self.has_created_app_for?(remote_name)
27
27
  app_name = "#{SuspendersTestHelpers::APP_NAME}-#{remote_name}"
28
- expected_line = "create #{app_name} --remote=#{remote_name}\n"
28
+ expected_line = "create #{app_name} --remote #{remote_name}\n"
29
29
 
30
30
  File.foreach(RECORDER).any? { |line| line == expected_line }
31
31
  end
32
32
 
33
33
  def self.has_configured_vars?(remote_name, var)
34
34
  File.foreach(RECORDER).any? do |line|
35
- line =~ /^config:add #{var}=.+ --remote=#{remote_name}\n$/
35
+ line =~ /^config:add #{var}=.+ --remote #{remote_name}\n$/
36
36
  end
37
37
  end
38
38
  end
@@ -12,7 +12,7 @@ gem "high_voltage"
12
12
  gem "i18n-tasks"
13
13
  gem "jquery-rails"
14
14
  gem "neat", "~> 1.5.1"
15
- gem "newrelic_rpm", ">= 3.7.3"
15
+ gem "newrelic_rpm"
16
16
  gem "normalize-rails", "~> 3.0.0"
17
17
  gem "pg"
18
18
  gem "rack-timeout"
@@ -25,6 +25,7 @@ gem "uglifier"
25
25
  gem "unicorn"
26
26
 
27
27
  group :development do
28
+ gem "bundler-audit"
28
29
  gem "spring"
29
30
  gem "spring-commands-rspec"
30
31
  end
@@ -7,10 +7,7 @@
7
7
  set -e
8
8
 
9
9
  # Set up Ruby dependencies via Bundler
10
- if ! command -v bundle > /dev/null; then
11
- gem install bundler --no-document
12
- fi
13
-
10
+ bundle --version &> /dev/null || gem install bundler --no-document
14
11
  bundle install
15
12
 
16
13
  # Set up configurable environment variables
@@ -0,0 +1,11 @@
1
+ if Rails.env.development? || Rails.env.test?
2
+ require "bundler/audit/cli"
3
+
4
+ namespace :bundler do
5
+ task :audit do
6
+ %w(update check).each do |command|
7
+ Bundler::Audit::CLI.start [command]
8
+ end
9
+ end
10
+ end
11
+ end
@@ -1 +1 @@
1
- Rack::Timeout.timeout = (ENV["TIMEOUT_IN_SECONDS"] || 5).to_i
1
+ Rack::Timeout.timeout = (ENV["RACK_TIMEOUT"] || 10).to_i
data/templates/unicorn.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # https://devcenter.heroku.com/articles/rails-unicorn
2
2
 
3
- worker_processes (ENV["WEB_CONCURRENCY"] || 3).to_i
4
- timeout (ENV["WEB_TIMEOUT"] || 5).to_i
3
+ worker_processes (ENV["UNICORN_WORKERS"] || 3).to_i
4
+ timeout (ENV["UNICORN_TIMEOUT"] || 15).to_i
5
5
  preload_app true
6
6
 
7
7
  before_fork do |server, worker|
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.18.0
4
+ version: 1.19.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-10-23 00:00:00.000000000 Z
11
+ date: 2014-11-23 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.6
47
+ version: 4.1.8
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.6
54
+ version: 4.1.8
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: aruba
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -165,6 +165,7 @@ files:
165
165
  - templates/application.css.scss
166
166
  - templates/background_jobs_rspec.rb
167
167
  - templates/bin_setup.erb
168
+ - templates/bundler_audit.rake
168
169
  - templates/config_i18n_tasks.yml
169
170
  - templates/config_locales_en.yml.erb
170
171
  - templates/database_cleaner_rspec.rb
@@ -199,7 +200,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
199
200
  requirements:
200
201
  - - ">="
201
202
  - !ruby/object:Gem::Version
202
- version: 2.1.3
203
+ version: 2.1.4
203
204
  required_rubygems_version: !ruby/object:Gem::Requirement
204
205
  requirements:
205
206
  - - ">="
@@ -207,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
208
  version: '0'
208
209
  requirements: []
209
210
  rubyforge_project:
210
- rubygems_version: 2.4.1
211
+ rubygems_version: 2.4.2
211
212
  signing_key:
212
213
  specification_version: 4
213
214
  summary: Generate a Rails app using thoughtbot's best practices.