lws 0.3.0.beta4 → 0.3.0.beta5
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/lws/auth.rb +6 -0
- data/lib/lws/version.rb +1 -1
- data/test/test_auth.rb +2 -42
- 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: 09eba051284033bf1f74fbd7962762f530e77685
|
4
|
+
data.tar.gz: 0eb4df37383f5d4619f917e2f4be9f8775a41422
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4345a0a8fe0cef7f31ff24c5c9f605c4103a1620598723fae4b4b35c4ec10d812a248ada907b06a7611817aac8bc049487c20a4d9331711a4e9b7dc4ca8b6f47
|
7
|
+
data.tar.gz: 56148a3378de7fb53452472adc92c7785ca8663c3af83fe3f942486151050f37bb01f1a54ce5e3d23f7cf5ac901c4f7158e389069fe32c96053ef8f8c396d542
|
data/lib/lws/auth.rb
CHANGED
@@ -175,6 +175,9 @@ module LWS::Auth
|
|
175
175
|
end
|
176
176
|
|
177
177
|
# = The device class
|
178
|
+
#
|
179
|
+
# This class is a nested/associated class of {Account} or {Token} only!
|
180
|
+
# It cannot be accessed directly.
|
178
181
|
class Device < LWS::Generic::Model
|
179
182
|
use_api LWS::Auth.api
|
180
183
|
|
@@ -263,6 +266,9 @@ module LWS::Auth
|
|
263
266
|
end
|
264
267
|
|
265
268
|
# = The user class
|
269
|
+
#
|
270
|
+
# This class is a nested/associated class of {Account} or {Token} only!
|
271
|
+
# It cannot be accessed directly.
|
266
272
|
class User < LWS::Generic::Model
|
267
273
|
use_api LWS::Auth.api
|
268
274
|
|
data/lib/lws/version.rb
CHANGED
data/test/test_auth.rb
CHANGED
@@ -15,7 +15,7 @@ class TestAuthAccount < MiniTest::Unit::TestCase
|
|
15
15
|
include LWS::Auth
|
16
16
|
|
17
17
|
def setup
|
18
|
-
@account = Account.
|
18
|
+
@account = Account.find(1)
|
19
19
|
end
|
20
20
|
|
21
21
|
def test_valid_account
|
@@ -58,7 +58,7 @@ class TestAuthCompany < MiniTest::Unit::TestCase
|
|
58
58
|
include LWS::Auth
|
59
59
|
|
60
60
|
def setup
|
61
|
-
@company = Company.
|
61
|
+
@company = Company.find(1)
|
62
62
|
end
|
63
63
|
|
64
64
|
def test_valid_company
|
@@ -75,26 +75,6 @@ class TestAuthCompany < MiniTest::Unit::TestCase
|
|
75
75
|
|
76
76
|
end
|
77
77
|
|
78
|
-
class TestAuthDevice < MiniTest::Unit::TestCase
|
79
|
-
|
80
|
-
include LWS::Auth
|
81
|
-
|
82
|
-
def setup
|
83
|
-
@device = Device.all.first
|
84
|
-
end
|
85
|
-
|
86
|
-
def test_valid_device
|
87
|
-
refute_nil(@device)
|
88
|
-
assert_instance_of(Device, @device)
|
89
|
-
refute_nil(@device.id)
|
90
|
-
end
|
91
|
-
|
92
|
-
def test_valid_device_associations
|
93
|
-
assert_instance_of(Account, @device.account)
|
94
|
-
end
|
95
|
-
|
96
|
-
end
|
97
|
-
|
98
78
|
class TestAuthToken < MiniTest::Unit::TestCase
|
99
79
|
|
100
80
|
include LWS::Auth
|
@@ -124,23 +104,3 @@ class TestAuthToken < MiniTest::Unit::TestCase
|
|
124
104
|
end
|
125
105
|
|
126
106
|
end
|
127
|
-
|
128
|
-
class TestAuthUser < MiniTest::Unit::TestCase
|
129
|
-
|
130
|
-
include LWS::Auth
|
131
|
-
|
132
|
-
def setup
|
133
|
-
@user = User.all.first
|
134
|
-
end
|
135
|
-
|
136
|
-
def test_valid_user
|
137
|
-
refute_nil(@user)
|
138
|
-
assert_instance_of(User, @user)
|
139
|
-
refute_nil(@user.id)
|
140
|
-
end
|
141
|
-
|
142
|
-
def test_valid_user_associations
|
143
|
-
assert_instance_of(Account, @user.account)
|
144
|
-
end
|
145
|
-
|
146
|
-
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0.
|
4
|
+
version: 0.3.0.beta5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LeftClick B.V.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday_middleware
|