suite_condition("Curb is not useful on JRuby") do
  RUBY_PLATFORM != 'java'
end

# There appears to be a bug in curb 0.8.6 that manifests in hangs of this suite
# when run on Ruby 1.8.7 or REE, so don't run against that version on those
# Rubies.
curb_version_spec = RUBY_VERSION == "1.8.7" ? '0.8.5' : '~>0.8.6'
gemfile <<-RB
  gem 'curb', '#{curb_version_spec}'
  gem 'rack'
  gem 'json', :platforms => [:rbx, :mri_18]

  # We try translating URIs through Addressable if it's there, so test with it.
  gem 'addressable', :require => 'addressable/uri'
RB

gemfile <<-RB
  gem 'curb', '#{curb_version_spec}'
  gem 'rack'
  gem 'json', :platforms => [:rbx, :mri_18]
RB

gemfile <<-RB
  gem 'curb', '0.8.1'
  gem 'rack'
  gem 'json', :platforms => [:rbx, :mri_18]
RB
