linked_rails 0.0.4.pre.gacd5f04d4 → 0.0.4.pre.gb0b6aea40

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: b7e8e910730057122673f7a3e2990ae01fe4e4f29a113f2612dcdbdaac0c11ce
4
- data.tar.gz: 10730a6477f855e8675884c96bb0cd3eadb50ff98fdbd928c6ca408646b4a7fb
3
+ metadata.gz: 751c3631475fa9d96f7f3a3918de84d4238b7a12546fa8d7838016cd46543900
4
+ data.tar.gz: 021fa4f27ea612b5b6f4cbd883985974c5f1272a1988c7868ac44fa9e52a36fd
5
5
  SHA512:
6
- metadata.gz: 7c8056f5ce99c4d35ba9ba5ea223dbcb86980d183495c9e2e875e06f946766c9e75437cb1843a6e6fb79e8ba62ff099e4c01537cb971478c6fa2cf49365cbb19
7
- data.tar.gz: 705a9f1eae5d013b79e1e608bad5a96109f987ff6af91699a718dc6c779bab68e438e5981b9734d59c26496a4f2fc139728c0f7064e314e7479d3931c586f4f3
6
+ metadata.gz: 8c60b2f5c0e2607618b2a9c1f113b9598ba3049a26950f4437c9607cb37ea90de65e9cd08c4e6051714c090e5a999e7c8e1914c83d4e966555534c11508da89c
7
+ data.tar.gz: 3df0ab9c5efc2109714476e1b8f0d417e54d574dd99eb5bd99075c78bb5cc5762bb25d4d375c54d5a7ff54878d790a18a8c8ddcefb849647ba7844511613b8e9
@@ -144,14 +144,9 @@ module LinkedRails
144
144
  end
145
145
 
146
146
  def resource_status(resource_policy)
147
- return 200 if resource_policy.show?
147
+ raise(LinkedRails::Errors::Forbidden.new(query: :show?)) unless resource_policy.show?
148
148
 
149
- raise(
150
- LinkedRails::Errors::Forbidden.new(
151
- action_status: resource_policy.try(:action_status),
152
- query: :show?
153
- )
154
- )
149
+ 200
155
150
  end
156
151
 
157
152
  def response_for_wrong_host(opts)
@@ -3,7 +3,7 @@
3
3
  module LinkedRails
4
4
  module Errors
5
5
  class Forbidden < StandardError
6
- attr_reader :query, :record, :policy, :action, :action_status
6
+ attr_reader :query, :record, :policy, :action
7
7
 
8
8
  # @param [Hash] options
9
9
  # @option options [String] query The action of the request
@@ -16,7 +16,6 @@ module LinkedRails
16
16
  @record = options[:record]
17
17
  @policy = options[:policy]
18
18
  @action = @query[-1] == '?' ? @query[0..-2] : @query
19
- @action_status = options[:action_status]
20
19
  @message = options[:message]
21
20
 
22
21
  raise StandardError if @query.blank? && @message.blank?
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: linked_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4.pre.gacd5f04d4
4
+ version: 0.0.4.pre.gb0b6aea40
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arthur Dingemans
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-13 00:00:00.000000000 Z
11
+ date: 2022-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_response