fetcheable_on_api 0.2.3 → 0.2.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 +4 -4
- data/lib/fetcheable_on_api/sortable.rb +2 -6
- data/lib/fetcheable_on_api/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c7d843ccd29700f0df6ed039ec4893090e1e2bff8a55af69587f8e7bc5f5e48c
|
|
4
|
+
data.tar.gz: 7341967166c54c6aa67749134549dc80c19310f2da7d8ab54f26bdb88700ba3e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: efeae3bd587ef064d38fe8842f22f629f3c997d1b68f1f0fe07553f1ca2bc7a471460a42c4555da8be39ab7c8f40f740536c44f7e4716f853655a382c461ad39
|
|
7
|
+
data.tar.gz: 6687cf7ef721085c338ab4064954a2fc694df9960214881e1cd62564b37a78fd0ad0d974fbfa27ffee550bd183434944404ce9db88cefde7042271df8fb110b1
|
|
@@ -91,17 +91,13 @@ module FetcheableOnApi
|
|
|
91
91
|
#
|
|
92
92
|
def format_params(params)
|
|
93
93
|
res = {}
|
|
94
|
-
|
|
95
94
|
params
|
|
96
95
|
.split(',')
|
|
97
96
|
.each do |attribute|
|
|
98
|
-
|
|
97
|
+
sort_sign = attribute =~ /\A[+-]/ ? attribute.slice!(0) : '+'
|
|
98
|
+
res[attribute.to_sym] = SORT_ORDER[sort_sign]
|
|
99
99
|
end
|
|
100
100
|
res
|
|
101
101
|
end
|
|
102
|
-
|
|
103
|
-
def sort_sign(attribute)
|
|
104
|
-
attribute =~ /\A[+-]/ ? attribute.slice!(0) : '+'
|
|
105
|
-
end
|
|
106
102
|
end
|
|
107
103
|
end
|