weighflow_cli 0.2.2 → 0.2.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
  SHA256:
3
- metadata.gz: 2ecb1b35aff4662fffcab033608f0ea6827ad91214d4033a061cc2c908990338
4
- data.tar.gz: f6f91ca72cc5b2df043334b784410f313506668912018bb80da9472e9e506780
3
+ metadata.gz: 9b16083d957ff3cfad0f8b7a0adbdf38837e3f2ec19b47402c24d8f4fba7f064
4
+ data.tar.gz: 95078a43257981ce4f2599a349d107620c1c0b35fa14fcabdb189b4c635a587e
5
5
  SHA512:
6
- metadata.gz: 77b6708b15972eddb504a8626a5ab779676a0215e4315f59574e804dd8a5e75bd921b80daaec5419775ff2a27bb29afbf25562103d41828727decfb8234790f2
7
- data.tar.gz: 31443865b8c51a3286350709f8029afb9041c30daae852d3ea4c1433a1cfe1d6fdf423e48735d4f586075c7a1a637b3d951f93ac6a043fa6c83663be5dedcc36
6
+ metadata.gz: 99a11f91ee22093061ab6e8bec309d8aebb3e5450d322a8d3ae688d50ec2caec99d41168fd50d9befbf70a994430eff81303525ead01c03543e1de9230ebffcf
7
+ data.tar.gz: a2e6813efc1754aba5b92d70de63ff2e3b785d1bed7bd63c94af8e086d5cd1ab0ec258e0b0d8e6e82c87ecddf30b5770922ed501be507c4edd89dab1169c9a71
data/.byebug_history CHANGED
@@ -1,4 +1,8 @@
1
1
  c
2
+ commodity_inbounds[:orders]
3
+ inventory_inbounds[:orders]
4
+ inventory_outbounds[:orders]
5
+ c
2
6
  response.code
3
7
  response.success?
4
8
  c
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- weighflow_cli (0.2.0)
4
+ weighflow_cli (0.2.2)
5
5
  httparty
6
6
  thor (~> 1.1.0)
7
7
 
@@ -15,9 +15,13 @@ module WeighflowCli
15
15
  end
16
16
 
17
17
 
18
+ desc 'data_path', "Current data path"
19
+ def data_path
20
+ puts DATA_PATH
21
+ end
18
22
 
19
23
 
20
- desc "login", "Save Login Credientials"
24
+ desc "login", "Save Login Credentials"
21
25
  def login
22
26
  Credentials.login
23
27
  end
@@ -25,7 +29,6 @@ module WeighflowCli
25
29
 
26
30
 
27
31
 
28
-
29
32
  desc "pull", "Pull Orders from Weighflow"
30
33
  method_options yaml: :boolean
31
34
  def pull
@@ -42,7 +42,7 @@ module WeighflowCli
42
42
  private
43
43
 
44
44
  def find_orders(selection: 'OC')
45
- response = self.class.get('/orders?s=OI')
45
+ response = self.class.get('/orders', query: { s: selection })
46
46
  render_error(response) unless response.success?
47
47
  JSON.parse(response.body, symbolize_names: true)
48
48
  end
@@ -15,6 +15,7 @@ module WeighflowCli
15
15
  inventory_inbounds = WeighflowCli.client.bulk_inventory_inbound_truck
16
16
  #
17
17
  # combine
18
+
18
19
  orders = commodity_outbounds[:orders] + commodity_inbounds[:orders] + inventory_outbounds[:orders] + inventory_inbounds[:orders]
19
20
  #
20
21
  diff = OrderRepository.new(orders)
@@ -155,7 +156,8 @@ module WeighflowCli
155
156
 
156
157
  def data
157
158
  return @data if defined?(@data)
158
- return nil unless @file_name
159
+ return {} unless @file_name
160
+ return {} unless File.exists?(@file_name)
159
161
  @data = JSON.parse(File.read(@file_name), symbolize_names: true)
160
162
  end
161
163
 
@@ -166,6 +168,8 @@ module WeighflowCli
166
168
  end
167
169
 
168
170
 
171
+ #
172
+ #
169
173
  class Finder
170
174
  include Handlers
171
175
 
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
  module WeighflowCli
6
- VERSION = "0.2.2"
6
+ VERSION = "0.2.3"
7
7
 
8
8
 
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weighflow_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bruce Martin