filterer 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: 7734d274d4ea4be3fa564c0d94a0b1a6fbb0910f
4
- data.tar.gz: 09622d7c585ed55a808810ac358a1a052b5f4da5
3
+ metadata.gz: 852f75a7abb5961f620080843aa3c4e27f801cda
4
+ data.tar.gz: fb3a53d1e407ed3f78c35d8180ea07625f9c8aef
5
5
  SHA512:
6
- metadata.gz: ba86f46c95b642b8606fdc5aac56e895c5dc5b4a4920f0be1bcb93a1eecf3b064836518b90e45c8657929819010b29bba5152ac605dbbc963231688b203ad6d4
7
- data.tar.gz: 928079d0abddddf7a0c6b15a781332bc0bb52935190df90226852a2b417eeb9cd1f0d7a162d174311ceb41ab5e5850c25276c4e6b8313bace2c4c3347fee6aa0
6
+ metadata.gz: a913462e9c327201503d837f81d9c559f1808eaff8fc0a32fe3d5daa0cd18ecd258d6f921d9b422d5b05202a2d70c14703b05e5e1af5ecad89e8c3a43403cf41
7
+ data.tar.gz: 4e6fab8accf2ccbd61803c0108c722f20e3b0bd48b14428e255aa5b08e62db3cf7cbc99efafbe7199f96459c4483b0bd9479c388b767df859bcecac4360c6512
data/lib/filterer/base.rb CHANGED
@@ -3,7 +3,7 @@ module Filterer
3
3
 
4
4
  IGNORED_PARAMS = [:page]
5
5
 
6
- attr_accessor :results, :meta, :direction, :sort, :params
6
+ attr_accessor :results, :meta, :direction, :sort, :params, :opts
7
7
 
8
8
  class << self
9
9
  attr_accessor :sort_options
@@ -109,7 +109,7 @@ module Filterer
109
109
  }.squish
110
110
  elsif get_sort_option(@sort)[:query_string_or_proc].is_a?(Proc)
111
111
  matches = get_sort_option(@sort)[:key].is_a?(Regexp) ? @sort.match(get_sort_option(@sort)[:key]) : nil
112
- @results = get_sort_option(@sort)[:query_string_or_proc].call(@results, matches)
112
+ @results = get_sort_option(@sort)[:query_string_or_proc].call(@results, matches, self)
113
113
  end
114
114
  end
115
115
 
@@ -1,3 +1,3 @@
1
1
  module Filterer
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filterer
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
  - Adam Becker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-10 00:00:00.000000000 Z
11
+ date: 2013-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 4.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 4.0.0
27
27
  - !ruby/object:Gem::Dependency