diff --git a/.travis.yml b/.travis.yml index 831b3eb..a5cbda0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,6 @@ before_install: - gem update --system script: "bundle exec rake spec:unit spec:acceptance features" gemfile: - - gemfiles/2.3.gemfile - gemfiles/3.0.gemfile - gemfiles/3.1.gemfile - gemfiles/3.2.gemfile diff --git a/Appraisals b/Appraisals index 71d57fb..11c67b9 100644 --- a/Appraisals +++ b/Appraisals @@ -1,7 +1,3 @@ -appraise "2.3" do - gem "activerecord", "~> 2.3" -end - appraise "3.0" do gem "activerecord", "~> 3.0" end diff --git a/GETTING_STARTED.md b/GETTING_STARTED.md index fe66495..e4d81af 100644 --- a/GETTING_STARTED.md +++ b/GETTING_STARTED.md @@ -7,13 +7,13 @@ Update Your Gemfile If you're using Rails, you'll need to change the required version of `factory_girl_rails`: ```ruby -gem "factory_girl_rails", "~> 1.2" +gem "factory_girl_rails", "~> 2.0" ``` If you're *not* using Rails, you'll just have to change the required version of `factory_girl`: ```ruby -gem "factory_girl", "~> 2.1.0" +gem "factory_girl", "~> 3.0" ``` Once your Gemfile is updated, you'll want to update your bundle. diff --git a/Gemfile.lock b/Gemfile.lock index 50249c3..6e325a9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,7 +2,7 @@ PATH remote: . specs: factory_girl (2.6.4) - activesupport (>= 2.3.9) + activesupport (>= 3.0.0) GEM remote: http://rubygems.org/ diff --git a/README.md b/README.md index 39e5c2b..36a4395 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ factory_girl is a fixtures replacement with a straightforward definition syntax, support for multiple build strategies (saved instances, unsaved instances, attribute hashes, and stubbed objects), and support for multiple factories for the same class (user, admin_user, and so on), including factory inheritance. -If you want to use factory_girl with Rails 3, see +If you want to use factory_girl with Rails, see [factory_girl_rails](https://github.com/thoughtbot/factory_girl_rails). Documentation diff --git a/factory_girl.gemspec b/factory_girl.gemspec index dabf9e5..8845f82 100644 --- a/factory_girl.gemspec +++ b/factory_girl.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |s| s.homepage = "https://github.com/thoughtbot/factory_girl" - s.add_dependency("activesupport", ">= 2.3.9") + s.add_dependency("activesupport", ">= 3.0.0") s.add_development_dependency("rspec", "~> 2.0") s.add_development_dependency("cucumber", "~> 1.0.0") diff --git a/gemfiles/2.3.gemfile.lock b/gemfiles/2.3.gemfile.lock deleted file mode 100644 index 4c7f1a6..0000000 --- a/gemfiles/2.3.gemfile.lock +++ /dev/null @@ -1,72 +0,0 @@ -PATH - remote: /Users/joshuaclayton/dev/gems/factory_girl - specs: - factory_girl (2.6.4) - activesupport (>= 2.3.9) - -GEM - remote: http://rubygems.org/ - specs: - activerecord (2.3.12) - activesupport (= 2.3.12) - activesupport (2.3.12) - appraisal (0.3.8) - bundler - rake - aruba (0.3.7) - childprocess (>= 0.1.9) - cucumber (>= 0.10.5) - rspec (>= 2.6.0) - bluecloth (2.1.0) - bourne (1.0) - mocha (= 0.9.8) - builder (3.0.0) - childprocess (0.1.9) - ffi (~> 1.0.6) - cucumber (1.0.0) - builder (>= 2.1.2) - diff-lcs (>= 1.1.2) - gherkin (~> 2.4.1) - json (>= 1.4.6) - term-ansicolor (>= 1.0.5) - diff-lcs (1.1.2) - ffi (1.0.9) - gherkin (2.4.1) - json (>= 1.4.6) - json (1.5.3) - mocha (0.9.8) - rake - rake (0.9.2) - rcov (0.9.9) - rspec (2.6.0) - rspec-core (~> 2.6.0) - rspec-expectations (~> 2.6.0) - rspec-mocks (~> 2.6.0) - rspec-core (2.6.4) - rspec-expectations (2.6.0) - diff-lcs (~> 1.1.2) - rspec-mocks (2.6.0) - sqlite3 (1.3.3) - sqlite3-ruby (1.3.3) - sqlite3 (>= 1.3.3) - term-ansicolor (1.0.5) - timecop (0.3.5) - yard (0.7.2) - -PLATFORMS - ruby - -DEPENDENCIES - activerecord (~> 2.3) - appraisal (~> 0.3.8) - aruba - bluecloth - bourne - cucumber (~> 1.0.0) - factory_girl! - mocha - rcov - rspec (~> 2.0) - sqlite3-ruby - timecop - yard diff --git a/gemfiles/3.0.gemfile.lock b/gemfiles/3.0.gemfile.lock index 6d51a14..5bce020 100644 --- a/gemfiles/3.0.gemfile.lock +++ b/gemfiles/3.0.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: /Users/joshuaclayton/dev/gems/factory_girl specs: factory_girl (2.6.4) - activesupport (>= 2.3.9) + activesupport (>= 3.0.0) GEM remote: http://rubygems.org/ diff --git a/gemfiles/3.1.gemfile.lock b/gemfiles/3.1.gemfile.lock index a44953d..e9b3be8 100644 --- a/gemfiles/3.1.gemfile.lock +++ b/gemfiles/3.1.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: /Users/joshuaclayton/dev/gems/factory_girl specs: factory_girl (2.6.4) - activesupport (>= 2.3.9) + activesupport (>= 3.0.0) GEM remote: http://rubygems.org/ diff --git a/gemfiles/3.2.gemfile.lock b/gemfiles/3.2.gemfile.lock index cab37c9..424a052 100644 --- a/gemfiles/3.2.gemfile.lock +++ b/gemfiles/3.2.gemfile.lock @@ -2,7 +2,7 @@ PATH remote: /Users/joshuaclayton/dev/gems/factory_girl specs: factory_girl (2.6.4) - activesupport (>= 2.3.9) + activesupport (>= 3.0.0) GEM remote: http://rubygems.org/ diff --git a/lib/factory_girl.rb b/lib/factory_girl.rb index bab394b..7754499 100644 --- a/lib/factory_girl.rb +++ b/lib/factory_girl.rb @@ -26,10 +26,6 @@ require 'factory_girl/find_definitions' require 'factory_girl/reload' require 'factory_girl/version' -if defined?(Rails) && Rails::VERSION::MAJOR == 2 - require 'factory_girl/rails2' -end - module FactoryGirl def self.factories @factories ||= Registry.new("Factory") diff --git a/lib/factory_girl/rails2.rb b/lib/factory_girl/rails2.rb deleted file mode 100644 index cb6e91a..0000000 --- a/lib/factory_girl/rails2.rb +++ /dev/null @@ -1,8 +0,0 @@ -Rails.configuration.after_initialize do - FactoryGirl.definition_file_paths = [ - File.join(Rails.root, 'factories'), - File.join(Rails.root, 'test', 'factories'), - File.join(Rails.root, 'spec', 'factories') - ] - FactoryGirl.find_definitions -end