voltex 0.0.8 → 0.1.0

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
- SHA1:
3
- metadata.gz: b282a966aaaf962ee73b61a7058797997d190260
4
- data.tar.gz: 3512c2339b07c25d1327fb9c98222f5a363401b8
2
+ SHA256:
3
+ metadata.gz: a58483dce8dc2fbbe9d70c173f50a47f43c9d33d3e8f41db402aa7619969704d
4
+ data.tar.gz: c97710119e36c74a0d0d5d1a592c9d9033cd41422f0d8bd78e49e0e7f212ea7f
5
5
  SHA512:
6
- metadata.gz: c6f0ce0d777f8e1fe2e16a76c7adb43befaa0d37ad32185f8cf0d35cab8a6e6683ef7cc3fd9a8f270a268915f4bdc1fff63904d5fbc37b94c14b39b7e34ada88
7
- data.tar.gz: 0d6ba883b3fa46241662b83169b4b4da6fe3fc20fad48362cbeee4465457b808deb9ccefe9a067b4f30c18a19432ac5604332efb498c466f6c071c69595275c1
6
+ metadata.gz: 818f929bc3b35f92396447f7547e23ef67fda7b5d20893322561713cbeddb2af6bfbaf6faf8f0b6c6236239e8ec09d9dc9c4f81b625d21b132797e96c1fc7713
7
+ data.tar.gz: 24c17c7afebdca85fd14a7bea69c8e72d234e4ff394d61e4cd5fd915e9150e676299cc79466a85fcf1648e18d25e84ebb0c5b0cef6caeebb48cc956cefcf7477
@@ -1,12 +1,15 @@
1
1
  desc 'Creates default permissions'
2
2
  task voltex: :environment do
3
3
  Rails.application.eager_load!
4
+ Zeitwerk::Loader.eager_load_all if defined?(Zeitwerk)
5
+ base_class = ApplicationRecord rescue ActiveRecord::Base
4
6
 
5
- ActiveRecord::Base.descendants.each do |descendant|
7
+ base_class.descendants.each do |descendant|
6
8
  Voltex.default_actions.each do |action|
7
9
  Voltex.permission_model.where(
8
10
  resource: descendant.name,
9
- action: action).first_or_create
11
+ action: action
12
+ ).first_or_create
10
13
  end
11
14
  end
12
15
 
@@ -1,3 +1,3 @@
1
1
  module Voltex
2
- VERSION = '0.0.8'
2
+ VERSION = '0.1.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voltex
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erick Fabian
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2018-01-29 00:00:00.000000000 Z
12
+ date: 2019-10-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -17,14 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '4.0'
20
+ version: '4.2'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '4.0'
27
+ version: '4.2'
28
+ - !ruby/object:Gem::Dependency
29
+ name: activerecord
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '4.2'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '4.2'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: request_store
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -40,75 +54,75 @@ dependencies:
40
54
  - !ruby/object:Gem::Version
41
55
  version: '1.3'
42
56
  - !ruby/object:Gem::Dependency
43
- name: sqlite3
57
+ name: aruba
44
58
  requirement: !ruby/object:Gem::Requirement
45
59
  requirements:
46
60
  - - "~>"
47
61
  - !ruby/object:Gem::Version
48
- version: '1.3'
62
+ version: '0.14'
49
63
  type: :development
50
64
  prerelease: false
51
65
  version_requirements: !ruby/object:Gem::Requirement
52
66
  requirements:
53
67
  - - "~>"
54
68
  - !ruby/object:Gem::Version
55
- version: '1.3'
69
+ version: '0.14'
56
70
  - !ruby/object:Gem::Dependency
57
- name: rspec-rails
71
+ name: cancan
58
72
  requirement: !ruby/object:Gem::Requirement
59
73
  requirements:
60
74
  - - "~>"
61
75
  - !ruby/object:Gem::Version
62
- version: '3.7'
76
+ version: '1.6'
63
77
  type: :development
64
78
  prerelease: false
65
79
  version_requirements: !ruby/object:Gem::Requirement
66
80
  requirements:
67
81
  - - "~>"
68
82
  - !ruby/object:Gem::Version
69
- version: '3.7'
83
+ version: '1.6'
70
84
  - !ruby/object:Gem::Dependency
71
- name: cucumber
85
+ name: sqlite3
72
86
  requirement: !ruby/object:Gem::Requirement
73
87
  requirements:
74
88
  - - "~>"
75
89
  - !ruby/object:Gem::Version
76
- version: '3.1'
90
+ version: '1.4'
77
91
  type: :development
78
92
  prerelease: false
79
93
  version_requirements: !ruby/object:Gem::Requirement
80
94
  requirements:
81
95
  - - "~>"
82
96
  - !ruby/object:Gem::Version
83
- version: '3.1'
97
+ version: '1.4'
84
98
  - !ruby/object:Gem::Dependency
85
- name: aruba
99
+ name: cucumber
86
100
  requirement: !ruby/object:Gem::Requirement
87
101
  requirements:
88
102
  - - "~>"
89
103
  - !ruby/object:Gem::Version
90
- version: '0.14'
104
+ version: '3.1'
91
105
  type: :development
92
106
  prerelease: false
93
107
  version_requirements: !ruby/object:Gem::Requirement
94
108
  requirements:
95
109
  - - "~>"
96
110
  - !ruby/object:Gem::Version
97
- version: '0.14'
111
+ version: '3.1'
98
112
  - !ruby/object:Gem::Dependency
99
- name: cancan
113
+ name: rspec-rails
100
114
  requirement: !ruby/object:Gem::Requirement
101
115
  requirements:
102
116
  - - "~>"
103
117
  - !ruby/object:Gem::Version
104
- version: '1.6'
118
+ version: '3.9'
105
119
  type: :development
106
120
  prerelease: false
107
121
  version_requirements: !ruby/object:Gem::Requirement
108
122
  requirements:
109
123
  - - "~>"
110
124
  - !ruby/object:Gem::Version
111
- version: '1.6'
125
+ version: '3.9'
112
126
  description: This engine aims to provide an easy way to work with dynamic permissions.
113
127
  email:
114
128
  - fabianerickalfonso@gmail.com
@@ -117,7 +131,6 @@ executables: []
117
131
  extensions: []
118
132
  extra_rdoc_files: []
119
133
  files:
120
- - MIT-LICENSE
121
134
  - README.md
122
135
  - Rakefile
123
136
  - app/controllers/voltex/application_controller.rb
@@ -161,15 +174,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
161
174
  requirements:
162
175
  - - ">="
163
176
  - !ruby/object:Gem::Version
164
- version: 2.0.0
177
+ version: '0'
165
178
  required_rubygems_version: !ruby/object:Gem::Requirement
166
179
  requirements:
167
180
  - - ">="
168
181
  - !ruby/object:Gem::Version
169
182
  version: '0'
170
183
  requirements: []
171
- rubyforge_project:
172
- rubygems_version: 2.6.14
184
+ rubygems_version: 3.0.6
173
185
  signing_key:
174
186
  specification_version: 4
175
187
  summary: Dynamic permissions authorization.
@@ -1,20 +0,0 @@
1
- Copyright 2015
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.