Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only run Reel specs on Ruby 1.9

  • Loading branch information...
commit 5fdedc038ca8ba209189535c7ba94b065321cce6 1 parent 5c09bb8
Tony Arcieri tarcieri authored
6 .travis.yml
View
@@ -2,6 +2,8 @@ rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- - rbx
- - jruby
+ - jruby-18mode
+ - jruby-19mode
+ - rbx-18mode
+ - rbx-19mode
bundler_args: --without=guard,docs
32 spec/webmachine/adapters/reel_spec.rb
View
@@ -1,21 +1,23 @@
require 'spec_helper'
-describe Webmachine::Adapters::Reel do
- let(:configuration) { Webmachine::Configuration.default }
- let(:dispatcher) { Webmachine::Dispatcher.new }
- let(:adapter) do
- described_class.new(configuration, dispatcher)
- end
+if RUBY_VERSION >= "1.9"
+ describe Webmachine::Adapters::Reel do
+ let(:configuration) { Webmachine::Configuration.default }
+ let(:dispatcher) { Webmachine::Dispatcher.new }
+ let(:adapter) do
+ described_class.new(configuration, dispatcher)
+ end
- it 'inherits from Webmachine::Adapter' do
- adapter.should be_a_kind_of(Webmachine::Adapter)
- end
+ it 'inherits from Webmachine::Adapter' do
+ adapter.should be_a_kind_of(Webmachine::Adapter)
+ end
- it 'implements #run' do
- adapter.should respond_to(:run)
- end
+ it 'implements #run' do
+ adapter.should respond_to(:run)
+ end
- it 'implements #process' do
- adapter.should respond_to(:process)
- end
+ it 'implements #process' do
+ adapter.should respond_to(:process)
+ end
+ end
end
2  webmachine.gemspec
View
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
gem.add_development_dependency(%q<yard>, ["~> 0.7.3"])
gem.add_development_dependency(%q<rake>)
gem.add_development_dependency(%q<mongrel>, ['~>1.2.beta'])
- gem.add_development_dependency(%q<reel>, ['>= 0.1.0'])
+ gem.add_development_dependency(%q<reel>, ['>= 0.1.0']) if RUBY_VERSION >= "1.9"
Lars Collaborator
lgierth added a note

The .gemspec is only being evaluated when building the gem and when developing using Bundler, so this will result in different gems being built depending on the Ruby version you run gem build on.

Tony Arcieri Collaborator

It's a development dependency. Is that really an issue?

Do you have a better suggestion?

Tony Arcieri Collaborator

An alternative might be to pull development dependencies in through the Gemfile instead of the gemspec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
gem.add_development_dependency(%q<hatetepe>, ['~> 0.5'])
gem.add_development_dependency(%q<rack>)
gem.add_development_dependency(%q<rack-test>)
Lars
Collaborator

The .gemspec is only being evaluated when building the gem and when developing using Bundler, so this will result in different gems being built depending on the Ruby version you run gem build on.

Tony Arcieri
Collaborator

It's a development dependency. Is that really an issue?

Do you have a better suggestion?

Tony Arcieri
Collaborator

An alternative might be to pull development dependencies in through the Gemfile instead of the gemspec

Please sign in to comment.
Something went wrong with that request. Please try again.