ximate 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ximate/search.rb +3 -2
- data/lib/ximate/version.rb +1 -1
- metadata +2 -13
data/lib/ximate/search.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Ximate
|
2
2
|
|
3
3
|
DATA = {}
|
4
|
-
OPTIONS = {:order_by_rank => true, :error_percent => 20}
|
4
|
+
OPTIONS = {:order_by_rank => true, :error_percent => 20, :logger => true}
|
5
5
|
|
6
6
|
def self.included(base)
|
7
7
|
base.extend(Search)
|
@@ -19,10 +19,11 @@ module Ximate
|
|
19
19
|
|
20
20
|
after_save :update_index
|
21
21
|
|
22
|
+
now = Time.now
|
22
23
|
self.to_s.classify.constantize.all.each do |p|
|
23
24
|
p.update_index(locale, &block)
|
24
25
|
end
|
25
|
-
|
26
|
+
Rails.logger.info("Build XIMATE hash data for '#{table}' in #{Time.now - now}.") if OPTIONS[:logger]
|
26
27
|
end
|
27
28
|
end
|
28
29
|
|
data/lib/ximate/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ximate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 29
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 0.0.1
|
5
|
+
version: 0.0.2
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Enrico Pilotto
|
@@ -57,23 +52,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
57
52
|
requirements:
|
58
53
|
- - ">="
|
59
54
|
- !ruby/object:Gem::Version
|
60
|
-
hash: 3
|
61
|
-
segments:
|
62
|
-
- 0
|
63
55
|
version: "0"
|
64
56
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
57
|
none: false
|
66
58
|
requirements:
|
67
59
|
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
|
-
hash: 3
|
70
|
-
segments:
|
71
|
-
- 0
|
72
61
|
version: "0"
|
73
62
|
requirements: []
|
74
63
|
|
75
64
|
rubyforge_project: ximate
|
76
|
-
rubygems_version: 1.
|
65
|
+
rubygems_version: 1.6.1
|
77
66
|
signing_key:
|
78
67
|
specification_version: 3
|
79
68
|
summary: Approximate fuzzy search for Ruby on Rails
|