Skip to content

Commit

Permalink
Update Gem configuration for Ruby 1.9.3 and JRuby
Browse files Browse the repository at this point in the history
  • Loading branch information
sikachu committed Sep 18, 2011
1 parent f1f5e6d commit 6785f59
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 18 deletions.
5 changes: 2 additions & 3 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
appraise "3.0" do
gem "rails", "3.0.10"
gem "rake", "~> 0.8.7"
end

appraise "3.1" do
gem "rails", "3.1.0"
gem 'sass'
gem 'coffee-script'
gem 'uglifier'
gem 'jquery-rails'
gem 'coffee-rails'
gem 'sass-rails'
end
9 changes: 8 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
source 'http://rubygems.org'

gemspec
gem 'rake', '~> 0.8.7'
gem 'rake', '~> 0.9.2'

# For test Rails application
gem 'sqlite3', :platform => :ruby
gem 'activerecord-jdbc-adapter', :platform => :jruby
gem 'activerecord-jdbcsqlite3-adapter', :platform => :jruby
gem 'jdbc-sqlite3', :platform => :jruby
gem 'jruby-openssl', :platform => :jruby
gem 'shoulda-context', '~> 1.0.0.beta1'
3 changes: 2 additions & 1 deletion features/rails_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ Feature: integrate with Rails
should assign_to(:example)
end
"""
When I successfully run `bundle exec rake test TESTOPTS=-v --trace`
When I set the "TESTOPTS" environment variable to "-v"
When I successfully run `bundle exec rake test --trace`
Then the output should contain "1 tests, 1 assertions, 0 failures, 0 errors"
And the output should contain "2 tests, 2 assertions, 0 failures, 0 errors"
And the output should contain "User should require name to be set"
Expand Down
12 changes: 10 additions & 2 deletions features/step_definitions/rails_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@
When I run `rails new #{APP_NAME}`
And I cd to "#{APP_NAME}"
And I comment out the gem "turn" from the Gemfile
And I append gems from Appraisal Gemfile
And I reset Bundler environment variable
And I set the "BUNDLE_GEMFILE" environment variable to "Gemfile"
And I successfully run `bundle install --local`
}
if RUBY_VERSION >= "1.9.3"
append_to_gemfile %(gem "rake", "~> 0.9.3.beta.1")
Then %(I successfully run `bundle update rake`)
end
end

When /^I configure the application to use "([^\"]+)" from this project$/ do |name|
Expand All @@ -42,10 +46,14 @@
end

When /^I configure the application to use shoulda-context$/ do
append_to_gemfile "gem 'shoulda-context', :git => 'git@github.com:thoughtbot/shoulda-context.git'"
append_to_gemfile "gem 'shoulda-context', '~> 1.0.0.beta1'"
steps %{And I run `bundle install --local`}
end

When /^I set the "([^"]*)" environment variable to "([^"]*)"$/ do |key, value|
ENV[key] = value
end

When /^I configure a wildcard route$/ do
steps %{
When I write to "config/routes.rb" with:
Expand Down
8 changes: 7 additions & 1 deletion gemfiles/3.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

source "http://rubygems.org"

gem "rake", "~> 0.8.7"
gem "rake", "~> 0.9.2"
gem "sqlite3", :platform=>:ruby
gem "activerecord-jdbc-adapter", :platform=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
gem "jdbc-sqlite3", :platform=>:jruby
gem "jruby-openssl", :platform=>:jruby
gem "shoulda-context", "~> 1.0.0.beta1"
gem "rails", "3.0.10"

gemspec :path=>"../"
12 changes: 9 additions & 3 deletions gemfiles/3.1.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@

source "http://rubygems.org"

gem "rake", "~> 0.8.7"
gem "rake", "~> 0.9.2"
gem "sqlite3", :platform=>:ruby
gem "activerecord-jdbc-adapter", :platform=>:jruby
gem "activerecord-jdbcsqlite3-adapter", :platform=>:jruby
gem "jdbc-sqlite3", :platform=>:jruby
gem "jruby-openssl", :platform=>:jruby
gem "shoulda-context", "~> 1.0.0.beta1"
gem "rails", "3.1.0"
gem "sass"
gem "coffee-script"
gem "uglifier"
gem "jquery-rails"
gem "coffee-rails"
gem "sass-rails"

gemspec :path=>"../"
7 changes: 0 additions & 7 deletions shoulda-matchers.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,12 @@ Gem::Specification.new do |s|
s.summary = %q{Making tests easy on the fingers and eyes}
s.description = %q{Making tests easy on the fingers and eyes}

s.add_development_dependency("sqlite3-ruby", "~> 1.3.2")
s.add_development_dependency("mocha", "~> 0.9.10")
s.add_development_dependency("rspec-rails", "~> 2.6.1.beta1")
s.add_development_dependency("cucumber", "~> 0.10.0")
s.add_development_dependency("appraisal", "~> 0.3.4")
s.add_development_dependency("aruba")

if RUBY_VERSION >= "1.9"
s.add_development_dependency("ruby-debug19", "~> 0.11.6")
else
s.add_development_dependency("ruby-debug", "~> 0.10.4")
end

if s.respond_to? :specification_version then
s.specification_version = 3
else
Expand Down

0 comments on commit 6785f59

Please sign in to comment.