Skip to content

Commit

Permalink
Merge pull request #7 from babasbot/appraisal
Browse files Browse the repository at this point in the history
Adding tests for activemodel >= 3 with appraisals
  • Loading branch information
Luis Alfredo Lorenzo committed Jul 9, 2015
2 parents 6a98310 + 1821267 commit bee5e07
Show file tree
Hide file tree
Showing 13 changed files with 91 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
/pkg/
/spec/reports/
/tmp/
*.gemfile.lock
16 changes: 15 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
language: ruby
rvm:
- 1.9.3
- 2.0.0
- 2.1.0
- 2.2.2
before_install: gem install bundler -v 1.10.4
before_install:
- gem update --system
install: "bundle install"
gemfile:
- gemfiles/activemodel_3.0.gemfile
- gemfiles/activemodel_3.1.gemfile
- gemfiles/activemodel_3.2.gemfile
- gemfiles/activemodel_4.0.gemfile
- gemfiles/activemodel_4.1.gemfile
- gemfiles/activemodel_4.2.gemfile
sudo: false
cache: bundler
23 changes: 23 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
appraise "activemodel-4.2" do
gem "activemodel", "~> 4.2.0"
end

appraise "activemodel-4.1" do
gem "activemodel", "~> 4.1.0"
end

appraise "activemodel-4.0" do
gem "activemodel", "~> 4.0.0"
end

appraise "activemodel-3.2" do
gem "activemodel", "~> 3.2.0"
end

appraise "activemodel-3.1" do
gem "activemodel", "~> 3.1.0"
end

appraise "activemodel-3.0" do
gem "activemodel", "~> 3.0.0"
end
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
source 'https://rubygems.org'

gemspec
gem "activemodel", "~> 4.1.0"
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
require "bundler/gem_tasks"
require "rubygems"
require "bundler"
require 'rake'
require 'appraisal'
require "rspec/core/rake_task"

Bundler::GemHelper.install_tasks
RSpec::Core::RakeTask.new(:spec)

task :default => :spec
9 changes: 4 additions & 5 deletions active_model_warnings.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,17 @@ Gem::Specification.new do |spec|

spec.summary = %q{Compliant validtions for ActiveModel.}
spec.description = %q{This is useful when you want to define optional validations for a resource and keep it valid.}
spec.homepage = "https://github.com/babasbot/active_model_validations."
spec.homepage = "https://github.com/babasbot/active_model_validations"
spec.license = "MIT"

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
spec.bindir = "exe"
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.10"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_dependency("activemodel", ">= 3.0.0")

spec.add_development_dependency "rspec"
spec.add_development_dependency "coveralls"

spec.add_runtime_dependency "activemodel", "~> 4.1.0"
spec.add_development_dependency 'appraisal'
end
7 changes: 7 additions & 0 deletions gemfiles/activemodel_3.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activemodel", "~> 3.0.0"

gemspec :path => "../"
7 changes: 7 additions & 0 deletions gemfiles/activemodel_3.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activemodel", "~> 3.1.0"

gemspec :path => "../"
7 changes: 7 additions & 0 deletions gemfiles/activemodel_3.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activemodel", "~> 3.2.0"

gemspec :path => "../"
7 changes: 7 additions & 0 deletions gemfiles/activemodel_4.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activemodel", "~> 4.0.0"

gemspec :path => "../"
7 changes: 7 additions & 0 deletions gemfiles/activemodel_4.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activemodel", "~> 4.1.0"

gemspec :path => "../"
7 changes: 7 additions & 0 deletions gemfiles/activemodel_4.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activemodel", "~> 4.2.0"

gemspec :path => "../"
2 changes: 1 addition & 1 deletion lib/active_model_warnings/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ActiveModelWarnings
VERSION = "0.1.0"
VERSION = "0.1.1"
end

0 comments on commit bee5e07

Please sign in to comment.