acts_as_xapian 0.1.1 → 0.1.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/LICENSE +1 -1
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/generators/acts_as_xapian/templates/tasks/xapian.rake +5 -1
- data/lib/acts_as_xapian.rb +4 -5
- metadata +4 -5
- data/acts_as_xapian.gemspec +0 -70
data/LICENSE
CHANGED
data/Rakefile
CHANGED
@@ -5,7 +5,7 @@ begin
|
|
5
5
|
require 'jeweler'
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
7
|
gem.name = "acts_as_xapian"
|
8
|
-
gem.summary = %Q{A gem for interacting with the Xapian full text search engine}
|
8
|
+
gem.summary = %Q{A gem for interacting with the Xapian full text search engine. Based on the acts_as_xapian plugin.}
|
9
9
|
gem.description = %Q{A gem for interacting with the Xapian full text search engine. Completely based on the acts_as_xapian plugin.}
|
10
10
|
gem.email = "mdnelson30@gmail.com"
|
11
11
|
gem.homepage = "http://github.com/mnelson/acts_as_xapian_gem"
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
@@ -11,7 +11,11 @@ namespace :xapian do
|
|
11
11
|
|
12
12
|
desc 'Pulls all the xapian models from either the params or the project itself'
|
13
13
|
task :retrieve_models => :environment do
|
14
|
-
@models = (ENV['models'] || ENV['m']) && (ENV['models'] || ENV['m']).split(" ").map{|m| m.constantize} ||
|
14
|
+
@models = (ENV['models'] || ENV['m']) && (ENV['models'] || ENV['m']).split(" ").map{|m| m.constantize} || nil
|
15
|
+
if @models.nil?
|
16
|
+
Dir.glob(RAILS_ROOT + '/app/models/*.rb').each { |file| require file }
|
17
|
+
@models = ActiveRecord::Base.send(:subclasses).select{|klazz| klazz.respond_to?(:xapian?)}
|
18
|
+
end
|
15
19
|
STDOUT.puts("Found Xapian Models: #{@models.map(&:name).join(', ')}")
|
16
20
|
end
|
17
21
|
# Parameters - specify 'models="PublicBody User"' to say which models
|
data/lib/acts_as_xapian.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
require File.join(File.dirname(__FILE__), 'acts_as_xapian',
|
3
|
-
|
4
|
-
require File.join(File.dirname(__FILE__), 'acts_as_xapian', '
|
5
|
-
require File.join(File.dirname(__FILE__), 'acts_as_xapian', 'core_ext/array' )
|
1
|
+
%w(base query_base search similar index writeable_index readable_index).each do |file|
|
2
|
+
require File.join(File.dirname(__FILE__), 'acts_as_xapian', file)
|
3
|
+
end
|
4
|
+
require File.join(File.dirname(__FILE__), 'acts_as_xapian', 'core_ext', 'array')
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 3
|
9
|
+
version: 0.1.3
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Mike Nelson
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-05-02 00:00:00 -04:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -59,7 +59,6 @@ files:
|
|
59
59
|
- README.rdoc
|
60
60
|
- Rakefile
|
61
61
|
- VERSION
|
62
|
-
- acts_as_xapian.gemspec
|
63
62
|
- generators/acts_as_xapian/USAGE
|
64
63
|
- generators/acts_as_xapian/acts_as_xapian_generator.rb
|
65
64
|
- generators/acts_as_xapian/templates/migrations/migration.rb
|
@@ -105,7 +104,7 @@ rubyforge_project:
|
|
105
104
|
rubygems_version: 1.3.6
|
106
105
|
signing_key:
|
107
106
|
specification_version: 3
|
108
|
-
summary: A gem for interacting with the Xapian full text search engine
|
107
|
+
summary: A gem for interacting with the Xapian full text search engine. Based on the acts_as_xapian plugin.
|
109
108
|
test_files:
|
110
109
|
- spec/acts_as_xapian_spec.rb
|
111
110
|
- spec/spec_helper.rb
|
data/acts_as_xapian.gemspec
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = %q{acts_as_xapian}
|
8
|
-
s.version = "0.1.1"
|
9
|
-
|
10
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = ["Mike Nelson"]
|
12
|
-
s.date = %q{2010-03-17}
|
13
|
-
s.description = %q{A gem for interacting with the Xapian full text search engine. Completely based on the acts_as_xapian plugin.}
|
14
|
-
s.email = %q{mdnelson30@gmail.com}
|
15
|
-
s.extra_rdoc_files = [
|
16
|
-
"LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
".gitignore",
|
22
|
-
"LICENSE",
|
23
|
-
"README.rdoc",
|
24
|
-
"Rakefile",
|
25
|
-
"VERSION",
|
26
|
-
"acts_as_xapian.gemspec",
|
27
|
-
"generators/acts_as_xapian/USAGE",
|
28
|
-
"generators/acts_as_xapian/acts_as_xapian_generator.rb",
|
29
|
-
"generators/acts_as_xapian/templates/migrations/migration.rb",
|
30
|
-
"generators/acts_as_xapian/templates/tasks/xapian.rake",
|
31
|
-
"lib/acts_as_xapian.rb",
|
32
|
-
"lib/acts_as_xapian/base.rb",
|
33
|
-
"lib/acts_as_xapian/core_ext/array.rb",
|
34
|
-
"lib/acts_as_xapian/index.rb",
|
35
|
-
"lib/acts_as_xapian/query_base.rb",
|
36
|
-
"lib/acts_as_xapian/readable_index.rb",
|
37
|
-
"lib/acts_as_xapian/search.rb",
|
38
|
-
"lib/acts_as_xapian/similar.rb",
|
39
|
-
"lib/acts_as_xapian/writeable_index.rb",
|
40
|
-
"spec/acts_as_xapian_spec.rb",
|
41
|
-
"spec/spec.opts",
|
42
|
-
"spec/spec_helper.rb"
|
43
|
-
]
|
44
|
-
s.homepage = %q{http://github.com/mnelson/acts_as_xapian_gem}
|
45
|
-
s.rdoc_options = ["--charset=UTF-8"]
|
46
|
-
s.require_paths = ["lib"]
|
47
|
-
s.rubygems_version = %q{1.3.6}
|
48
|
-
s.summary = %q{A gem for interacting with the Xapian full text search engine}
|
49
|
-
s.test_files = [
|
50
|
-
"spec/acts_as_xapian_spec.rb",
|
51
|
-
"spec/spec_helper.rb"
|
52
|
-
]
|
53
|
-
|
54
|
-
if s.respond_to? :specification_version then
|
55
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
56
|
-
s.specification_version = 3
|
57
|
-
|
58
|
-
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
59
|
-
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
60
|
-
s.add_development_dependency(%q<active_record>, [">= 0"])
|
61
|
-
else
|
62
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
63
|
-
s.add_dependency(%q<active_record>, [">= 0"])
|
64
|
-
end
|
65
|
-
else
|
66
|
-
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
67
|
-
s.add_dependency(%q<active_record>, [">= 0"])
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|