grape-order 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 87c5bc99ba99485f575a497989509f3dfcb44043
4
- data.tar.gz: 714bc5c8147175c18e8bf52cdb581125653bb650
3
+ metadata.gz: 947b09b0ddadd7e4f366c2d61369158bab3164d5
4
+ data.tar.gz: cd69fd5e22df01dcec572e6fc260bcfb1648caee
5
5
  SHA512:
6
- metadata.gz: 9e100b26cef49973d7a9000914cd184b21d049581ace0d2a362507e7bd5383e452a7c30281f7afef18e374031c99dabcc49faeeec6e39de3c33ada443fbcd9fc
7
- data.tar.gz: fd67b0330f582a5184da528433d284629c86ad1ca0e3cf0fe853e3cd7e927c258eb64b8a6f37f03c4ab7396437df7f96907b564ec7703cd74217f1846f344c9b
6
+ metadata.gz: 4a0467d1a952f6cf1c0f814ca23e7aa816d48ef0d8afc41c25b88aadd79a7fef499b1287f08d8c090e3f20dfb25272cd52723bc39b880b7ef7308d4dc6ad638d
7
+ data.tar.gz: 6dc86fe32eb1bbd33bbc4431457f22a1be41dd319da1dbdad0ee52be17b20ebaae7b6491d3420e17f879d3d499fc7d2713c0c1a8750125975e30608195f8f5c0
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Grape::Sort [![Gem Version](https://badge.fury.io/rb/grape-order.png)]
1
+ # Grape::Order [![Gem Version](https://badge.fury.io/rb/grape-order.png)]
2
2
 
3
3
  Collection ordering for [grape](https://github.com/intridea/grape) API framework.
4
4
 
@@ -9,7 +9,7 @@ module Grape
9
9
  def order(collection)
10
10
  sorters = params[:order].split(',').map do |s|
11
11
  if s[0] == '-'
12
- "#{s} asc"
12
+ "#{s[1..-1]} asc"
13
13
  else
14
14
  "#{s} desc"
15
15
  end
@@ -1,5 +1,5 @@
1
1
  module Grape
2
2
  module Order
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-order
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grzegorz Brzezinka