searchgasm 1.3.0 → 1.3.1
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/CHANGELOG.rdoc +6 -1
- data/lib/searchgasm/condition/not_begin_with.rb +4 -1
- data/lib/searchgasm/condition/not_end_with.rb +4 -1
- data/lib/searchgasm/condition/not_have_keywords.rb +4 -1
- data/lib/searchgasm/condition/not_like.rb +4 -1
- data/lib/searchgasm/version.rb +1 -1
- data/lib/searchgasm.rb +10 -8
- data/searchgasm.gemspec +2 -2
- metadata +1 -1
data/CHANGELOG.rdoc
CHANGED
@@ -1,4 +1,9 @@
|
|
1
|
-
== 1.3.
|
1
|
+
== 1.3.1 released 2008-10-02
|
2
|
+
|
3
|
+
* Fixed bug when requiring a connection adapter that is not present
|
4
|
+
* Fixes bug in "not" conditions
|
5
|
+
|
6
|
+
== 1.3.0 released 2008-10-02
|
2
7
|
|
3
8
|
* Added modifiers into the mix: hour_of_created_at_less_than = 10, etc.
|
4
9
|
* Changed how the Searchgasm::Conditions::Base class works. Instead of predefining all methods for all conditions upon instantiation, they are defined as needed via method_missing. Similar to
|
@@ -10,7 +10,10 @@ module Searchgasm
|
|
10
10
|
def to_conditions(value)
|
11
11
|
begin_with = BeginWith.new
|
12
12
|
begin_with.value = value
|
13
|
-
being_with.to_conditions
|
13
|
+
conditions = being_with.to_conditions
|
14
|
+
return conditions if conditions.blank?
|
15
|
+
conditions.first.gsub!(" LIKE ", " NOT LIKE ")
|
16
|
+
conditions
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
@@ -10,7 +10,10 @@ module Searchgasm
|
|
10
10
|
def to_conditions(value)
|
11
11
|
ends_with = EndsWith.new
|
12
12
|
ends_with.value = value
|
13
|
-
ends_with.to_conditions
|
13
|
+
conditions = ends_with.to_conditions
|
14
|
+
return conditions if conditions.blank?
|
15
|
+
conditions.first.gsub!(" LIKE ", " NOT LIKE ")
|
16
|
+
conditions
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
@@ -10,7 +10,10 @@ module Searchgasm
|
|
10
10
|
def to_conditions(value)
|
11
11
|
keywords = Keywords.new
|
12
12
|
keywords.value = value
|
13
|
-
keywords.to_conditions
|
13
|
+
conditions = keywords.to_conditions
|
14
|
+
return conditions if conditions.blank?
|
15
|
+
conditions.first.gsub!(" LIKE ", " NOT LIKE ")
|
16
|
+
conditions
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
@@ -10,7 +10,10 @@ module Searchgasm
|
|
10
10
|
def to_conditions(value)
|
11
11
|
like = Like.new
|
12
12
|
like.value = value
|
13
|
-
like.to_conditions
|
13
|
+
conditions = like.to_conditions
|
14
|
+
return conditions if conditions.blank?
|
15
|
+
conditions.first.gsub!(" LIKE ", " NOT LIKE ")
|
16
|
+
conditions
|
14
17
|
end
|
15
18
|
end
|
16
19
|
end
|
data/lib/searchgasm/version.rb
CHANGED
data/lib/searchgasm.rb
CHANGED
@@ -1,11 +1,16 @@
|
|
1
1
|
$:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
2
|
-
|
2
|
+
|
3
|
+
require "active_support"
|
3
4
|
require "active_record"
|
4
5
|
require "active_record/version"
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
require "
|
6
|
+
|
7
|
+
["mysql", "postgresql", "sqlite"].each do |adapter_name|
|
8
|
+
begin
|
9
|
+
require "active_record/connection_adapters/#{adapter_name}_adapter"
|
10
|
+
require "searchgasm/active_record/connection_adapters/#{adapter_name}_adapter"
|
11
|
+
rescue Exception
|
12
|
+
end
|
13
|
+
end
|
9
14
|
|
10
15
|
# Core Ext
|
11
16
|
require "searchgasm/core_ext/hash"
|
@@ -21,9 +26,6 @@ require "searchgasm/config"
|
|
21
26
|
# ActiveRecord
|
22
27
|
require "searchgasm/active_record/base"
|
23
28
|
require "searchgasm/active_record/associations"
|
24
|
-
require "searchgasm/active_record/connection_adapters/mysql_adapter"
|
25
|
-
require "searchgasm/active_record/connection_adapters/postgresql_adapter"
|
26
|
-
require "searchgasm/active_record/connection_adapters/sqlite_adapter"
|
27
29
|
|
28
30
|
# Search
|
29
31
|
require "searchgasm/search/ordering"
|
data/searchgasm.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
|
2
|
-
# Gem::Specification for Searchgasm-1.3.
|
2
|
+
# Gem::Specification for Searchgasm-1.3.1
|
3
3
|
# Originally generated by Echoe
|
4
4
|
|
5
5
|
--- !ruby/object:Gem::Specification
|
6
6
|
name: searchgasm
|
7
7
|
version: !ruby/object:Gem::Version
|
8
|
-
version: 1.3.
|
8
|
+
version: 1.3.1
|
9
9
|
platform: ruby
|
10
10
|
authors:
|
11
11
|
- Ben Johnson of Binary Logic
|