wnw_permissible 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 67b5263d2db1322ea7c5ce292bad74c9cac74ca8edae57937bc3e5c369a4c4c9
4
- data.tar.gz: 2ef42e325b9061afc83397696011ea8a1a3ae15fea33705d428c92aad22929e6
3
+ metadata.gz: 8469cd2270279f4c5dfd0100a0919e97b9854a53877746ec6dbba32123dea6d7
4
+ data.tar.gz: 57708e2933882a7b147b6a4902573c5c489359f496a9ab299ac666cb3af87f8d
5
5
  SHA512:
6
- metadata.gz: 9bd0de7884bf61ef0c461fb2474a4812e690f24c1a8c505ebee2e5d8f939910c663626e4d99db440f7e7915cd63e94d5585cd70f67b8eeebb11d288a88ade781
7
- data.tar.gz: 1ebcd4bb7eaa528e68cde79dc761e51fed9977d26821125438e2ffbd819b1cfce726e7e88e0d76fcffbde53b71b8c53d1fcbebe809e368496f74b69af4df1fde
6
+ metadata.gz: cc72a03eaa4b73c7888392ebbfb1b43a8401719a7b773e35a113d3e50ba85a103a8385cfee8e91818c74de118a161ac7bd21f72fc9171bfe60e7b9fd8d28ce25
7
+ data.tar.gz: 67ed2d6dc6c8f3757563f5839d2dcac25fa1c2774b3a7c288c92d67ad4d011e4810d9b797f6156ab139763be310619e43f8f43072624d16a007241a59641641b
data/README.md CHANGED
@@ -74,8 +74,10 @@ Note that the column is a `:string`. The value contained in the column will be s
74
74
  Now decorate `RoleLimit` to declare that your new attribute should be serialized:
75
75
 
76
76
  ```ruby
77
- # app/decorators/role_limit_decorator.rb
78
- RoleLimit.class_eval do
77
+ # app/models/role_limit.rb
78
+ require_dependency WnwPermissible::Engine.config.root.join('app', 'models', __FILE__).to_s
79
+
80
+ class RoleLimit
79
81
  serialize :searches
80
82
  end
81
83
  ```
@@ -1,7 +1,7 @@
1
1
  # Created by WnwPermissible to contain any custom model code. It's safe to
2
2
  # delete this file if you do not need any custom functionality in the model.
3
3
 
4
- require_dependency WnwPermissible::Engine.config.root.join('app', 'models', '<%= config[:model] %>.rb').to_s
4
+ require_dependency WnwPermissible::Engine.config.root.join('app', 'models', __FILE__).to_s
5
5
 
6
6
  class <%= config[:model].camelize %>
7
7
  # add custom model code here
@@ -1,11 +1,5 @@
1
1
  module WnwPermissible
2
2
  class Engine < ::Rails::Engine
3
3
 
4
- config.to_prepare do
5
- Dir.glob(Rails.root + "app/decorators/**/*_decorator*.rb").each do |c|
6
- require_dependency(c)
7
- end
8
- end
9
-
10
4
  end
11
5
  end
@@ -1,3 +1,3 @@
1
1
  module WnwPermissible
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wnw_permissible
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Cameron
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-15 00:00:00.000000000 Z
11
+ date: 2018-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -56,17 +56,12 @@ files:
56
56
  - app/models/role_permission.rb
57
57
  - lib/generators/wnw_permissible/USAGE
58
58
  - lib/generators/wnw_permissible/install_generator.rb
59
- - lib/generators/wnw_permissible/templates/authorization.rb.erb
60
59
  - lib/generators/wnw_permissible/templates/create_authorizations.rb.erb
61
60
  - lib/generators/wnw_permissible/templates/create_permissions.rb.erb
62
61
  - lib/generators/wnw_permissible/templates/create_role_limits.rb.erb
63
62
  - lib/generators/wnw_permissible/templates/create_role_permissions.rb.erb
64
63
  - lib/generators/wnw_permissible/templates/create_roles.rb.erb
65
64
  - lib/generators/wnw_permissible/templates/model.rb.erb
66
- - lib/generators/wnw_permissible/templates/permission.rb.erb
67
- - lib/generators/wnw_permissible/templates/role.rb.erb
68
- - lib/generators/wnw_permissible/templates/role_limit.rb.erb
69
- - lib/generators/wnw_permissible/templates/role_permission.rb.erb
70
65
  - lib/tasks/wnw_permissible_tasks.rake
71
66
  - lib/wnw_permissible.rb
72
67
  - lib/wnw_permissible/engine.rb
@@ -1,8 +0,0 @@
1
- # Created by WnwPermissible to contain any custom model code. It's safe to
2
- # delete this file if you do not need any custom functionality in the model.
3
-
4
- require_dependency WnwPermissible::Engine.config.root.join('app', 'models', 'authorization.rb').to_s
5
-
6
- class Authorization
7
- # add custom model code here
8
- end
@@ -1,8 +0,0 @@
1
- # Created by WnwPermissible to contain any custom model code. It's safe to
2
- # delete this file if you do not need any custom functionality in the model.
3
-
4
- require_dependency WnwPermissible::Engine.config.root.join('app', 'models', 'permission.rb').to_s
5
-
6
- class Permission
7
- # add custom model code here
8
- end
@@ -1,8 +0,0 @@
1
- # Created by WnwPermissible to contain any custom model code. It's safe to
2
- # delete this file if you do not need any custom functionality in the model.
3
-
4
- require_dependency WnwPermissible::Engine.config.root.join('app', 'models', 'role.rb').to_s
5
-
6
- class Role
7
- # add custom model code here
8
- end
@@ -1,8 +0,0 @@
1
- # Created by WnwPermissible to contain any custom model code. It's safe to
2
- # delete this file if you do not need any custom functionality in the model.
3
-
4
- require_dependency WnwPermissible::Engine.config.root.join('app', 'models', 'role_limit.rb').to_s
5
-
6
- class RoleLimit
7
- # add custom model code here
8
- end
@@ -1,8 +0,0 @@
1
- # Created by WnwPermissible to contain any custom model code. It's safe to
2
- # delete this file if you do not need any custom functionality in the model.
3
-
4
- require_dependency WnwPermissible::Engine.config.root.join('app', 'models', 'role_permission.rb').to_s
5
-
6
- class RolePermission
7
- # add custom model code here
8
- end