zanders 0.1.6 → 0.1.7
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/lib/zanders/user.rb +18 -5
- data/lib/zanders/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fd290ed25f16427fa73247062191e817df55573
|
4
|
+
data.tar.gz: 68b0b7b5063e21938c88c759393f0865459bc16b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02f93bd3cce05b21243a33dd86eb56cfa35c8375cfded8cb5c4826cf6a63c5011f6053b76c76bcea129523fabbd51891b1716c0a65bc844f8d70efb207972a60
|
7
|
+
data.tar.gz: 06693e4fb86499687e0f50eb2c22f74144eb19f5330b95deda9885086c98296151e331aed1e92e0041b848c508e520255a3c156cdfd5d41ea29260f3a1a7aa37
|
data/lib/zanders/user.rb
CHANGED
@@ -1,16 +1,29 @@
|
|
1
1
|
module Zanders
|
2
2
|
class User < SoapClient
|
3
3
|
|
4
|
+
attr_reader :username, :password
|
5
|
+
|
4
6
|
def initialize(options = {})
|
5
7
|
requires!(options, :username, :password)
|
6
|
-
|
8
|
+
|
9
|
+
@username = options[:username]
|
10
|
+
@password = options[:password]
|
7
11
|
end
|
8
12
|
|
9
|
-
# TODO-david
|
10
|
-
#
|
11
|
-
# Waiting on an endpoint for this
|
12
13
|
def authenticated?
|
13
|
-
|
14
|
+
response = soap_client(ITEM_API_URL).call(:login_check, message: build_request_data)
|
15
|
+
response = response.body[:login_check_response][:return][:item]
|
16
|
+
|
17
|
+
response.first[:value] == "0"
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def build_request_data
|
23
|
+
{
|
24
|
+
username: @username,
|
25
|
+
password: @password
|
26
|
+
}
|
14
27
|
end
|
15
28
|
|
16
29
|
end
|
data/lib/zanders/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zanders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Knight
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|