ship_station 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f6e52dfeae6e1d23cf67b9c7936d449f739937d
4
- data.tar.gz: 0dec3f22f5a4df2d678bf0cf7776d2e183294a04
3
+ metadata.gz: 3abdec6703223fbe5b3130d1dbcc36c24534ce7b
4
+ data.tar.gz: 868fd90b9b7dbcb7fc21be8bbb1d8dd96736d558
5
5
  SHA512:
6
- metadata.gz: 4a821afd4cd17a93e39a285d33c962a01a39585bf66425ed34d56187d1acc2b16b11f425e645ca105f6121ac7ad1b12315afd97a95dcf5fb6642bfa6abce8772
7
- data.tar.gz: 707d651f317cffa12827a60b4f63034cc4a75b6843bebd3f29d7270ccdd07615a652e97b4b7f5ee38a04b48328e6da9d909c9fca5f7a29ca44780ace8370a164
6
+ metadata.gz: d7afcc073f6c4ecb614574eb1b6ae294073af82471350d7b3b97fc975f79584885bfc901cd25ddbe8e00b40704b6a3d7712d92d63c013b7dee8c4ed0ba586b3c
7
+ data.tar.gz: b22c3a37a1effe634e2ecd3fb3de9266a9c02411d5ef0cf58c9f67274b8a5d279c12587db54b02b0c05846bda4f6346da84c90a42fbcb00748c419ce92ca7eda
@@ -9,6 +9,11 @@ module ShipStation
9
9
  define_method "#{name}" do |i|
10
10
  raise(ConfigurationError, "Shipstation username not configured") if ShipStation.username.nil?
11
11
  raise(ConfigurationError, "Shipstation password not configured") if ShipStation.password.nil?
12
+ if i.is_a?(Hash)
13
+ i.each do |key, value|
14
+ i[key] = value.to_time if value.is_a?(ActiveSupport::TimeWithZone)
15
+ end
16
+ end
12
17
  super(i)
13
18
  end
14
19
  end
@@ -7,5 +7,6 @@ module ShipStation
7
7
  use_api V1::API
8
8
  super(args)
9
9
  end
10
+
10
11
  end
11
12
  end
@@ -1,3 +1,3 @@
1
1
  module ShipStation
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/ship_station.rb CHANGED
@@ -1,7 +1,5 @@
1
1
  # require 'ship_station/version'
2
- require 'active_support'
3
- require 'active_support/core_ext'
4
- require 'active_support/dependencies'
2
+ require 'active_support/all'
5
3
  require 'logger'
6
4
  require 'her'
7
5
 
@@ -55,4 +55,11 @@ RSpec.describe ShipStation::Order do
55
55
  expect(orders.count).to eq(1)
56
56
  expect(order.orderNumber).to eq(orderNumber)
57
57
  end
58
+
59
+ it "converts date info to time" do
60
+ Time.zone = "Eastern Time (US & Canada)"
61
+ modifyDateEnd = 3.minutes.ago
62
+ orders = ShipStation::Order.where(modifyDateEnd: modifyDateEnd)
63
+ expect(orders.params[:modifyDateEnd]).to be_a(Time)
64
+ end
58
65
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ship_station
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Jacobs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-06 00:00:00.000000000 Z
11
+ date: 2018-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: her
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.10.1
27
+ - !ruby/object:Gem::Dependency
28
+ name: activesupport
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: pry-byebug
29
43
  requirement: !ruby/object:Gem::Requirement