From fb8ffa9dce30a0ce242b295b7ef8068a835cb3d6 Mon Sep 17 00:00:00 2001 From: John C Date: Mon, 19 Sep 2016 14:40:31 +1000 Subject: [PATCH] Fix rest-client dependency for Ruby v1.9 --- eway_rapid.gemspec | 8 +++++++- lib/eway_rapid/version.rb | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/eway_rapid.gemspec b/eway_rapid.gemspec index 2b53a1a..e18d7ea 100644 --- a/eway_rapid.gemspec +++ b/eway_rapid.gemspec @@ -16,9 +16,15 @@ Gem::Specification.new do |spec| spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) } spec.require_paths = ['lib'] - spec.add_dependency 'rest-client', ['>= 1.8.0', '< 3.0'] spec.add_dependency 'json', '~> 1.8.3' + # prevent dependency issues for Ruby 1.9 + if Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.0.0') + spec.add_dependency 'rest-client', '~> 1.8.0' + else + spec.add_dependency 'rest-client', ['>= 1.8.0', '< 3.0'] + end + spec.add_development_dependency 'bundler', '~> 1.10' spec.add_development_dependency 'rake', '~> 10.0' spec.add_development_dependency 'test-unit' diff --git a/lib/eway_rapid/version.rb b/lib/eway_rapid/version.rb index 3d32fba..353092d 100644 --- a/lib/eway_rapid/version.rb +++ b/lib/eway_rapid/version.rb @@ -1,3 +1,3 @@ module EwayRapid - VERSION = '1.2.0' + VERSION = '1.2.1' end