Skip to content

Commit

Permalink
Merge pull request miasma-rb#19 from miasma-rb/enhancement/replace-de…
Browse files Browse the repository at this point in the history
…precated

Replace usage of deprecated http API methods
  • Loading branch information
chrisroberts committed Dec 11, 2015
2 parents b5f7bd6 + 0a2b0a5 commit 0c78df6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/miasma/types/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def api_for(type)

# @return [HTTP]
def connection
HTTP.with_headers('User-Agent' => "miasma/v#{Miasma::VERSION}")
HTTP.headers('User-Agent' => "miasma/v#{Miasma::VERSION}")
end

# @return [String] url endpoint
Expand Down Expand Up @@ -113,7 +113,7 @@ def request(args)
ary.push(options) unless options.empty?
end
if(args[:headers])
_connection = connection.with_headers(args[:headers])
_connection = connection.headers(args[:headers])
args.delete(:headers)
else
_connection = connection
Expand Down
2 changes: 1 addition & 1 deletion miasma.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |s|
s.description = 'Smoggy API'
s.license = 'Apache 2.0'
s.require_path = 'lib'
s.add_runtime_dependency 'http'
s.add_runtime_dependency 'http', '>= 0.8.12', '< 1.0'
s.add_runtime_dependency 'multi_json'
s.add_runtime_dependency 'multi_xml'
s.add_runtime_dependency 'xml-simple'
Expand Down

0 comments on commit 0c78df6

Please sign in to comment.