the_role_api 3.7 → 3.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/initializers/the_role.rb +1 -0
- data/lib/the_role_api/config.rb +32 -30
- data/the_role_api.gemspec +4 -1
- metadata +2 -3
- data/lib/the_role_api/version.rb +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 057a9e358ecd4bd9b8cae771303a35c6a95c2248
|
4
|
+
data.tar.gz: a29a59233b278ad8fe323bc75486f532f38cbfb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c2667414401a7d3462a023ef2b5f3e5e964a264f6f713af34de91be0a4b7d854c391f273a93c2b0c3a204fb6c5b59f11241c8f871f69e378dbb0ffa557dd764
|
7
|
+
data.tar.gz: dff98bc998175d50212d31618b1ac616c62c6e27daf692749d8204dba1c0c2bceae5a7cff7a0a9701f5c1e739b90c42e64300e0bb2b6e5e71245f245a411af61
|
data/lib/the_role_api/config.rb
CHANGED
@@ -1,30 +1,32 @@
|
|
1
|
-
module TheRole
|
2
|
-
def self.configure(&block)
|
3
|
-
yield @config ||= TheRole::Configuration.new
|
4
|
-
end
|
5
|
-
|
6
|
-
def self.config
|
7
|
-
@config
|
8
|
-
end
|
9
|
-
|
10
|
-
# Configuration class
|
11
|
-
class Configuration
|
12
|
-
include ActiveSupport::Configurable
|
13
|
-
config_accessor :layout,
|
14
|
-
:
|
15
|
-
:
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
config.
|
25
|
-
|
26
|
-
config.
|
27
|
-
config.
|
28
|
-
config.
|
29
|
-
|
30
|
-
|
1
|
+
module TheRole
|
2
|
+
def self.configure(&block)
|
3
|
+
yield @config ||= TheRole::Configuration.new
|
4
|
+
end
|
5
|
+
|
6
|
+
def self.config
|
7
|
+
@config
|
8
|
+
end
|
9
|
+
|
10
|
+
# Configuration class
|
11
|
+
class Configuration
|
12
|
+
include ActiveSupport::Configurable
|
13
|
+
config_accessor :layout,
|
14
|
+
:layout_title,
|
15
|
+
:destroy_strategy,
|
16
|
+
:default_user_role,
|
17
|
+
:access_denied_method,
|
18
|
+
:login_required_method,
|
19
|
+
:first_user_should_be_admin
|
20
|
+
end
|
21
|
+
|
22
|
+
configure do |config|
|
23
|
+
config.layout = :application
|
24
|
+
config.layout_title = 'The Role Gem'
|
25
|
+
|
26
|
+
config.default_user_role = nil
|
27
|
+
config.access_denied_method = nil
|
28
|
+
config.login_required_method = nil
|
29
|
+
config.destroy_strategy = nil
|
30
|
+
config.first_user_should_be_admin = false
|
31
|
+
end
|
32
|
+
end
|
data/the_role_api.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: the_role_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '3.
|
4
|
+
version: '3.8'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ilya N. Zykin [the-teacher]
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -93,7 +93,6 @@ files:
|
|
93
93
|
- lib/the_role_api/config.rb
|
94
94
|
- lib/the_role_api/hash.rb
|
95
95
|
- lib/the_role_api/trash/the_class_exists.rb
|
96
|
-
- lib/the_role_api/version.rb
|
97
96
|
- the_role_api.gemspec
|
98
97
|
homepage: https://github.com/TheRole/the_role_api
|
99
98
|
licenses:
|
data/lib/the_role_api/version.rb
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require_relative '../../gem_version'
|