From 5625ea69b23fcce32ce029f4da77e9480d6b876b Mon Sep 17 00:00:00 2001 From: Mauro George Date: Tue, 30 Dec 2014 16:09:18 -0200 Subject: [PATCH] Setup of appraisal --- .gitignore | 1 + Appraisals | 31 +++++++++++++++++++++++++++++++ Gemfile | 17 ----------------- Rakefile | 15 ++++++++++++++- awesome_print.gemspec | 1 + gemfiles/mongoid_3.1.gemfile | 14 ++++++++++++++ gemfiles/rails_3.2.gemfile | 14 ++++++++++++++ gemfiles/rails_4.0.1.gemfile | 14 ++++++++++++++ gemfiles/rails_4.0.gemfile | 13 +++++++++++++ gemfiles/rails_4.1.gemfile | 15 +++++++++++++++ gemfiles/rails_4.2.gemfile | 15 +++++++++++++++ 11 files changed, 132 insertions(+), 18 deletions(-) create mode 100644 Appraisals create mode 100644 gemfiles/mongoid_3.1.gemfile create mode 100644 gemfiles/rails_3.2.gemfile create mode 100644 gemfiles/rails_4.0.1.gemfile create mode 100644 gemfiles/rails_4.0.gemfile create mode 100644 gemfiles/rails_4.1.gemfile create mode 100644 gemfiles/rails_4.2.gemfile diff --git a/.gitignore b/.gitignore index 222d8a4..16b94dc 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ coverage rdoc pkg .ruby-version +gemfiles/*.gemfile.lock Gemfile.lock ## PROJECT::RVM diff --git a/Appraisals b/Appraisals new file mode 100644 index 0000000..b36e277 --- /dev/null +++ b/Appraisals @@ -0,0 +1,31 @@ +appraise 'rails-3.2' do + gem 'activesupport', '~> 3.2.0' + gem 'activerecord', '~> 3.2.0' + gem 'mongoid', '~> 3.0.0' +end + +appraise 'mongoid-3.1' do + gem 'activesupport', '~> 3.2.0' + gem 'activerecord', '~> 3.2.0' + gem 'mongoid', '~> 3.1.0' +end + +appraise 'rails-4.0' do + gem 'activesupport', '~> 4.0.0' + gem 'activerecord', '~> 4.0.0' +end + +appraise 'rails-4.1' do + gem 'activesupport', '~> 4.1.0' + gem 'actionview', '~> 4.1.0' + gem 'activerecord', '~> 4.1.0' + gem 'mongoid', '~> 4.0.0' +end + +appraise 'rails-4.2' do + gem 'activesupport', '~> 4.2.0' + gem 'actionview', '~> 4.2.0' + gem 'activerecord', '~> 4.2.0' + gem 'mongoid', '~> 4.0.0' +end + diff --git a/Gemfile b/Gemfile index b67838e..2aa9854 100644 --- a/Gemfile +++ b/Gemfile @@ -3,18 +3,6 @@ gemspec group :development do - # ActionView extension - # #################### - gem 'actionview', '>= 4.2.0' - - # ActiveSupport extension - # ####################### - gem 'activesupport', '>= 4.2.0' - - # ActiveRecord extension - # ###################### - # * To simplify creating test models we use an in-memory SQLite DB - gem 'activerecord', '>= 4.2.0' gem 'sqlite3' # MongoMapper extension @@ -33,9 +21,4 @@ group :development do # * Ripple is abandoned http://basho.com/tag/ripple-client-apis/ # * Ripple is not currently compatible with Rails 4 # gem 'ripple', '~> 0.9.5' - - # Mongoid extension - # ################# - # * cannot be enabled at the same time as mongo_mapper - gem 'mongoid', '>= 4.0.0' end diff --git a/Rakefile b/Rakefile index f2bc512..322b7c3 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1,20 @@ +require "rubygems" +require "bundler/setup" + require "bundler" Bundler::GemHelper.install_tasks -task :default => :spec +task :default do + if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/ + Rake::Task['spec'].invoke + else + Rake::Task['appraise'].invoke + end +end + +task :appraise do + exec 'appraisal install && appraisal rake' +end desc "Run all awesome_print gem specs" task :spec do diff --git a/awesome_print.gemspec b/awesome_print.gemspec index 75394c1..7c118d9 100644 --- a/awesome_print.gemspec +++ b/awesome_print.gemspec @@ -24,5 +24,6 @@ Gem::Specification.new do |s| s.require_paths = ["lib"] s.add_development_dependency "rspec", ">= 3.0.0" + s.add_development_dependency "appraisal" s.add_development_dependency "fakefs", ">= 0.2.1" end diff --git a/gemfiles/mongoid_3.1.gemfile b/gemfiles/mongoid_3.1.gemfile new file mode 100644 index 0000000..e946ba2 --- /dev/null +++ b/gemfiles/mongoid_3.1.gemfile @@ -0,0 +1,14 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activesupport", "~> 3.2.0" +gem "activerecord", "~> 3.2.0" +gem "mongoid", "~> 3.1.0" + +group :development do + gem "sqlite3" + gem "nokogiri", ">= 1.6.5" +end + +gemspec :path => "../" diff --git a/gemfiles/rails_3.2.gemfile b/gemfiles/rails_3.2.gemfile new file mode 100644 index 0000000..fbbb4de --- /dev/null +++ b/gemfiles/rails_3.2.gemfile @@ -0,0 +1,14 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activesupport", "~> 3.2.0" +gem "activerecord", "~> 3.2.0" +gem "mongoid", "~> 3.0.0" + +group :development do + gem "sqlite3" + gem "nokogiri", ">= 1.6.5" +end + +gemspec :path => "../" diff --git a/gemfiles/rails_4.0.1.gemfile b/gemfiles/rails_4.0.1.gemfile new file mode 100644 index 0000000..38e2990 --- /dev/null +++ b/gemfiles/rails_4.0.1.gemfile @@ -0,0 +1,14 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activesupport", "~> 4.0.1" +gem "activerecord", "~> 4.0.1" +gem "mongoid", "~> 4.0.0" + +group :development do + gem "sqlite3" + gem "nokogiri", ">= 1.6.5" +end + +gemspec :path => "../" diff --git a/gemfiles/rails_4.0.gemfile b/gemfiles/rails_4.0.gemfile new file mode 100644 index 0000000..2e7f5ed --- /dev/null +++ b/gemfiles/rails_4.0.gemfile @@ -0,0 +1,13 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activesupport", "~> 4.0.0" +gem "activerecord", "~> 4.0.0" + +group :development do + gem "sqlite3" + gem "nokogiri", ">= 1.6.5" +end + +gemspec :path => "../" diff --git a/gemfiles/rails_4.1.gemfile b/gemfiles/rails_4.1.gemfile new file mode 100644 index 0000000..a36972d --- /dev/null +++ b/gemfiles/rails_4.1.gemfile @@ -0,0 +1,15 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activesupport", "~> 4.1.0" +gem "actionview", "~> 4.1.0" +gem "activerecord", "~> 4.1.0" +gem "mongoid", "~> 4.0.0" + +group :development do + gem "sqlite3" + gem "nokogiri", ">= 1.6.5" +end + +gemspec :path => "../" diff --git a/gemfiles/rails_4.2.gemfile b/gemfiles/rails_4.2.gemfile new file mode 100644 index 0000000..7130e17 --- /dev/null +++ b/gemfiles/rails_4.2.gemfile @@ -0,0 +1,15 @@ +# This file was generated by Appraisal + +source "https://rubygems.org" + +gem "activesupport", "~> 4.2.0" +gem "actionview", "~> 4.2.0" +gem "activerecord", "~> 4.2.0" +gem "mongoid", "~> 4.0.0" + +group :development do + gem "sqlite3" + gem "nokogiri", ">= 1.6.5" +end + +gemspec :path => "../"