orion_wholesale 1.0.0 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -4
- data/lib/orion_wholesale/user.rb +13 -3
- data/lib/orion_wholesale/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: 42a25807711abdd8ecb8b79f27d62664c8c91d57f8ddd1e12ed29cb2c7f7c9d2
|
4
|
+
data.tar.gz: 746ae5c53c63c05b2b7c058b84b4e704b09a67b28773be729bbbed46c7e9dea3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae4f799fe6745b7e1903ae4c374322fc412769a40d130dd353088aea108eaaba5ab0289d8514ae7f6b25f6eedeade61c4c752fa96e8b44dfce456cf67621e224
|
7
|
+
data.tar.gz: 0f627faa2a35a31bc2056e9ca3eb5e5b911058b24a99a00185534059e45cb0c427c942ea723c253767f9bf7c5e67332f7aebde08cf7d89b98c2be57327f4d975
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
orion_wholesale (1.
|
4
|
+
orion_wholesale (1.1.3)
|
5
5
|
activesupport (>= 5, < 7)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
activesupport (5.2.4.
|
10
|
+
activesupport (5.2.4.4)
|
11
11
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
12
12
|
i18n (>= 0.7, < 2)
|
13
13
|
minitest (~> 5.1)
|
14
14
|
tzinfo (~> 1.1)
|
15
|
-
concurrent-ruby (1.1.
|
15
|
+
concurrent-ruby (1.1.7)
|
16
16
|
diff-lcs (1.3)
|
17
17
|
i18n (1.8.5)
|
18
18
|
concurrent-ruby (~> 1.0)
|
19
|
-
minitest (5.14.
|
19
|
+
minitest (5.14.2)
|
20
20
|
net-sftp (2.1.2)
|
21
21
|
net-ssh (>= 2.6.5)
|
22
22
|
net-ssh (5.2.0)
|
data/lib/orion_wholesale/user.rb
CHANGED
@@ -1,14 +1,24 @@
|
|
1
1
|
module OrionWholesale
|
2
2
|
class User < Base
|
3
3
|
|
4
|
+
USER_DIR = '/ammoready'
|
5
|
+
USER_FILENAME_PREFIX = 'orion_ardy_cust_tab'
|
6
|
+
|
4
7
|
def initialize(options = {})
|
5
|
-
requires!(options, :username, :password)
|
8
|
+
requires!(options, :username, :password, :account_id)
|
6
9
|
@options = options
|
7
10
|
end
|
8
11
|
|
9
12
|
def authenticated?
|
10
|
-
|
11
|
-
|
13
|
+
tempfile = get_most_recent_file(USER_FILENAME_PREFIX, USER_DIR)
|
14
|
+
|
15
|
+
File.open(tempfile).each_with_index do |row, i|
|
16
|
+
row = row.split("\t")
|
17
|
+
|
18
|
+
return true if row[0].strip.downcase == @options[:account_id].strip.downcase
|
19
|
+
end
|
20
|
+
|
21
|
+
false
|
12
22
|
rescue OrionWholesale::NotAuthenticated
|
13
23
|
false
|
14
24
|
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.
|
4
|
+
version: 1.1.3
|
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-
|
11
|
+
date: 2020-09-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|