Skip to content

Commit

Permalink
Update Gemfiles to allow use of JRuby or Rubinius. Update .travis.yml…
Browse files Browse the repository at this point in the history
… to include these VMs. Add begin/rescue block to Rakefile for RDocTask
  • Loading branch information
petergoldstein committed Dec 15, 2013
1 parent 799465c commit 7073a63
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ rvm:
- 1.9.2
- 1.9.3
- 2.0.0
- jruby-19mode
- rbx
gemfile:
- gemfiles/rails3/Gemfile
- gemfiles/rails4/Gemfile
matrix:
allow_failures:
- rvm: 1.8.7
gemfile: gemfiles/rails4/Gemfile
- rvm: 1.9.2
gemfile: gemfiles/rails4/Gemfile
9 changes: 9 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
source "http://rubygems.org"

gem 'sqlite3', :platforms => [:ruby]
gem 'activerecord-jdbcsqlite3-adapter', :platforms => [:jruby]

platforms :rbx do
gem 'rubysl', '~> 2.0'
gem 'rubinius-developer_tools'
gem 'rubysl-test-unit'
end

# Specify your gem's dependencies in acts_as_list-rails3.gemspec
gemspec

Expand Down
22 changes: 13 additions & 9 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,19 @@ Rake::TestTask.new(:test) do |t|
t.verbose = false
end

# Run the rdoc task to generate rdocs for this gem
require 'rdoc/task'
RDoc::Task.new do |rdoc|
require "acts_as_list/version"
version = ActiveRecord::Acts::List::VERSION
begin
# Run the rdoc task to generate rdocs for this gem
require 'rdoc/task'
RDoc::Task.new do |rdoc|
require "acts_as_list/version"
version = ActiveRecord::Acts::List::VERSION

rdoc.rdoc_dir = 'rdoc'
rdoc.title = "acts_as_list-rails3 #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "acts_as_list-rails3 #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
rescue LoadError
puts 'RDocTask is not supported on this platform.'
end

2 changes: 0 additions & 2 deletions acts_as_list.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,4 @@ Gem::Specification.new do |s|
# Dependencies (installed via 'bundle install')...
s.add_dependency("activerecord", [">= 3.0"])
s.add_development_dependency("bundler", [">= 1.0.0"])
s.add_development_dependency("rdoc")
s.add_development_dependency("sqlite3")
end
9 changes: 9 additions & 0 deletions gemfiles/rails3/Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
source "https://rubygems.org"

gem 'sqlite3', :platforms => [:ruby]
gem 'activerecord-jdbcsqlite3-adapter', :platforms => [:jruby]

platforms :rbx do
gem 'rubysl', '~> 2.0'
gem 'rubinius-developer_tools'
gem 'rubysl-test-unit'
end

gem 'activerecord', '>= 3.0', '< 4'

# Specify your gem's dependencies in acts_as_list.gemspec
Expand Down
10 changes: 10 additions & 0 deletions gemfiles/rails4/Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
source "https://rubygems.org"

gem 'sqlite3', :platforms => [:ruby]
gem 'activerecord-jdbcsqlite3-adapter', :platforms => [:jruby]

platforms :rbx do
gem 'rubysl', '~> 2.0'
gem 'rubinius-developer_tools'
gem 'rubysl-test-unit'
end


gem 'activerecord', '>= 4.0.0', '< 5'

# Specify your gem's dependencies in acts_as_list.gemspec
Expand Down

0 comments on commit 7073a63

Please sign in to comment.