searchlogic 2.5.2 → 2.5.3

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
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 2
3
3
  :minor: 5
4
- :patch: 2
4
+ :patch: 3
5
5
  :build:
@@ -196,13 +196,15 @@ module Searchlogic
196
196
  searchlogic_lambda(column.type, :skip_conversion => options[:skip_conversion]) { |*values|
197
197
  values.collect! { |value| value_with_modifier(value, options[:value_modifier]) }
198
198
 
199
- if does_not_equal && values == [nil]
200
- sql.gsub!('!=', 'IS NOT')
199
+ new_sql = if does_not_equal && values == [nil]
200
+ sql.gsub('!=', 'IS NOT')
201
201
  elsif equals && values == [nil]
202
- sql.gsub!('=', 'IS')
202
+ sql.gsub('=', 'IS')
203
+ else
204
+ sql
203
205
  end
204
206
 
205
- {:conditions => [sql, *values]}
207
+ {:conditions => [new_sql, *values]}
206
208
  }
207
209
  end
208
210
  end
data/searchlogic.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{searchlogic}
8
- s.version = "2.5.2"
8
+ s.version = "2.5.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ben Johnson of Binary Logic"]
12
- s.date = %q{2011-03-08}
12
+ s.date = %q{2011-03-09}
13
13
  s.description = %q{Searchlogic makes using ActiveRecord named scopes easier and less repetitive.}
14
14
  s.email = %q{bjohnson@binarylogic.com}
15
15
  s.extra_rdoc_files = [
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
1
+ require 'spec_helper'
2
2
 
3
3
  describe "Searchlogic::ActiveRecord::AssociationProxy" do
4
4
  it "should call location conditions" do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
1
+ require 'spec_helper'
2
2
 
3
3
  describe Searchlogic::ActiveRecord::Consistency do
4
4
  it "should merge joins with consistent conditions" do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
1
+ require 'spec_helper'
2
2
 
3
3
  describe Searchlogic::CoreExt::Object do
4
4
  it "should accept and pass the argument to the searchlogic_options" do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
1
+ require 'spec_helper'
2
2
 
3
3
  describe Searchlogic::CoreExt::Proc do
4
4
  it "should have a searchlogic_options accessor" do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
1
+ require 'spec_helper'
2
2
 
3
3
  describe Searchlogic::NamedScopes::AliasScope do
4
4
  before(:each) do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
1
+ require 'spec_helper'
2
2
 
3
3
  describe Searchlogic::NamedScopes::AssociationConditions do
4
4
  it "should create a named scope" do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
1
+ require 'spec_helper'
2
2
 
3
3
  describe Searchlogic::NamedScopes::Ordering do
4
4
  it "should allow ascending" do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
1
+ require 'spec_helper'
2
2
 
3
3
  describe Searchlogic::NamedScopes::ColumnConditions do
4
4
  it "should be dynamically created and then cached" do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
1
+ require 'spec_helper'
2
2
 
3
3
  describe Searchlogic::NamedScopes::OrConditions do
4
4
  it "should define a scope by the exact same name as requested by the code" do
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
1
+ require 'spec_helper'
2
2
 
3
3
  describe Searchlogic::NamedScopes::Ordering do
4
4
  it "should have ascending" do
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: searchlogic
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 2.5.2
5
+ version: 2.5.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ben Johnson of Binary Logic
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-03-08 00:00:00 -05:00
13
+ date: 2011-03-09 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -104,7 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - ">="
106
106
  - !ruby/object:Gem::Version
107
- hash: -2121447102080969670
107
+ hash: -3818165968683800774
108
108
  segments:
109
109
  - 0
110
110
  version: "0"