lib/runcible/base.rb in runcible-1.7.0 vs lib/runcible/base.rb in runcible-1.7.1

- old
+ new

@@ -130,15 +130,23 @@ elsif body.is_a? Array body = body.map do |i| i.respond_to?(:with_indifferent_access) ? i.with_indifferent_access : i end end - response = RestClient::Response.create(body, response.net_http_res, response.args) + response = rest_client_response(body, response.net_http_res, response.args) rescue JSON::ParserError log_exception end return response + end + + def rest_client_response(body, net_http_res, args) + if Gem.loaded_specs['rest-client'].version < Gem::Version.create('1.8.0') + RestClient::Response.create(body, net_http_res, args) + else + RestClient::Response.create(body, net_http_res, args, nil) + end end def required_params(local_names, binding, keys_to_remove = []) local_names = local_names.each_with_object({}) do |v, acc| value = binding.eval(v.to_s) unless v == :_