queryfy 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -2
- data/README.md +1 -1
- data/lib/queryfy/version.rb +1 -1
- data/lib/queryfy.rb +1 -0
- data/queryfy.gemspec +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8245801e6c8695ed9ac50a84d9aeb6f7179a946
|
4
|
+
data.tar.gz: de1e2a5ff538749f4d6b27e632015048ccd5a7db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0ad2bda81f8b531a0ebcc7163becbed28c5817561b96236d5e7e543b518e000679d73f32d1c47b2abaa7b46c83f404838d9339475caa6dd344fad9f187d1188e
|
7
|
+
data.tar.gz: e39d222be50aae99827b6b0020776099ccea9f9dc9bd069f681df2a2eec06f90dc28fe4214fa96f18a45e9055c730350532183ebfc202314f27d067d4e9592fd
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Queryfy [![Build Status](https://travis-ci.org/Bonemind/Queryfy.svg?branch=master)](https://travis-ci.org/Bonemind/Queryfy) [![Dependency Status](https://gemnasium.com/Bonemind/Queryfy.svg)](https://gemnasium.com/Bonemind/Queryfy)
|
1
|
+
# Queryfy [![Build Status](https://travis-ci.org/Bonemind/Queryfy.svg?branch=master)](https://travis-ci.org/Bonemind/Queryfy) [![Dependency Status](https://gemnasium.com/Bonemind/Queryfy.svg)](https://gemnasium.com/Bonemind/Queryfy) [![Gem Version](https://badge.fury.io/rb/queryfy.svg)](https://badge.fury.io/rb/queryfy)
|
2
2
|
|
3
3
|
Queryfy is a gem that allows you to simply and easily paginate and filter activerecord models using queryparams.
|
4
4
|
The gem assumes you pass it a hash of queryparams which contain a filterstring in `filter`, and optionally `offset` and `limit` fields.
|
data/lib/queryfy/version.rb
CHANGED
data/lib/queryfy.rb
CHANGED
@@ -13,6 +13,7 @@ module Queryfy
|
|
13
13
|
# Actually builds the query
|
14
14
|
def self.build_query(klass, querystring, limit = 50, offset = 0)
|
15
15
|
limit = [max_limit, limit.to_i].min
|
16
|
+
offset = offset.to_i
|
16
17
|
# Handle empty and nil queries
|
17
18
|
if (querystring.nil? || querystring == '')
|
18
19
|
return {
|
data/queryfy.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queryfy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bonemind
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: filter_lexer
|
@@ -58,6 +58,20 @@ dependencies:
|
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
60
|
version: '10.0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: sqlite3
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
61
75
|
description: Query activerecord models based on sql-like syntax with arbitratily deeply
|
62
76
|
nested conditions
|
63
77
|
email:
|