thinking-sphinx 1.3.20 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. data/README.textile +3 -0
  2. data/VERSION +1 -1
  3. data/features/excerpts.feature +8 -0
  4. data/features/field_sorting.feature +18 -0
  5. data/features/searching_across_models.feature +1 -1
  6. data/features/searching_by_model.feature +0 -7
  7. data/features/sphinx_scopes.feature +18 -0
  8. data/features/step_definitions/common_steps.rb +4 -0
  9. data/features/step_definitions/search_steps.rb +5 -0
  10. data/features/support/env.rb +3 -5
  11. data/features/thinking_sphinx/db/fixtures/people.rb +1 -1
  12. data/features/thinking_sphinx/models/andrew.rb +17 -0
  13. data/features/thinking_sphinx/models/person.rb +2 -1
  14. data/lib/thinking_sphinx.rb +2 -0
  15. data/lib/thinking_sphinx/active_record.rb +1 -1
  16. data/lib/thinking_sphinx/active_record/scopes.rb +7 -0
  17. data/lib/thinking_sphinx/adapters/abstract_adapter.rb +38 -8
  18. data/lib/thinking_sphinx/adapters/postgresql_adapter.rb +6 -2
  19. data/lib/thinking_sphinx/attribute.rb +5 -0
  20. data/lib/thinking_sphinx/configuration.rb +11 -7
  21. data/lib/thinking_sphinx/context.rb +4 -2
  22. data/lib/thinking_sphinx/property.rb +1 -0
  23. data/lib/thinking_sphinx/search.rb +66 -36
  24. data/lib/thinking_sphinx/tasks.rb +7 -0
  25. data/spec/thinking_sphinx/active_record/has_many_association_spec.rb +1 -0
  26. data/spec/thinking_sphinx/active_record/scopes_spec.rb +2 -3
  27. data/spec/thinking_sphinx/adapters/abstract_adapter_spec.rb +134 -0
  28. data/spec/thinking_sphinx/configuration_spec.rb +7 -0
  29. data/spec/thinking_sphinx/context_spec.rb +3 -2
  30. data/spec/thinking_sphinx/search_spec.rb +67 -25
  31. data/tasks/distribution.rb +0 -14
  32. data/tasks/testing.rb +29 -21
  33. metadata +227 -91
@@ -1,4 +1,5 @@
1
1
  require 'fileutils'
2
+ require 'timeout'
2
3
 
3
4
  namespace :thinking_sphinx do
4
5
  task :app_env do
@@ -52,6 +53,12 @@ namespace :thinking_sphinx do
52
53
  config = ThinkingSphinx::Configuration.instance
53
54
  pid = sphinx_pid
54
55
  config.controller.stop
56
+
57
+ # Ensure searchd is stopped, but don't try too hard
58
+ Timeout.timeout(5) do
59
+ sleep(1) until config.controller.stop
60
+ end
61
+
55
62
  puts "Stopped search daemon (pid #{pid})."
56
63
  end
57
64
  end
@@ -63,6 +63,7 @@ describe 'ThinkingSphinx::ActiveRecord::HasManyAssociation' do
63
63
  it "should add a filter for the attribute in a sphinx scope call" do
64
64
  Friendship.should_receive(:search).with do |options|
65
65
  options[:with][:person_id].should == @person.id
66
+ Friendship
66
67
  end
67
68
 
68
69
  @person.friendships.reverse
@@ -87,10 +87,9 @@ describe ThinkingSphinx::ActiveRecord::Scopes do
87
87
  search.by_foo('foo').search.options[:conditions].should == {:foo => 'foo', :name => 'foo'}
88
88
  end
89
89
 
90
- # FIXME: Probably the other way around is more logical? How to do this?
91
- it "should apply the default scope options after other scope options to the underlying search object" do
90
+ it "should apply the default scope options before other scope options to the underlying search object" do
92
91
  search = ThinkingSphinx::Search.new(:classes => [Alpha])
93
- search.by_name('bar').search.options[:conditions].should == {:name => 'foo'}
92
+ search.by_name('bar').search.options[:conditions].should == {:name => 'bar'}
94
93
  end
95
94
  end
96
95
 
@@ -0,0 +1,134 @@
1
+ require 'spec_helper'
2
+
3
+ describe ThinkingSphinx::AbstractAdapter do
4
+ describe '.detect' do
5
+ let(:model) { stub('model') }
6
+
7
+ it "returns a MysqlAdapter object for :mysql" do
8
+ ThinkingSphinx::AbstractAdapter.stub(:adapter_for_model => :mysql)
9
+
10
+ adapter = ThinkingSphinx::AbstractAdapter.detect(model)
11
+ adapter.should be_a(ThinkingSphinx::MysqlAdapter)
12
+ end
13
+
14
+ it "returns a PostgreSQLAdapter object for :postgresql" do
15
+ ThinkingSphinx::AbstractAdapter.stub(:adapter_for_model => :postgresql)
16
+
17
+ adapter = ThinkingSphinx::AbstractAdapter.detect(model)
18
+ adapter.should be_a(ThinkingSphinx::PostgreSQLAdapter)
19
+ end
20
+
21
+ it "raises an exception for other responses" do
22
+ ThinkingSphinx::AbstractAdapter.stub(:adapter_for_model => :sqlite)
23
+
24
+ lambda {
25
+ ThinkingSphinx::AbstractAdapter.detect(model)
26
+ }.should raise_error
27
+ end
28
+ end
29
+
30
+ describe '.adapter_for_model' do
31
+ let(:model) { stub('model') }
32
+
33
+ after :each do
34
+ ThinkingSphinx.database_adapter = nil
35
+ end
36
+
37
+ it "translates strings to symbols" do
38
+ ThinkingSphinx.database_adapter = 'foo'
39
+
40
+ ThinkingSphinx::AbstractAdapter.adapter_for_model(model).should == :foo
41
+ end
42
+
43
+ it "passes through symbols unchanged" do
44
+ ThinkingSphinx.database_adapter = :bar
45
+
46
+ ThinkingSphinx::AbstractAdapter.adapter_for_model(model).should == :bar
47
+ end
48
+
49
+ it "returns standard_adapter_for_model if database_adapter is not set" do
50
+ ThinkingSphinx.database_adapter = nil
51
+ ThinkingSphinx::AbstractAdapter.stub!(:standard_adapter_for_model => :baz)
52
+
53
+ ThinkingSphinx::AbstractAdapter.adapter_for_model(model).should == :baz
54
+ end
55
+
56
+ it "calls the lambda and returns it if one is provided" do
57
+ ThinkingSphinx.database_adapter = lambda { |model| :foo }
58
+
59
+ ThinkingSphinx::AbstractAdapter.adapter_for_model(model).should == :foo
60
+ end
61
+ end
62
+
63
+ describe '.standard_adapter_for_model' do
64
+ let(:klass) { stub('connection class') }
65
+ let(:connection) { stub('connection', :class => klass) }
66
+ let(:model) { stub('model', :connection => connection) }
67
+
68
+ it "translates a normal MySQL adapter" do
69
+ klass.stub(:name => 'ActiveRecord::ConnectionAdapters::MysqlAdapter')
70
+
71
+ ThinkingSphinx::AbstractAdapter.standard_adapter_for_model(model).
72
+ should == :mysql
73
+ end
74
+
75
+ it "translates a MySQL plus adapter" do
76
+ klass.stub(:name => 'ActiveRecord::ConnectionAdapters::MysqlplusAdapter')
77
+
78
+ ThinkingSphinx::AbstractAdapter.standard_adapter_for_model(model).
79
+ should == :mysql
80
+ end
81
+
82
+ it "translates a MySQL2 adapter" do
83
+ klass.stub(:name => 'ActiveRecord::ConnectionAdapters::Mysql2Adapter')
84
+
85
+ ThinkingSphinx::AbstractAdapter.standard_adapter_for_model(model).
86
+ should == :mysql
87
+ end
88
+
89
+ it "translates a NullDB adapter to MySQL" do
90
+ klass.stub(:name => 'ActiveRecord::ConnectionAdapters::NullDBAdapter')
91
+
92
+ ThinkingSphinx::AbstractAdapter.standard_adapter_for_model(model).
93
+ should == :mysql
94
+ end
95
+
96
+ it "translates a normal PostgreSQL adapter" do
97
+ klass.stub(:name => 'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter')
98
+
99
+ ThinkingSphinx::AbstractAdapter.standard_adapter_for_model(model).
100
+ should == :postgresql
101
+ end
102
+
103
+ it "translates a JDBC MySQL adapter to MySQL" do
104
+ klass.stub(:name => 'ActiveRecord::ConnectionAdapters::JdbcAdapter')
105
+ connection.stub(:config => {:adapter => 'jdbcmysql'})
106
+
107
+ ThinkingSphinx::AbstractAdapter.standard_adapter_for_model(model).
108
+ should == :mysql
109
+ end
110
+
111
+ it "translates a JDBC PostgreSQL adapter to PostgreSQL" do
112
+ klass.stub(:name => 'ActiveRecord::ConnectionAdapters::JdbcAdapter')
113
+ connection.stub(:config => {:adapter => 'jdbcpostgresql'})
114
+
115
+ ThinkingSphinx::AbstractAdapter.standard_adapter_for_model(model).
116
+ should == :postgresql
117
+ end
118
+
119
+ it "returns other JDBC adapters without translation" do
120
+ klass.stub(:name => 'ActiveRecord::ConnectionAdapters::JdbcAdapter')
121
+ connection.stub(:config => {:adapter => 'jdbcmssql'})
122
+
123
+ ThinkingSphinx::AbstractAdapter.standard_adapter_for_model(model).
124
+ should == 'jdbcmssql'
125
+ end
126
+
127
+ it "returns other unknown adapters without translation" do
128
+ klass.stub(:name => 'ActiveRecord::ConnectionAdapters::FooAdapter')
129
+
130
+ ThinkingSphinx::AbstractAdapter.standard_adapter_for_model(model).
131
+ should == 'ActiveRecord::ConnectionAdapters::FooAdapter'
132
+ end
133
+ end
134
+ end
@@ -118,6 +118,8 @@ describe ThinkingSphinx::Configuration do
118
118
  config.app_root = "/here/somewhere"
119
119
  end
120
120
  ThinkingSphinx::Configuration.instance.app_root.should == "/here/somewhere"
121
+
122
+ ThinkingSphinx::Configuration.instance.reset
121
123
  end
122
124
  end
123
125
 
@@ -235,6 +237,7 @@ describe ThinkingSphinx::Configuration do
235
237
  @config.address = 'domain.url'
236
238
  @config.port = 3333
237
239
  @config.configuration.searchd.max_matches = 100
240
+ @config.timeout = 1
238
241
  end
239
242
 
240
243
  it "should return an instance of Riddle::Client" do
@@ -252,6 +255,10 @@ describe ThinkingSphinx::Configuration do
252
255
  it "should use the configuration max matches" do
253
256
  @config.client.max_matches.should == 100
254
257
  end
258
+
259
+ it "should use the configuration timeout" do
260
+ @config.client.timeout.should == 1
261
+ end
255
262
  end
256
263
 
257
264
  describe '#models_by_crc' do
@@ -53,8 +53,9 @@ describe ThinkingSphinx::Context do
53
53
 
54
54
  it "should catch database errors with a warning" do
55
55
  @class_name.should_receive(:constantize).and_raise(Mysql::Error)
56
- STDERR.should_receive(:puts).with('Warning: Error loading a.rb')
57
-
56
+ STDERR.stub!(:puts => '')
57
+ STDERR.should_receive(:puts).with('Warning: Error loading a.rb:')
58
+
58
59
  lambda {
59
60
  @context.prepare
60
61
  }.should_not raise_error
@@ -218,6 +218,34 @@ describe ThinkingSphinx::Search do
218
218
  ThinkingSphinx::Search.new(:classes => [Alpha, Beta]).first
219
219
  end
220
220
 
221
+ it "should restrict includes to the relevant classes" do
222
+ Alpha.should_receive(:find) do |type, options|
223
+ options[:include].should == [:betas]
224
+ [@alpha_a, @alpha_b]
225
+ end
226
+
227
+ Beta.should_receive(:find) do |type, options|
228
+ options[:include].should == [:gammas]
229
+ [@beta_a, @beta_b]
230
+ end
231
+
232
+ ThinkingSphinx::Search.new(:include => [:betas, :gammas]).first
233
+ end
234
+
235
+ it "should restrict single includes to the relevant classes" do
236
+ Alpha.should_receive(:find) do |type, options|
237
+ options[:include].should == :betas
238
+ [@alpha_a, @alpha_b]
239
+ end
240
+
241
+ Beta.should_receive(:find) do |type, options|
242
+ options[:include].should be_nil
243
+ [@beta_a, @beta_b]
244
+ end
245
+
246
+ ThinkingSphinx::Search.new(:include => :betas).first
247
+ end
248
+
221
249
  describe 'query' do
222
250
  it "should concatenate arguments with spaces" do
223
251
  @client.should_receive(:query) do |query, index, comment|
@@ -276,6 +304,32 @@ describe ThinkingSphinx::Search do
276
304
  'foo@bar.com -foo-bar', :star => /[\w@.-]+/u
277
305
  ).first
278
306
  end
307
+
308
+ it "should ignore multi-field limitations" do
309
+ @client.should_receive(:query) do |query, index, comment|
310
+ query.should == '@(foo,bar) *baz*'
311
+ end
312
+
313
+ ThinkingSphinx::Search.new('@(foo,bar) baz', :star => true).first
314
+ end
315
+
316
+ it "should ignore multi-field limitations with spaces" do
317
+ @client.should_receive(:query) do |query, index, comment|
318
+ query.should == '@(foo bar) *baz*'
319
+ end
320
+
321
+ ThinkingSphinx::Search.new('@(foo bar) baz', :star => true).first
322
+ end
323
+
324
+ it "should ignore multi-field limitations in the middle of queries" do
325
+ @client.should_receive(:query) do |query, index, comment|
326
+ query.should == '*baz* @foo *bar* @(foo,bar) *baz*'
327
+ end
328
+
329
+ ThinkingSphinx::Search.new(
330
+ 'baz @foo bar @(foo,bar) baz', :star => true
331
+ ).first
332
+ end
279
333
  end
280
334
 
281
335
  describe 'comment' do
@@ -510,31 +564,6 @@ describe ThinkingSphinx::Search do
510
564
  filter.attribute.should == 'sphinx_internal_id'
511
565
  filter.exclude?.should be_true
512
566
  end
513
-
514
- describe 'in :conditions' do
515
- it "should add as filters for known attributes in :conditions option" do
516
- ThinkingSphinx::Search.new('general',
517
- :conditions => {:word => 'specific', :lat => 1.5},
518
- :classes => [Alpha]
519
- ).first
520
-
521
- filter = @client.filters.last
522
- filter.values.should == [1.5]
523
- filter.attribute.should == 'lat'
524
- filter.exclude?.should be_false
525
- end
526
-
527
- it "should not add the filter to the query string" do
528
- @client.should_receive(:query) do |query, index, comment|
529
- query.should == 'general @word specific'
530
- end
531
-
532
- ThinkingSphinx::Search.new('general',
533
- :conditions => {:word => 'specific', :lat => 1.5},
534
- :classes => [Alpha]
535
- ).first
536
- end
537
- end
538
567
  end
539
568
 
540
569
  describe 'sort mode' do
@@ -1202,6 +1231,19 @@ describe ThinkingSphinx::Search do
1202
1231
  @search.freeze.should be_a(ThinkingSphinx::Search)
1203
1232
  end
1204
1233
  end
1234
+
1235
+ describe '#client' do
1236
+ let(:client) { Riddle::Client.new }
1237
+ it "should respect the client in options" do
1238
+ search = ThinkingSphinx::Search.new :client => client
1239
+ search.client.should == client
1240
+ end
1241
+
1242
+ it "should get a new client from the configuration singleton by default" do
1243
+ ThinkingSphinx::Configuration.instance.stub!(:client => client)
1244
+ ThinkingSphinx::Search.new.client.should == client
1245
+ end
1246
+ end
1205
1247
  end
1206
1248
 
1207
1249
  describe ThinkingSphinx::Search, "playing nice with Search model" do
@@ -1,6 +1,3 @@
1
- require 'yard'
2
- require 'jeweler'
3
-
4
1
  desc 'Generate documentation'
5
2
  YARD::Rake::YardocTask.new
6
3
 
@@ -29,17 +26,6 @@ Jeweler::Tasks.new do |gem|
29
26
  "spec/**/*_spec.rb"
30
27
  ]
31
28
 
32
- gem.add_dependency 'activerecord', '>= 1.15.6', '< 3.0.0'
33
- gem.add_dependency 'riddle', '>= 1.0.10'
34
- gem.add_dependency 'after_commit', '>= 1.0.6'
35
-
36
- gem.add_development_dependency "yard", ">= 0"
37
- gem.add_development_dependency "rspec", ">= 1.2.9"
38
- gem.add_development_dependency "cucumber", ">= 0"
39
- gem.add_development_dependency "will_paginate", "2.3.11"
40
- gem.add_development_dependency "ginger", "1.2.0"
41
- gem.add_development_dependency "faker", "0.3.1"
42
-
43
29
  gem.post_install_message = <<-MESSAGE
44
30
  If you're upgrading, you should read this:
45
31
  http://freelancing-god.github.com/ts/en/upgrading.html
@@ -1,13 +1,12 @@
1
1
  require 'rubygems'
2
- require 'spec/rake/spectask'
2
+ require 'rspec/core/rake_task'
3
3
  require 'cucumber/rake/task'
4
4
 
5
5
  desc "Run the specs under spec"
6
- Spec::Rake::SpecTask.new do |t|
7
- t.spec_files = FileList['spec/**/*_spec.rb']
8
- t.spec_opts << "-c"
6
+ RSpec::Core::RakeTask.new do |t|
7
+ t.pattern = 'spec/**/*_spec.rb'
9
8
  end
10
- # task :spec => :check_dependencies
9
+ task :spec => :check_dependencies
11
10
 
12
11
  desc "Run all feature-set configurations"
13
12
  task :features do |t|
@@ -32,36 +31,45 @@ namespace :features do
32
31
  task :postgresql => :check_dependencies
33
32
  end
34
33
 
35
- desc "Generate RCov reports"
36
- Spec::Rake::SpecTask.new(:rcov) do |t|
37
- t.libs << 'lib'
38
- t.spec_files = FileList['spec/**/*_spec.rb']
39
- t.rcov = true
40
- t.rcov_opts = [
41
- '--exclude', 'spec',
42
- '--exclude', 'gems',
43
- '--exclude', 'riddle',
44
- '--exclude', 'ruby'
45
- ]
46
- end
47
-
48
34
  namespace :rcov do
35
+ desc "Generate RCov reports"
36
+ RSpec::Core::RakeTask.new(:rspec) do |t|
37
+ t.pattern = 'spec/**/*_spec.rb'
38
+ t.rcov = true
39
+ t.rcov_opts = [
40
+ '--exclude', 'spec',
41
+ '--exclude', 'gems',
42
+ '--exclude', 'riddle',
43
+ '--exclude', 'ruby',
44
+ '--aggregate coverage.data'
45
+ ]
46
+ end
47
+
49
48
  def add_task(name, description)
50
49
  Cucumber::Rake::Task.new(name, description) do |t|
51
- t.cucumber_opts = "--format pretty"
52
- t.profile = name
50
+ t.cucumber_opts = "--format pretty features/*.feature DATABASE=#{name}"
53
51
  t.rcov = true
54
52
  t.rcov_opts = [
55
53
  '--exclude', 'spec',
56
54
  '--exclude', 'gems',
57
55
  '--exclude', 'riddle',
58
- '--exclude', 'features'
56
+ '--exclude', 'features',
57
+ '--aggregate coverage.data'
59
58
  ]
60
59
  end
61
60
  end
62
61
 
63
62
  add_task :mysql, "Run feature-set against MySQL with rcov"
64
63
  add_task :postgresql, "Run feature-set against PostgreSQL with rcov"
64
+
65
+ task :all do
66
+ rm 'coverage.data' if File.exist?('coverage.data')
67
+ rm 'rerun.txt' if File.exist?('rerun.txt')
68
+
69
+ Rake::Task['rcov:rspec'].invoke
70
+ Rake::Task['rcov:mysql'].invoke
71
+ Rake::Task['rcov:postgresql'].invoke
72
+ end
65
73
  end
66
74
 
67
75
  desc "Build cucumber.yml file"
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thinking-sphinx
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 7
4
5
  prerelease: false
5
6
  segments:
6
7
  - 1
7
- - 3
8
- - 20
9
- version: 1.3.20
8
+ - 4
9
+ - 0
10
+ version: 1.4.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - Pat Allan
@@ -14,17 +15,19 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-09-03 00:00:00 +09:00
18
+ date: 2010-11-15 00:00:00 +08:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- name: activerecord
22
+ type: :runtime
22
23
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
+ name: activerecord
25
+ version_requirements: &id001 !ruby/object:Gem::Requirement
24
26
  none: false
25
27
  requirements:
26
28
  - - ">="
27
29
  - !ruby/object:Gem::Version
30
+ hash: 39
28
31
  segments:
29
32
  - 1
30
33
  - 15
@@ -32,129 +35,254 @@ dependencies:
32
35
  version: 1.15.6
33
36
  - - <
34
37
  - !ruby/object:Gem::Version
38
+ hash: 7
35
39
  segments:
36
40
  - 3
37
41
  - 0
38
42
  - 0
39
43
  version: 3.0.0
40
- type: :runtime
41
- version_requirements: *id001
44
+ requirement: *id001
42
45
  - !ruby/object:Gem::Dependency
43
- name: riddle
46
+ type: :runtime
44
47
  prerelease: false
45
- requirement: &id002 !ruby/object:Gem::Requirement
48
+ name: riddle
49
+ version_requirements: &id002 !ruby/object:Gem::Requirement
46
50
  none: false
47
51
  requirements:
48
52
  - - ">="
49
53
  - !ruby/object:Gem::Version
54
+ hash: 31
50
55
  segments:
51
56
  - 1
57
+ - 2
52
58
  - 0
53
- - 10
54
- version: 1.0.10
55
- type: :runtime
56
- version_requirements: *id002
59
+ version: 1.2.0
60
+ requirement: *id002
57
61
  - !ruby/object:Gem::Dependency
58
- name: after_commit
62
+ type: :runtime
59
63
  prerelease: false
60
- requirement: &id003 !ruby/object:Gem::Requirement
64
+ name: after_commit
65
+ version_requirements: &id003 !ruby/object:Gem::Requirement
61
66
  none: false
62
67
  requirements:
63
68
  - - ">="
64
69
  - !ruby/object:Gem::Version
70
+ hash: 25
65
71
  segments:
66
72
  - 1
67
73
  - 0
68
- - 6
69
- version: 1.0.6
70
- type: :runtime
71
- version_requirements: *id003
74
+ - 7
75
+ version: 1.0.7
76
+ requirement: *id003
72
77
  - !ruby/object:Gem::Dependency
73
- name: yard
78
+ type: :development
74
79
  prerelease: false
75
- requirement: &id004 !ruby/object:Gem::Requirement
80
+ name: mysql
81
+ version_requirements: &id004 !ruby/object:Gem::Requirement
76
82
  none: false
77
83
  requirements:
78
- - - ">="
84
+ - - "="
85
+ - !ruby/object:Gem::Version
86
+ hash: 45
87
+ segments:
88
+ - 2
89
+ - 8
90
+ - 1
91
+ version: 2.8.1
92
+ requirement: *id004
93
+ - !ruby/object:Gem::Dependency
94
+ type: :development
95
+ prerelease: false
96
+ name: pg
97
+ version_requirements: &id005 !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - "="
79
101
  - !ruby/object:Gem::Version
102
+ hash: 59
80
103
  segments:
81
104
  - 0
82
- version: "0"
105
+ - 9
106
+ - 0
107
+ version: 0.9.0
108
+ requirement: *id005
109
+ - !ruby/object:Gem::Dependency
83
110
  type: :development
84
- version_requirements: *id004
111
+ prerelease: false
112
+ name: jeweler
113
+ version_requirements: &id006 !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - "="
117
+ - !ruby/object:Gem::Version
118
+ hash: -1876988220
119
+ segments:
120
+ - 1
121
+ - 5
122
+ - 0
123
+ - pre5
124
+ version: 1.5.0.pre5
125
+ requirement: *id006
85
126
  - !ruby/object:Gem::Dependency
127
+ type: :development
128
+ prerelease: false
129
+ name: yard
130
+ version_requirements: &id007 !ruby/object:Gem::Requirement
131
+ none: false
132
+ requirements:
133
+ - - "="
134
+ - !ruby/object:Gem::Version
135
+ hash: 5
136
+ segments:
137
+ - 0
138
+ - 6
139
+ - 1
140
+ version: 0.6.1
141
+ requirement: *id007
142
+ - !ruby/object:Gem::Dependency
143
+ type: :development
144
+ prerelease: false
86
145
  name: rspec
146
+ version_requirements: &id008 !ruby/object:Gem::Requirement
147
+ none: false
148
+ requirements:
149
+ - - "="
150
+ - !ruby/object:Gem::Version
151
+ hash: 13
152
+ segments:
153
+ - 2
154
+ - 0
155
+ - 1
156
+ version: 2.0.1
157
+ requirement: *id008
158
+ - !ruby/object:Gem::Dependency
159
+ type: :development
87
160
  prerelease: false
88
- requirement: &id005 !ruby/object:Gem::Requirement
161
+ name: rspec-core
162
+ version_requirements: &id009 !ruby/object:Gem::Requirement
89
163
  none: false
90
164
  requirements:
91
- - - ">="
165
+ - - "="
92
166
  - !ruby/object:Gem::Version
167
+ hash: 13
93
168
  segments:
169
+ - 2
170
+ - 0
94
171
  - 1
172
+ version: 2.0.1
173
+ requirement: *id009
174
+ - !ruby/object:Gem::Dependency
175
+ type: :development
176
+ prerelease: false
177
+ name: rspec-expectations
178
+ version_requirements: &id010 !ruby/object:Gem::Requirement
179
+ none: false
180
+ requirements:
181
+ - - "="
182
+ - !ruby/object:Gem::Version
183
+ hash: 13
184
+ segments:
95
185
  - 2
96
- - 9
97
- version: 1.2.9
186
+ - 0
187
+ - 1
188
+ version: 2.0.1
189
+ requirement: *id010
190
+ - !ruby/object:Gem::Dependency
98
191
  type: :development
99
- version_requirements: *id005
192
+ prerelease: false
193
+ name: rspec-mocks
194
+ version_requirements: &id011 !ruby/object:Gem::Requirement
195
+ none: false
196
+ requirements:
197
+ - - "="
198
+ - !ruby/object:Gem::Version
199
+ hash: 13
200
+ segments:
201
+ - 2
202
+ - 0
203
+ - 1
204
+ version: 2.0.1
205
+ requirement: *id011
100
206
  - !ruby/object:Gem::Dependency
101
- name: cucumber
207
+ type: :development
102
208
  prerelease: false
103
- requirement: &id006 !ruby/object:Gem::Requirement
209
+ name: rcov
210
+ version_requirements: &id012 !ruby/object:Gem::Requirement
104
211
  none: false
105
212
  requirements:
106
- - - ">="
213
+ - - "="
107
214
  - !ruby/object:Gem::Version
215
+ hash: 43
108
216
  segments:
109
217
  - 0
110
- version: "0"
218
+ - 9
219
+ - 8
220
+ version: 0.9.8
221
+ requirement: *id012
222
+ - !ruby/object:Gem::Dependency
111
223
  type: :development
112
- version_requirements: *id006
224
+ prerelease: false
225
+ name: cucumber
226
+ version_requirements: &id013 !ruby/object:Gem::Requirement
227
+ none: false
228
+ requirements:
229
+ - - "="
230
+ - !ruby/object:Gem::Version
231
+ hash: 51
232
+ segments:
233
+ - 0
234
+ - 9
235
+ - 4
236
+ version: 0.9.4
237
+ requirement: *id013
113
238
  - !ruby/object:Gem::Dependency
114
- name: will_paginate
239
+ type: :development
115
240
  prerelease: false
116
- requirement: &id007 !ruby/object:Gem::Requirement
241
+ name: will_paginate
242
+ version_requirements: &id014 !ruby/object:Gem::Requirement
117
243
  none: false
118
244
  requirements:
119
245
  - - "="
120
246
  - !ruby/object:Gem::Version
247
+ hash: 29
121
248
  segments:
122
249
  - 2
123
250
  - 3
124
- - 11
125
- version: 2.3.11
126
- type: :development
127
- version_requirements: *id007
251
+ - 15
252
+ version: 2.3.15
253
+ requirement: *id014
128
254
  - !ruby/object:Gem::Dependency
129
- name: ginger
255
+ type: :development
130
256
  prerelease: false
131
- requirement: &id008 !ruby/object:Gem::Requirement
257
+ name: ginger
258
+ version_requirements: &id015 !ruby/object:Gem::Requirement
132
259
  none: false
133
260
  requirements:
134
261
  - - "="
135
262
  - !ruby/object:Gem::Version
263
+ hash: 31
136
264
  segments:
137
265
  - 1
138
266
  - 2
139
267
  - 0
140
268
  version: 1.2.0
141
- type: :development
142
- version_requirements: *id008
269
+ requirement: *id015
143
270
  - !ruby/object:Gem::Dependency
144
- name: faker
271
+ type: :development
145
272
  prerelease: false
146
- requirement: &id009 !ruby/object:Gem::Requirement
273
+ name: faker
274
+ version_requirements: &id016 !ruby/object:Gem::Requirement
147
275
  none: false
148
276
  requirements:
149
277
  - - "="
150
278
  - !ruby/object:Gem::Version
279
+ hash: 17
151
280
  segments:
152
281
  - 0
153
282
  - 3
154
283
  - 1
155
284
  version: 0.3.1
156
- type: :development
157
- version_requirements: *id009
285
+ requirement: *id016
158
286
  description: A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.
159
287
  email: pat@freelancing-gods.com
160
288
  executables: []
@@ -212,6 +340,25 @@ files:
212
340
  - tasks/distribution.rb
213
341
  - tasks/rails.rake
214
342
  - tasks/testing.rb
343
+ - features/abstract_inheritance.feature
344
+ - features/alternate_primary_key.feature
345
+ - features/attribute_transformation.feature
346
+ - features/attribute_updates.feature
347
+ - features/deleting_instances.feature
348
+ - features/direct_attributes.feature
349
+ - features/excerpts.feature
350
+ - features/extensible_delta_indexing.feature
351
+ - features/facets.feature
352
+ - features/facets_across_model.feature
353
+ - features/field_sorting.feature
354
+ - features/handling_edits.feature
355
+ - features/retry_stale_indexes.feature
356
+ - features/searching_across_models.feature
357
+ - features/searching_by_index.feature
358
+ - features/searching_by_model.feature
359
+ - features/searching_with_find_arguments.feature
360
+ - features/sphinx_detection.feature
361
+ - features/sphinx_scopes.feature
215
362
  - features/step_definitions/alpha_steps.rb
216
363
  - features/step_definitions/beta_steps.rb
217
364
  - features/step_definitions/common_steps.rb
@@ -222,8 +369,10 @@ files:
222
369
  - features/step_definitions/scope_steps.rb
223
370
  - features/step_definitions/search_steps.rb
224
371
  - features/step_definitions/sphinx_steps.rb
372
+ - features/sti_searching.feature
225
373
  - features/support/env.rb
226
374
  - features/support/lib/generic_delta_handler.rb
375
+ - features/thinking_sphinx/database.example.yml
227
376
  - features/thinking_sphinx/db/fixtures/alphas.rb
228
377
  - features/thinking_sphinx/db/fixtures/authors.rb
229
378
  - features/thinking_sphinx/db/fixtures/betas.rb
@@ -260,6 +409,7 @@ files:
260
409
  - features/thinking_sphinx/db/migrations/create_taggings.rb
261
410
  - features/thinking_sphinx/db/migrations/create_tags.rb
262
411
  - features/thinking_sphinx/models/alpha.rb
412
+ - features/thinking_sphinx/models/andrew.rb
263
413
  - features/thinking_sphinx/models/animal.rb
264
414
  - features/thinking_sphinx/models/author.rb
265
415
  - features/thinking_sphinx/models/beta.rb
@@ -280,30 +430,11 @@ files:
280
430
  - features/thinking_sphinx/models/robot.rb
281
431
  - features/thinking_sphinx/models/tag.rb
282
432
  - features/thinking_sphinx/models/tagging.rb
283
- - features/abstract_inheritance.feature
284
- - features/alternate_primary_key.feature
285
- - features/attribute_transformation.feature
286
- - features/attribute_updates.feature
287
- - features/deleting_instances.feature
288
- - features/direct_attributes.feature
289
- - features/excerpts.feature
290
- - features/extensible_delta_indexing.feature
291
- - features/facets.feature
292
- - features/facets_across_model.feature
293
- - features/handling_edits.feature
294
- - features/retry_stale_indexes.feature
295
- - features/searching_across_models.feature
296
- - features/searching_by_index.feature
297
- - features/searching_by_model.feature
298
- - features/searching_with_find_arguments.feature
299
- - features/sphinx_detection.feature
300
- - features/sphinx_scopes.feature
301
- - features/sti_searching.feature
302
- - features/thinking_sphinx/database.example.yml
303
433
  - spec/thinking_sphinx/active_record/delta_spec.rb
304
434
  - spec/thinking_sphinx/active_record/has_many_association_spec.rb
305
435
  - spec/thinking_sphinx/active_record/scopes_spec.rb
306
436
  - spec/thinking_sphinx/active_record_spec.rb
437
+ - spec/thinking_sphinx/adapters/abstract_adapter_spec.rb
307
438
  - spec/thinking_sphinx/association_spec.rb
308
439
  - spec/thinking_sphinx/attribute_spec.rb
309
440
  - spec/thinking_sphinx/auto_version_spec.rb
@@ -332,8 +463,8 @@ post_install_message: |+
332
463
  If you're upgrading, you should read this:
333
464
  http://freelancing-god.github.com/ts/en/upgrading.html
334
465
 
335
- rdoc_options:
336
- - --charset=UTF-8
466
+ rdoc_options: []
467
+
337
468
  require_paths:
338
469
  - lib
339
470
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -341,6 +472,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
341
472
  requirements:
342
473
  - - ">="
343
474
  - !ruby/object:Gem::Version
475
+ hash: 3
344
476
  segments:
345
477
  - 0
346
478
  version: "0"
@@ -349,6 +481,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
349
481
  requirements:
350
482
  - - ">="
351
483
  - !ruby/object:Gem::Version
484
+ hash: 3
352
485
  segments:
353
486
  - 0
354
487
  version: "0"
@@ -360,6 +493,25 @@ signing_key:
360
493
  specification_version: 3
361
494
  summary: ActiveRecord/Rails Sphinx library
362
495
  test_files:
496
+ - features/abstract_inheritance.feature
497
+ - features/alternate_primary_key.feature
498
+ - features/attribute_transformation.feature
499
+ - features/attribute_updates.feature
500
+ - features/deleting_instances.feature
501
+ - features/direct_attributes.feature
502
+ - features/excerpts.feature
503
+ - features/extensible_delta_indexing.feature
504
+ - features/facets.feature
505
+ - features/facets_across_model.feature
506
+ - features/field_sorting.feature
507
+ - features/handling_edits.feature
508
+ - features/retry_stale_indexes.feature
509
+ - features/searching_across_models.feature
510
+ - features/searching_by_index.feature
511
+ - features/searching_by_model.feature
512
+ - features/searching_with_find_arguments.feature
513
+ - features/sphinx_detection.feature
514
+ - features/sphinx_scopes.feature
363
515
  - features/step_definitions/alpha_steps.rb
364
516
  - features/step_definitions/beta_steps.rb
365
517
  - features/step_definitions/common_steps.rb
@@ -370,8 +522,10 @@ test_files:
370
522
  - features/step_definitions/scope_steps.rb
371
523
  - features/step_definitions/search_steps.rb
372
524
  - features/step_definitions/sphinx_steps.rb
525
+ - features/sti_searching.feature
373
526
  - features/support/env.rb
374
527
  - features/support/lib/generic_delta_handler.rb
528
+ - features/thinking_sphinx/database.example.yml
375
529
  - features/thinking_sphinx/db/fixtures/alphas.rb
376
530
  - features/thinking_sphinx/db/fixtures/authors.rb
377
531
  - features/thinking_sphinx/db/fixtures/betas.rb
@@ -408,6 +562,7 @@ test_files:
408
562
  - features/thinking_sphinx/db/migrations/create_taggings.rb
409
563
  - features/thinking_sphinx/db/migrations/create_tags.rb
410
564
  - features/thinking_sphinx/models/alpha.rb
565
+ - features/thinking_sphinx/models/andrew.rb
411
566
  - features/thinking_sphinx/models/animal.rb
412
567
  - features/thinking_sphinx/models/author.rb
413
568
  - features/thinking_sphinx/models/beta.rb
@@ -428,30 +583,11 @@ test_files:
428
583
  - features/thinking_sphinx/models/robot.rb
429
584
  - features/thinking_sphinx/models/tag.rb
430
585
  - features/thinking_sphinx/models/tagging.rb
431
- - features/abstract_inheritance.feature
432
- - features/alternate_primary_key.feature
433
- - features/attribute_transformation.feature
434
- - features/attribute_updates.feature
435
- - features/deleting_instances.feature
436
- - features/direct_attributes.feature
437
- - features/excerpts.feature
438
- - features/extensible_delta_indexing.feature
439
- - features/facets.feature
440
- - features/facets_across_model.feature
441
- - features/handling_edits.feature
442
- - features/retry_stale_indexes.feature
443
- - features/searching_across_models.feature
444
- - features/searching_by_index.feature
445
- - features/searching_by_model.feature
446
- - features/searching_with_find_arguments.feature
447
- - features/sphinx_detection.feature
448
- - features/sphinx_scopes.feature
449
- - features/sti_searching.feature
450
- - features/thinking_sphinx/database.example.yml
451
586
  - spec/thinking_sphinx/active_record/delta_spec.rb
452
587
  - spec/thinking_sphinx/active_record/has_many_association_spec.rb
453
588
  - spec/thinking_sphinx/active_record/scopes_spec.rb
454
589
  - spec/thinking_sphinx/active_record_spec.rb
590
+ - spec/thinking_sphinx/adapters/abstract_adapter_spec.rb
455
591
  - spec/thinking_sphinx/association_spec.rb
456
592
  - spec/thinking_sphinx/attribute_spec.rb
457
593
  - spec/thinking_sphinx/auto_version_spec.rb