mumukit-auth 7.5.1 → 7.5.2
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/mumukit/auth/grant.rb +1 -1
- data/lib/mumukit/auth/slug.rb +13 -6
- data/lib/mumukit/auth/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: a233658a7f1e3cfb135b4a483349e9fe38e20d92a5bf8a97040ccc618640c077
|
4
|
+
data.tar.gz: 0664fea5f198d4870f21c681f1e42e36df4d4081735e4844edc0891211ffe5a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 836d44fcc5880cbc22268a9705e4f4d5a9f77256d7de7a84851356ce7da06daf5b5da0bea28b56a7aebabd1b89109b9e556e6af728ea6edbb923cc13e67e8d37
|
7
|
+
data.tar.gz: d8860943ad2c1da1190189664deaeb73681abf3543c93e219b7c563eb1c27d998954678ef70da2de6b7c22e4332115af612b7aea31db325b27d08aba10e9ebef
|
data/lib/mumukit/auth/grant.rb
CHANGED
data/lib/mumukit/auth/slug.rb
CHANGED
@@ -15,16 +15,19 @@ module Mumukit::Auth
|
|
15
15
|
alias_method :content, :second
|
16
16
|
|
17
17
|
def initialize(first, second)
|
18
|
-
|
19
|
-
|
18
|
+
raise 'slug first part must be non-nil' unless first
|
19
|
+
raise 'slug second part must be non-nil' unless second
|
20
|
+
|
21
|
+
@first = first
|
22
|
+
@second = second
|
20
23
|
end
|
21
24
|
|
22
25
|
def match_first(first)
|
23
|
-
match self.first, first
|
26
|
+
match self.first.downcase, first.downcase
|
24
27
|
end
|
25
28
|
|
26
29
|
def match_second(second)
|
27
|
-
match self.second, second
|
30
|
+
match self.second.downcase, second.downcase
|
28
31
|
end
|
29
32
|
|
30
33
|
def rebase(new_organizaton)
|
@@ -32,19 +35,23 @@ module Mumukit::Auth
|
|
32
35
|
end
|
33
36
|
|
34
37
|
def ==(o)
|
35
|
-
self.class == o.class &&
|
38
|
+
self.class == o.class && to_case_insensitive_s == o.to_case_insensitive_s
|
36
39
|
end
|
37
40
|
|
38
41
|
alias_method :eql?, :==
|
39
42
|
|
40
43
|
def hash
|
41
|
-
|
44
|
+
to_case_insensitive_s.hash
|
42
45
|
end
|
43
46
|
|
44
47
|
def to_s
|
45
48
|
"#{first}/#{second}"
|
46
49
|
end
|
47
50
|
|
51
|
+
def to_case_insensitive_s
|
52
|
+
@case_insensitive_s ||= to_s.downcase
|
53
|
+
end
|
54
|
+
|
48
55
|
def inspect
|
49
56
|
"<Mumukit::Auth::Slug #{to_s}>"
|
50
57
|
end
|
data/lib/mumukit/auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mumukit-auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 7.5.
|
4
|
+
version: 7.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Franco Leonardo Bulgarelli
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|