acts_as_indexed 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +4 -1
- data/Gemfile +6 -5
- data/VERSION +1 -1
- data/acts_as_indexed.gemspec +3 -4
- data/lib/acts_as_indexed/storage.rb +8 -3
- metadata +4 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
===0.7.1 [22nd February 2011]
|
2
|
+
- Removed file locking on Microsoft Windows as it is unsupported.
|
3
|
+
|
1
4
|
===0.7.0 [11th February 2011]
|
2
5
|
- Threadsafe support. Index files are now locked for changes, and atomically written.
|
3
6
|
- Configurable case-sensitivity.
|
@@ -25,7 +28,7 @@
|
|
25
28
|
- Real names given for all contributors.
|
26
29
|
|
27
30
|
===0.6.3 [5th July 2010]
|
28
|
-
-
|
31
|
+
- Index file path can now be defined as a Pathname as well as an array. [parndt - Philip Arndt]
|
29
32
|
- Can now define which records are indexed and which are not via an :if proc. [madpilot - Myles Eftos]
|
30
33
|
- Lots of tidying up. [parndt - Philip Arndt]
|
31
34
|
- Rails 3 fixes. [myabc - Alex Coles]
|
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.1
|
data/acts_as_indexed.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{acts_as_indexed}
|
8
|
-
s.version = "0.7.
|
8
|
+
s.version = "0.7.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Douglas F Shearer"]
|
12
|
-
s.date = %q{2011-02-
|
12
|
+
s.date = %q{2011-02-22}
|
13
13
|
s.description = %q{Acts As Indexed is a plugin which provides a pain-free way to add fulltext search to your Ruby on Rails app}
|
14
14
|
s.email = %q{dougal.s@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -46,7 +46,7 @@ Gem::Specification.new do |s|
|
|
46
46
|
]
|
47
47
|
s.homepage = %q{http://github.com/dougal/acts_as_indexed}
|
48
48
|
s.require_paths = ["lib"]
|
49
|
-
s.rubygems_version = %q{1.
|
49
|
+
s.rubygems_version = %q{1.5.2}
|
50
50
|
s.summary = %q{Acts As Indexed is a plugin which provides a pain-free way to add fulltext search to your Ruby on Rails app}
|
51
51
|
s.test_files = [
|
52
52
|
"test/abstract_unit.rb",
|
@@ -59,7 +59,6 @@ Gem::Specification.new do |s|
|
|
59
59
|
]
|
60
60
|
|
61
61
|
if s.respond_to? :specification_version then
|
62
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
63
62
|
s.specification_version = 3
|
64
63
|
|
65
64
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
@@ -122,8 +122,8 @@ module ActsAsIndexed #:nodoc:
|
|
122
122
|
else
|
123
123
|
@path.mkpath
|
124
124
|
|
125
|
-
# Do we need to lock for this? I don't think so as it is only ever
|
126
|
-
#
|
125
|
+
# Do we need to lock for this? I don't think so as it is only ever
|
126
|
+
# creating, not modifying.
|
127
127
|
write_file(version_path) do |f|
|
128
128
|
f.write(ActsAsIndexed::INDEX_VERSION)
|
129
129
|
end
|
@@ -167,7 +167,8 @@ module ActsAsIndexed #:nodoc:
|
|
167
167
|
# Borrowed from Rails' ActiveSupport FileStore. Also under MIT licence.
|
168
168
|
# Lock a file for a block so only one process can modify it at a time.
|
169
169
|
def lock_file(file_path, &block) # :nodoc:
|
170
|
-
|
170
|
+
# Windows does not support file locking.
|
171
|
+
if !windows? && file_path.exist?
|
171
172
|
file_path.open('r') do |f|
|
172
173
|
begin
|
173
174
|
f.flock File::LOCK_EX
|
@@ -181,5 +182,9 @@ module ActsAsIndexed #:nodoc:
|
|
181
182
|
end
|
182
183
|
end
|
183
184
|
|
185
|
+
def windows?
|
186
|
+
@@is_windows ||= RUBY_PLATFORM[/mswin32|mingw|cygwin/]
|
187
|
+
end
|
188
|
+
|
184
189
|
end
|
185
190
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_indexed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 1
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 7
|
9
|
-
-
|
10
|
-
version: 0.7.
|
9
|
+
- 1
|
10
|
+
version: 0.7.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Douglas F Shearer
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-02-
|
18
|
+
date: 2011-02-22 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|