weighflow_cli 0.2.7 → 0.2.8
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 +12 -0
- data/.gitignore +2 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +15 -1
- data/lib/weighflow_cli.rb +12 -4
- data/lib/weighflow_cli/cli.rb +2 -3
- data/lib/weighflow_cli/client.rb +1 -1
- data/lib/weighflow_cli/order_handler.rb +2 -2
- data/lib/weighflow_cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2f3ed43fcfecb4a905c2e58e8e38920002f9267dc151917472bdaca2abad173
|
4
|
+
data.tar.gz: 0443ce04de39d02bb39dca8fa908d4dc854c014d359b2b9225e2865511bde5f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bf5120b6de638145c148e6ac3b695f1fde406246c04a006933a4b3a9d19a7ac1213a9e7cd12517ec9511f39f1043b02d8222fdcb1931663da3323af7958d1e9
|
7
|
+
data.tar.gz: 1bf4768ac5f4e8df1845bea9ecb88d9b9dfb82aa15dc35714bc268a0e4213363fea9a4061b9185e5758a76e4e4f85587d8d45a6e5dab26e7e353fff91e9d907d
|
data/.byebug_history
CHANGED
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,17 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
weighflow_cli (0.2.
|
4
|
+
weighflow_cli (0.2.7)
|
5
5
|
httparty
|
6
6
|
thor (~> 1.1.0)
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
+
addressable (2.7.0)
|
12
|
+
public_suffix (>= 2.0.2, < 5.0)
|
11
13
|
awesome_print (1.8.0)
|
12
14
|
byebug (11.1.3)
|
15
|
+
crack (0.4.5)
|
16
|
+
rexml
|
13
17
|
diff-lcs (1.4.4)
|
14
18
|
gem-release (2.2.1)
|
19
|
+
hashdiff (1.0.1)
|
15
20
|
httparty (0.18.1)
|
16
21
|
mime-types (~> 3.0)
|
17
22
|
multi_xml (>= 0.5.2)
|
@@ -19,7 +24,9 @@ GEM
|
|
19
24
|
mime-types-data (~> 3.2015)
|
20
25
|
mime-types-data (3.2021.0225)
|
21
26
|
multi_xml (0.6.0)
|
27
|
+
public_suffix (4.0.6)
|
22
28
|
rake (13.0.3)
|
29
|
+
rexml (3.2.4)
|
23
30
|
rspec (3.10.0)
|
24
31
|
rspec-core (~> 3.10.0)
|
25
32
|
rspec-expectations (~> 3.10.0)
|
@@ -34,6 +41,11 @@ GEM
|
|
34
41
|
rspec-support (~> 3.10.0)
|
35
42
|
rspec-support (3.10.2)
|
36
43
|
thor (1.1.0)
|
44
|
+
vcr (6.0.0)
|
45
|
+
webmock (3.12.0)
|
46
|
+
addressable (>= 2.3.6)
|
47
|
+
crack (>= 0.3.2)
|
48
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
37
49
|
|
38
50
|
PLATFORMS
|
39
51
|
ruby
|
@@ -45,6 +57,8 @@ DEPENDENCIES
|
|
45
57
|
gem-release
|
46
58
|
rake (~> 13.0)
|
47
59
|
rspec (~> 3.0)
|
60
|
+
vcr
|
61
|
+
webmock
|
48
62
|
weighflow_cli!
|
49
63
|
|
50
64
|
BUNDLED WITH
|
data/lib/weighflow_cli.rb
CHANGED
@@ -20,12 +20,20 @@ module WeighflowCli
|
|
20
20
|
#
|
21
21
|
Dir.mkdir(_ROOT_PATH) unless Dir.exists?(_ROOT_PATH)
|
22
22
|
#
|
23
|
+
|
23
24
|
# Provide an override to relocate data directory
|
24
|
-
|
25
|
-
|
26
|
-
|
25
|
+
def self.data_path
|
26
|
+
return @data_path if defined?(@data_path)
|
27
|
+
@data_path ||= ENV.fetch('WEIGHFLOW_CLI_PATH') { File.join(_ROOT_PATH, 'data') }
|
28
|
+
ensure_data_path
|
29
|
+
@data_path
|
30
|
+
end
|
31
|
+
|
32
|
+
##
|
27
33
|
# Ensure data path
|
28
|
-
|
34
|
+
def self.ensure_data_path
|
35
|
+
Dir.mkdir(data_path) unless Dir.exists?(data_path)
|
36
|
+
end
|
29
37
|
#
|
30
38
|
|
31
39
|
Configuration = Struct.new(:secret, :url)
|
data/lib/weighflow_cli/cli.rb
CHANGED
@@ -5,8 +5,7 @@
|
|
5
5
|
|
6
6
|
class Cli < Thor
|
7
7
|
include Rendering
|
8
|
-
|
9
|
-
|
8
|
+
|
10
9
|
|
11
10
|
package_name "WeighflowCli"
|
12
11
|
class_option :yaml, type: :boolean
|
@@ -26,7 +25,7 @@
|
|
26
25
|
|
27
26
|
desc 'data_path', "Current data path"
|
28
27
|
def data_path
|
29
|
-
puts
|
28
|
+
puts WeighflowCli.data_path
|
30
29
|
end
|
31
30
|
|
32
31
|
|
data/lib/weighflow_cli/client.rb
CHANGED
@@ -64,7 +64,7 @@ module WeighflowCli
|
|
64
64
|
#
|
65
65
|
# Data index file name
|
66
66
|
def index_file_name
|
67
|
-
@index_file_name ||= File.join(
|
67
|
+
@index_file_name ||= File.join(WeighflowCli.data_path, 'orders_index_cache')
|
68
68
|
end
|
69
69
|
|
70
70
|
|
@@ -85,7 +85,7 @@ module WeighflowCli
|
|
85
85
|
#
|
86
86
|
# Build the file name from the checksum
|
87
87
|
def build_detail_file_name(order)
|
88
|
-
File.join(
|
88
|
+
File.join(WeighflowCli.data_path, 'order_' + create_checksum(order) + '.json')
|
89
89
|
end
|
90
90
|
|
91
91
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: weighflow_cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruce Martin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02
|
11
|
+
date: 2021-03-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|