Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #923 from justinfrench/rails4beta

update build matrix for rails 4.0.0.beta1 and ruby 2.0.0
  • Loading branch information...
commit 8d305455b374293eddb8156aa087f08a1d7302a9 2 parents 3cbc35b + 325282e
@twalpole twalpole authored
View
17 .travis.yml
@@ -1,4 +1,6 @@
-before_install: gem update --system
+before_install:
+ - gem update --system
+ - gem update bundler
rvm:
- 1.8.7
- ree
@@ -8,22 +10,21 @@ gemfile:
- gemfiles/rails-3.0.gemfile
- gemfiles/rails-3.1.gemfile
- gemfiles/rails-3.2.gemfile
- - gemfiles/rails-4.gemfile
env:
- DEFER_GC=false RAILS_EDGE=true
script: "rake spec"
matrix:
- exclude:
- - rvm: 1.8.7
- gemfile: gemfiles/rails-4.gemfile
- env: DEFER_GC=false RAILS_EDGE=true
- - rvm: ree
+ include:
+ - rvm: 1.9.3
gemfile: gemfiles/rails-4.gemfile
env: DEFER_GC=false RAILS_EDGE=true
- - rvm: 1.9.2
+ - rvm: 2.0.0
gemfile: gemfiles/rails-4.gemfile
env: DEFER_GC=false RAILS_EDGE=true
allow_failures:
- rvm: 1.9.3
gemfile: gemfiles/rails-4.gemfile
env: DEFER_GC=false RAILS_EDGE=true
+ - rvm: 2.0.0
+ gemfile: gemfiles/rails-4.gemfile
+ env: DEFER_GC=false RAILS_EDGE=true
View
4 Appraisals
@@ -12,8 +12,6 @@ end
if ENV["RAILS_EDGE"] == "true"
appraise 'rails-4' do
- gem 'rails', :git => 'git://github.com/rails/rails.git'
- gem 'activerecord-deprecated_finders', :git=>'https://github.com/rails/activerecord-deprecated_finders.git'
- gem 'journey', :git=>'https://github.com/rails/journey.git'
+ gem 'rails', '~> 4.0.0.beta1'
end
end
View
17 Rakefile
@@ -3,7 +3,6 @@ require 'bundler/setup'
require 'appraisal'
require 'rdoc/task'
require 'rspec/core/rake_task'
-require 'tasks/verify_rcov'
Bundler::GemHelper.install_tasks
@@ -38,19 +37,3 @@ desc 'Test the formtastic plugin with specdoc formatting and colors'
RSpec::Core::RakeTask.new('specdoc') do |t|
t.pattern = FileList['spec/**/*_spec.rb']
end
-
-desc 'Run all examples with RCov'
-RSpec::Core::RakeTask.new('rcov') do |t|
- t.pattern = FileList['spec/**/*_spec.rb']
- t.rcov = true
- t.rcov_opts = %w(--exclude gems/*,spec/*,.bundle/*, --aggregate coverage.data)
-end
-
-RCov::VerifyTask.new(:verify_coverage) do |t|
- t.require_exact_threshold = false
- t.threshold = (RUBY_VERSION == "1.8.7" ? 95 : 0)
-end
-
-desc "Run all examples and verify coverage"
-task :spec_and_verify_coverage => [:rcov, :verify_coverage] do
-end
View
1  formtastic.gemspec
@@ -30,7 +30,6 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<hpricot>, ["~> 0.8.3"])
s.add_development_dependency(%q<BlueCloth>) # for YARD
s.add_development_dependency(%q<yard>, ["~> 0.6"])
- s.add_development_dependency(%q<rcov>, ["~> 0.9.9"])
s.add_development_dependency(%q<colored>)
s.add_development_dependency(%q<tzinfo>)
s.add_development_dependency(%q<ammeter>, ["0.2.5"])
View
4 gemfiles/rails-4.gemfile
@@ -2,8 +2,6 @@
source :rubygems
-gem "rails", :git=>"git://github.com/rails/rails.git"
-gem "activerecord-deprecated_finders", :git=>"https://github.com/rails/activerecord-deprecated_finders.git"
-gem "journey", :git=>"https://github.com/rails/journey.git"
+gem "rails", "~> 4.0.0.beta1"
gemspec :path=>"../"
View
44 lib/tasks/verify_rcov.rb
@@ -1,44 +0,0 @@
-require 'colored'
-
-# @private
-module RCov
-
- class VerifyTask < Rake::TaskLib
-
- attr_accessor :name
- attr_accessor :index_html
- attr_accessor :verbose
- attr_accessor :threshold
- attr_accessor :require_exact_threshold
-
- def initialize(name=:verify_rcov)
- @name = name
- @index_html = 'coverage/index.html'
- @verbose = true
- @require_exact_threshold = true
- yield self if block_given?
- raise "Threshold must be set" if @threshold.nil?
- define
- end
-
- def define
- desc "Verify that rcov coverage is at least #{threshold}%"
- task @name do
- total_coverage = 0
- File.open(index_html).each_line do |line|
- if line =~ /<tt class='coverage_total'>\s*(\d+\.\d+)%\s*<\/tt>/
- total_coverage = $1.to_f
- break
- end
- end
- output_coverage(total_coverage)
- end
- end
-
- def output_coverage(total_coverage)
- puts "Coverage: #{total_coverage}% (threshold: #{threshold}%)".green if verbose && total_coverage >= threshold
- raise "Coverage must be at least #{threshold}% but was #{total_coverage}%".red if total_coverage < threshold
- raise "Coverage has increased above the threshold of #{threshold}% to #{total_coverage}%. You should update your threshold value.".red if (total_coverage > threshold) and require_exact_threshold
- end
- end
-end
Please sign in to comment.
Something went wrong with that request. Please try again.