suspenders 1.9.2 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 69d77473b20593a1671fc134eedd8937e2eac68a
4
- data.tar.gz: 4439abee6400c3830f0e47dbe9f5a927743c3286
3
+ metadata.gz: 0152238c3011c893d503649500d9b5a40fdbbf59
4
+ data.tar.gz: c27664d7c142b6b9521d9d2c977dfad77d3afc47
5
5
  SHA512:
6
- metadata.gz: 760f7123d033fa460f83a4785590607f19ffb209b622cfaf39258d40bb302625e362a1d18fec39218a78d2ea11a3299aea64920d33d774d4d3f291797c303b62
7
- data.tar.gz: bf566bfb24f13022139d7a060fc24a2e5258ab7ab35cd56b6a67f01463d121757fff0739d0ab897c974d7904287a7710ea96f8f97d0a61f342c22f7444ad8c68
6
+ metadata.gz: a7d1e9dc555cf3c14a00a5c3f6b455d56ae32835a3e8051138b6892f6d47db504fa462a7e549fd34fc24d3875bf8510817d05c39819daabf2e4c1d75c9aee254
7
+ data.tar.gz: 78129944dc4b6735352f1a62af7e90900a72a28127d5bbc5c75bb9b5adf277e4c207639ab546e354cca49c14a946da1ae3f1c62e3128bbaa51585a91e32f0360
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- suspenders (1.9.2)
4
+ suspenders (1.9.3)
5
5
  bundler (~> 1.3)
6
6
  rails (= 4.0.3)
7
7
 
data/NEWS.md CHANGED
@@ -1,3 +1,8 @@
1
+ 1.9.3 (April 13, 2014)
2
+
3
+ * Use FactoryGirl.lint instead of custom-generated factory-testing code.
4
+ * Fix Delayed::Job <-> Rails 4.1 dependency conflict.
5
+
1
6
  1.9.2 (April 10, 2014)
2
7
 
3
8
  * Join Heroku apps in bin/setup.
@@ -51,13 +51,8 @@ module Suspenders
51
51
  inject_into_class 'config/application.rb', 'Application', config
52
52
  end
53
53
 
54
- def enable_factory_girl_syntax
55
- copy_file 'factory_girl_syntax_rspec.rb', 'spec/support/factory_girl.rb'
56
- end
57
-
58
- def test_factories_first
59
- copy_file 'factories_spec.rb', 'spec/models/factories_spec.rb'
60
- append_file 'Rakefile', factories_spec_rake_task
54
+ def set_up_factory_girl_for_rspec
55
+ copy_file 'factory_girl_rspec.rb', 'spec/support/factory_girl.rb'
61
56
  end
62
57
 
63
58
  def configure_smtp
@@ -73,8 +73,7 @@ module Suspenders
73
73
 
74
74
  def setup_test_environment
75
75
  say 'Setting up the test environment'
76
- build :enable_factory_girl_syntax
77
- build :test_factories_first
76
+ build :set_up_factory_girl_for_rspec
78
77
  build :generate_rspec
79
78
  build :configure_rspec
80
79
  build :use_spring_binstubs
@@ -1,3 +1,3 @@
1
1
  module Suspenders
2
- VERSION = '1.9.2'
2
+ VERSION = '1.9.3'
3
3
  end
@@ -18,7 +18,9 @@ class FakeHeroku
18
18
  def self.has_gem_included?(project_path, gem_name)
19
19
  gemfile = File.open(File.join(project_path, 'Gemfile'), 'a')
20
20
 
21
- File.foreach(gemfile).any?{ |line| line.match(/rails_12factor/) }
21
+ File.foreach(gemfile).any? do |line|
22
+ line.match(/#{Regexp.quote(gem_name)}/)
23
+ end
22
24
  end
23
25
 
24
26
  def self.has_created_app_for?(remote_name)
@@ -5,7 +5,7 @@ ruby '<%= RUBY_VERSION %>'
5
5
  gem 'airbrake'
6
6
  gem 'bourbon'
7
7
  gem 'coffee-rails'
8
- gem 'delayed_job_active_record', '>= 4.0.0'
8
+ gem 'delayed_job_active_record'
9
9
  gem 'email_validator'
10
10
  gem 'flutie'
11
11
  gem 'high_voltage'
@@ -0,0 +1,12 @@
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
+ config.include FactoryGirl::Syntax::Methods
12
+ 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.9.2
4
+ version: 1.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - thoughtbot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-10 00:00:00.000000000 Z
11
+ date: 2014-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -145,9 +145,7 @@ files:
145
145
  - templates/development_seeds.rb
146
146
  - templates/disable_xml_params.rb
147
147
  - templates/errors.rb
148
- - templates/factories_spec.rb
149
- - templates/factories_spec_rake_task.rb
150
- - templates/factory_girl_syntax_rspec.rb
148
+ - templates/factory_girl_rspec.rb
151
149
  - templates/i18n.rb
152
150
  - templates/postgresql_database.yml.erb
153
151
  - templates/rack_timeout.rb
@@ -1,13 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'factories' do
4
- FactoryGirl.factories.map(&:name).each do |factory_name|
5
- specify "#{factory_name} factory is valid", :factory do
6
- factory = build(factory_name)
7
-
8
- if factory.respond_to?(:valid?)
9
- expect(factory).to be_valid, factory.errors.full_messages.join(',')
10
- end
11
- end
12
- end
13
- end
@@ -1,15 +0,0 @@
1
- if defined?(RSpec)
2
- task(:spec).clear
3
-
4
- desc 'Run all specs'
5
- RSpec::Core::RakeTask.new(:spec) do |t|
6
- t.rspec_opts = '--tag ~factory'
7
- end
8
-
9
- desc 'Run factory specs.'
10
- RSpec::Core::RakeTask.new(:factory_specs) do |t|
11
- t.pattern = './spec/models/factories_spec.rb'
12
- end
13
-
14
- task spec: :factory_specs
15
- end
@@ -1,3 +0,0 @@
1
- RSpec.configure do |config|
2
- config.include FactoryGirl::Syntax::Methods
3
- end