fetcheable_on_api 0.2.3 → 0.2.4

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: 86236648008d977d8cf84a2b083af86581079912d4b1d7f10e801f098baa66b4
4
- data.tar.gz: aed101c2b06e89e8d343af140d50d292cbe4e796061d3bdc426a7b768a804a9d
3
+ metadata.gz: c7d843ccd29700f0df6ed039ec4893090e1e2bff8a55af69587f8e7bc5f5e48c
4
+ data.tar.gz: 7341967166c54c6aa67749134549dc80c19310f2da7d8ab54f26bdb88700ba3e
5
5
  SHA512:
6
- metadata.gz: ace285bdcafbd9946f312c7964528dba3be9a3da1a9f5e358fa5922be692593bf16685d7745c43f541bea6727b9c3f2819a067ddda1f6398a02beb68be066f58
7
- data.tar.gz: 5aebd924fb07e8171021e6a5d9bf86806bf6c0b304709cf32e97917adb9e50d96706912aac4064087cefd02a98ad84d7bdbecc609816f969fe47b37b97941066
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
- res[attribute.to_sym] = SORT_ORDER[sort_sign(attribute)]
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FetcheableOnApi
4
- VERSION = '0.2.3'.freeze
4
+ VERSION = '0.2.4'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fetcheable_on_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabien