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

gemfile <<-RB
  gem 'curb', '~> 0.8.8'
  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', '~> 0.8.8'
  gem 'rack'
  gem 'json', :platforms => [:rbx, :mri_18]
RB

# Older curb's than 0.8.6 don't build against Ruby 2.2.0
if RUBY_VERSION < "2.2.0"
gemfile <<-RB
  gem 'curb', '0.8.1'
  gem 'rack'
  gem 'json', :platforms => [:rbx, :mri_18]
RB
end
