deep_unrest 0.1.54 → 0.1.55

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: bf36ddb88a73244347e83a8a8b265b40d98e6f821a739e5c94435d329a38a5de
4
- data.tar.gz: 9451ce3688642554c81b753efe7e2e2badd71d3be73d36398323c4a7c6171e91
3
+ metadata.gz: e9439a12cece497a2f6c344216e2f71c443dcfe6e9bc8b29b2a0a6bd88aa280e
4
+ data.tar.gz: 13886a9c1f9dcb8384e0c80f1ebf14073bd16403ac6098ab5f463346af8c58b3
5
5
  SHA512:
6
- metadata.gz: 9ad246d65a81431253ddac7d9f3adb2bd975249402a2f7ed2d637c129a0d284ccf10b8dd7ac09bb5372908e21f560bc89b968803890441e7bf9f3c45286749be
7
- data.tar.gz: 1b67db7bff81345c443824b74663953955d3c6e5f96a23894bcb82347b20f422aa48ed8a03823d5ceae3a3e39e71841ae5931fd78020e6050f9d9c19761feab4
6
+ metadata.gz: bad6eb16bc28178c2bcb04b5ea88bb63e9dee5326c9da52f52e5c1ea2b2df045255cf52810d36f409cab0f9832b8f7aaa1ab2165a47a2e641344508aef897b2a
7
+ data.tar.gz: 165b21701d238820f826283708940f60bdbb9a10376b8980742565a8cb2e706879e2947380733f22a3b0ed8b0a999d5a76aa536397f27707b92c7cf14a51233c
@@ -120,20 +120,22 @@ module DeepUnrest
120
120
  item[:scope].merge(records_original(ctx))
121
121
  }
122
122
 
123
- # transform sort value casing for rails
124
- sort_criteria = query[:sort]&.map { |s| s.clone.merge(field: s[:field].underscore) }
125
-
126
- processor = JSONAPI::Processor.new(resource,
127
- :find,
128
- filters: query[:filter] || {},
129
- context: { current_user: item[:current_user] },
130
- sort_criteria: sort_criteria,
131
- paginator: paginator)
132
-
133
- jsonapi_result = processor.process
134
-
135
- # un-monkey patch the resource :records method
136
- r_metaclass.send(:alias_method, :records, :records_original)
123
+ begin
124
+ # transform sort value casing for rails
125
+ sort_criteria = query[:sort]&.map { |s| s.clone.merge(field: s[:field].underscore) }
126
+
127
+ processor = JSONAPI::Processor.new(resource,
128
+ :find,
129
+ filters: query[:filter] || {},
130
+ context: { current_user: item[:current_user] },
131
+ sort_criteria: sort_criteria,
132
+ paginator: paginator)
133
+
134
+ jsonapi_result = processor.process
135
+ ensure
136
+ # un-monkey patch the resource :records method
137
+ r_metaclass.send(:alias_method, :records, :records_original)
138
+ end
137
139
 
138
140
  meta << {
139
141
  addr: [*addr, item[:key], 'meta'],
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeepUnrest
4
- VERSION = '0.1.54'
4
+ VERSION = '0.1.55'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep_unrest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.54
4
+ version: 0.1.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lynn Hurley