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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 368215a8be8f5391e12fa5babd34d4459ad3febc
4
- data.tar.gz: c43ec411ac08e1019479d627c136c671c91ac592
3
+ metadata.gz: b8245801e6c8695ed9ac50a84d9aeb6f7179a946
4
+ data.tar.gz: de1e2a5ff538749f4d6b27e632015048ccd5a7db
5
5
  SHA512:
6
- metadata.gz: 27e9e000df4807311b61519bf5e767b784e248688962c5721ab991cd14ec6fdf5748ad9c47adab659083bb0c3f4a9597f0bdfb565999f155959d77020220c1c9
7
- data.tar.gz: e1e8b6aced6759749fa8e571d8774dc2c0707e2d9378e5d632b407ab5567ea7c0c8374db74de979f89b8a0bff94103fcc6f0dd71619626e12fd3f11e6550e059
6
+ metadata.gz: 0ad2bda81f8b531a0ebcc7163becbed28c5817561b96236d5e7e543b518e000679d73f32d1c47b2abaa7b46c83f404838d9339475caa6dd344fad9f187d1188e
7
+ data.tar.gz: e39d222be50aae99827b6b0020776099ccea9f9dc9bd069f681df2a2eec06f90dc28fe4214fa96f18a45e9055c730350532183ebfc202314f27d067d4e9592fd
data/Gemfile CHANGED
@@ -1,7 +1,5 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'sqlite3'
4
-
5
3
  # Specify your gem's dependencies in queryfy.gemspec
6
4
  rails = ENV['RAILS'] || '~> 4.2.0'
7
5
  gem 'rails', rails
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.
@@ -1,3 +1,3 @@
1
1
  module Queryfy
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
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
@@ -30,4 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_runtime_dependency 'filter_lexer', '~>0.2', '>= 0.2.1'
31
31
  spec.add_development_dependency "bundler", "~> 1.10"
32
32
  spec.add_development_dependency "rake", "~> 10.0"
33
+ spec.add_development_dependency "sqlite3"
33
34
  end
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.1
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-01 00:00:00.000000000 Z
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: