jsonapionify 0.12.3 → 0.12.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWNlMTA2NTM0YmE2ODY1NjgxYzZkZDdkZWI1YTI5NTA5ZjA4YmM0OA==
4
+ YTNiZDQwMzc2MWI0NGI3MmQyYzFjYzI5YWZkMmZmZmRkOGZlNDIyOQ==
5
5
  data.tar.gz: !binary |-
6
- MjllZmNlOGU1NmU1Nzk1YjZlZDYxODMxNThiZWQyYzA5NTVhMDc2Yg==
6
+ MDMzNjk2OGFiZTJhZjM5NDNiNjcwMGIxY2NiZWUwMWViOGMwNjUzOQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Y2RlOTA5MDI3MGQ5M2U2MjAwZGJjMTNiOGNjMjFiOTU2ZmM5YzFlOTRiMDc0
10
- MGRjMGJiN2NhZDkyODI2Y2VmNmUxNzE2MThmNjcxOWIzZDE0YjllZTFkYTFj
11
- N2Q0YTQ3NTQyY2FkMDQxN2Y2YTE3NTI2OTIwNThhNGVjNjk1YjE=
9
+ NmNhZGM4NmExYTBiODJiOGZmYTdiNGRkODViMTNhOGIzNWE0MTc2OWE3M2Zk
10
+ OTZlZjg2MjMxMjUwZTNiMjI1OTRiMTMzZDZhOTE1Mzc5YWM0MGVjMWFmOTZl
11
+ NGFlYzRkN2RmOGI0YTY5M2RkN2I4YjlmNjJmZmMwZDFiZjU0NmE=
12
12
  data.tar.gz: !binary |-
13
- Y2FmODhmNzdhOTAwNjVmNWMzNDU4MDdlNDZiNzQ3YzlkNDY2NjQyYzRjNmE0
14
- NDEyNTU1MzRiN2FkMzZkNGE2NzAyODVkZjNlMDJmNDlmMzg4ODA2ZDUzYWRm
15
- OTZkMmYxZjVmOTVkYjliYWZlOWMwNmEyZGYwNzRmODgxZjA4N2I=
13
+ MDkxZWQ1MDkyMjRmODllMzhlOTY5MzA0YmQxODUzMTk4MjNlYWU1YjZkMGU1
14
+ ZTU5MzE1NGYxN2NhOTRkMjEzYzk5MjQ5ZjJkNDE3YThjOWEyYTBlYzk2Mzkz
15
+ YTY2MTcxMWViYTJiZWY0ODgwMjZhZjIyMWZmZTc4YTA1YjVkZDk=
@@ -65,13 +65,6 @@ module JSONAPIonify::Api
65
65
  detail "attribute not permitted: #{attribute}"
66
66
  end
67
67
 
68
- error :attributes_missing do
69
- pointer 'data'
70
- title 'missing Member'
71
- detail 'missing attributes member'
72
- status '422'
73
- end
74
-
75
68
  error :include_parameter_invalid do
76
69
  parameter 'sort'
77
70
  title 'include parameter is invalid'
@@ -24,9 +24,7 @@ module JSONAPIonify::Api
24
24
  context(:request_attributes, readonly: true, persisted: true) do |context, request:, action_name:, id:, request_data:|
25
25
  should_error = false
26
26
 
27
- request_attributes = request_data.fetch(:attributes) do
28
- error_now :attributes_missing
29
- end
27
+ request_attributes = request_data.fetch(:attributes, {})
30
28
 
31
29
  # Check for required attributes
32
30
  self.attributes.each do |attr|
@@ -100,7 +100,7 @@ module JSONAPIonify::Structure
100
100
  keys += self.keys.select(&block) if block_given?
101
101
  valid_keys = keys.map(&:to_sym) & self.keys.map(&:to_sym)
102
102
  unless valid_keys.present?
103
- errors.add('*', "must contain one of: #{keys_to_sentence(*valid_keys)}")
103
+ errors.add('*', "must contain one of: #{keys_to_sentence(*self.keys)}")
104
104
  end
105
105
  end
106
106
  end
@@ -1,3 +1,3 @@
1
1
  module JSONAPIonify
2
- VERSION = "0.12.3"
2
+ VERSION = "0.12.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapionify
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.3
4
+ version: 0.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Waldrip