dm-sphinx-adapter 0.7 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
File without changes
data/Rakefile CHANGED
@@ -1,22 +1,49 @@
1
- # -*- ruby -*-
2
-
3
1
  require 'rubygems'
4
- require 'hoe'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "dm-sphinx-adapter"
8
+ gem.summary = %q{A DataMapper Sphinx adapter.}
9
+ gem.email = "shane.hanna@gmail.com"
10
+ gem.homepage = "http://github.com/shanna/dm-sphinx-adapter"
11
+ gem.authors = ["Shane Hanna"]
12
+ gem.add_dependency 'dm-core', ['~> 0.9']
13
+ gem.files.reject!{|f| f=~ %r{test/files/tmp/.*}}
14
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
15
+ end
16
+ rescue LoadError
17
+ puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
18
+ end
5
19
 
6
- Hoe.new('dm-sphinx-adapter', '0.7') do |p|
7
- p.developer('Shane Hanna', 'shane.hanna@gmail.com')
8
- p.extra_deps = [
9
- ['dm-core', '~> 0.9.7']
10
- ]
20
+ require 'rake/rdoctask'
21
+ Rake::RDocTask.new do |rdoc|
22
+ rdoc.rdoc_dir = 'rdoc'
23
+ rdoc.title = 'dm-sphinx-adapter'
24
+ rdoc.options << '--line-numbers' << '--inline-source'
25
+ rdoc.rdoc_files.include('README*')
26
+ rdoc.rdoc_files.include('lib/**/*.rb')
11
27
  end
12
28
 
13
- # http://blog.behindlogic.com/2008/10/auto-generate-your-manifest-and-gemspec.html
14
- desc 'Rebuild manifest and gemspec.'
15
- task :cultivate do
16
- Dir.chdir(File.dirname(__FILE__)) do #TODO: Is this required?
17
- system %q{git ls-files | grep -v "\.gitignore" > Manifest.txt}
18
- system %q{rake debug_gem | grep -v "(in " > `basename \`pwd\``.gemspec}
29
+ require 'rake/testtask'
30
+ Rake::TestTask.new(:test) do |test|
31
+ test.libs << 'lib' << 'test'
32
+ test.pattern = 'test/**/test_*.rb'
33
+ test.verbose = true
34
+ end
35
+
36
+ begin
37
+ require 'rcov/rcovtask'
38
+ Rcov::RcovTask.new do |test|
39
+ test.libs << 'test'
40
+ test.pattern = 'test/**/test_*.rb'
41
+ test.verbose = true
42
+ end
43
+ rescue LoadError
44
+ task :rcov do
45
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
19
46
  end
20
47
  end
21
48
 
22
- # vim: syntax=Ruby
49
+ task :default => :test
@@ -0,0 +1,4 @@
1
+ ---
2
+ :major: 0
3
+ :minor: 7
4
+ :patch: 1
@@ -21,11 +21,20 @@ module DataMapper
21
21
  # end
22
22
  # end
23
23
  module Resource
24
+
25
+ def self.append_inclusions(*inclusions)
26
+ extra_inclusions.concat inclusions
27
+ true
28
+ end
29
+
30
+ def self.extra_inclusions
31
+ @extra_inclusions ||= []
32
+ end
33
+
24
34
  def self.included(model) #:nodoc:
25
- model.class_eval do
26
- include DataMapper::Resource
27
- extend ClassMethods
28
- end
35
+ model.send(:include, DataMapper::Resource)
36
+ model.extend ClassMethods if defined?(ClassMethods)
37
+ extra_inclusions.each{|inclusion| model.send(:include, inclusion)}
29
38
  end
30
39
 
31
40
  module ClassMethods
@@ -89,7 +98,15 @@ module DataMapper
89
98
  # ==== Returns
90
99
  # Array<DataMapper::Adapters::Sphinx::Attribute>
91
100
  def sphinx_attributes(repository_name = default_repository_name)
92
- properties(repository_name).grep{|p| p.kind_of? Sphinx::Attribute}
101
+ properties(repository_name).find_all{|p| p.kind_of? Sphinx::Attribute}
102
+ end
103
+
104
+ # List of properties (aka sphinx fields).
105
+ #
106
+ # This list will be the inverse of properties not declared as attributes.
107
+ # ==== Returns
108
+ def sphinx_fields(repository_name = default_repository_name)
109
+ properties(repository_name).reject{|p| p.kind_of? Sphinx::Attribute}
93
110
  end
94
111
 
95
112
  end # ClassMethods
@@ -0,0 +1,94 @@
1
+ module DataMapper
2
+ module Adapters
3
+ module Sphinx
4
+ require 'builder'
5
+
6
+
7
+ # Sphinx xmlpipe2.
8
+ #
9
+ # Full text search data from any DM adapter without having to implement new Sphinx data sources drivers.
10
+ #
11
+ # ==== See
12
+ # * http://www.sphinxsearch.com/docs/current.html#xmlpipe2
13
+ #
14
+ #--
15
+ # TODO:
16
+ # * Synopsis.
17
+ module XmlPipe2
18
+ def self.included(model)
19
+ model.extend ClassMethods if defined?(ClassMethods)
20
+ end
21
+
22
+ module ClassMethods
23
+
24
+ # Write a Sphinx xmlpipe2 XML stream to $stdout.
25
+ #
26
+ # ==== Parameters
27
+ # source<String>:: The name of the repository to stream from.
28
+ # destination<String>:: The name of the repository to stream to (contains your sphinx definition).
29
+ # query<Hash>:: The conditions with which to find the records to stream.
30
+ #--
31
+ # TODO:
32
+ # * in_memory_adapter doesn't call the super constructor so there is no field_naming_convention set in
33
+ # DataMapper 0.9.10. Submit a patch or live with rescue and field.name clause?
34
+ # * Keys that aren't called .id?
35
+ # * Composite keys?
36
+ # * Method for schema and documents.
37
+ # * Less poking round in the internals of the :default adapter if I can?
38
+ # * Destination should always be a dm-sphinx-adapter adapter.
39
+ # * Optional schema since it overrides any schema you might define in the sphinx configuration.
40
+ # * Schema default values from DM property default values.
41
+ def xmlpipe2(source, destination = :default, query = {})
42
+ builder = Builder::XmlMarkup.new(:target => $stdout)
43
+ builder.instruct!
44
+ builder.sphinx(:docset, :'xmlns:sphinx' => 'sphinx') do
45
+
46
+ builder.sphinx(:schema) do
47
+ sphinx_fields(destination).each do |field|
48
+ builder.sphinx(:field, :name => (field.field(destination) rescue field.name))
49
+ end
50
+ sphinx_attributes(destination).each do |attr|
51
+ builder.sphinx(:attr, {
52
+ :name => (attr.field(destination) rescue attr.name),
53
+ :type => xmlpipe2_type(attr.primitive)
54
+ })
55
+ end
56
+ end
57
+
58
+ all(query.merge(:repository => repository(source))).map do |resource|
59
+ builder.sphinx(:document, :id => resource.id) do |document|
60
+ properties(destination).each do |property|
61
+ # TODO: Pretty sure this isn't the correct way to get and typecast.
62
+ builder.tag!((property.field(destination) rescue property.name)) do |field|
63
+ field.cdata!(property.typecast(property.get(resource)))
64
+ end
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
70
+
71
+ private
72
+ def xmlpipe2_type(primitive) #:nodoc:
73
+ {
74
+ Integer => 'int',
75
+ Float => 'float',
76
+ BigDecimal => 'float',
77
+ DateTime => 'timestamp',
78
+ Date => 'timestamp',
79
+ Time => 'timestamp',
80
+ TrueClass => 'bool',
81
+ String => 'str2ordinal',
82
+ DataMapper::Types::Text => 'str2ordinal'
83
+ }[primitive]
84
+ end
85
+
86
+ end # ClassMethods
87
+ end # XmlPipe2
88
+
89
+ # Include XmlPipe2 in all DM::A::SphinxResource models when you require this file.
90
+ Resource.append_inclusions XmlPipe2
91
+ end # Sphinx
92
+ end # Adapters
93
+ end # DataMapper
94
+
@@ -10,30 +10,30 @@
10
10
  </sphinx:schema>
11
11
 
12
12
  <sphinx:document id="1">
13
- <t_string>one</t_string>
14
- <t_text>text one!</t_text>
15
- <t_decimal>10.5</t_decimal>
16
- <t_float>100.5</t_float>
17
- <t_integer>1000</t_integer>
18
- <t_datetime>1235183682</t_datetime>
13
+ <t_string><![CDATA[one]]></t_string>
14
+ <t_text><![CDATA[text one!]]></t_text>
15
+ <t_decimal><![CDATA[10.5]]></t_decimal>
16
+ <t_float><![CDATA[100.5]]></t_float>
17
+ <t_integer><![CDATA[1000]]></t_integer>
18
+ <t_datetime><![CDATA[1235183682]]></t_datetime>
19
19
  </sphinx:document>
20
20
 
21
21
  <sphinx:document id="2">
22
- <t_string>two</t_string>
23
- <t_text>text two!</t_text>
24
- <t_decimal>20.5</t_decimal>
25
- <t_float>200.5</t_float>
26
- <t_integer>2000</t_integer>
27
- <t_datetime>1235183682</t_datetime>
22
+ <t_string><![CDATA[two]]></t_string>
23
+ <t_text><![CDATA[text two!]]></t_text>
24
+ <t_decimal><![CDATA[20.5]]></t_decimal>
25
+ <t_float><![CDATA[200.5]]></t_float>
26
+ <t_integer><![CDATA[2000]]></t_integer>
27
+ <t_datetime><![CDATA[1235183682]]></t_datetime>
28
28
  </sphinx:document>
29
29
 
30
30
  <sphinx:document id="3">
31
- <t_string>three</t_string>
32
- <t_text>text three!</t_text>
33
- <t_decimal>30.5</t_decimal>
34
- <t_float>300.5</t_float>
35
- <t_integer>3000</t_integer>
36
- <t_datetime>1235183682</t_datetime>
31
+ <t_string><![CDATA[three]]></t_string>
32
+ <t_text><![CDATA[text three!]]></t_text>
33
+ <t_decimal><![CDATA[30.5]]></t_decimal>
34
+ <t_float><![CDATA[300.5]]></t_float>
35
+ <t_integer><![CDATA[3000]]></t_integer>
36
+ <t_datetime><![CDATA[1235183682]]></t_datetime>
37
37
  </sphinx:document>
38
38
  </sphinx:docset>
39
39
 
@@ -0,0 +1 @@
1
+ <?xml version="1.0" encoding="UTF-8"?><sphinx:docset xmlns:sphinx="sphinx"><sphinx:schema><sphinx:field name="id"/><sphinx:field name="t_string"/><sphinx:attr type="str2ordinal" name="t_text"/><sphinx:attr type="float" name="t_decimal"/><sphinx:attr type="float" name="t_float"/><sphinx:attr type="int" name="t_integer"/><sphinx:attr type="timestamp" name="t_datetime"/></sphinx:schema><sphinx:document id="1"><id><![CDATA[1]]></id><t_string><![CDATA[one]]></t_string><t_text><![CDATA[text one!]]></t_text><t_decimal><![CDATA[0.01]]></t_decimal><t_float><![CDATA[0.0001]]></t_float><t_integer><![CDATA[1]]></t_integer><t_datetime><![CDATA[1235914716]]></t_datetime></sphinx:document></sphinx:docset>
@@ -3,8 +3,8 @@ require 'rubygems'
3
3
  require 'extlib'
4
4
  require 'extlib/hook'
5
5
  require 'pathname'
6
- require 'shoulda'
7
6
  require 'test/unit'
7
+ require 'shoulda'
8
8
 
9
9
  base = Pathname.new(__FILE__).dirname + '..'
10
10
  files = base + 'test' + 'files'
@@ -38,9 +38,9 @@ class TestQuery < Test::Unit::TestCase
38
38
 
39
39
  should 'treat multiple .eql operators as AND search' do
40
40
  # When is DM going to switch conditions to an array? :(
41
- assert /(?:@t_string "b" )?@t_string "a"(?: @t_string "b")?/.match(
41
+ assert(/(?:@t_string "b" )?@t_string "a"(?: @t_string "b")?/.match(
42
42
  query_string(:t_string.eql => 'a', :t_string.eql => 'b')
43
- )
43
+ ))
44
44
  end
45
45
 
46
46
  should 'leave raw conditions as they are' do
@@ -0,0 +1,77 @@
1
+ require File.join(File.dirname(__FILE__), 'helper')
2
+ require 'dm-sphinx-adapter/xmlpipe2'
3
+
4
+ class TestResource < Test::Unit::TestCase
5
+ context 'DM::A::Sphinx::Resource module' do
6
+ begin
7
+ require 'nokogiri'
8
+ rescue LoadError
9
+ warn ' * WARNING: Nokogiri not found, skipping xmlpipe2 tests.'
10
+ return nil
11
+ end
12
+
13
+ setup do
14
+ load File.join(File.dirname(__FILE__), 'files', 'model.rb')
15
+ end
16
+
17
+ should 'respond to #xmlpipe2' do
18
+ assert_respond_to Item, :xmlpipe2
19
+ end
20
+
21
+ context '#xmlpipe2' do
22
+ setup do
23
+ $stdout = StringIO.new
24
+ Item.create(
25
+ :id => 1,
26
+ :t_string => 'one',
27
+ :t_text => "text one!",
28
+ :t_decimal => BigDecimal.new('0.01'),
29
+ :t_float => 0.0001,
30
+ :t_integer => 1,
31
+ :t_datetime => Time.at(1235914716)
32
+ )
33
+ Item.xmlpipe2(:default, :search)
34
+ @xml = $stdout.rewind && $stdout.read
35
+ @doc = Nokogiri::XML.parse(@xml) rescue nil
36
+ @ns = {'s' => 'sphinx'}
37
+ $stdout = STDOUT
38
+ end
39
+
40
+ should 'stream xml to stdout' do
41
+ assert_not_nil @xml
42
+ assert_not_nil @doc
43
+ end
44
+
45
+ context 'schema' do
46
+ should 'have id field' do
47
+ assert_not_nil @doc.xpath(%q{//s:field[@name='id']}, @ns).first
48
+ end
49
+
50
+ should 'have t_string field' do
51
+ assert_not_nil @doc.xpath(%q{//s:field[@name='t_string']}, @ns).first
52
+ end
53
+
54
+ should 'have text attribute' do
55
+ assert_not_nil @doc.xpath(%q{//s:attr[@name='t_text' and @type='str2ordinal']}, @ns).first
56
+ end
57
+
58
+ should 'have decimal attribute' do
59
+ assert_not_nil @doc.xpath(%q{//s:attr[@name='t_decimal' and @type='float']}, @ns).first
60
+ end
61
+
62
+ should 'have float attribute' do
63
+ assert_not_nil @doc.xpath(%q{//s:attr[@name='t_float' and @type='float']}, @ns).first
64
+ end
65
+
66
+ should 'have int attribute' do
67
+ assert_not_nil @doc.xpath(%q{//s:attr[@name='t_integer' and @type='int']}, @ns).first
68
+ end
69
+
70
+ should 'have timestamp attribute' do
71
+ assert_not_nil @doc.xpath(%q{//s:attr[@name='t_datetime' and @type='timestamp']}, @ns).first
72
+ end
73
+ end
74
+ end
75
+ end
76
+ end
77
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-sphinx-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.7"
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shane Hanna
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-22 00:00:00 +11:00
12
+ date: 2009-04-12 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,43 +20,27 @@ dependencies:
20
20
  requirements:
21
21
  - - ~>
22
22
  - !ruby/object:Gem::Version
23
- version: 0.9.7
23
+ version: "0.9"
24
24
  version:
25
- - !ruby/object:Gem::Dependency
26
- name: hoe
27
- type: :development
28
- version_requirement:
29
- version_requirements: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.8.3
34
- version:
35
- description: A DataMapper Sphinx adapter.
36
- email:
37
- - shane.hanna@gmail.com
25
+ description:
26
+ email: shane.hanna@gmail.com
38
27
  executables: []
39
28
 
40
29
  extensions: []
41
30
 
42
31
  extra_rdoc_files:
43
- - History.txt
44
- - LICENCE.txt
45
- - Manifest.txt
46
- - README.txt
32
+ - README.rdoc
47
33
  files:
48
- - History.txt
49
- - LICENCE.txt
50
- - Manifest.txt
51
- - README.txt
34
+ - README.rdoc
52
35
  - Rakefile
53
- - dm-sphinx-adapter.gemspec
36
+ - VERSION.yml
54
37
  - lib/dm-sphinx-adapter.rb
55
38
  - lib/dm-sphinx-adapter/adapter.rb
56
39
  - lib/dm-sphinx-adapter/attribute.rb
57
40
  - lib/dm-sphinx-adapter/index.rb
58
41
  - lib/dm-sphinx-adapter/query.rb
59
42
  - lib/dm-sphinx-adapter/resource.rb
43
+ - lib/dm-sphinx-adapter/xmlpipe2.rb
60
44
  - lib/riddle.rb
61
45
  - lib/riddle/client.rb
62
46
  - lib/riddle/client/filter.rb
@@ -65,18 +49,19 @@ files:
65
49
  - test/files/model.rb
66
50
  - test/files/source.xml
67
51
  - test/files/sphinx.conf
52
+ - test/files/test_xmlpipe2.xml
68
53
  - test/helper.rb
69
54
  - test/test_adapter.rb
70
55
  - test/test_attribute.rb
71
56
  - test/test_index.rb
72
57
  - test/test_query.rb
73
58
  - test/test_resource.rb
59
+ - test/test_xmlpipe2.rb
74
60
  has_rdoc: true
75
- homepage: http://dm-sphinx.rubyforge.org
61
+ homepage: http://github.com/shanna/dm-sphinx-adapter
76
62
  post_install_message:
77
63
  rdoc_options:
78
- - --main
79
- - README.txt
64
+ - --charset=UTF-8
80
65
  require_paths:
81
66
  - lib
82
67
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -93,14 +78,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
78
  version:
94
79
  requirements: []
95
80
 
96
- rubyforge_project: dm-sphinx-adapter
81
+ rubyforge_project:
97
82
  rubygems_version: 1.3.1
98
83
  signing_key:
99
84
  specification_version: 2
100
85
  summary: A DataMapper Sphinx adapter.
101
86
  test_files:
87
+ - test/files/model.rb
88
+ - test/helper.rb
102
89
  - test/test_adapter.rb
103
90
  - test/test_attribute.rb
104
91
  - test/test_index.rb
105
92
  - test/test_query.rb
106
93
  - test/test_resource.rb
94
+ - test/test_xmlpipe2.rb
@@ -1,42 +0,0 @@
1
- === 0.7 / 2009-02-21
2
-
3
- * Explicit repository names everywhere I can. DM ~> 0.9.10 and dm-sphinx-adapter 0.6.2 couldn't guess the default repository name.
4
-
5
- === 0.6.2 / 2008-12-16
6
-
7
- * Fixed shallow .dup of riddle client errors. You need to upgrade if you are running 0.6.1.
8
-
9
- === 0.6.1 / 2008-12-16
10
-
11
- * The adapter returns the entire Riddle::Client#query response so document :weight and :attributes are usable.
12
- * Fixed broken naming convention bug. The AbstractAdapter constructor was not being called.
13
-
14
- === 0.6 / 2008-12-13
15
-
16
- * Removed managed client and all related libs.
17
- * Switched to Shoulda for tests in an effort to clean them up a bit.
18
-
19
- === 0.5 / 2008-12-01
20
-
21
- * Moved sphinx extended query string generator into a class of its own.
22
- * Improved generated extended query syntax and added tests.
23
- * Support for sphinx "" phrase search operator (dm conditions as array).
24
- * Support for sphinx | OR operator (dm conditions using {:field.in => %w{}}).
25
-
26
- === 0.4 / 2008-11-21
27
-
28
- * Fixed broken dm-is-searchable support.
29
- * Bumped version because the read_one/read_many result structure had to change to support dm-is-searchable.
30
-
31
- === 0.3 / 2008-11-18
32
-
33
- * Removed calls to indexer on create/update. See README.txt
34
- * Made the client object available from the adapter.
35
-
36
- === 0.2 / 2008-11-09
37
-
38
- * Addributes.
39
- * Self managed searchd daemon if you want it.
40
-
41
- === 0.1 / 2008-10-24
42
-
@@ -1,20 +0,0 @@
1
- Copyright (c) 2008 Shane Hanna
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,26 +0,0 @@
1
- History.txt
2
- LICENCE.txt
3
- Manifest.txt
4
- README.txt
5
- Rakefile
6
- dm-sphinx-adapter.gemspec
7
- lib/dm-sphinx-adapter.rb
8
- lib/dm-sphinx-adapter/adapter.rb
9
- lib/dm-sphinx-adapter/attribute.rb
10
- lib/dm-sphinx-adapter/index.rb
11
- lib/dm-sphinx-adapter/query.rb
12
- lib/dm-sphinx-adapter/resource.rb
13
- lib/riddle.rb
14
- lib/riddle/client.rb
15
- lib/riddle/client/filter.rb
16
- lib/riddle/client/message.rb
17
- lib/riddle/client/response.rb
18
- test/files/model.rb
19
- test/files/source.xml
20
- test/files/sphinx.conf
21
- test/helper.rb
22
- test/test_adapter.rb
23
- test/test_attribute.rb
24
- test/test_index.rb
25
- test/test_query.rb
26
- test/test_resource.rb
@@ -1,38 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
- Gem::Specification.new do |s|
4
- s.name = %q{dm-sphinx-adapter}
5
- s.version = "0.7"
6
-
7
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
- s.authors = ["Shane Hanna"]
9
- s.date = %q{2009-02-21}
10
- s.description = %q{A DataMapper Sphinx adapter.}
11
- s.email = ["shane.hanna@gmail.com"]
12
- s.extra_rdoc_files = ["History.txt", "LICENCE.txt", "Manifest.txt", "README.txt"]
13
- s.files = ["History.txt", "LICENCE.txt", "Manifest.txt", "README.txt", "Rakefile", "dm-sphinx-adapter.gemspec", "lib/dm-sphinx-adapter.rb", "lib/dm-sphinx-adapter/adapter.rb", "lib/dm-sphinx-adapter/attribute.rb", "lib/dm-sphinx-adapter/index.rb", "lib/dm-sphinx-adapter/query.rb", "lib/dm-sphinx-adapter/resource.rb", "lib/riddle.rb", "lib/riddle/client.rb", "lib/riddle/client/filter.rb", "lib/riddle/client/message.rb", "lib/riddle/client/response.rb", "test/files/model.rb", "test/files/source.xml", "test/files/sphinx.conf", "test/helper.rb", "test/test_adapter.rb", "test/test_attribute.rb", "test/test_index.rb", "test/test_query.rb", "test/test_resource.rb"]
14
- s.has_rdoc = true
15
- s.homepage = %q{http://dm-sphinx.rubyforge.org}
16
- s.rdoc_options = ["--main", "README.txt"]
17
- s.require_paths = ["lib"]
18
- s.rubyforge_project = %q{dm-sphinx-adapter}
19
- s.rubygems_version = %q{1.3.1}
20
- s.summary = %q{A DataMapper Sphinx adapter.}
21
- s.test_files = ["test/test_adapter.rb", "test/test_attribute.rb", "test/test_index.rb", "test/test_query.rb", "test/test_resource.rb"]
22
-
23
- if s.respond_to? :specification_version then
24
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
25
- s.specification_version = 2
26
-
27
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
- s.add_runtime_dependency(%q<dm-core>, ["~> 0.9.7"])
29
- s.add_development_dependency(%q<hoe>, [">= 1.8.3"])
30
- else
31
- s.add_dependency(%q<dm-core>, ["~> 0.9.7"])
32
- s.add_dependency(%q<hoe>, [">= 1.8.3"])
33
- end
34
- else
35
- s.add_dependency(%q<dm-core>, ["~> 0.9.7"])
36
- s.add_dependency(%q<hoe>, [">= 1.8.3"])
37
- end
38
- end