thinking-sphinx 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile CHANGED
@@ -189,3 +189,7 @@ Since I first released this library, there's been quite a few people who have su
189
189
  * Lee Capps
190
190
  * Sam Goldstein
191
191
  * Artem Orlov
192
+ * Matt Todd
193
+ * Ivan Ukhov
194
+ * Stephen Celis
195
+ * Paco Guzmán
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0
1
+ 2.0.1
@@ -11,24 +11,24 @@ When /^I search for the document id of (\w+) (\w+) in the (\w+) index$/ do |mode
11
11
  end
12
12
 
13
13
  Then "it should exist" do
14
- ThinkingSphinx::Search.search_for_id(@id, @index).should == true
14
+ ThinkingSphinx.search_for_id(@id, @index).should == true
15
15
  end
16
16
 
17
17
  Then "it should not exist" do
18
- ThinkingSphinx::Search.search_for_id(@id, @index).should == false
18
+ ThinkingSphinx.search_for_id(@id, @index).should == false
19
19
  end
20
20
 
21
21
  Then "it should exist if using Rails 2.1 or newer" do
22
22
  require 'active_record/version'
23
23
  unless ActiveRecord::VERSION::STRING.to_f < 2.1
24
- ThinkingSphinx::Search.search_for_id(@id, @index).should == true
24
+ ThinkingSphinx.search_for_id(@id, @index).should == true
25
25
  end
26
26
  end
27
27
 
28
28
  Then "it should not exist if using Rails 2.1 or newer" do
29
29
  require 'active_record/version'
30
30
  unless ActiveRecord::VERSION::STRING.to_f < 2.1
31
- ThinkingSphinx::Search.search_for_id(@id, @index).should == false
31
+ ThinkingSphinx.search_for_id(@id, @index).should == false
32
32
  end
33
33
  end
34
34
 
@@ -68,7 +68,7 @@ module Cucumber
68
68
  Kernel.at_exit do
69
69
  ::ThinkingSphinx::Configuration.instance.controller.stop
70
70
  sleep(0.5) # Ensure Sphinx has shut down completely
71
- ActiveRecord::Base.logger.close
71
+ ::ThinkingSphinx::ActiveRecord::LogSubscriber.logger.close
72
72
  end
73
73
  end
74
74
 
@@ -89,7 +89,7 @@ module Cucumber
89
89
  end
90
90
 
91
91
  def configure_active_record
92
- ActiveRecord::Base.logger = Logger.new(
92
+ ::ThinkingSphinx::ActiveRecord::LogSubscriber.logger = Logger.new(
93
93
  open("#{temporary_directory}/active_record.log", "a")
94
94
  )
95
95
 
@@ -0,0 +1 @@
1
+ require 'thinking_sphinx'
@@ -0,0 +1,31 @@
1
+ module ThinkingSphinx
2
+ module ActionController
3
+ extend ActiveSupport::Concern
4
+
5
+ protected
6
+
7
+ attr_internal :query_runtime
8
+
9
+ def cleanup_view_runtime
10
+ log_subscriber = ThinkingSphinx::ActiveRecord::LogSubscriber
11
+ query_runtime_pre_render = log_subscriber.reset_runtime
12
+ runtime = super
13
+ query_runtime_post_render = log_subscriber.reset_runtime
14
+ self.query_runtime = query_runtime_pre_render + query_runtime_post_render
15
+ runtime - query_runtime_post_render
16
+ end
17
+
18
+ def append_info_to_payload(payload)
19
+ super
20
+ payload[:query_runtime] = query_runtime
21
+ end
22
+
23
+ module ClassMethods
24
+ def log_process_action(payload)
25
+ messages, query_runtime = super, payload[:query_runtime]
26
+ messages << ("Sphinx: %.1fms" % query_runtime.to_f) if query_runtime
27
+ messages
28
+ end
29
+ end
30
+ end
31
+ end
@@ -1,6 +1,7 @@
1
1
  require 'thinking_sphinx/active_record/attribute_updates'
2
2
  require 'thinking_sphinx/active_record/delta'
3
3
  require 'thinking_sphinx/active_record/has_many_association'
4
+ require 'thinking_sphinx/active_record/log_subscriber'
4
5
  require 'thinking_sphinx/active_record/scopes'
5
6
 
6
7
  module ThinkingSphinx
@@ -0,0 +1,61 @@
1
+ require 'active_support/log_subscriber'
2
+
3
+ module ThinkingSphinx
4
+ module ActiveRecord
5
+ class LogSubscriber < ActiveSupport::LogSubscriber
6
+ def self.runtime=(value)
7
+ Thread.current['thinking_sphinx_query_runtime'] = value
8
+ end
9
+
10
+ def self.runtime
11
+ Thread.current['thinking_sphinx_query_runtime'] ||= 0
12
+ end
13
+
14
+ def self.reset_runtime
15
+ rt, self.runtime = runtime, 0
16
+ rt
17
+ end
18
+
19
+ def initialize
20
+ super
21
+ @odd_or_even = false
22
+ end
23
+
24
+ def query(event)
25
+ self.class.runtime += event.duration
26
+ return unless logger.debug?
27
+
28
+ identifier = color('Sphinx Query (%.1fms)' % event.duration, GREEN, true)
29
+ query = event.payload[:query]
30
+ query = color query, nil, true if odd?
31
+
32
+ debug " #{identifier} #{query}"
33
+ end
34
+
35
+ def message(event)
36
+ return unless logger.debug?
37
+
38
+ identifier = color 'Sphinx', GREEN, true
39
+ message = event.payload[:message]
40
+ message = color message, nil, true if odd?
41
+
42
+ debug " #{identifier} #{message}"
43
+ end
44
+
45
+ def odd?
46
+ @odd_or_even = !@odd_or_even
47
+ end
48
+
49
+ def logger
50
+ return @logger if defined? @logger
51
+ self.logger = ::ActiveRecord::Base.logger
52
+ end
53
+
54
+ def logger=(logger)
55
+ @logger = logger
56
+ end
57
+
58
+ attach_to :thinking_sphinx
59
+ end
60
+ end
61
+ end
@@ -64,12 +64,12 @@ module ThinkingSphinx
64
64
  end
65
65
 
66
66
  def arel_join
67
- arel_join = @join.with_join_class(Arel::OuterJoin)
68
- arel_join.options[:conditions].gsub!(/::ts_join_alias::/,
67
+ @join.join_type = Arel::OuterJoin
68
+ @join.options[:conditions].gsub!(/::ts_join_alias::/,
69
69
  "#{@reflection.klass.connection.quote_table_name(@join.parent.aliased_table_name)}"
70
- ) if arel_join.options[:conditions].is_a?(String)
70
+ ) if @join.options[:conditions].is_a?(String)
71
71
 
72
- arel_join
72
+ @join
73
73
  end
74
74
 
75
75
  # Returns true if the association - or a parent - is a has_many or
@@ -224,7 +224,7 @@ module ThinkingSphinx
224
224
  end_assoc = end_association_for_mva
225
225
  raise "Could not determine SQL for MVA" if base_assoc.nil?
226
226
 
227
- relation = Table(base_assoc.table)
227
+ relation = Arel::Table.new(base_assoc.table)
228
228
 
229
229
  association_joins.each do |join|
230
230
  relation = relation.join(join.relation, Arel::OuterJoin).
@@ -10,6 +10,13 @@ module ThinkingSphinx
10
10
  end
11
11
  end
12
12
 
13
+ initializer "thinking_sphinx.action_controller" do
14
+ ActiveSupport.on_load :action_controller do
15
+ require 'thinking_sphinx/action_controller'
16
+ include ThinkingSphinx::ActionController
17
+ end
18
+ end
19
+
13
20
  initializer "thinking_sphinx.set_app_root" do |app|
14
21
  ThinkingSphinx::Configuration.instance.reset # Rails has setup app now
15
22
  end
@@ -29,34 +29,38 @@ module ThinkingSphinx
29
29
 
30
30
  # Deprecated. Use ThinkingSphinx.search
31
31
  def self.search(*args)
32
- log 'ThinkingSphinx::Search.search is deprecated. Please use ThinkingSphinx.search instead.'
32
+ warn 'ThinkingSphinx::Search.search is deprecated. Please use ThinkingSphinx.search instead.'
33
33
  ThinkingSphinx.search *args
34
34
  end
35
35
 
36
36
  # Deprecated. Use ThinkingSphinx.search_for_ids
37
37
  def self.search_for_ids(*args)
38
- log 'ThinkingSphinx::Search.search_for_ids is deprecated. Please use ThinkingSphinx.search_for_ids instead.'
38
+ warn 'ThinkingSphinx::Search.search_for_ids is deprecated. Please use ThinkingSphinx.search_for_ids instead.'
39
39
  ThinkingSphinx.search_for_ids *args
40
40
  end
41
41
 
42
42
  # Deprecated. Use ThinkingSphinx.search_for_ids
43
43
  def self.search_for_id(*args)
44
- log 'ThinkingSphinx::Search.search_for_id is deprecated. Please use ThinkingSphinx.search_for_id instead.'
44
+ warn 'ThinkingSphinx::Search.search_for_id is deprecated. Please use ThinkingSphinx.search_for_id instead.'
45
45
  ThinkingSphinx.search_for_id *args
46
46
  end
47
47
 
48
48
  # Deprecated. Use ThinkingSphinx.count
49
49
  def self.count(*args)
50
- log 'ThinkingSphinx::Search.count is deprecated. Please use ThinkingSphinx.count instead.'
50
+ warn 'ThinkingSphinx::Search.count is deprecated. Please use ThinkingSphinx.count instead.'
51
51
  ThinkingSphinx.count *args
52
52
  end
53
53
 
54
54
  # Deprecated. Use ThinkingSphinx.facets
55
55
  def self.facets(*args)
56
- log 'ThinkingSphinx::Search.facets is deprecated. Please use ThinkingSphinx.facets instead.'
56
+ warn 'ThinkingSphinx::Search.facets is deprecated. Please use ThinkingSphinx.facets instead.'
57
57
  ThinkingSphinx.facets *args
58
58
  end
59
-
59
+
60
+ def self.warn(message)
61
+ ::ActiveSupport::Deprecation.warn message
62
+ end
63
+
60
64
  def self.bundle_searches(enum = nil)
61
65
  bundle = ThinkingSphinx::BundledSearch.new
62
66
 
@@ -102,6 +106,11 @@ module ThinkingSphinx
102
106
  self
103
107
  end
104
108
 
109
+ def as_json(*args)
110
+ populate
111
+ @array.as_json(*args)
112
+ end
113
+
105
114
  # Indication of whether the request has been made to Sphinx for the search
106
115
  # query.
107
116
  #
@@ -344,12 +353,11 @@ module ThinkingSphinx
344
353
 
345
354
  retry_on_stale_index do
346
355
  begin
347
- log "Querying: '#{query}'"
348
- runtime = Benchmark.realtime {
356
+ log query do
349
357
  @results = client.query query, indexes, comment
350
- }
351
- log "Found #{@results[:total_found]} results", :debug,
352
- "Sphinx (#{sprintf("%f", runtime)}s)"
358
+ end
359
+ total = @results[:total_found].to_i
360
+ log "Found #{total} result#{'s' unless total == 1}"
353
361
  rescue Errno::ECONNREFUSED => err
354
362
  raise ThinkingSphinx::ConnectionError,
355
363
  'Connection to Sphinx Daemon (searchd) failed.'
@@ -406,30 +414,27 @@ module ThinkingSphinx
406
414
  match[:attributes]['class_crc'] == object.class.to_crc32
407
415
  }
408
416
  end
409
-
410
- def self.log(message, method = :debug, identifier = 'Sphinx')
411
- return if ::ActiveRecord::Base.logger.nil?
412
-
413
- info = ''
414
- if ::ActiveRecord::LogSubscriber.colorize_logging
415
- identifier_color, message_color = "4;32;1", "0" # 0;1 = Bold
416
- info << " \e[#{identifier_color}m#{identifier}\e[0m "
417
- info << "\e[#{message_color}m#{message}\e[0m"
417
+
418
+ def self.log(message, &block)
419
+ return if ThinkingSphinx::ActiveRecord::LogSubscriber.logger.nil?
420
+
421
+ if block_given?
422
+ ::ActiveSupport::Notifications.
423
+ instrument('query.thinking_sphinx', :query => message, &block)
418
424
  else
419
- info = "#{identifier} #{message}"
425
+ ::ActiveSupport::Notifications.
426
+ instrument('message.thinking_sphinx', :message => message)
420
427
  end
421
-
422
- ::ActiveRecord::Base.logger.send method, info
423
428
  end
424
-
425
- def log(*args)
426
- self.class.log(*args)
429
+
430
+ def log(query, &block)
431
+ self.class.log(query, &block)
427
432
  end
428
-
433
+
429
434
  def prepare(client)
430
435
  index_options = one_class ?
431
436
  one_class.sphinx_indexes.first.local_options : {}
432
-
437
+
433
438
  [
434
439
  :max_matches, :group_by, :group_function, :group_clause,
435
440
  :group_distinct, :id_range, :cut_off, :retry_count, :retry_delay,
@@ -475,8 +480,8 @@ module ThinkingSphinx
475
480
  stale_ids |= err.ids
476
481
  # ID exclusion
477
482
  options[:without_ids] = Array(options[:without_ids]) | err.ids
478
-
479
- log 'Sphinx Stale Ids (%s %s left): %s' % [
483
+
484
+ log 'Stale Ids (%s %s left): %s' % [
480
485
  retries, (retries == 1 ? 'try' : 'tries'), stale_ids.join(', ')
481
486
  ]
482
487
  retry
@@ -728,13 +733,37 @@ module ThinkingSphinx
728
733
  when NilClass
729
734
  nil
730
735
  when Array
731
- includes.select { |inc| klass.reflections[inc] }
736
+ include_from_array includes, klass
732
737
  when Symbol
733
738
  klass.reflections[includes].nil? ? nil : includes
739
+ when Hash
740
+ include_from_hash includes, klass
734
741
  else
735
742
  includes
736
743
  end
737
744
  end
745
+
746
+ def include_from_array(array, klass)
747
+ scoped_array = []
748
+ array.each do |value|
749
+ case value
750
+ when Hash
751
+ scoped_hash = include_from_hash(value, klass)
752
+ scoped_array << scoped_hash unless scoped_hash.nil?
753
+ else
754
+ scoped_array << value unless klass.reflections[value].nil?
755
+ end
756
+ end
757
+ scoped_array.empty? ? nil : scoped_array
758
+ end
759
+
760
+ def include_from_hash(hash, klass)
761
+ scoped_hash = {}
762
+ hash.keys.each do |key|
763
+ scoped_hash[key] = hash[key] unless klass.reflections[key].nil?
764
+ end
765
+ scoped_hash.empty? ? nil : scoped_hash
766
+ end
738
767
 
739
768
  def instances_from_class(klass, matches)
740
769
  index_options = klass.sphinx_index_options
@@ -115,8 +115,10 @@ describe ThinkingSphinx::Search do
115
115
  it "return the output of ThinkingSphinx.search" do
116
116
  @results = [] # to confirm same object
117
117
  ThinkingSphinx.stub!(:search => @results)
118
-
119
- ThinkingSphinx::Search.search.object_id.should == @results.object_id
118
+
119
+ ActiveSupport::Deprecation.silence do
120
+ ThinkingSphinx::Search.search.object_id.should == @results.object_id
121
+ end
120
122
  end
121
123
  end
122
124
 
@@ -124,9 +126,11 @@ describe ThinkingSphinx::Search do
124
126
  it "return the output of ThinkingSphinx.search_for_ids" do
125
127
  @results = [] # to confirm same object
126
128
  ThinkingSphinx.stub!(:search_for_ids => @results)
127
-
128
- ThinkingSphinx::Search.search_for_ids.object_id.
129
- should == @results.object_id
129
+
130
+ ActiveSupport::Deprecation.silence do
131
+ ThinkingSphinx::Search.search_for_ids.object_id.
132
+ should == @results.object_id
133
+ end
130
134
  end
131
135
  end
132
136
 
@@ -134,9 +138,11 @@ describe ThinkingSphinx::Search do
134
138
  it "return the output of ThinkingSphinx.search_for_ids" do
135
139
  @results = [] # to confirm same object
136
140
  ThinkingSphinx.stub!(:search_for_id => @results)
137
-
138
- ThinkingSphinx::Search.search_for_id.object_id.
139
- should == @results.object_id
141
+
142
+ ActiveSupport::Deprecation.silence do
143
+ ThinkingSphinx::Search.search_for_id.object_id.
144
+ should == @results.object_id
145
+ end
140
146
  end
141
147
  end
142
148
 
@@ -144,8 +150,10 @@ describe ThinkingSphinx::Search do
144
150
  it "return the output of ThinkingSphinx.search" do
145
151
  @results = [] # to confirm same object
146
152
  ThinkingSphinx.stub!(:count => @results)
147
-
148
- ThinkingSphinx::Search.count.object_id.should == @results.object_id
153
+
154
+ ActiveSupport::Deprecation.silence do
155
+ ThinkingSphinx::Search.count.object_id.should == @results.object_id
156
+ end
149
157
  end
150
158
  end
151
159
 
@@ -153,8 +161,10 @@ describe ThinkingSphinx::Search do
153
161
  it "return the output of ThinkingSphinx.facets" do
154
162
  @results = [] # to confirm same object
155
163
  ThinkingSphinx.stub!(:facets => @results)
156
-
157
- ThinkingSphinx::Search.facets.object_id.should == @results.object_id
164
+
165
+ ActiveSupport::Deprecation.silence do
166
+ ThinkingSphinx::Search.facets.object_id.should == @results.object_id
167
+ end
158
168
  end
159
169
  end
160
170
 
@@ -245,6 +255,46 @@ describe ThinkingSphinx::Search do
245
255
 
246
256
  ThinkingSphinx::Search.new(:include => :betas).first
247
257
  end
258
+
259
+ it "should respect complex includes" do
260
+ Alpha.should_receive(:find) do |type, options|
261
+ options[:include].should == [:thetas, {:betas => :gammas}]
262
+ [@alpha_a, @alpha_b]
263
+ end
264
+
265
+ Beta.should_receive(:find) do |type, options|
266
+ options[:include].should be_nil
267
+ [@beta_a, @beta_b]
268
+ end
269
+
270
+ ThinkingSphinx::Search.new(:include => [:thetas, {:betas => :gammas}]).first
271
+ end
272
+
273
+ it "should respect hash includes" do
274
+ Alpha.should_receive(:find) do |type, options|
275
+ options[:include].should == {:betas => :gammas}
276
+ [@alpha_a, @alpha_b]
277
+ end
278
+
279
+ Beta.should_receive(:find) do |type, options|
280
+ options[:include].should be_nil
281
+ [@beta_a, @beta_b]
282
+ end
283
+
284
+ ThinkingSphinx::Search.new(:include => {:betas => :gammas}).first
285
+ end
286
+
287
+ it "should respect includes for single class searches" do
288
+ Alpha.should_receive(:find) do |type, options|
289
+ options[:include].should == {:betas => :gammas}
290
+ [@alpha_a, @alpha_b]
291
+ end
292
+
293
+ ThinkingSphinx::Search.new(
294
+ :include => {:betas => :gammas},
295
+ :classes => [Alpha]
296
+ ).first
297
+ end
248
298
 
249
299
  describe 'query' do
250
300
  it "should concatenate arguments with spaces" do
data/tasks/testing.rb CHANGED
@@ -6,7 +6,6 @@ desc "Run the specs under spec"
6
6
  RSpec::Core::RakeTask.new do |t|
7
7
  t.pattern = 'spec/**/*_spec.rb'
8
8
  end
9
- task :spec => :check_dependencies
10
9
 
11
10
  desc "Run all feature-set configurations"
12
11
  task :features do |t|
@@ -26,9 +25,6 @@ namespace :features do
26
25
 
27
26
  add_task :mysql, "Run feature-set against MySQL"
28
27
  add_task :postgresql, "Run feature-set against PostgreSQL"
29
-
30
- task :mysql => :check_dependencies
31
- task :postgresql => :check_dependencies
32
28
  end
33
29
 
34
30
  namespace :rcov do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thinking-sphinx
3
3
  version: !ruby/object:Gem::Version
4
- hash: 15
4
+ hash: 13
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
8
  - 0
9
- - 0
10
- version: 2.0.0
9
+ - 1
10
+ version: 2.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Pat Allan
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-15 00:00:00 +08:00
18
+ date: 2010-11-20 00:00:00 +11:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -27,12 +27,12 @@ dependencies:
27
27
  requirements:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
- hash: 7
30
+ hash: 1
31
31
  segments:
32
32
  - 3
33
33
  - 0
34
- - 0
35
- version: 3.0.0
34
+ - 3
35
+ version: 3.0.3
36
36
  requirement: *id001
37
37
  - !ruby/object:Gem::Dependency
38
38
  type: :runtime
@@ -43,12 +43,12 @@ dependencies:
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- hash: 31
46
+ hash: 29
47
47
  segments:
48
48
  - 1
49
49
  - 2
50
- - 0
51
- version: 1.2.0
50
+ - 1
51
+ version: 1.2.1
52
52
  requirement: *id002
53
53
  - !ruby/object:Gem::Dependency
54
54
  type: :development
@@ -85,25 +85,40 @@ dependencies:
85
85
  - !ruby/object:Gem::Dependency
86
86
  type: :development
87
87
  prerelease: false
88
- name: jeweler
88
+ name: actionpack
89
89
  version_requirements: &id005 !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ hash: 1
95
+ segments:
96
+ - 3
97
+ - 0
98
+ - 3
99
+ version: 3.0.3
100
+ requirement: *id005
101
+ - !ruby/object:Gem::Dependency
102
+ type: :development
103
+ prerelease: false
104
+ name: jeweler
105
+ version_requirements: &id006 !ruby/object:Gem::Requirement
90
106
  none: false
91
107
  requirements:
92
108
  - - "="
93
109
  - !ruby/object:Gem::Version
94
- hash: -1876988220
110
+ hash: 1
95
111
  segments:
96
112
  - 1
97
113
  - 5
98
- - 0
99
- - pre5
100
- version: 1.5.0.pre5
101
- requirement: *id005
114
+ - 1
115
+ version: 1.5.1
116
+ requirement: *id006
102
117
  - !ruby/object:Gem::Dependency
103
118
  type: :development
104
119
  prerelease: false
105
120
  name: yard
106
- version_requirements: &id006 !ruby/object:Gem::Requirement
121
+ version_requirements: &id007 !ruby/object:Gem::Requirement
107
122
  none: false
108
123
  requirements:
109
124
  - - "="
@@ -114,12 +129,12 @@ dependencies:
114
129
  - 6
115
130
  - 1
116
131
  version: 0.6.1
117
- requirement: *id006
132
+ requirement: *id007
118
133
  - !ruby/object:Gem::Dependency
119
134
  type: :development
120
135
  prerelease: false
121
136
  name: rspec
122
- version_requirements: &id007 !ruby/object:Gem::Requirement
137
+ version_requirements: &id008 !ruby/object:Gem::Requirement
123
138
  none: false
124
139
  requirements:
125
140
  - - "="
@@ -130,12 +145,12 @@ dependencies:
130
145
  - 0
131
146
  - 1
132
147
  version: 2.0.1
133
- requirement: *id007
148
+ requirement: *id008
134
149
  - !ruby/object:Gem::Dependency
135
150
  type: :development
136
151
  prerelease: false
137
152
  name: rspec-core
138
- version_requirements: &id008 !ruby/object:Gem::Requirement
153
+ version_requirements: &id009 !ruby/object:Gem::Requirement
139
154
  none: false
140
155
  requirements:
141
156
  - - "="
@@ -146,12 +161,12 @@ dependencies:
146
161
  - 0
147
162
  - 1
148
163
  version: 2.0.1
149
- requirement: *id008
164
+ requirement: *id009
150
165
  - !ruby/object:Gem::Dependency
151
166
  type: :development
152
167
  prerelease: false
153
168
  name: rspec-expectations
154
- version_requirements: &id009 !ruby/object:Gem::Requirement
169
+ version_requirements: &id010 !ruby/object:Gem::Requirement
155
170
  none: false
156
171
  requirements:
157
172
  - - "="
@@ -162,12 +177,12 @@ dependencies:
162
177
  - 0
163
178
  - 1
164
179
  version: 2.0.1
165
- requirement: *id009
180
+ requirement: *id010
166
181
  - !ruby/object:Gem::Dependency
167
182
  type: :development
168
183
  prerelease: false
169
184
  name: rspec-mocks
170
- version_requirements: &id010 !ruby/object:Gem::Requirement
185
+ version_requirements: &id011 !ruby/object:Gem::Requirement
171
186
  none: false
172
187
  requirements:
173
188
  - - "="
@@ -178,12 +193,12 @@ dependencies:
178
193
  - 0
179
194
  - 1
180
195
  version: 2.0.1
181
- requirement: *id010
196
+ requirement: *id011
182
197
  - !ruby/object:Gem::Dependency
183
198
  type: :development
184
199
  prerelease: false
185
200
  name: rcov
186
- version_requirements: &id011 !ruby/object:Gem::Requirement
201
+ version_requirements: &id012 !ruby/object:Gem::Requirement
187
202
  none: false
188
203
  requirements:
189
204
  - - "="
@@ -194,12 +209,12 @@ dependencies:
194
209
  - 9
195
210
  - 8
196
211
  version: 0.9.8
197
- requirement: *id011
212
+ requirement: *id012
198
213
  - !ruby/object:Gem::Dependency
199
214
  type: :development
200
215
  prerelease: false
201
216
  name: cucumber
202
- version_requirements: &id012 !ruby/object:Gem::Requirement
217
+ version_requirements: &id013 !ruby/object:Gem::Requirement
203
218
  none: false
204
219
  requirements:
205
220
  - - "="
@@ -210,12 +225,12 @@ dependencies:
210
225
  - 9
211
226
  - 4
212
227
  version: 0.9.4
213
- requirement: *id012
228
+ requirement: *id013
214
229
  - !ruby/object:Gem::Dependency
215
230
  type: :development
216
231
  prerelease: false
217
232
  name: will_paginate
218
- version_requirements: &id013 !ruby/object:Gem::Requirement
233
+ version_requirements: &id014 !ruby/object:Gem::Requirement
219
234
  none: false
220
235
  requirements:
221
236
  - - "="
@@ -226,12 +241,12 @@ dependencies:
226
241
  - 0
227
242
  - pre
228
243
  version: 3.0.pre
229
- requirement: *id013
244
+ requirement: *id014
230
245
  - !ruby/object:Gem::Dependency
231
246
  type: :development
232
247
  prerelease: false
233
248
  name: ginger
234
- version_requirements: &id014 !ruby/object:Gem::Requirement
249
+ version_requirements: &id015 !ruby/object:Gem::Requirement
235
250
  none: false
236
251
  requirements:
237
252
  - - "="
@@ -242,12 +257,12 @@ dependencies:
242
257
  - 2
243
258
  - 0
244
259
  version: 1.2.0
245
- requirement: *id014
260
+ requirement: *id015
246
261
  - !ruby/object:Gem::Dependency
247
262
  type: :development
248
263
  prerelease: false
249
264
  name: faker
250
- version_requirements: &id015 !ruby/object:Gem::Requirement
265
+ version_requirements: &id016 !ruby/object:Gem::Requirement
251
266
  none: false
252
267
  requirements:
253
268
  - - "="
@@ -258,7 +273,7 @@ dependencies:
258
273
  - 3
259
274
  - 1
260
275
  version: 0.3.1
261
- requirement: *id015
276
+ requirement: *id016
262
277
  description: A concise and easy-to-use Ruby library that connects ActiveRecord to the Sphinx search daemon, managing configuration, indexing and searching.
263
278
  email: pat@freelancing-gods.com
264
279
  executables: []
@@ -274,11 +289,14 @@ files:
274
289
  - lib/cucumber/thinking_sphinx/external_world.rb
275
290
  - lib/cucumber/thinking_sphinx/internal_world.rb
276
291
  - lib/cucumber/thinking_sphinx/sql_logger.rb
292
+ - lib/thinking-sphinx.rb
277
293
  - lib/thinking_sphinx.rb
294
+ - lib/thinking_sphinx/action_controller.rb
278
295
  - lib/thinking_sphinx/active_record.rb
279
296
  - lib/thinking_sphinx/active_record/attribute_updates.rb
280
297
  - lib/thinking_sphinx/active_record/delta.rb
281
298
  - lib/thinking_sphinx/active_record/has_many_association.rb
299
+ - lib/thinking_sphinx/active_record/log_subscriber.rb
282
300
  - lib/thinking_sphinx/active_record/scopes.rb
283
301
  - lib/thinking_sphinx/adapters/abstract_adapter.rb
284
302
  - lib/thinking_sphinx/adapters/mysql_adapter.rb