index-tanked 0.1.15 → 0.1.16
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/index-tanked/configuration.rb +19 -3
- data/lib/index-tanked/version.rb +1 -1
- metadata +4 -4
@@ -2,9 +2,25 @@ module IndexTanked
|
|
2
2
|
class Configuration
|
3
3
|
|
4
4
|
class << self
|
5
|
-
attr_accessor :url, :index, :search_availability, :index_availability,
|
6
|
-
|
7
|
-
|
5
|
+
attr_accessor :url, :index, :search_availability, :index_availability, :timeout
|
6
|
+
|
7
|
+
def self.block_accessor(*fields)
|
8
|
+
fields.each do |field|
|
9
|
+
attr_writer field
|
10
|
+
|
11
|
+
eval("
|
12
|
+
def #{field}
|
13
|
+
if block_given?
|
14
|
+
@#{field} = Proc.new
|
15
|
+
else
|
16
|
+
@#{field}
|
17
|
+
end
|
18
|
+
end
|
19
|
+
")
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
block_accessor :add_to_index_fallback, :delete_from_index_fallback, :missing_activerecord_ids_handler
|
8
24
|
|
9
25
|
def search_available?
|
10
26
|
if search_availability.is_a? Proc
|
data/lib/index-tanked/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: index-tanked
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 59
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 16
|
10
|
+
version: 0.1.16
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Adam Kittelson
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-04-
|
19
|
+
date: 2011-04-11 00:00:00 -05:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|