rhino_project_core 0.21.0.beta.45 → 0.21.0.beta.46

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
2
  SHA256:
3
- metadata.gz: 2067ef29a2dafd97f80be50db1bd8d96de7826914480ffe7b2455afb3a2c3846
4
- data.tar.gz: 9847bf820bd6b94b0affb6fc0a98778fad403de9b431ab0dc7fa0c4812232a69
3
+ metadata.gz: 5523b3587da0f1a5099bb649e0f1243a716a85b27379372ab513c9beb759f3fa
4
+ data.tar.gz: be28497ecfe5fec48183bdddab3b5a13f4e4c0d4a3fa0e2c01bc9153509bf31e
5
5
  SHA512:
6
- metadata.gz: 5eceb42ab45721610b6d13f0fe81b8c49db1272b5b5b1f9ff61dfa0aec10980c598832222cd06af2bad04fd693ca34de7acccd6091e205c750bc94569b9d53e6
7
- data.tar.gz: 807591098866d30ea4843849292f5efe54ac4e44e486775039403eb4a1f4e3a58fa80eed31f6e0c61e2a42334b030b45c882f1c7cc0a5a69a85599a9c151a2ad
6
+ metadata.gz: f5728dd8cc8a7cd570b01af965bd87365f216910ac66011b40023d1e8a632be9edf4275de5b66ed1d89ea054c741e6ea55b0393fd1f848c3ee2d8fa5933009f3
7
+ data.tar.gz: 5a10bba5d890d5f71d8930b34e65de0094130c7b477ffcfc5121877e432103107e45fbf2b360cd4b11bfb1e3741cebe78962b902a7edb47d4ebc554f6890d0cb
@@ -24,6 +24,7 @@ module Rhino
24
24
  include Rhino::Resource::ActiveRecordExtension::Reference
25
25
  include Rhino::Resource::ActiveRecordExtension::Describe
26
26
  include Rhino::Resource::ActiveRecordExtension::Routing
27
+ include Rhino::Resource::ActiveRecordExtension::Owner
27
28
  include Rhino::Resource::ActiveRecordExtension::Params
28
29
  include Rhino::Resource::ActiveRecordExtension::Serialization
29
30
  include Rhino::Resource::ActiveRecordExtension::Search
@@ -89,7 +89,6 @@ module Rhino
89
89
  #
90
90
  def rhino_owner(name, **_options)
91
91
  self.resource_owned_by = name
92
- rhino_policy :global if global_owned?
93
92
  end
94
93
 
95
94
  # Sets rhino_owner[rdoc-ref:rhino_owner] to be the base owner
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative 'resource/owner'
4
- require_relative 'resource/properties'
5
- require_relative 'resource/reference'
6
- require_relative 'resource/describe'
7
- require_relative 'resource/routing'
8
- require_relative 'resource/params'
9
- require_relative 'resource/serialization'
10
- require_relative 'resource/sieves'
3
+ require_relative "resource/owner"
4
+ require_relative "resource/properties"
5
+ require_relative "resource/reference"
6
+ require_relative "resource/describe"
7
+ require_relative "resource/routing"
8
+ require_relative "resource/params"
9
+ require_relative "resource/serialization"
10
+ require_relative "resource/sieves"
11
11
 
12
- require_relative '../../app/policies/rhino/crud_policy'
12
+ require_relative "../../app/policies/rhino/crud_policy"
13
13
 
14
14
  module Rhino
15
15
  module Resource
@@ -25,7 +25,7 @@ module Rhino
25
25
  include Rhino::Resource::Sieves
26
26
 
27
27
  included do
28
- class_attribute :_policy_class, default: Rhino::CrudPolicy
28
+ class_attribute :_policy_class
29
29
 
30
30
  def owner
31
31
  send self.class.resource_owned_by
@@ -41,7 +41,11 @@ module Rhino
41
41
 
42
42
  class_methods do
43
43
  def policy_class
44
- _policy_class
44
+ self._policy_class ||= begin
45
+ return Rhino::GlobalPolicy if global_owned?
46
+
47
+ Rhino::CrudPolicy
48
+ end
45
49
  end
46
50
 
47
51
  def rhino_policy(policy)
data/lib/rhino/version.rb CHANGED
@@ -10,7 +10,7 @@ module Rhino
10
10
  MAJOR = 0
11
11
  MINOR = 21
12
12
  TINY = 0
13
- PRE = "beta.45"
13
+ PRE = "beta.46"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rhino_project_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.21.0.beta.45
4
+ version: 0.21.0.beta.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Rosevear