suspenders 1.12.0 → 1.13.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: b73d9dd152a7c46d51d98d0855f6d9386be74344
4
- data.tar.gz: 17e0abffef3c289c9554a22a7faa896f30cb4b58
3
+ metadata.gz: b5ae0ed5179635c5fa49f27586042a26a82a02e1
4
+ data.tar.gz: ed728df580f72a76f0f5a686481f3c37df9cb491
5
5
  SHA512:
6
- metadata.gz: 3545288487aafdea1f0a80f4ec51bca609962b5e69bf59a3096c9e8516bf5d640aa6bc9d3b9d033927e58fc0dc719107a3f378b1a13b7fb25fa2c156db5df678
7
- data.tar.gz: add7e9af12cab579a0e9a7f638e0f3d99125348484a709003957031132c6c8b98095854e4199df130bb4b858fe61ff2ca65cc7e4683b4ddc94c7695a68d6a359
6
+ metadata.gz: 35be178ed3056e2f25af279292ef5b62bb5998e101acc9e657ce67b95c3cd8751a4a3d47dc16775048f28fc9d72a9dc7c22ef81a480e9d1de8f9546628ebaedb
7
+ data.tar.gz: 57cafa13f02ee9a92fc10e7c52b4ead9565564c0021ddabad67b9e8b7dc56daec65cf4f20adf5825ec183c980c9f3319493ca801261aff294563f2cc1c93ea5e
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- suspenders (1.12.0)
4
+ suspenders (1.13.0)
5
5
  bundler (~> 1.3)
6
6
  rails (~> 4.1.0)
7
7
 
@@ -115,7 +115,7 @@ GEM
115
115
  activesupport (>= 3.0)
116
116
  sprockets (~> 2.8)
117
117
  thor (0.19.1)
118
- thread_safe (0.3.3)
118
+ thread_safe (0.3.4)
119
119
  tilt (1.4.1)
120
120
  treetop (1.4.15)
121
121
  polyglot
data/NEWS.md CHANGED
@@ -1,3 +1,9 @@
1
+ 1.13.0 (May 29, 2014)
2
+
3
+ * Remove `FactoryGirl.lint` in `before(:suite)` in order to avoid paying and
4
+ estimated extra ~300ms load time on a typical thoughtbot app.
5
+ * Automatically join Heroku app in `bin/setup` if using Heroku organizations.
6
+
1
7
  1.12.0 (May 26, 2014)
2
8
 
3
9
  * Fix `rake dev:prime` now that Suspenders-generated apps require some `ENV`
@@ -276,19 +276,31 @@ end
276
276
  end
277
277
 
278
278
  def set_heroku_remotes
279
- remotes = <<-RUBY
279
+ remotes = <<-SHELL
280
280
 
281
- # Set up staging and production git remotes
282
- git remote add staging git@heroku.com:#{app_name}-staging.git
283
- heroku join --app #{app_name}-staging
281
+ # Set up staging and production git remotes.
282
+ git remote add staging git@heroku.com:#{app_name}-staging.git || true
283
+ git remote add production git@heroku.com:#{app_name}-production.git || true
284
284
 
285
- git remote add production git@heroku.com:#{app_name}-production.git
286
- heroku join --app #{app_name}-production
287
- RUBY
285
+ # Join the staging and production apps.
286
+ #{join_heroku_app('staging')}
287
+ #{join_heroku_app('production')}
288
+ SHELL
288
289
 
289
290
  append_file 'bin/setup', remotes
290
291
  end
291
292
 
293
+ def join_heroku_app(environment)
294
+ heroku_app_name = "#{app_name}-#{environment}"
295
+ <<-SHELL
296
+ if heroku join --app #{heroku_app_name} &> /dev/null; then
297
+ echo 'You are a collaborator on the "#{heroku_app_name}" Heroku app'
298
+ else
299
+ echo 'Ask for access to the "#{heroku_app_name}" Heroku app'
300
+ fi
301
+ SHELL
302
+ end
303
+
292
304
  def set_heroku_rails_secrets
293
305
  path_addition = override_path_for_tests
294
306
  run "#{path_addition} heroku config:add SECRET_KEY_BASE=#{generate_secret} --remote=staging"
@@ -1,4 +1,4 @@
1
1
  module Suspenders
2
2
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
3
- VERSION = '1.12.0'
3
+ VERSION = '1.13.0'
4
4
  end
@@ -9,5 +9,11 @@ feature 'Heroku' do
9
9
  expect(FakeHeroku).to have_created_app_for('production')
10
10
  expect(FakeHeroku).to have_configured_vars('staging', 'SECRET_KEY_BASE')
11
11
  expect(FakeHeroku).to have_configured_vars('production', 'SECRET_KEY_BASE')
12
+
13
+ bin_setup = IO.read("#{project_path}/bin/setup")
14
+ app_name = SuspendersTestHelpers::APP_NAME
15
+
16
+ expect(bin_setup).to include("heroku join --app #{app_name}-staging")
17
+ expect(bin_setup).to include("heroku join --app #{app_name}-production")
12
18
  end
13
19
  end
@@ -37,7 +37,6 @@ feature 'Suspend a new project with default configuration' do
37
37
  expect(secrets_file).to match(/secret_key_base: <%= ENV\['SECRET_KEY_BASE'\] %>/)
38
38
  end
39
39
 
40
-
41
40
  scenario 'action mailer support file is added' do
42
41
  run_suspenders
43
42
 
@@ -1,12 +1,3 @@
1
1
  RSpec.configure do |config|
2
- config.before(:suite) do
3
- begin
4
- DatabaseCleaner.start
5
- FactoryGirl.lint
6
- ensure
7
- DatabaseCleaner.clean
8
- end
9
- end
10
-
11
2
  config.include FactoryGirl::Syntax::Methods
12
3
  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.12.0
4
+ version: 1.13.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-05-26 00:00:00.000000000 Z
11
+ date: 2014-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler