Skip to content

Commit

Permalink
Update Hashei version
Browse files Browse the repository at this point in the history
  • Loading branch information
cirdes committed Jul 14, 2014
1 parent 9a57b18 commit 5320555
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 17 deletions.
22 changes: 12 additions & 10 deletions Gemfile.lock
@@ -1,24 +1,26 @@
PATH
remote: .
specs:
pagseguro_v2 (0.0.0)
pagseguro_v2 (0.0.8)
builder
hashie (>= 1.2.0)
hashie (>= 3.2.0)
httparty
nokogiri

GEM
remote: http://rubygems.org/
specs:
builder (3.0.0)
builder (3.2.2)
diff-lcs (1.1.3)
hashie (1.2.0)
httparty (0.8.3)
multi_json (~> 1.0)
multi_xml
multi_json (1.3.6)
multi_xml (0.5.1)
nokogiri (1.5.4)
hashie (3.2.0)
httparty (0.13.1)
json (~> 1.8)
multi_xml (>= 0.5.2)
json (1.8.1)
mini_portile (0.6.0)
multi_xml (0.5.5)
nokogiri (1.6.2.1)
mini_portile (= 0.6.0)
rspec (2.10.0)
rspec-core (~> 2.10.0)
rspec-expectations (~> 2.10.0)
Expand Down
4 changes: 2 additions & 2 deletions lib/pagseguro_v2/notification.rb
Expand Up @@ -7,8 +7,8 @@ class Notification < Hashie::Trash

def transaction
response = self.client.query_transaction(self)
transaction = Transaction.new response['transaction']
transaction = PagseguroV2::Transaction.new(response['transaction'])
transaction
end
end
end
end
4 changes: 2 additions & 2 deletions lib/pagseguro_v2/transaction.rb
@@ -1,6 +1,5 @@
module PagseguroV2
class Transaction < Hashie::Trash
include Hashie::Extensions::IgnoreUndeclared
property :date
property :code
property :reference
Expand Down Expand Up @@ -29,7 +28,8 @@ class Transaction < Hashie::Trash

def initialize(options)
translate_status(options)
super(options)
options_sym = Hash[options.map { |k, v| [k.to_sym, v] }]
super(options_sym)
end

def translate_status(options)
Expand Down
2 changes: 1 addition & 1 deletion lib/pagseguro_v2/version.rb
@@ -1,3 +1,3 @@
module PagseguroV2
VERSION = "0.0.8"
VERSION = "0.0.9"
end
4 changes: 2 additions & 2 deletions pagseguro_v2.gemspec
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |s|

s.add_dependency('nokogiri')
s.add_development_dependency "rspec", "~> 2.10.0"
s.add_runtime_dependency "hashie", '>= 1.2.0'
s.add_runtime_dependency "hashie", '>= 3.2.0'
s.add_runtime_dependency "httparty"
s.add_runtime_dependency "builder"
end
end

0 comments on commit 5320555

Please sign in to comment.