subroutine 0.10.0.beta9 → 0.10.0.beta10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/subroutine/auth.rb +6 -3
- data/lib/subroutine/version.rb +1 -1
- data/test/subroutine/auth_test.rb +5 -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: 70efa6b815728e1b2d8e3117ebc40b629d98f7f150528a1901ff7e03f763fa10
|
4
|
+
data.tar.gz: 28d84cad0e8508b32c0f7ad93d3c79b94a3cdef9b5632c3b933f7f85a04b703b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d2f21c4f6739a3ad32c5915f7f8eb60efece410ceb78b31f76b1f5f522ee65b669c0f42b4d5c43bd5aedf549cefe7643e837879e1cf513676491017aa8a6bf1
|
7
|
+
data.tar.gz: '06698f7f7ddd4993ee0e6651a8f1b38f665fc770be023d532bd7b5671030213f26f58b18cf58c1d569433f6ce41854b98909f94bbd15b1ba8a5261e97a77d512'
|
data/lib/subroutine/auth.rb
CHANGED
@@ -88,10 +88,13 @@ module Subroutine
|
|
88
88
|
super(args.extract_options!, &block)
|
89
89
|
|
90
90
|
@skip_auth_checks = false
|
91
|
-
@current_user = args.shift
|
92
91
|
|
93
|
-
|
94
|
-
|
92
|
+
user = args.shift
|
93
|
+
|
94
|
+
if self.class.supported_user_class_names.include?(user.class.name)
|
95
|
+
@current_user = user
|
96
|
+
else
|
97
|
+
raise ArgumentError, "current_user must be one of the following types {#{self.class.supported_user_class_names.join(",")}} but was #{user.class.name}"
|
95
98
|
end
|
96
99
|
end
|
97
100
|
|
data/lib/subroutine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: subroutine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.0.
|
4
|
+
version: 0.10.0.beta10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Nelson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-01-
|
11
|
+
date: 2020-01-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|