Skip to content

Commit

Permalink
use Hashie:Mash instead of ObjectifiedHash
Browse files Browse the repository at this point in the history
  • Loading branch information
nashby committed Dec 28, 2012
1 parent e4d7dd7 commit eaa39e0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
1 change: 1 addition & 0 deletions gitlab.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]

gem.add_runtime_dependency 'httparty'
gem.add_runtime_dependency 'hashie'

gem.add_development_dependency 'rake'
gem.add_development_dependency 'rspec'
Expand Down
1 change: 0 additions & 1 deletion lib/gitlab.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require File.expand_path('../gitlab/version', __FILE__)
require File.expand_path('../gitlab/objectified_hash', __FILE__)
require File.expand_path('../gitlab/configuration', __FILE__)
require File.expand_path('../gitlab/error', __FILE__)
require File.expand_path('../gitlab/request', __FILE__)
Expand Down
18 changes: 0 additions & 18 deletions lib/gitlab/objectified_hash.rb

This file was deleted.

5 changes: 3 additions & 2 deletions lib/gitlab/request.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'httparty'
require 'hashie/mash'

module Gitlab
# @private
Expand All @@ -13,9 +14,9 @@ def self.parse(body)
body = decode(body)

if body.is_a? Hash
ObjectifiedHash.new body
Hashie::Mash.new body
elsif body.is_a? Array
body.collect! {|e| ObjectifiedHash.new(e)}
body.collect! {|e| Hashie::Mash.new(e)}
else
raise Error::Parsing.new "Couldn't parse a response body"
end
Expand Down

0 comments on commit eaa39e0

Please sign in to comment.