nberger-searchlogic 2.4.28 → 2.4.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/VERSION.yml CHANGED
@@ -2,4 +2,4 @@
2
2
  :major: 2
3
3
  :build:
4
4
  :minor: 4
5
- :patch: 28
5
+ :patch: 29
@@ -17,7 +17,8 @@ module Searchlogic
17
17
  # the merge_joins method to delete duplicates.
18
18
  def merge_joins_with_singularity(*args)
19
19
  joins = merge_joins_without_singularity(*args)
20
- joins.collect { |j| j.is_a?(String) ? j.split(/ [^\(]/) : j }.flatten.uniq
20
+ # remove double spaces in STI joins conditions, and then split in double spaces
21
+ joins.collect { |j| j.is_a?(String) ? j.gsub(/ \(/, " (").split(/ /) : j }.flatten.uniq
21
22
  end
22
23
 
23
24
  # This method ensures that the order of the conditions in the joins are the same.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{nberger-searchlogic}
8
- s.version = "2.4.28"
8
+ s.version = "2.4.29"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Nicol\303\241s Berger, Yoomee Developers, Ben Johnson of Binary Logic"]
12
- s.date = %q{2011-02-24}
12
+ s.date = %q{2011-02-25}
13
13
  s.description = %q{Searchlogic makes using ActiveRecord named scopes easier and less repetitive.}
14
14
  s.email = %q{nberger@yellowspot.com.ar, developers@yoomee.com, bjohnson@binarylogic.com}
15
15
  s.extra_rdoc_files = [
@@ -492,6 +492,7 @@ describe Searchlogic::Search do
492
492
  loaded_search.current_scope.should == {:conditions => "1=1"}
493
493
  loaded_search.name_like.should == "Ben"
494
494
  loaded_search.created_at_after.should == time
495
+ end
495
496
  end
496
497
 
497
498
  context "sti" do
@@ -499,7 +500,7 @@ describe Searchlogic::Search do
499
500
  m = Manager.create(:full_name => "John Doe")
500
501
  company = Company.create
501
502
  company.managers << m
502
- search = Company.search(:managers_full_name_like => "John", :managers_full_name_like => "Mich")
503
+ search = Company.search(:managers_full_name_like => "John", :managers_full_name_like => "Doe")
503
504
  search.all.count.should == 1
504
505
  search.empty?.should == false
505
506
  search.count.should == 1
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nberger-searchlogic
3
3
  version: !ruby/object:Gem::Version
4
- hash: 39
4
+ hash: 37
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 4
9
- - 28
10
- version: 2.4.28
9
+ - 29
10
+ version: 2.4.29
11
11
  platform: ruby
12
12
  authors:
13
13
  - "Nicol\xC3\xA1s Berger, Yoomee Developers, Ben Johnson of Binary Logic"
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-02-24 00:00:00 -03:00
18
+ date: 2011-02-25 00:00:00 -03:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency