Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Remove 1.8.x support

  • Loading branch information...
commit 400c9f193f20c4a1d48f4ffc110433d225ebbf0b 1 parent cfaa00c
@joshuaclayton joshuaclayton authored
View
2  .travis.yml
@@ -1,6 +1,4 @@
rvm:
- - ree-1.8.7
- - 1.8.7
- 1.9.2
- 1.9.3
before_install:
View
7 Gemfile.lock
@@ -55,7 +55,6 @@ GEM
multi_json (1.0.3)
rack (1.3.3)
rake (0.9.2)
- rcov (0.9.10)
rdiscount (1.6.8)
rspec (2.6.0)
rspec-core (~> 2.6.0)
@@ -65,6 +64,10 @@ GEM
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
+ simplecov (0.6.1)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
sqlite3 (1.3.4)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
@@ -85,8 +88,8 @@ DEPENDENCIES
cucumber (~> 1.0.0)
factory_girl!
mocha
- rcov
rspec (~> 2.0)
+ simplecov
sqlite3-ruby
timecop
yard
View
12 Rakefile
@@ -5,7 +5,6 @@ require 'appraisal'
require 'yard'
require 'rspec/core/rake_task'
require 'cucumber/rake/task'
-require 'rcov/rcovtask'
Bundler::GemHelper.install_tasks
@@ -29,17 +28,6 @@ end
desc "Run the unit and acceptance specs"
task :spec => ['spec:unit', 'spec:acceptance']
-desc 'Performs code coverage on the factory_girl plugin.'
-RSpec::Core::RakeTask.new(:rcov) do |task|
- task.pattern = 'spec/**/*_spec.rb'
- task.rcov = true
- task.rspec_opts = "--format progress"
- task.rcov_opts = %{--exclude osx\/objc,spec,gems\/ --aggregate coverage/coverage.data}
-end
-
-desc "Clean files generated by rake tasks"
-task :clobber => [:clobber_rcov]
-
Cucumber::Rake::Task.new(:features) do |t|
t.fork = true
t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'progress')]
View
4 factory_girl.gemspec
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.test_files = `git ls-files -- Appraisals {spec,features,gemfiles}/*`.split("\n")
s.require_paths = ['lib']
- s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
+ s.required_ruby_version = Gem::Requirement.new(">= 1.9.2")
s.authors = ["Josh Clayton", "Joe Ferris"]
s.email = ["jclayton@thoughtbot.com", "jferris@thoughtbot.com"]
@@ -26,7 +26,7 @@ Gem::Specification.new do |s|
s.add_development_dependency("rspec", "~> 2.0")
s.add_development_dependency("cucumber", "~> 1.0.0")
s.add_development_dependency("timecop")
- s.add_development_dependency("rcov")
+ s.add_development_dependency("simplecov")
s.add_development_dependency("aruba")
s.add_development_dependency("mocha")
s.add_development_dependency("bourne")
View
3  features/support/env.rb
@@ -1,5 +1,8 @@
PROJECT_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..', '..'))
+require "simplecov"
+SimpleCov.start
+
$: << File.join(PROJECT_ROOT, 'lib')
require 'active_record'
View
8 gemfiles/3.0.gemfile.lock
@@ -45,8 +45,8 @@ GEM
json (1.5.3)
mocha (0.9.8)
rake
+ multi_json (1.1.0)
rake (0.9.2)
- rcov (0.9.9)
rspec (2.6.0)
rspec-core (~> 2.6.0)
rspec-expectations (~> 2.6.0)
@@ -55,6 +55,10 @@ GEM
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
+ simplecov (0.6.1)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
sqlite3 (1.3.3)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
@@ -75,8 +79,8 @@ DEPENDENCIES
cucumber (~> 1.0.0)
factory_girl!
mocha
- rcov
rspec (~> 2.0)
+ simplecov
sqlite3-ruby
timecop
yard
View
7 gemfiles/3.1.gemfile.lock
@@ -55,7 +55,6 @@ GEM
multi_json (1.0.3)
rack (1.3.2)
rake (0.9.2)
- rcov (0.9.10)
rdiscount (1.6.8)
rspec (2.6.0)
rspec-core (~> 2.6.0)
@@ -65,6 +64,10 @@ GEM
rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.6.0)
+ simplecov (0.6.1)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
sqlite3 (1.3.4)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
@@ -85,8 +88,8 @@ DEPENDENCIES
cucumber (~> 1.0.0)
factory_girl!
mocha
- rcov
rspec (~> 2.0)
+ simplecov
sqlite3-ruby
timecop
yard
View
7 gemfiles/3.2.gemfile.lock
@@ -53,7 +53,6 @@ GEM
multi_json (1.0.4)
rack (1.4.0)
rake (0.9.2.2)
- rcov (0.9.11)
rdiscount (1.6.8)
rspec (2.8.0)
rspec-core (~> 2.8.0)
@@ -63,6 +62,10 @@ GEM
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
+ simplecov (0.6.1)
+ multi_json (~> 1.0)
+ simplecov-html (~> 0.5.3)
+ simplecov-html (0.5.3)
sqlite3 (1.3.5)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
@@ -83,8 +86,8 @@ DEPENDENCIES
cucumber (~> 1.0.0)
factory_girl!
mocha
- rcov
rspec (~> 2.0)
+ simplecov
sqlite3-ruby
timecop
yard
View
8 lib/factory_girl/factory_runner.rb
@@ -4,12 +4,8 @@ def initialize(name, strategy, traits_and_overrides)
@name = name
@strategy = strategy
- @overrides = if traits_and_overrides.last.respond_to?(:has_key?)
- traits_and_overrides.pop
- else
- {}
- end
- @traits = traits_and_overrides
+ @overrides = traits_and_overrides.extract_options!
+ @traits = traits_and_overrides
end
def run(strategy_override = nil, &block)
View
18 lib/factory_girl/null_object.rb
@@ -1,19 +1,7 @@
module FactoryGirl
- if defined?(::BasicObject)
- class NullObject < ::BasicObject
- def method_missing(*args)
- nil
- end
- end
- else
- class NullObject
- instance_methods.each do |m|
- undef_method(m) if m.to_s !~ /(?:^__|^nil\?$|^send$|^object_id$)/
- end
-
- def method_missing(*args)
- nil
- end
+ class NullObject < ::BasicObject
+ def method_missing(*args)
+ nil
end
end
end
View
5 spec/acceptance/overrides_spec.rb
@@ -1,5 +1,4 @@
require 'spec_helper'
-require 'active_support/ordered_hash'
describe "attribute overrides" do
before do
@@ -32,9 +31,7 @@ def secure=(value)
let(:admin) { FactoryGirl.create(:admin) }
let(:post_attributes) do
- attributes = ActiveSupport::OrderedHash.new
- attributes[:secure] = false
- attributes
+ { secure: false }
end
let(:non_admin_post_attributes) do
View
3  spec/spec_helper.rb
@@ -5,6 +5,9 @@
require 'rspec'
require 'rspec/autorun'
+require "simplecov"
+SimpleCov.start
+
require 'factory_girl'
require "mocha"
require "bourne"
Please sign in to comment.
Something went wrong with that request. Please try again.