orion_wholesale 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +5 -5
- data/lib/orion_wholesale.rb +6 -4
- data/lib/orion_wholesale/catalog.rb +1 -4
- data/lib/orion_wholesale/inventory.rb +2 -5
- data/lib/orion_wholesale/version.rb +1 -1
- data/orion_wholesale.gemspec +1 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cf2c460fd7c8bb0f320f3b5beb12181c2d74594578bda11137c06f0d65cd00e9
|
4
|
+
data.tar.gz: f5fb4cb1393044ce0ebe0244e204add347a2d4a6a5ae74bf093c51e9ce288c64
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6668f60ea9c9ccfd988aa5e659f65ed03527e03b09efbcd85445984488b84cf8e6ea20689373d99ca3d7985d5354abb59ae6c60321a1d1d03deb2f50a31a9d6b
|
7
|
+
data.tar.gz: b4e6a99279ca506225e7f76bd6137613492054264dd1e622147e05beaa587f8cfb8477e9304233c325a3ab6f197ce019f29c1f6fd668278ecdb9ba4f65dd685c
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
orion_wholesale (1.1.
|
4
|
+
orion_wholesale (1.1.5)
|
5
5
|
activesupport (>= 5, < 7)
|
6
|
+
net-sftp
|
6
7
|
|
7
8
|
GEM
|
8
9
|
remote: https://rubygems.org/
|
@@ -17,9 +18,9 @@ GEM
|
|
17
18
|
i18n (1.8.5)
|
18
19
|
concurrent-ruby (~> 1.0)
|
19
20
|
minitest (5.14.2)
|
20
|
-
net-sftp (
|
21
|
-
net-ssh (>=
|
22
|
-
net-ssh (
|
21
|
+
net-sftp (3.0.0)
|
22
|
+
net-ssh (>= 5.0.0, < 7.0.0)
|
23
|
+
net-ssh (6.1.0)
|
23
24
|
rake (12.3.3)
|
24
25
|
rspec (3.9.0)
|
25
26
|
rspec-core (~> 3.9.0)
|
@@ -43,7 +44,6 @@ PLATFORMS
|
|
43
44
|
|
44
45
|
DEPENDENCIES
|
45
46
|
bundler (>= 1.15)
|
46
|
-
net-sftp
|
47
47
|
orion_wholesale!
|
48
48
|
rake (~> 12.3.0)
|
49
49
|
rspec (~> 3.7)
|
data/lib/orion_wholesale.rb
CHANGED
@@ -36,12 +36,14 @@ module OrionWholesale
|
|
36
36
|
attr_accessor :ftp_host
|
37
37
|
attr_accessor :ftp_port
|
38
38
|
attr_accessor :top_level_dir
|
39
|
+
attr_accessor :catalog_filename_prefix
|
39
40
|
|
40
41
|
def initialize
|
41
|
-
@debug_mode
|
42
|
-
@ftp_host
|
43
|
-
@ftp_port
|
44
|
-
@top_level_dir
|
42
|
+
@debug_mode ||= false
|
43
|
+
@ftp_host ||= "74.143.53.110"
|
44
|
+
@ftp_port ||= "10022"
|
45
|
+
@top_level_dir ||= "/ammoready"
|
46
|
+
@catalog_filename_prefix ||= 'orion_inv_arweb'
|
45
47
|
end
|
46
48
|
end
|
47
49
|
end
|
@@ -1,8 +1,5 @@
|
|
1
1
|
module OrionWholesale
|
2
2
|
class Catalog < Base
|
3
|
-
|
4
|
-
CATALOG_DIR = '/ammoready'
|
5
|
-
CATALOG_FILENAME_PREFIX = 'orion_inv_arweb'
|
6
3
|
|
7
4
|
def initialize(options = {})
|
8
5
|
requires!(options, :username, :password)
|
@@ -15,7 +12,7 @@ module OrionWholesale
|
|
15
12
|
end
|
16
13
|
|
17
14
|
def all
|
18
|
-
tempfile = get_most_recent_file(
|
15
|
+
tempfile = get_most_recent_file(OrionWholesale.config.catalog_filename_prefix, OrionWholesale.config.top_level_dir)
|
19
16
|
items = []
|
20
17
|
|
21
18
|
File.open(tempfile).each_with_index do |row, i|
|
@@ -1,9 +1,6 @@
|
|
1
1
|
module OrionWholesale
|
2
2
|
class Inventory < Base
|
3
3
|
|
4
|
-
CATALOG_DIR = '/ammoready'.freeze
|
5
|
-
CATALOG_FILENAME_PREFIX = 'orion_inv_arweb'.freeze
|
6
|
-
|
7
4
|
def initialize(options = {})
|
8
5
|
requires!(options, :username, :password)
|
9
6
|
@options = options
|
@@ -20,7 +17,7 @@ module OrionWholesale
|
|
20
17
|
end
|
21
18
|
|
22
19
|
def all
|
23
|
-
tempfile = get_most_recent_file(
|
20
|
+
tempfile = get_most_recent_file(OrionWholesale.config.catalog_filename_prefix, OrionWholesale.config.top_level_dir)
|
24
21
|
items = []
|
25
22
|
|
26
23
|
File.open(tempfile).each_with_index do |row, i|
|
@@ -47,7 +44,7 @@ module OrionWholesale
|
|
47
44
|
end
|
48
45
|
|
49
46
|
def quantity
|
50
|
-
tempfile = get_most_recent_file(
|
47
|
+
tempfile = get_most_recent_file(OrionWholesale.config.catalog_filename_prefix, OrionWholesale.config.top_level_dir)
|
51
48
|
items = []
|
52
49
|
|
53
50
|
File.open(tempfile).each_with_index do |row, i|
|
data/orion_wholesale.gemspec
CHANGED
@@ -22,9 +22,9 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
24
|
spec.add_runtime_dependency "activesupport", ">= 5", "< 7"
|
25
|
+
spec.add_runtime_dependency "net-sftp"
|
25
26
|
|
26
27
|
spec.add_development_dependency "bundler", ">= 1.15"
|
27
28
|
spec.add_development_dependency "rake", "~> 12.3.0"
|
28
29
|
spec.add_development_dependency "rspec", "~> 3.7"
|
29
|
-
spec.add_development_dependency "net-sftp"
|
30
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: orion_wholesale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tony Beninate
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -30,6 +30,20 @@ dependencies:
|
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '7'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: net-sftp
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ">="
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
type: :runtime
|
41
|
+
prerelease: false
|
42
|
+
version_requirements: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
33
47
|
- !ruby/object:Gem::Dependency
|
34
48
|
name: bundler
|
35
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,20 +86,6 @@ dependencies:
|
|
72
86
|
- - "~>"
|
73
87
|
- !ruby/object:Gem::Version
|
74
88
|
version: '3.7'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: net-sftp
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - ">="
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - ">="
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '0'
|
89
89
|
description: ''
|
90
90
|
email:
|
91
91
|
- tonybeninate@icloud.com
|