Skip to content
This repository has been archived by the owner on Jun 27, 2020. It is now read-only.

Commit

Permalink
Update RedditKit's dependencies to use >= rather than ~>.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Symons committed Dec 11, 2013
2 parents 841b939 + 7502e1e commit 5c405f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 0 additions & 2 deletions lib/redditkit/client/users.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ def unfriend(user)
def username_available?(username)
response = get('api/username_available.json', :user => username)
available = response[:body]

available == 'true'
end

# Registers a new reddit account.
Expand Down
6 changes: 3 additions & 3 deletions lib/redditkit/response/parse_json.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'faraday'
require 'json'
require 'multi_json'

module RedditKit

Expand All @@ -13,8 +13,8 @@ class ParseJSON < Faraday::Response::Middleware
# an application/json header, we want to return the body itself if the
# JSON parsing fails, because the response is still likely useful.
def parse(body)
JSON.parse(body, :symbolize_names => true) unless body.nil?
rescue JSON::ParserError
MultiJson.load(body, :symbolize_keys => true) unless body.nil?
rescue MultiJson::LoadError
body
end

Expand Down
6 changes: 4 additions & 2 deletions redditkit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ Gem::Specification.new do |spec|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ["lib"]

spec.add_dependency 'faraday', "~> 0.8"
spec.add_dependency 'htmlentities', "~> 4.3"
spec.add_dependency 'faraday', ">= 0.8"
spec.add_dependency 'htmlentities', ">= 4.3"
spec.add_dependency 'multi_json', '>= 1.8'

spec.add_development_dependency 'dotenv'
end

0 comments on commit 5c405f7

Please sign in to comment.