diff --git a/Appraisals b/Appraisals new file mode 100644 index 00000000..d49261ba --- /dev/null +++ b/Appraisals @@ -0,0 +1,9 @@ +appraise "rails3" do + gem "rails", "~> 3.2.13" + gem "sass-rails", "~> 3.2.6" +end + +appraise "rails4" do + gem "rails", "4.0.0" + gem "sass-rails", "4.0.0" +end diff --git a/Gemfile b/Gemfile index 3f8dd098..d86da4be 100644 --- a/Gemfile +++ b/Gemfile @@ -5,40 +5,26 @@ source "http://rubygems.org" # development dependencies will be added by default to the :development group. gemspec -# support multiple rails versions -# http://schneems.com/post/50991826838/testing-against-multiple-rails-versions -rails_version = ENV["RAILS_VERSION"] || "default" - -rails = case rails_version -when "master" - {github: "rails/rails"} -when "default" - "3.2.13" -else - "~> #{rails_version}" -end -gem "rails", rails - -sass_version = ENV["SASS_VERSION"] || ">= 3.1" - # jquery-rails is used by the dummy application gem "jquery-rails" gem "pg" gem "ice_cube" +group :development do + gem "pry" +end + group :test do gem "rspec-rails", "2.13.0" - gem "rspec", "2.13.0" gem "spork", "~> 0.9.2" gem "guard" gem "guard-spork" gem "guard-rspec" - gem 'rb-fsevent', :require => false end group :assets do - gem "sass-rails", sass_version + gem "sass-rails" gem "coffee-rails" gem "uglifier" end diff --git a/Gemfile.lock b/Gemfile.lock index a968b6bf..677893ad 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -38,6 +38,9 @@ GEM activesupport (3.2.13) i18n (= 0.6.1) multi_json (~> 1.0) + appraisal (0.5.2) + bundler + rake arel (3.0.2) builder (3.0.4) childprocess (0.3.9) @@ -165,6 +168,7 @@ PLATFORMS ruby DEPENDENCIES + appraisal coffee-rails guard guard-rspec @@ -173,11 +177,10 @@ DEPENDENCIES jquery-rails pg pry - rails (= 3.2.13) rb-fsevent recurring_select! rspec (= 2.13.0) rspec-rails (= 2.13.0) - sass-rails (>= 3.1) + sass-rails spork (~> 0.9.2) uglifier diff --git a/README.md b/README.md index c0434cd3..df0e5f79 100644 --- a/README.md +++ b/README.md @@ -81,11 +81,10 @@ love to get jasmine running also, but haven't had time yet. Tests can be ran against different versions of Rails like so: ``` -RAILS_VERSION=4.0.0 SASS_VERSION=4.0.0 bundle update -RAILS_VERSION=4.0.0 SASS_VERSION=4.0.0 bundle exec rspec spec +rake appraisal:install +rake appraisal ``` - Feel free to open issues or send pull requests. Licensing diff --git a/Rakefile b/Rakefile index 6d5f6293..1c4c1cfe 100644 --- a/Rakefile +++ b/Rakefile @@ -1,17 +1,16 @@ #!/usr/bin/env rake -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end -begin - require 'rdoc/task' -rescue LoadError - require 'rdoc/rdoc' - require 'rake/rdoctask' - RDoc::Task = Rake::RDocTask -end +require 'rubygems' +require 'bundler/setup' +require 'appraisal' + +require 'rspec/core/rake_task' +RSpec::Core::RakeTask.new(:spec) +task :default => :spec +require 'rubygems/package_task' +Bundler::GemHelper.install_tasks + +require 'rdoc/task' RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_dir = 'rdoc' rdoc.title = 'RecurringSelect' @@ -20,20 +19,6 @@ RDoc::Task.new(:rdoc) do |rdoc| rdoc.rdoc_files.include('lib/**/*.rb') end -APP_RAKEFILE = File.expand_path("../test/dummy/Rakefile", __FILE__) +APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__) load 'rails/tasks/engine.rake' - -Bundler::GemHelper.install_tasks - -require 'rake/testtask' - -Rake::TestTask.new(:test) do |t| - t.libs << 'lib' - t.libs << 'test' - t.pattern = 'test/**/*_test.rb' - t.verbose = false -end - - -task :default => :test diff --git a/gemfiles/rails3.gemfile b/gemfiles/rails3.gemfile new file mode 100644 index 00000000..4e678112 --- /dev/null +++ b/gemfiles/rails3.gemfile @@ -0,0 +1,11 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "jquery-rails" +gem "pg" +gem "ice_cube" +gem "rails", "~> 3.2.13" +gem "sass-rails", "~> 3.2.6" + +gemspec :path=>"../" \ No newline at end of file diff --git a/gemfiles/rails3.gemfile.lock b/gemfiles/rails3.gemfile.lock new file mode 100644 index 00000000..83cccf22 --- /dev/null +++ b/gemfiles/rails3.gemfile.lock @@ -0,0 +1,133 @@ +PATH + remote: /Users/nathany/Dropbox/Development/jobber/recurring_select + specs: + recurring_select (1.0.2) + coffee-rails (>= 3.1) + ice_cube (>= 0.8) + jquery-rails + rails (>= 3.1) + sass-rails (>= 3.1) + +GEM + remote: http://rubygems.org/ + specs: + actionmailer (3.2.13) + actionpack (= 3.2.13) + mail (~> 2.5.3) + actionpack (3.2.13) + activemodel (= 3.2.13) + activesupport (= 3.2.13) + builder (~> 3.0.0) + erubis (~> 2.7.0) + journey (~> 1.0.4) + rack (~> 1.4.5) + rack-cache (~> 1.2) + rack-test (~> 0.6.1) + sprockets (~> 2.2.1) + activemodel (3.2.13) + activesupport (= 3.2.13) + builder (~> 3.0.0) + activerecord (3.2.13) + activemodel (= 3.2.13) + activesupport (= 3.2.13) + arel (~> 3.0.2) + tzinfo (~> 0.3.29) + activeresource (3.2.13) + activemodel (= 3.2.13) + activesupport (= 3.2.13) + activesupport (3.2.13) + i18n (= 0.6.1) + multi_json (~> 1.0) + appraisal (0.5.2) + bundler + rake + arel (3.0.2) + builder (3.0.4) + coffee-rails (3.2.2) + coffee-script (>= 2.2.0) + railties (~> 3.2.0) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.6.2) + diff-lcs (1.2.4) + erubis (2.7.0) + execjs (1.4.0) + multi_json (~> 1.0) + hike (1.2.3) + i18n (0.6.1) + ice_cube (0.11.0) + journey (1.0.4) + jquery-rails (3.0.1) + railties (>= 3.0, < 5.0) + thor (>= 0.14, < 2.0) + json (1.8.0) + mail (2.5.4) + mime-types (~> 1.16) + treetop (~> 1.4.8) + mime-types (1.23) + multi_json (1.7.7) + pg (0.15.1) + polyglot (0.3.3) + rack (1.4.5) + rack-cache (1.2) + rack (>= 0.4) + rack-ssl (1.3.3) + rack + rack-test (0.6.2) + rack (>= 1.0) + rails (3.2.13) + actionmailer (= 3.2.13) + actionpack (= 3.2.13) + activerecord (= 3.2.13) + activeresource (= 3.2.13) + activesupport (= 3.2.13) + bundler (~> 1.0) + railties (= 3.2.13) + railties (3.2.13) + actionpack (= 3.2.13) + activesupport (= 3.2.13) + rack-ssl (~> 1.3.2) + rake (>= 0.8.7) + rdoc (~> 3.4) + thor (>= 0.14.6, < 2.0) + rake (10.1.0) + rdoc (3.12.2) + json (~> 1.4) + rspec (2.13.0) + rspec-core (~> 2.13.0) + rspec-expectations (~> 2.13.0) + rspec-mocks (~> 2.13.0) + rspec-core (2.13.1) + rspec-expectations (2.13.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.13.1) + sass (3.2.9) + sass-rails (3.2.6) + railties (~> 3.2.0) + sass (>= 3.1.10) + tilt (~> 1.3) + sprockets (2.2.2) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + thor (0.18.1) + tilt (1.4.1) + treetop (1.4.14) + polyglot + polyglot (>= 0.3.1) + tzinfo (0.3.37) + +PLATFORMS + ruby + +DEPENDENCIES + appraisal + ice_cube + jquery-rails + pg + rails (~> 3.2.13) + recurring_select! + rspec (= 2.13.0) + sass-rails (~> 3.2.6) diff --git a/gemfiles/rails4.gemfile b/gemfiles/rails4.gemfile new file mode 100644 index 00000000..45c7702f --- /dev/null +++ b/gemfiles/rails4.gemfile @@ -0,0 +1,11 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "jquery-rails" +gem "pg" +gem "ice_cube" +gem "rails", "4.0.0" +gem "sass-rails", "4.0.0" + +gemspec :path=>"../" \ No newline at end of file diff --git a/gemfiles/rails4.gemfile.lock b/gemfiles/rails4.gemfile.lock new file mode 100644 index 00000000..171a56b6 --- /dev/null +++ b/gemfiles/rails4.gemfile.lock @@ -0,0 +1,128 @@ +PATH + remote: /Users/nathany/Dropbox/Development/jobber/recurring_select + specs: + recurring_select (1.0.2) + coffee-rails (>= 3.1) + ice_cube (>= 0.8) + jquery-rails + rails (>= 3.1) + sass-rails (>= 3.1) + +GEM + remote: http://rubygems.org/ + specs: + actionmailer (4.0.0) + actionpack (= 4.0.0) + mail (~> 2.5.3) + actionpack (4.0.0) + activesupport (= 4.0.0) + builder (~> 3.1.0) + erubis (~> 2.7.0) + rack (~> 1.5.2) + rack-test (~> 0.6.2) + activemodel (4.0.0) + activesupport (= 4.0.0) + builder (~> 3.1.0) + activerecord (4.0.0) + activemodel (= 4.0.0) + activerecord-deprecated_finders (~> 1.0.2) + activesupport (= 4.0.0) + arel (~> 4.0.0) + activerecord-deprecated_finders (1.0.3) + activesupport (4.0.0) + i18n (~> 0.6, >= 0.6.4) + minitest (~> 4.2) + multi_json (~> 1.3) + thread_safe (~> 0.1) + tzinfo (~> 0.3.37) + appraisal (0.5.2) + bundler + rake + arel (4.0.0) + atomic (1.1.9) + builder (3.1.4) + coffee-rails (4.0.0) + coffee-script (>= 2.2.0) + railties (>= 4.0.0.beta, < 5.0) + coffee-script (2.2.0) + coffee-script-source + execjs + coffee-script-source (1.6.2) + diff-lcs (1.2.4) + erubis (2.7.0) + execjs (1.4.0) + multi_json (~> 1.0) + hike (1.2.3) + i18n (0.6.4) + ice_cube (0.11.0) + jquery-rails (3.0.1) + railties (>= 3.0, < 5.0) + thor (>= 0.14, < 2.0) + mail (2.5.4) + mime-types (~> 1.16) + treetop (~> 1.4.8) + mime-types (1.23) + minitest (4.7.5) + multi_json (1.7.7) + pg (0.15.1) + polyglot (0.3.3) + rack (1.5.2) + rack-test (0.6.2) + rack (>= 1.0) + rails (4.0.0) + actionmailer (= 4.0.0) + actionpack (= 4.0.0) + activerecord (= 4.0.0) + activesupport (= 4.0.0) + bundler (>= 1.3.0, < 2.0) + railties (= 4.0.0) + sprockets-rails (~> 2.0.0) + railties (4.0.0) + actionpack (= 4.0.0) + activesupport (= 4.0.0) + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (10.1.0) + rspec (2.13.0) + rspec-core (~> 2.13.0) + rspec-expectations (~> 2.13.0) + rspec-mocks (~> 2.13.0) + rspec-core (2.13.1) + rspec-expectations (2.13.0) + diff-lcs (>= 1.1.3, < 2.0) + rspec-mocks (2.13.1) + sass (3.2.9) + sass-rails (4.0.0) + railties (>= 4.0.0.beta, < 5.0) + sass (>= 3.1.10) + sprockets-rails (~> 2.0.0) + sprockets (2.10.0) + hike (~> 1.2) + multi_json (~> 1.0) + rack (~> 1.0) + tilt (~> 1.1, != 1.3.0) + sprockets-rails (2.0.0) + actionpack (>= 3.0) + activesupport (>= 3.0) + sprockets (~> 2.8) + thor (0.18.1) + thread_safe (0.1.0) + atomic + tilt (1.4.1) + treetop (1.4.14) + polyglot + polyglot (>= 0.3.1) + tzinfo (0.3.37) + +PLATFORMS + ruby + +DEPENDENCIES + appraisal + ice_cube + jquery-rails + pg + rails (= 4.0.0) + recurring_select! + rspec (= 2.13.0) + sass-rails (= 4.0.0) diff --git a/recurring_select.gemspec b/recurring_select.gemspec index f89a3269..f143ab49 100644 --- a/recurring_select.gemspec +++ b/recurring_select.gemspec @@ -22,5 +22,6 @@ Gem::Specification.new do |s| s.add_dependency "sass-rails", ">= 3.1" s.add_dependency "coffee-rails", ">= 3.1" - s.add_development_dependency "pry" + s.add_development_dependency "appraisal" + s.add_development_dependency "rspec", "2.13.0" end