mumukit-auth 3.4.0 → 3.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f996970b436e6ab66475fb320b132809ba5c048
4
- data.tar.gz: 92440b4ee31f5f9a5e029f22b69bea23180cc9c2
3
+ metadata.gz: 63256ef255aa98c721f6ae19e80175d854a95b1f
4
+ data.tar.gz: 2363ef922d76cc6be39fca46a586cc034d3e3968
5
5
  SHA512:
6
- metadata.gz: a40806e2f692bf75844bacf84ad6c22f1fb69f260082b6f00d4f38ea4d445ab8c3ee971fe2734ea9ca38bafe874cb2257ef8506c5a389968cae362caaf3ac8ab
7
- data.tar.gz: 11c38fdcb37d87c1d08764e08837a89da08018f2c541a7f85c4f3abc4d243463e85c4c2e4397fd4e359cba9e64c4d421faf6c28208824e156c10d0c46b6991e8
6
+ metadata.gz: b5c80f78f868f61cbd86b9e7fe2b7c015cbbbc1e90354f74ea630d920fce964255b2b0fc00b5992da25ae2eec237f5a0a53fe8b95b575d0dad61a4155bc3f07e
7
+ data.tar.gz: 36fde21860e81bf850740361ea5825bf005e49dff2dbca0620859d645be18ad5bff86f75d87d4a36b3b3150fbb6813739a2beff9d622a2b6751a98cae35639ac
@@ -50,6 +50,10 @@ class Mumukit::Auth::Permissions
50
50
  other.scopes.all? { |role, scope| has_all_permissions?(role, scope) }
51
51
  end
52
52
 
53
+ def grant_strings_for(role)
54
+ scope_for(role).grants.map(&:to_s)
55
+ end
56
+
53
57
  def as_json(options={})
54
58
  scopes.as_json(options)
55
59
  end
@@ -21,6 +21,10 @@ module Mumukit::Auth
21
21
  new Mumukit::Auth.config.daybreak_name
22
22
  end
23
23
 
24
+ def clean_env!
25
+ FileUtils.rm ["#{Mumukit::Auth.config.daybreak_name}.db"], force: true
26
+ end
27
+
24
28
  def with(&block)
25
29
  store = from_env
26
30
  block.call store
@@ -1,5 +1,5 @@
1
1
  module Mumukit
2
2
  module Auth
3
- VERSION = '3.4.0'
3
+ VERSION = '3.5.0'
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: 3.4.0
4
+ version: 3.5.0
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: 2016-12-26 00:00:00.000000000 Z
11
+ date: 2016-12-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler