arpa 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +17 -0
- data/.ruby-version +1 -1
- data/.travis.yml +5 -0
- data/CHANGELOG.md +4 -0
- data/README.md +4 -4
- data/Rakefile +1 -2
- data/arpa.gemspec +17 -18
- data/lib/arpa.rb +65 -67
- data/lib/arpa/additions/resource.rb +0 -2
- data/lib/arpa/data_mappers/action_mapper.rb +1 -2
- data/lib/arpa/data_mappers/base.rb +15 -16
- data/lib/arpa/data_mappers/profile_mapper.rb +3 -4
- data/lib/arpa/data_mappers/resource_mapper.rb +1 -1
- data/lib/arpa/data_mappers/role_mapper.rb +2 -2
- data/lib/arpa/entities/action.rb +0 -2
- data/lib/arpa/entities/profile.rb +2 -3
- data/lib/arpa/entities/resource.rb +4 -6
- data/lib/arpa/entities/role.rb +2 -3
- data/lib/arpa/exceptions/record_invalid.rb +0 -1
- data/lib/arpa/repositories/actions/creator.rb +0 -1
- data/lib/arpa/repositories/actions/finder.rb +5 -6
- data/lib/arpa/repositories/actions/remover.rb +0 -1
- data/lib/arpa/repositories/actions/repository_action.rb +1 -2
- data/lib/arpa/repositories/base.rb +0 -2
- data/lib/arpa/repositories/profiles/creator.rb +0 -1
- data/lib/arpa/repositories/profiles/finder.rb +2 -3
- data/lib/arpa/repositories/profiles/remover.rb +0 -1
- data/lib/arpa/repositories/profiles/repository_profile.rb +1 -2
- data/lib/arpa/repositories/profiles/updater.rb +0 -1
- data/lib/arpa/repositories/registrator.rb +5 -10
- data/lib/arpa/repositories/resources/creator.rb +0 -1
- data/lib/arpa/repositories/resources/finder.rb +0 -1
- data/lib/arpa/repositories/resources/remover.rb +0 -1
- data/lib/arpa/repositories/resources/repository_resource.rb +1 -2
- data/lib/arpa/repositories/roles/creator.rb +0 -1
- data/lib/arpa/repositories/roles/finder.rb +0 -1
- data/lib/arpa/repositories/roles/remover.rb +0 -1
- data/lib/arpa/repositories/roles/repository_role.rb +1 -2
- data/lib/arpa/repositories/roles/updater.rb +0 -1
- data/lib/arpa/services/actions/create/action_creator.rb +1 -3
- data/lib/arpa/services/actions/remove/action_remover.rb +0 -2
- data/lib/arpa/services/base.rb +6 -10
- data/lib/arpa/services/profiles/create/profile_creator.rb +0 -2
- data/lib/arpa/services/profiles/profile_manager_creator.rb +0 -1
- data/lib/arpa/services/profiles/profile_manager_remover.rb +0 -1
- data/lib/arpa/services/profiles/profile_manager_updater.rb +0 -1
- data/lib/arpa/services/profiles/remove/profile_remover.rb +0 -2
- data/lib/arpa/services/profiles/update/profile_updater.rb +0 -2
- data/lib/arpa/services/resources/create/resource_creator.rb +0 -2
- data/lib/arpa/services/resources/remove/resource_remover.rb +1 -4
- data/lib/arpa/services/resources/resource_manager_creator.rb +1 -2
- data/lib/arpa/services/roles/create/role_creator.rb +0 -3
- data/lib/arpa/services/roles/remove/role_remover.rb +0 -2
- data/lib/arpa/services/roles/role_manager_creator.rb +0 -2
- data/lib/arpa/services/roles/role_manager_remover.rb +0 -1
- data/lib/arpa/services/roles/role_manager_updater.rb +0 -1
- data/lib/arpa/services/roles/update/role_updater.rb +0 -2
- data/lib/arpa/services/verifier.rb +0 -1
- data/lib/arpa/validators/action_validator.rb +0 -1
- data/lib/arpa/validators/profile_validator.rb +0 -1
- data/lib/arpa/validators/resource_validator.rb +0 -1
- data/lib/arpa/validators/role_validator.rb +0 -2
- data/lib/arpa/version.rb +1 -1
- data/lib/generators/arpa/controllers_generator.rb +21 -22
- data/lib/generators/arpa/install_generator.rb +5 -6
- data/lib/generators/arpa/templates/controllers/profiles_controller.rb +31 -37
- data/lib/generators/arpa/templates/controllers/resources_controller.rb +20 -11
- data/lib/generators/arpa/templates/controllers/roles_controller.rb +31 -37
- data/lib/generators/arpa/templates/migration.rb +1 -1
- data/spec/factories/repository_actions.rb +4 -5
- data/spec/factories/repository_profiles.rb +4 -5
- data/spec/factories/repository_resources.rb +1 -3
- data/spec/factories/repository_roles.rb +2 -3
- data/spec/factories/repository_test.rb +1 -1
- data/spec/lib/arpa/additions/resource_spec.rb +8 -6
- data/spec/lib/arpa/data_mappers/action_mapper_spec.rb +1 -3
- data/spec/lib/arpa/data_mappers/base_spec.rb +0 -2
- data/spec/lib/arpa/data_mappers/profile_mapper_spec.rb +1 -3
- data/spec/lib/arpa/data_mappers/resource_mapper_spec.rb +1 -3
- data/spec/lib/arpa/data_mappers/role_mapper_spec.rb +1 -3
- data/spec/lib/arpa/entities/action_spec.rb +3 -6
- data/spec/lib/arpa/entities/profile_spec.rb +1 -7
- data/spec/lib/arpa/entities/resource_spec.rb +1 -9
- data/spec/lib/arpa/entities/role_spec.rb +1 -7
- data/spec/lib/arpa/repositories/actions/finder_spec.rb +1 -8
- data/spec/lib/arpa/repositories/base_spec.rb +1 -9
- data/spec/lib/arpa/repositories/profiles/finder_spec.rb +0 -6
- data/spec/lib/arpa/repositories/profiles/remover_spec.rb +0 -4
- data/spec/lib/arpa/repositories/resources/finder_spec.rb +0 -8
- data/spec/lib/arpa/repositories/resources/remover_spec.rb +0 -4
- data/spec/lib/arpa/repositories/roles/finder_spec.rb +0 -4
- data/spec/lib/arpa/repositories/roles/remover_spec.rb +0 -4
- data/spec/lib/arpa/requests/profiles/create_request_spec.rb +10 -12
- data/spec/lib/arpa/requests/profiles/remove_request_spec.rb +4 -9
- data/spec/lib/arpa/requests/resources/create_request_spec.rb +18 -21
- data/spec/lib/arpa/requests/roles/create_request_spec.rb +7 -9
- data/spec/lib/arpa/requests/roles/remove_request_spec.rb +3 -6
- data/spec/lib/arpa/requests/roles/update_request_spec.rb +7 -9
- data/spec/lib/arpa/services/actions/create/action_creator_spec.rb +5 -14
- data/spec/lib/arpa/services/actions/remove/action_remover_spec.rb +3 -6
- data/spec/lib/arpa/services/base_spec.rb +8 -15
- data/spec/lib/arpa/services/profiles/create/profile_creator_spec.rb +0 -7
- data/spec/lib/arpa/services/profiles/profile_manager_creator_spec.rb +2 -4
- data/spec/lib/arpa/services/profiles/profile_manager_remover_spec.rb +3 -6
- data/spec/lib/arpa/services/profiles/profile_manager_updater_spec.rb +2 -4
- data/spec/lib/arpa/services/profiles/remove/profile_remover_spec.rb +0 -5
- data/spec/lib/arpa/services/profiles/update/profile_updater_spec.rb +0 -7
- data/spec/lib/arpa/services/resources/create/resource_creator_spec.rb +1 -7
- data/spec/lib/arpa/services/resources/remove/resource_remover_spec.rb +2 -6
- data/spec/lib/arpa/services/resources/resource_manager_creator_spec.rb +5 -7
- data/spec/lib/arpa/services/roles/create/role_creator_spec.rb +0 -7
- data/spec/lib/arpa/services/roles/remove/role_remover_spec.rb +1 -8
- data/spec/lib/arpa/services/roles/role_manager_creator_spec.rb +2 -4
- data/spec/lib/arpa/services/roles/role_manager_remover_spec.rb +2 -4
- data/spec/lib/arpa/services/roles/role_manager_updater_spec.rb +2 -4
- data/spec/lib/arpa/services/roles/update/role_updater_spec.rb +0 -7
- data/spec/lib/arpa/services/verifier_spec.rb +3 -6
- data/spec/lib/arpa/validators/action_validator_spec.rb +0 -1
- data/spec/lib/arpa/validators/profile_validator_spec.rb +1 -2
- data/spec/lib/arpa/validators/resource_validator_spec.rb +0 -1
- data/spec/lib/arpa/validators/role_validator_spec.rb +1 -2
- data/spec/spec_helper.rb +4 -6
- data/spec/support/schema.rb +9 -10
- metadata +40 -36
metadata
CHANGED
@@ -1,65 +1,59 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arpa
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rachid Calazans
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: database_cleaner
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: factory_bot
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '3.3'
|
48
45
|
- - ">="
|
49
46
|
- !ruby/object:Gem::Version
|
50
|
-
version:
|
47
|
+
version: '0'
|
51
48
|
type: :development
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
54
51
|
requirements:
|
55
|
-
- - "~>"
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
version: '3.3'
|
58
52
|
- - ">="
|
59
53
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
54
|
+
version: '0'
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
|
-
name:
|
56
|
+
name: pry
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
64
58
|
requirements:
|
65
59
|
- - ">="
|
@@ -73,27 +67,35 @@ dependencies:
|
|
73
67
|
- !ruby/object:Gem::Version
|
74
68
|
version: '0'
|
75
69
|
- !ruby/object:Gem::Dependency
|
76
|
-
name:
|
70
|
+
name: rake
|
77
71
|
requirement: !ruby/object:Gem::Requirement
|
78
72
|
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '1.3'
|
82
73
|
- - ">="
|
83
74
|
- !ruby/object:Gem::Version
|
84
|
-
version:
|
75
|
+
version: '0'
|
85
76
|
type: :development
|
86
77
|
prerelease: false
|
87
78
|
version_requirements: !ruby/object:Gem::Requirement
|
88
79
|
requirements:
|
89
|
-
- - "
|
80
|
+
- - ">="
|
90
81
|
- !ruby/object:Gem::Version
|
91
|
-
version: '
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
92
94
|
- - ">="
|
93
95
|
- !ruby/object:Gem::Version
|
94
|
-
version:
|
96
|
+
version: '0'
|
95
97
|
- !ruby/object:Gem::Dependency
|
96
|
-
name:
|
98
|
+
name: rubocop
|
97
99
|
requirement: !ruby/object:Gem::Requirement
|
98
100
|
requirements:
|
99
101
|
- - ">="
|
@@ -107,7 +109,7 @@ dependencies:
|
|
107
109
|
- !ruby/object:Gem::Version
|
108
110
|
version: '0'
|
109
111
|
- !ruby/object:Gem::Dependency
|
110
|
-
name:
|
112
|
+
name: sqlite3
|
111
113
|
requirement: !ruby/object:Gem::Requirement
|
112
114
|
requirements:
|
113
115
|
- - ">="
|
@@ -126,28 +128,28 @@ dependencies:
|
|
126
128
|
requirements:
|
127
129
|
- - ">="
|
128
130
|
- !ruby/object:Gem::Version
|
129
|
-
version:
|
131
|
+
version: '0'
|
130
132
|
type: :runtime
|
131
133
|
prerelease: false
|
132
134
|
version_requirements: !ruby/object:Gem::Requirement
|
133
135
|
requirements:
|
134
136
|
- - ">="
|
135
137
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
138
|
+
version: '0'
|
137
139
|
- !ruby/object:Gem::Dependency
|
138
140
|
name: railties
|
139
141
|
requirement: !ruby/object:Gem::Requirement
|
140
142
|
requirements:
|
141
143
|
- - ">="
|
142
144
|
- !ruby/object:Gem::Version
|
143
|
-
version:
|
145
|
+
version: '0'
|
144
146
|
type: :runtime
|
145
147
|
prerelease: false
|
146
148
|
version_requirements: !ruby/object:Gem::Requirement
|
147
149
|
requirements:
|
148
150
|
- - ">="
|
149
151
|
- !ruby/object:Gem::Version
|
150
|
-
version:
|
152
|
+
version: '0'
|
151
153
|
description: Authorization Gem for Ruby and Ruby on Rails projects
|
152
154
|
email:
|
153
155
|
- rachidcalazans@gmail.com
|
@@ -156,8 +158,10 @@ extensions: []
|
|
156
158
|
extra_rdoc_files: []
|
157
159
|
files:
|
158
160
|
- ".gitignore"
|
161
|
+
- ".rubocop.yml"
|
159
162
|
- ".ruby-gemset"
|
160
163
|
- ".ruby-version"
|
164
|
+
- ".travis.yml"
|
161
165
|
- CHANGELOG.md
|
162
166
|
- Gemfile
|
163
167
|
- LICENSE.txt
|
@@ -315,7 +319,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
315
319
|
version: '0'
|
316
320
|
requirements: []
|
317
321
|
rubyforge_project:
|
318
|
-
rubygems_version: 2.6
|
322
|
+
rubygems_version: 2.7.6
|
319
323
|
signing_key:
|
320
324
|
specification_version: 4
|
321
325
|
summary: Authorization Gem for Ruby and Ruby on Rails projects
|