lti_roles 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: f6bb3dfd0cddf026cb1a18a4b87a95d09bbdc166
4
- data.tar.gz: 9d940e9ad7709f14e8333e0146bc52349b6105e8
3
+ metadata.gz: 4fe490787524eb7f6b3fb35ecc580d8cd3f4db7a
4
+ data.tar.gz: 2cb53f7920b5d2de6f766dcf705034f2110ad507
5
5
  SHA512:
6
- metadata.gz: 7d278152e45f9b2f742f8dd9574101867918b130d708140398ee0d55cec9d993eb27c558984393d0c185c1e320456579dc2b4a8d12aaa19de50d182637e1f1f1
7
- data.tar.gz: 7837d3a8a5c05e687cffb29b1206b5f19d5b287f5943e487762453bcc4fcfd8bbfd4d95e49157e27eba3a60f041c0d46ab7b6bfcfaf8a494c25319126bb82004
6
+ metadata.gz: fb95baec26dd6e191d9819cbc498e76e03caaf77df341c5d931d93e1247d2738db5c218473061f0ccb457efd6682f1408ec18a07fa2459d61d30e541cfc71453
7
+ data.tar.gz: 1607994260bc6024a18500573514580f3c2b38cc4f72fb5a91091329f92a36cbaae466ff376fd0f7f4408bb3f3f7020a23956aa7f77d28f5b954b7546ca78b64
@@ -12,10 +12,10 @@ module LTIRoles
12
12
 
13
13
  def initialize(roles = '')
14
14
  @roles = roles
15
- @context_types = []#map_roles(ContextTypeURN)
16
- @system_roles = []#map_roles(SystemRoleURN)
17
- @institution_roles = []#map_roles(InstitutionRoleURN)
18
- @context_roles = []#map_roles(ContextRoleURN)
15
+ @context_types = []
16
+ @system_roles = []
17
+ @institution_roles = []
18
+ @context_roles = []
19
19
  @other_roles = []
20
20
  map_roles
21
21
  end
@@ -38,7 +38,7 @@ module LTIRoles
38
38
  end
39
39
 
40
40
  def clean_role(urn_prefix, role)
41
- role.gsub(urn_prefix, '').gsub('/', '').underscore
41
+ role.gsub(/#{Regexp.quote(urn_prefix)}/i, '').gsub('/', '').underscore
42
42
  end
43
43
 
44
44
  def to_h
@@ -1,3 +1,3 @@
1
1
  module LTIRoles
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lti_roles
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cody Tanner