searchlogic 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,8 +1,13 @@
1
- == 2.0.2
1
+ == 2.1.1 released 2009-06-28
2
+
3
+ * Added inner_join convenience method.
4
+
5
+ == 2.1.0 released 2009-06-28
2
6
 
3
7
  * Added a delete method to the Search class to allow the deleting of conditions off of the object.
4
8
  * Add alias_scope feature, lets your create "named scopes" that represent a procedure of named scopes, while at the same time telling Searchlogic it is safe to use in the Search class.
5
9
  * Use url_for as the default with form_for since rails does some magic to determine the url to use.
10
+ * Switched to using inner joins instead of left outer joins.
6
11
 
7
12
  == 2.0.1 released 2009-06-20
8
13
 
data/README.rdoc CHANGED
@@ -25,7 +25,13 @@ Or from github:
25
25
 
26
26
  sudo gem install binarylogic-searchlogic
27
27
 
28
- Now just include it in your project and you are ready to go. See below for usage examples.
28
+ Now just include it in your project and you are ready to go.
29
+
30
+ You can also install this as a plugin:
31
+
32
+ script/plugin install git://github.com/binarylogic/searchlogic.git
33
+
34
+ See below for usage examples.
29
35
 
30
36
  == Search using conditions on columns
31
37
 
data/Rakefile CHANGED
@@ -10,6 +10,7 @@ begin
10
10
  gem.homepage = "http://github.com/binarylogic/searchlogic"
11
11
  gem.authors = ["Ben Johnson of Binary Logic"]
12
12
  gem.rubyforge_project = "searchlogic"
13
+ gem.add_dependency "activerecord", ">= 2.0.0"
13
14
  end
14
15
  rescue LoadError
15
16
  puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
@@ -30,21 +31,6 @@ end
30
31
 
31
32
  task :default => :spec
32
33
 
33
- require 'rake/rdoctask'
34
- Rake::RDocTask.new do |rdoc|
35
- if File.exist?('VERSION.yml')
36
- config = YAML.load(File.read('VERSION.yml'))
37
- version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
38
- else
39
- version = ""
40
- end
41
-
42
- rdoc.rdoc_dir = 'rdoc'
43
- rdoc.title = "search #{version}"
44
- rdoc.rdoc_files.include('README*')
45
- rdoc.rdoc_files.include('lib/**/*.rb')
46
- end
47
-
48
34
  begin
49
35
  require 'rake/contrib/sshpublisher'
50
36
  namespace :rubyforge do
data/VERSION.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  :major: 2
3
3
  :minor: 1
4
- :patch: 0
4
+ :patch: 1
@@ -29,6 +29,12 @@ module Searchlogic
29
29
  !association_alias_condition_details(name).nil?
30
30
  end
31
31
 
32
+ # A convenience method for creating inner join sql to that your inner joins
33
+ # are consistent with how Active Record creates them.
34
+ def inner_joins(association_name)
35
+ ActiveRecord::Associations::ClassMethods::InnerJoinDependency.new(self, association_name, nil).join_associations.collect { |assoc| assoc.association_join }
36
+ end
37
+
32
38
  private
33
39
  def method_missing(name, *args, &block)
34
40
  if details = association_condition_details(name)
@@ -93,7 +99,6 @@ module Searchlogic
93
99
  # named scope that is based on a hash.
94
100
  options = scope.proxy_options
95
101
  options[:joins] = options[:joins].blank? ? association.name : {association.name => options[:joins]}
96
- #add_left_outer_joins(options, association)
97
102
  options
98
103
  else
99
104
  # The underlying condition requires parameters, let's match the parameters it requires
data/searchlogic.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{searchlogic}
5
- s.version = "2.1.0"
5
+ s.version = "2.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Ben Johnson of Binary Logic"]
9
- s.date = %q{2009-06-27}
9
+ s.date = %q{2009-06-28}
10
10
  s.email = %q{bjohnson@binarylogic.com}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
@@ -62,8 +62,11 @@ Gem::Specification.new do |s|
62
62
  s.specification_version = 3
63
63
 
64
64
  if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
65
+ s.add_runtime_dependency(%q<activerecord>, [">= 2.0.0"])
65
66
  else
67
+ s.add_dependency(%q<activerecord>, [">= 2.0.0"])
66
68
  end
67
69
  else
70
+ s.add_dependency(%q<activerecord>, [">= 2.0.0"])
68
71
  end
69
72
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: searchlogic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Johnson of Binary Logic
@@ -9,10 +9,19 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-27 00:00:00 -04:00
12
+ date: 2009-06-28 00:00:00 -04:00
13
13
  default_executable:
14
- dependencies: []
15
-
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activerecord
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.0.0
24
+ version:
16
25
  description:
17
26
  email: bjohnson@binarylogic.com
18
27
  executables: []