the_role 2.5.3 → 2.5.4
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/README.md +13 -0
- data/config/locales/nl.yml +44 -0
- data/config/routes.rb +16 -14
- data/lib/the_role.rb +1 -0
- data/lib/the_role/version.rb +1 -1
- data/spec/dummy_app/Gemfile +2 -2
- data/spec/dummy_app/config/routes.rb +6 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 626bfa9539e57a6786b501f93020c87e3acafda9
|
4
|
+
data.tar.gz: 7a8283cc83abf00e6534f175bab6ea383140b61c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7ff40200cbd2021824ac83debeb74e77a9d629009082148e90c82bdbfc4a44cbad5eeedd3975f72e860e5d678cf1c01f35b2fb2ee8a4040741a2934da57d782
|
7
|
+
data.tar.gz: 255e284863d2a3ab3d3df592b00caf54d9abad008788ebfff393bdf5c99131b11621ba25e4d051b40dee3d0e73946fe2ef1d0d223d8a44281f6c17422559030b
|
data/README.md
CHANGED
@@ -192,6 +192,19 @@ class ApplicationController < ActionController::Base
|
|
192
192
|
end
|
193
193
|
end
|
194
194
|
```
|
195
|
+
|
196
|
+
#### Mount routes
|
197
|
+
|
198
|
+
config/routes.rb
|
199
|
+
|
200
|
+
```ruby
|
201
|
+
concern :the_role, TheRole::AdminRoutes.new
|
202
|
+
|
203
|
+
namespace :admin do
|
204
|
+
concerns :the_role
|
205
|
+
end
|
206
|
+
```
|
207
|
+
|
195
208
|
### Configuration
|
196
209
|
|
197
210
|
create the_role config:
|
@@ -0,0 +1,44 @@
|
|
1
|
+
nl:
|
2
|
+
the_role:
|
3
|
+
role_created: Toegangsprofiel aangemaakt
|
4
|
+
role_updated: Toegangsprofiel bijgewerkt
|
5
|
+
role_deleted: Toegangsprofiel verwijderd
|
6
|
+
section_created: Sectie aangemaakt
|
7
|
+
section_not_created: Sectie niet aangemaakt
|
8
|
+
section_rule_created: "Sectieprofiel aangemaakt"
|
9
|
+
section_rule_not_created: "Sectieprofiel niet aangemaakt"
|
10
|
+
section_rule_on: "Sectieprofiel is geactiveerd"
|
11
|
+
section_rule_off: "Sectieprofiel is gedeactiveerd"
|
12
|
+
state_not_changed: "Sectieprofiel niet aangepast"
|
13
|
+
section_deleted: Sectie verwijderd
|
14
|
+
section_not_deleted: Sectie niet verwijderd
|
15
|
+
section_rule_deleted: "Sectieprofiel verwijderd"
|
16
|
+
section_rule_not_deleted: "Sectieprofiel niet verwijderd"
|
17
|
+
access_denied: "Toegang geweigerd"
|
18
|
+
|
19
|
+
admin:
|
20
|
+
roles:
|
21
|
+
new:
|
22
|
+
create: Maak nieuwe toegangsprofiel aan
|
23
|
+
name: Naam van toegangsprofiel (underscored latin string)
|
24
|
+
title: Titel van toegangsprofiel (text)
|
25
|
+
description: Beschrijving van toegangsprofiel (text)
|
26
|
+
based_on_role: "Nieuwe toegansprofiel wordt gebaseerd op:"
|
27
|
+
role:
|
28
|
+
role_name: 'Toegangsprofiel naam:'
|
29
|
+
title: 'Titel:'
|
30
|
+
role_description: 'Omschrijving van het toegangsprofiel:'
|
31
|
+
delete_section: Verwijder sectie
|
32
|
+
section_delete_confirm: 'Wil je de sectie verwijderen?'
|
33
|
+
rule_delete_confirm: 'Wil je het toegangsprofiel verwijderen?'
|
34
|
+
enable: Activeren
|
35
|
+
disable: Deactiveren
|
36
|
+
delete_rule: Verwijder toegangsprofiel
|
37
|
+
new_section_placeholder: Naam nieuwe sectie
|
38
|
+
create_section: Maak nieuwe sectie aan
|
39
|
+
new_rule_placeholder: Naam nieuw toegansprofiel
|
40
|
+
create_rule: Maak nieuw toegansprofiel
|
41
|
+
sidebar:
|
42
|
+
roles_list: Lijst toegangsprofielen
|
43
|
+
new_role: Maak nieuw toegansprofiel
|
44
|
+
delete_role_confirm: 'Weet je het zeker? Dit kan gevaarlijk zijn!'
|
data/config/routes.rb
CHANGED
@@ -1,19 +1,21 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
module TheRole
|
2
|
+
class AdminRoutes
|
3
|
+
def call mapper, options = {}
|
4
|
+
mapper.resources :roles, :except => :show do
|
5
|
+
mapper.patch 'change', on: :member
|
6
|
+
mapper.resources :sections, :controller => :role_sections, :only => :none do
|
7
|
+
mapper.collection do
|
8
|
+
mapper.post :create
|
9
|
+
mapper.post :create_rule
|
10
|
+
end
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
mapper.member do
|
13
|
+
mapper.put :rule_on
|
14
|
+
mapper.put :rule_off
|
14
15
|
|
15
|
-
|
16
|
-
|
16
|
+
mapper.delete :destroy
|
17
|
+
mapper.delete :destroy_rule
|
18
|
+
end
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
data/lib/the_role.rb
CHANGED
data/lib/the_role/version.rb
CHANGED
data/spec/dummy_app/Gemfile
CHANGED
@@ -21,8 +21,8 @@ gem 'jbuilder', '~> 1.0.1'
|
|
21
21
|
# gem 'the_string_to_slug', path: "../../../the_string_to_slug"
|
22
22
|
|
23
23
|
gem 'the_role',
|
24
|
-
|
25
|
-
"~> 2.5.3"
|
24
|
+
path: '../../'
|
25
|
+
# "~> 2.5.3"
|
26
26
|
|
27
27
|
gem 'the_role_bootstrap3_ui',
|
28
28
|
# path: "path: '../../../../../the_role_bootstrap3_ui"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: the_role
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.4
|
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: 2014-03-
|
11
|
+
date: 2014-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: the_string_to_slug
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- app/models/concerns/user.rb
|
70
70
|
- config/locales/en.yml
|
71
71
|
- config/locales/es.yml
|
72
|
+
- config/locales/nl.yml
|
72
73
|
- config/locales/pl.yml
|
73
74
|
- config/locales/pt_BR.yml
|
74
75
|
- config/locales/ru.yml
|