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 +4 -4
- data/.byebug_history +4 -0
- data/Gemfile.lock +1 -1
- data/lib/weighflow_cli/cli.rb +5 -2
- data/lib/weighflow_cli/client.rb +1 -1
- data/lib/weighflow_cli/order_handler.rb +5 -1
- data/lib/weighflow_cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9b16083d957ff3cfad0f8b7a0adbdf38837e3f2ec19b47402c24d8f4fba7f064
|
|
4
|
+
data.tar.gz: 95078a43257981ce4f2599a349d107620c1c0b35fa14fcabdb189b4c635a587e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99a11f91ee22093061ab6e8bec309d8aebb3e5450d322a8d3ae688d50ec2caec99d41168fd50d9befbf70a994430eff81303525ead01c03543e1de9230ebffcf
|
|
7
|
+
data.tar.gz: a2e6813efc1754aba5b92d70de63ff2e3b785d1bed7bd63c94af8e086d5cd1ab0ec258e0b0d8e6e82c87ecddf30b5770922ed501be507c4edd89dab1169c9a71
|
data/.byebug_history
CHANGED
data/Gemfile.lock
CHANGED
data/lib/weighflow_cli/cli.rb
CHANGED
|
@@ -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
|
|
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
|
data/lib/weighflow_cli/client.rb
CHANGED
|
@@ -42,7 +42,7 @@ module WeighflowCli
|
|
|
42
42
|
private
|
|
43
43
|
|
|
44
44
|
def find_orders(selection: 'OC')
|
|
45
|
-
response = self.class.get('/orders
|
|
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
|
|
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
|
|