purolator_ruby 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d9ffe792eaac8c1f2f80823bc6fa7aa1d7bb1000
4
- data.tar.gz: 91f3ff53114d9a2775fab487afccb790a11e11a9
3
+ metadata.gz: a7dce61f9b7496741021a3a781343fb67edb8c49
4
+ data.tar.gz: 4f55e808a5dc2bc5848b790e7600c7e3e61f38e3
5
5
  SHA512:
6
- metadata.gz: 0040853935f978951d7c73ed493eae5f90ba329913ff85a6ef15807a38ad5246cdaaa2750b878a76c8b4432a703154dc9c97a5f035715f6a2d97b5a7d0ba16d5
7
- data.tar.gz: 6ced26c451fadeccd2816c662ec9c103a78ba945bd017202f97f12856c45546f3fed98dfb3923489e5bdd27226f598cb8daa64474a05f97ea8110b3385f3cee9
6
+ metadata.gz: d524af4a1687a26ecf76ead648bb294008dd2a3416fd477876542496e9e7b057ae3fd7fa223ad3904510e45dd74842d1ad7c789856795dbc18b41c91a0ac9b8d
7
+ data.tar.gz: 5f78345ca3a98428d17370a3af33ea0589f84fef5f23b9eaef2ff756bf375bdd0a54e9348a8aae8148fc4662125c793a60838a925e1bcd0f00439dd1448968f2
@@ -1,29 +1,3 @@
1
- class Hash
2
-
3
- # Returns a new hash less the given keys.
4
- def except(*less_keys)
5
- hash = dup
6
- less_keys.each{ |k| hash.delete(k) }
7
- hash
8
- end
9
-
10
- # Replaces hash with new hash less the given keys.
11
- # This returns the hash of keys removed.
12
- #
13
- # h = {:a=>1, :b=>2, :c=>3}
14
- # h.except!(:a) #=> {:a=>1}
15
- # h #=> {:b=>2,:c=>3}
16
- #
17
- # Returns a Hash of the removed pairs.
18
- def except!(*rejected)
19
- removed = {}
20
- rejected.each{ |k| removed[k] = delete(k) }
21
- removed
22
- end
23
-
24
- end
25
-
26
-
27
1
  module PurolatorRuby
28
2
 
29
3
  CreateShipmentResponse = Struct.new(:status, :shipment_pin, :payload, :errors)
@@ -34,7 +8,9 @@ module PurolatorRuby
34
8
 
35
9
  def initialize(options)
36
10
  @client = options.fetch(:client)
37
- @payload_opts = options.except(:client).merge(account_number: client.account_number, billing_number: client.billing_number)
11
+ _opts = options.dup
12
+ _opts.delete(:client)
13
+ @payload_opts = _opts.merge(account_number: client.account_number, billing_number: client.billing_number)
38
14
  end
39
15
 
40
16
  def send!
@@ -1,3 +1,3 @@
1
1
  module PurolatorRuby
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: purolator_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Boris Filipov
@@ -126,6 +126,7 @@ files:
126
126
  - lib/purolator_ruby/create_shipment_request.rb
127
127
  - lib/purolator_ruby/environment_credentials.rb
128
128
  - lib/purolator_ruby/version.rb
129
+ - purolator_ruby-0.0.2.gem
129
130
  - purolator_ruby.gemspec
130
131
  - spec/.DS_Store
131
132
  - spec/fixtures/ShippingService.wsdl