acts_as_indexed 0.6.4 → 0.6.5
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/CHANGELOG +4 -0
- data/Gemfile +5 -0
- data/Gemfile.lock +24 -0
- data/VERSION +1 -1
- data/acts_as_indexed.gemspec +4 -2
- data/lib/acts_as_indexed/search_index.rb +2 -2
- data/test/acts_as_indexed_test.rb +1 -1
- metadata +6 -4
data/CHANGELOG
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
===0.6.5 [19th August 2010]
|
2
|
+
- Reintroduced support for older version of Ruby which do not implement Array#exclude? [bug report by Andy Egger]
|
3
|
+
- Using Bundler to manage development dependencies.
|
4
|
+
|
1
5
|
===0.6.4 [16th August 2010]
|
2
6
|
- Added starts-with query type [nilbus - Edward Anderson]
|
3
7
|
- Various fixes and improvements.
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
gemcutter (0.6.1)
|
5
|
+
git (1.2.5)
|
6
|
+
jeweler (1.4.0)
|
7
|
+
gemcutter (>= 0.1.0)
|
8
|
+
git (>= 1.2.5)
|
9
|
+
rubyforge (>= 2.0.0)
|
10
|
+
json_pure (1.4.6)
|
11
|
+
mocha (0.9.8)
|
12
|
+
rake
|
13
|
+
rake (0.8.7)
|
14
|
+
rubyforge (2.0.4)
|
15
|
+
json_pure (>= 1.1.7)
|
16
|
+
sqlite3-ruby (1.3.1)
|
17
|
+
|
18
|
+
PLATFORMS
|
19
|
+
ruby
|
20
|
+
|
21
|
+
DEPENDENCIES
|
22
|
+
jeweler
|
23
|
+
mocha
|
24
|
+
sqlite3-ruby
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.6.
|
1
|
+
0.6.5
|
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.6.
|
8
|
+
s.version = "0.6.5"
|
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{2010-08-
|
12
|
+
s.date = %q{2010-08-19}
|
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 = [
|
@@ -18,6 +18,8 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.files = [
|
19
19
|
".gitignore",
|
20
20
|
"CHANGELOG",
|
21
|
+
"Gemfile",
|
22
|
+
"Gemfile.lock",
|
21
23
|
"MIT-LICENSE",
|
22
24
|
"README.rdoc",
|
23
25
|
"Rakefile",
|
@@ -119,11 +119,11 @@ module ActsAsIndexed #:nodoc:
|
|
119
119
|
return results2 if results1.empty?
|
120
120
|
|
121
121
|
# Delete any records from results 1 that are not in results 2.
|
122
|
-
r1 = results1.delete_if{ |r_id,w| results2.
|
122
|
+
r1 = results1.delete_if{ |r_id,w| !results2.include?(r_id) }
|
123
123
|
|
124
124
|
|
125
125
|
# Delete any records from results 2 that are not in results 1.
|
126
|
-
r2 = results2.delete_if{ |r_id,w| results1.
|
126
|
+
r2 = results2.delete_if{ |r_id,w| !results1.include?(r_id) }
|
127
127
|
|
128
128
|
# Merge the results by adding their respective scores.
|
129
129
|
r1.merge(r2) { |r_id,old_val,new_val| old_val + new_val}
|
@@ -51,7 +51,7 @@ class ActsAsIndexedTest < ActiveSupport::TestCase
|
|
51
51
|
p = Post.create(:title => 'A special title', :body => 'foo bar bla bla bla')
|
52
52
|
assert Post.find_with_index('title',{},{:ids_only => true}).include?(p.id)
|
53
53
|
p.update_attributes(:title => 'No longer special')
|
54
|
-
assert Post.find_with_index('title',{},{:ids_only => true}).
|
54
|
+
assert !Post.find_with_index('title',{},{:ids_only => true}).include?(p.id)
|
55
55
|
end
|
56
56
|
|
57
57
|
def test_simple_queries
|
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: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 6
|
9
|
-
-
|
10
|
-
version: 0.6.
|
9
|
+
- 5
|
10
|
+
version: 0.6.5
|
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: 2010-08-
|
18
|
+
date: 2010-08-19 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|
@@ -30,6 +30,8 @@ extra_rdoc_files:
|
|
30
30
|
files:
|
31
31
|
- .gitignore
|
32
32
|
- CHANGELOG
|
33
|
+
- Gemfile
|
34
|
+
- Gemfile.lock
|
33
35
|
- MIT-LICENSE
|
34
36
|
- README.rdoc
|
35
37
|
- Rakefile
|