diff --git a/Gemfile b/Gemfile index 98a4c81..9d00447 100644 --- a/Gemfile +++ b/Gemfile @@ -1,5 +1,8 @@ source "http://rubygems.org" +# chrisk is updating it, but hasn't released a gem yet - see https://github.com/chrisk/fakeweb/issues/57#issuecomment-325515168 +# Once a gem is released, remove this line and uncomment the one in enom.gemspec +gem 'fakeweb', git: 'https://github.com/chrisk/fakeweb.git' gem "jruby-openssl", :platform => :jruby gemspec diff --git a/enom.gemspec b/enom.gemspec index 247e7a7..8aa3bb0 100644 --- a/enom.gemspec +++ b/enom.gemspec @@ -8,13 +8,15 @@ Gem::Specification.new do |s| s.email = "bensie@gmail.com" s.files = %w( README.md Rakefile LICENSE ) + ["lib/enom.rb"] + Dir.glob("lib/enom/*.rb") + Dir.glob("lib/enom/commands/*.rb") + Dir.glob("test/**/*") + Dir.glob("bin/*") s.has_rdoc = false - s.add_dependency "httparty", "~> 0.10.0" + s.add_dependency "httparty", "~> 0.15" s.add_dependency "public_suffix", "~> 3.0.0" s.add_dependency "activesupport", "> 4.2" s.add_development_dependency "test-unit" - s.add_development_dependency "shoulda" - s.add_development_dependency "fakeweb" - s.add_development_dependency "rake", "~> 0.9" + s.add_development_dependency "shoulda", "~> 3.5" + # chrisk is updating fakeweb, but hasn't released a gem yet - see https://github.com/chrisk/fakeweb/issues/57#issuecomment-325515168 + # Once a gem is released, remove the line in the Gemfile and uncomment this one + # s.add_development_dependency "fakeweb" + s.add_development_dependency "rake", "~> 12.0" s.executables = %w(enom) s.default_executable = "enom" end diff --git a/lib/enom/domain.rb b/lib/enom/domain.rb index 00bd9a0..20cd6b2 100644 --- a/lib/enom/domain.rb +++ b/lib/enom/domain.rb @@ -396,7 +396,7 @@ def set_extended_domain_attributes(attributes) # # @raise [Enom::InterfaceError] If response is invalid def validate_response!(response) - unless response.is_a?(Hash) && response.key?('interface_response') + unless response.respond_to?(:key?) && response.key?('interface_response') raise Enom::InterfaceError, response.inspect end end diff --git a/test/test_helper.rb b/test/test_helper.rb index 8f54bd0..b031c43 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -124,7 +124,7 @@ class Test::Unit::TestCase }, { :command => "Check Many with default (*) TLD list (Success)", - :request => "https://reseller.enom.com/interface.asp?Command=Check&SLD=test123456test123456&TLD=*&TLDList=&UID=resellid&PW=resellpw&ResponseType=xml", + :request => "https://reseller.enom.com/interface.asp?Command=Check&SLD=test123456test123456&TLD=%2A&TLDList=&UID=resellid&PW=resellpw&ResponseType=xml", :response => <<-EOF