nexus_cqrs 0.4.4 → 0.4.5

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: 9be679b93bcb87378a6a0bd75dc5925b05e6f9dffef3fea2ec74d3482e883dda
4
- data.tar.gz: 2749a963dbcd1a7b8d48cf18844b1fe106774b976d76b19f5fd6255211bece01
3
+ metadata.gz: db72b483e967493d5e37a286713381f251518ec32f163ae7815f99c07d7bc3d7
4
+ data.tar.gz: 8efd35b594563d0df4e234dd2eba492052aefb3ef995f3e39cac9f071de35a87
5
5
  SHA512:
6
- metadata.gz: 7b4e7ec0a0b1fb59524d835d4fe181aff5d1bb94e5f0ea8b27497dd7fc8daf44984b0329d898b290fce84ed53ef013f74f0fe14a3fd4fbddda1b63f2aac18191
7
- data.tar.gz: ce8df945c033cac10d106581adf226a55e9615594335606f1ea9ecbd19f00eb378dc1e7cf88fb7fab632d95281a77f35cbae32938cb697fb2c12968f6d69d95f
6
+ metadata.gz: c50ca03abdef77895b8c8f3c1a5a1ddff58303c007a82712a2c903ea4a01d66d0e050511908b3b73c1be6d57ec2564ce5430d3e2b000e87a46404e0c8fcb6baa
7
+ data.tar.gz: 1dc9aa1d54cacdb47ed56ff35b7f7e20f016bfed6eb78ab79628e60ac4fcf9a8b210ef14a4f5b91446246af5e44a953c05cbd31d632a7085ed2fe70cc9d76bf1
data/Gemfile.lock CHANGED
@@ -55,7 +55,7 @@ GEM
55
55
  parallel (1.21.0)
56
56
  parser (3.0.2.0)
57
57
  ast (~> 2.4.1)
58
- pundit (2.1.1)
58
+ pundit (2.2.0)
59
59
  activesupport (>= 3.0.0)
60
60
  racc (1.6.0)
61
61
  rack (2.2.3)
@@ -6,7 +6,7 @@ module NexusCqrs
6
6
  # Concern used to provide authorisation abilities to handlers and other classes. Overrides pundit's `authorize` method
7
7
  # and creates helpers for the permission_provider
8
8
  module Auth
9
- include Pundit
9
+ include Pundit::Authorization
10
10
 
11
11
  # Overrides pundit's `authorize` method, allowing the message to be passed
12
12
  #
@@ -17,7 +17,7 @@ module NexusCqrs
17
17
  query ||= Strings::Case.snakecase(message.demodularised_class_name) + '?'
18
18
 
19
19
  # Retreive the policy class object from the type of record we are passing in
20
- policy_class ||= PolicyFinder.new(record).policy
20
+ policy_class ||= Pundit::PolicyFinder.new(record).policy
21
21
 
22
22
  # Pull context variables from command
23
23
  user = message.metadata[:current_user]
@@ -25,7 +25,7 @@ module NexusCqrs
25
25
 
26
26
  # Instantiate new policy class, with context
27
27
  policy = policy_class.new(UserContext.new(user, global_permissions), record)
28
- raise NotAuthorizedError, query: query, record: record, policy: policy unless policy.public_send(query)
28
+ raise Pundit::NotAuthorizedError, query: query, record: record, policy: policy unless policy.public_send(query)
29
29
 
30
30
  record.is_a?(Array) ? record.last : record
31
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module NexusCqrs
3
- # Leave this as 0.4.4 in order for CI process to replace with the tagged version.
4
- VERSION = '0.4.4'
3
+ # Leave this as 0.4.5 in order for CI process to replace with the tagged version.
4
+ VERSION = '0.4.5'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nexus_cqrs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Lovett
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-11-25 00:00:00.000000000 Z
11
+ date: 2022-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: generator_spec
@@ -154,7 +154,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
154
154
  - !ruby/object:Gem::Version
155
155
  version: '0'
156
156
  requirements: []
157
- rubygems_version: 3.2.32
157
+ rubygems_version: 3.3.8
158
158
  signing_key:
159
159
  specification_version: 4
160
160
  summary: Core package for the nexus cqrs gem