ts-datetime-delta 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -11,9 +11,7 @@ require 'cucumber/thinking_sphinx/internal_world'
11
11
  world = Cucumber::ThinkingSphinx::InternalWorld.new
12
12
  world.configure_database
13
13
 
14
- SphinxVersion = ENV['VERSION'] || '0.9.8'
15
-
16
- require "thinking_sphinx/#{SphinxVersion}"
14
+ require "thinking_sphinx"
17
15
  require 'thinking_sphinx/deltas/datetime_delta'
18
16
 
19
17
  world.setup
@@ -2,10 +2,13 @@ namespace :thinking_sphinx do
2
2
  namespace :index do
3
3
  desc "Index Thinking Sphinx datetime delta indexes"
4
4
  task :delta => :app_env do
5
- ThinkingSphinx.indexed_models.select { |model|
6
- model.constantize.sphinx_indexes.any? { |index| index.delta? }
5
+ ThinkingSphinx.context.indexed_models.collect { |model|
6
+ model.constantize
7
+ }.select { |model|
8
+ model.define_indexes
9
+ model.delta_indexed_by_sphinx?
7
10
  }.each do |model|
8
- model.constantize.sphinx_indexes.select { |index|
11
+ model.sphinx_indexes.select { |index|
9
12
  index.delta? && index.delta_object.respond_to?(:delayed_index)
10
13
  }.each { |index|
11
14
  index.delta_object.delayed_index(index.model)
@@ -4,9 +4,7 @@ require 'rubygems'
4
4
  require 'spec'
5
5
  require 'spec/autorun'
6
6
 
7
- SphinxVersion = ENV['VERSION'] || '0.9.8'
8
-
9
- require "thinking_sphinx/#{SphinxVersion}"
7
+ require "thinking_sphinx"
10
8
  require 'thinking_sphinx/deltas/datetime_delta'
11
9
 
12
10
  Spec::Runner.configure do |config|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ts-datetime-delta
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pat Allan
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-11-26 00:00:00 +11:00
12
+ date: 2009-12-03 00:00:00 +11:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -20,7 +20,7 @@ dependencies:
20
20
  requirements:
21
21
  - - ">="
22
22
  - !ruby/object:Gem::Version
23
- version: 1.3.6
23
+ version: 1.3.8
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec