mumukit-auth 7.5.1 → 7.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b6e7669dbae64688edb9e4fb1fa943d84d6918c623c57e461bc24e1ea8487d7e
4
- data.tar.gz: 89299a776db1bb429ab04bd7374464065665554b4ffd24f7ee34b8ef54f501f9
3
+ metadata.gz: a233658a7f1e3cfb135b4a483349e9fe38e20d92a5bf8a97040ccc618640c077
4
+ data.tar.gz: 0664fea5f198d4870f21c681f1e42e36df4d4081735e4844edc0891211ffe5a2
5
5
  SHA512:
6
- metadata.gz: a6ab2cfd8d72c54b679639a29f6463a80ef2aaa6df765d0e1e369fc17696ecdaf0adf86bd96ad33bc228e080d4b6996d630bf0172ffa5b882e11881666bb0937
7
- data.tar.gz: 2f28c3c9fa41fc3dc9527c80735d32e8a91adac6b44d5ad4b99271e493a1b32cc24c9f92642e5a415cf30618e86bb0fe702ff147f31bc53d11ce3e9b0a1f9205
6
+ metadata.gz: 836d44fcc5880cbc22268a9705e4f4d5a9f77256d7de7a84851356ce7da06daf5b5da0bea28b56a7aebabd1b89109b9e556e6af728ea6edbb923cc13e67e8d37
7
+ data.tar.gz: d8860943ad2c1da1190189664deaeb73681abf3543c93e219b7c563eb1c27d998954678ef70da2de6b7c22e4332115af612b7aea31db325b27d08aba10e9ebef
@@ -86,7 +86,7 @@ module Mumukit::Auth
86
86
  end
87
87
 
88
88
  def to_s
89
- @slug.to_s
89
+ @slug.to_case_insensitive_s
90
90
  end
91
91
 
92
92
  def to_mumukit_slug
@@ -15,16 +15,19 @@ module Mumukit::Auth
15
15
  alias_method :content, :second
16
16
 
17
17
  def initialize(first, second)
18
- @first = first.downcase
19
- @second = second.downcase
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 && to_s == o.to_s
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
- to_s.hash
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
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Auth
3
- VERSION = '7.5.1'
3
+ VERSION = '7.5.2'
4
4
  end
5
5
  end
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.1
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-17 00:00:00.000000000 Z
11
+ date: 2019-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler