prx_auth 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/prx_auth/resource_map.rb +8 -0
- data/lib/prx_auth/scope_list.rb +4 -0
- data/lib/prx_auth/version.rb +1 -1
- data/test/prx_auth/resource_map_test.rb +13 -0
- data/test/prx_auth/scope_list_test.rb +11 -0
- 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: ea45502db577f8550ac1aa9d96187123a7a62d67e7d51998eac6d0eded55e587
|
4
|
+
data.tar.gz: 1e0cd0290b00484e5bb3dc6979d79c154287c823bf5f284a2657f35addcb6272
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf7061a2989e205e67f8c908f971b26ebb6d281f3234dcfaef1d29b50ed33369a9256ad7472415e67f13f25f63d24f87298562435c70eb0dd4c489b6ca83dac9
|
7
|
+
data.tar.gz: ea96bdda24fd8a2a1dba8bea12b9ac793316d021962f0751b3ac3e3496e90b8096db7f38af664fca535e5951a37771761111144154abf4933e10b5f7c538c532
|
data/lib/prx_auth/scope_list.rb
CHANGED
data/lib/prx_auth/version.rb
CHANGED
@@ -169,4 +169,17 @@ describe PrxAuth::ResourceMap do
|
|
169
169
|
assert map.as_json.has_key?('*')
|
170
170
|
end
|
171
171
|
end
|
172
|
+
|
173
|
+
describe '#[]' do
|
174
|
+
it 'automatically stringifies' do
|
175
|
+
refute_nil map[123]
|
176
|
+
end
|
177
|
+
end
|
178
|
+
|
179
|
+
describe '#[]=' do
|
180
|
+
it 'automatically stringifies' do
|
181
|
+
map[789] = PrxAuth::ScopeList.new("")
|
182
|
+
refute_nil map["789"]
|
183
|
+
end
|
184
|
+
end
|
172
185
|
end
|
@@ -105,4 +105,15 @@ describe PrxAuth::ScopeList do
|
|
105
105
|
assert !sl.contains?(:one)
|
106
106
|
end
|
107
107
|
end
|
108
|
+
|
109
|
+
describe '==' do
|
110
|
+
|
111
|
+
it 'is equal when they are functionally equal' do
|
112
|
+
assert_equal PrxAuth::ScopeList.new("foo ns:foo bar ns2:baz"), PrxAuth::ScopeList.new("ns2:baz bar foo")
|
113
|
+
end
|
114
|
+
|
115
|
+
it 'is not equal when they are not functionally equal' do
|
116
|
+
refute_equal PrxAuth::ScopeList.new("foo bar"), PrxAuth::ScopeList.new("foo:bar bar:foo")
|
117
|
+
end
|
118
|
+
end
|
108
119
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: prx_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eve Asher
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-08-
|
12
|
+
date: 2020-08-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|