jsonapi-resources 0.10.3 → 0.10.4
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f0373c84cc7d1e7fa2da86da83b30db06192824ecd5261718d167ddcbd7d3c3d
|
|
4
|
+
data.tar.gz: 4f2667a8a42ed1a4c91100979e047a0fafedc0467d84bd13e487fc7cb8baf60d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6d080b0c4fcd192780be59c59158149081d7873301e36870335df9e362cc025d58b471d5677c7ba53c0d1b90c299cd41dea8975239fbd0510cdf0a9eb6a39cfb
|
|
7
|
+
data.tar.gz: 726d7c41751b41f79e1dfa6c6e6f4cd85d35c2a4e713d6836f8e1e8e8b275c74c62053fb1e95b278e6821732e81159cacdd6424482a182bc577ff56c0af767df
|
|
@@ -756,7 +756,7 @@ module JSONAPI
|
|
|
756
756
|
|
|
757
757
|
# Assumes ActiveRecord's counting. Override if you need a different counting method
|
|
758
758
|
def count_records(records)
|
|
759
|
-
if Rails::VERSION::MAJOR
|
|
759
|
+
if (Rails::VERSION::MAJOR == 5 && ActiveRecord::VERSION::MINOR >= 1) || Rails::VERSION::MAJOR >= 6
|
|
760
760
|
records.count(:all)
|
|
761
761
|
else
|
|
762
762
|
records.count
|
|
@@ -418,7 +418,7 @@ module JSONAPI
|
|
|
418
418
|
sorts = sort_criteria
|
|
419
419
|
elsif sort_criteria.is_a?(String)
|
|
420
420
|
begin
|
|
421
|
-
raw = URI.
|
|
421
|
+
raw = URI.decode_www_form_component(sort_criteria)
|
|
422
422
|
sorts = CSV.parse_line(raw)
|
|
423
423
|
rescue CSV::MalformedCSVError
|
|
424
424
|
fail JSONAPI::Exceptions::InvalidSortCriteria.new(format_key(resource_klass._type), raw)
|
|
@@ -5,10 +5,10 @@ module JSONAPI
|
|
|
5
5
|
ActionController::Rendering,
|
|
6
6
|
ActionController::Renderers::All,
|
|
7
7
|
ActionController::StrongParameters,
|
|
8
|
-
ActionController::ForceSSL,
|
|
8
|
+
Gem::Requirement.new('< 6.1').satisfied_by?(ActionPack.gem_version) ? ActionController::ForceSSL : nil,
|
|
9
9
|
ActionController::Instrumentation,
|
|
10
10
|
JSONAPI::ActsAsResourceController
|
|
11
|
-
].freeze
|
|
11
|
+
].compact.freeze
|
|
12
12
|
|
|
13
13
|
# Note, the url_helpers are not loaded. This will prevent links from being generated for resources, and warnings
|
|
14
14
|
# will be emitted. Link support can be added by including `Rails.application.routes.url_helpers`, and links
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jsonapi-resources
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.10.
|
|
4
|
+
version: 0.10.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dan Gebhardt
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2021-
|
|
12
|
+
date: 2021-02-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: bundler
|
|
@@ -247,7 +247,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
247
247
|
- !ruby/object:Gem::Version
|
|
248
248
|
version: '0'
|
|
249
249
|
requirements: []
|
|
250
|
-
rubygems_version: 3.
|
|
250
|
+
rubygems_version: 3.0.3
|
|
251
251
|
signing_key:
|
|
252
252
|
specification_version: 4
|
|
253
253
|
summary: Easily support JSON API in Rails.
|