mongoid_fulltext 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +27 -12
- data/CHANGELOG.md +39 -59
- data/Dangerfile +1 -0
- data/Gemfile +5 -2
- data/LICENSE +1 -1
- data/README.md +8 -12
- data/lib/mongoid/full_text_search.rb +7 -7
- data/lib/mongoid/full_text_search/version.rb +1 -1
- data/mongoid_fulltext.gemspec +1 -1
- data/spec/mongoid/full_text_search_spec.rb +1 -1
- data/spec/spec_helper.rb +3 -1
- data/spec/support/mongoid.rb +5 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 424bedb9121315f16c39308131cf6a9611b0ce1f
|
4
|
+
data.tar.gz: 62c8a5bb13b1367dd238114b275d9e3648a7672a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff22fc634046b8408da5f2e6bbcb4825092785f1d6ebce3f60ade99d97de28318ca050c1d1a9740a55bf2343e626b31cf4e09ea617e1e7952526b072623a67d1
|
7
|
+
data.tar.gz: c80cc59816cee90f221c5d8e677cd087c6d76a7082eb8add87186a08836e08071fae3d2d9d733e6230e75b413856546aeca54637090605be927bf0564f13c9cb
|
data/.travis.yml
CHANGED
@@ -1,15 +1,30 @@
|
|
1
|
-
|
2
|
-
- 2.2
|
3
|
-
- 2.1
|
4
|
-
- 2.0
|
5
|
-
- 1.9.3
|
6
|
-
- rbx-2.2.10
|
7
|
-
- jruby-19mode
|
1
|
+
sudo: false
|
8
2
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
3
|
+
matrix:
|
4
|
+
include:
|
5
|
+
- rvm: 2.3.1
|
6
|
+
env:
|
7
|
+
- MONGOID_VERSION=6.0
|
8
|
+
before_script:
|
9
|
+
- bundle exec danger
|
10
|
+
- rvm: 2.3.1
|
11
|
+
env:
|
12
|
+
- MONGOID_VERSION=5.0
|
13
|
+
- rvm: 2.3.1
|
14
|
+
env:
|
15
|
+
- MONGOID_VERSION=4.0
|
16
|
+
- rvm: 2.2
|
17
|
+
env:
|
18
|
+
- MONGOID_VERSION=3.1.0
|
19
|
+
- rvm: 2.1
|
20
|
+
env:
|
21
|
+
- MONGOID_VERSION=3.0.0
|
14
22
|
|
15
23
|
services: mongodb
|
24
|
+
|
25
|
+
addons:
|
26
|
+
apt:
|
27
|
+
sources:
|
28
|
+
- mongodb-3.2-precise
|
29
|
+
packages:
|
30
|
+
- mongodb-org-server
|
data/CHANGELOG.md
CHANGED
@@ -1,150 +1,130 @@
|
|
1
|
-
0.
|
2
|
-
------------------
|
1
|
+
### 0.8.0 (1/19/2017)
|
3
2
|
|
4
|
-
* [#
|
3
|
+
* [#28](https://github.com/mongoid/mongoid_fulltext/pull/28): Moved to the mongoid organization - [@dblock](https://github.com/dblock).
|
4
|
+
* [#28](https://github.com/mongoid/mongoid_fulltext/pull/29): Compatibility with Mongoid 6 - [@dblock](https://github.com/dblock).
|
5
|
+
* [#28](https://github.com/mongoid/mongoid_fulltext/pull/28): Only testing on Ruby 2.3.1 and MongoDB 3.2 - [@dblock](https://github.com/dblock).
|
6
|
+
* [#31](https://github.com/mongoid/mongoid_fulltext/pull/31): Added danger, PR linter - [@dblock](https://github.com/dblock).
|
5
7
|
|
6
|
-
0.7.
|
7
|
-
|
8
|
+
### 0.7.1 (11/18/2015)
|
9
|
+
|
10
|
+
* [#24](https://github.com/mongoid/mongoid_fulltext/pull/24): Fix: `undefined method 'create_indexes' for module 'Mongoid::Indexable::ClassMethods'` - [@dblock](https://github.com/dblock).
|
11
|
+
|
12
|
+
### 0.7.0 (9/18/2015)
|
8
13
|
|
9
14
|
* Compatible with Mongoid 4 and 5 - [@dblock](https://github.com/dblock).
|
10
15
|
* Rewritten .gemspec, removed Jeweler - [@dblock](https://github.com/dblock).
|
11
16
|
* Added RuboCop - [@dblock](https://github.com/dblock).
|
12
17
|
|
13
|
-
0.6.1 (4/3/2013)
|
14
|
-
----------------
|
18
|
+
### 0.6.1 (4/3/2013)
|
15
19
|
|
16
|
-
* [#6](https://github.com/
|
20
|
+
* [#6](https://github.com/mongoid/mongoid_fulltext/pull/6): Upgrade to Mongoid ~> 3.0 - [@simi](https://github.com/simi).
|
17
21
|
|
18
|
-
0.6.0 (7/16/2012)
|
19
|
-
-----------------
|
22
|
+
### 0.6.0 (7/16/2012)
|
20
23
|
|
21
|
-
* [#2](https://github.com/
|
22
|
-
* [#1](https://github.com/
|
24
|
+
* [#2](https://github.com/mongoid/mongoid_fulltext/pull/2): Upgrade to Mongoid 3.0 - [@volmer](https://github.com/volmer).
|
25
|
+
* [#1](https://github.com/mongoid/mongoid_fulltext/pull/1): Fix: downcase destroys non-latin strings - [@netoneko](https://github.com/netoneko).
|
23
26
|
|
24
|
-
0.5.8 (3/8/2012)
|
25
|
-
----------------
|
27
|
+
### 0.5.8 (3/8/2012)
|
26
28
|
|
27
29
|
* Fix: do not CGI.unescape inside fulltext search - [@dblock](https://github.com/dblock).
|
28
30
|
* Refactored array filter API, allowing for overriding filter query method - [@ethul](https://github.com/ethul).
|
29
31
|
* Fix: check for the existence of the Mongoid.logger before calling it in case it was configured to false - [@AaronH](https://github.com/AaronH).
|
30
32
|
* Added install instructions to Readme - [@Nerian](https://github.com/Nerian).
|
31
33
|
|
32
|
-
0.5.7 (1/11/2012)
|
33
|
-
-----------------
|
34
|
+
### 0.5.7 (1/11/2012)
|
34
35
|
|
35
36
|
* Added `reindex_immediately` option to suppress automatic reindexing - [@joeyAghion](https://github.com/joeyAghion).
|
36
37
|
* Fix: treatment of word separators, adding newlines, tabs and dashes into the set of default word separators - [@aaw](https://github.com/aaw).
|
37
38
|
|
38
|
-
0.5.4 (11/8/2011)
|
39
|
-
-----------------
|
39
|
+
### 0.5.4 (11/8/2011)
|
40
40
|
|
41
41
|
* Made full word and prefix bumps inversely proportional to the length of the string - [@aaw](https://github.com/aaw).
|
42
42
|
|
43
|
-
0.5.3 (11/8/2011)
|
44
|
-
-----------------
|
43
|
+
### 0.5.3 (11/8/2011)
|
45
44
|
|
46
45
|
* Added an option to index short prefixes of words - [@aaw](https://github.com/aaw).
|
47
46
|
|
48
|
-
0.5.2 (11/5/2011)
|
49
|
-
-----------------
|
47
|
+
### 0.5.2 (11/5/2011)
|
50
48
|
|
51
49
|
* Added the ability to index full words that are less than the ngram length and not stop words - [@aaw](https://github.com/aaw).
|
52
50
|
|
53
|
-
0.5.1 (11/2/2011)
|
54
|
-
-----------------
|
51
|
+
### 0.5.1 (11/2/2011)
|
55
52
|
|
56
53
|
* Reducing the score for a full-word match (these used to be counted multiple times for multiple occurrences) and adding a list of stopwords to the config. Stopwords aren't given a score boost when matched as full words - [@aaw](https://github.com/aaw).
|
57
54
|
* Added UTF8 downcasing - [@zepplock](https://github.com/zepplock).
|
58
55
|
|
59
|
-
0.5.0 (10/11/2011)
|
60
|
-
-----------------
|
56
|
+
### 0.5.0 (10/11/2011)
|
61
57
|
|
62
58
|
* Fix: inconsistet scoring words with the same length as the ngram length - [@aaw](https://github.com/aaw).
|
63
59
|
|
64
|
-
0.4.5 (10/5/2011)
|
65
|
-
-----------------
|
60
|
+
### 0.4.5 (10/5/2011)
|
66
61
|
|
67
62
|
* Added `update_if` config option to control when index updates occur - [@nickhoffman](https://github.com/nickhoffman).
|
68
63
|
|
69
|
-
0.4.4 (8/31/2011)
|
70
|
-
-----------------
|
64
|
+
### 0.4.4 (8/31/2011)
|
71
65
|
|
72
66
|
* Added `remove_accents` - [@tdp2110](https://github.com/tdp2110).
|
73
67
|
|
74
|
-
0.4.3 (8/3/2011)
|
75
|
-
----------------
|
68
|
+
### 0.4.3 (8/3/2011)
|
76
69
|
|
77
70
|
* Fix: including `Mongoid::FulltextSearch` and not using it causes created_indexes to fail - [@dblock](https://github.com/dblock).
|
78
71
|
|
79
|
-
0.4.2 (6/28/2011)
|
80
|
-
-----------------
|
72
|
+
### 0.4.2 (6/28/2011)
|
81
73
|
|
82
74
|
* Delay-creating indexes in sync with how Mongoid creates indexes on normal collections - [@dblock](https://github.com/dblock).
|
83
75
|
|
84
|
-
0.4.1 (6/27/2011)
|
85
|
-
-----------------
|
76
|
+
### 0.4.1 (6/27/2011)
|
86
77
|
|
87
78
|
* Using `Mongoid.logger` for logging - [@dblock](https://github.com/dblock).
|
88
79
|
* Changed `ensure_index` to index in the background, avoid blocking booting app - [@dblock](https://github.com/dblock).
|
89
80
|
|
90
|
-
0.4.0 (6/19/2011)
|
91
|
-
-----------------
|
81
|
+
### 0.4.0 (6/19/2011)
|
92
82
|
|
93
83
|
* Removing all use of map-reduce - [@aaw](https://github.com/aaw).
|
94
84
|
* Support class name with module for example (Module::ClassConstantName) - [@steverandy](https://github.com/steverandy).
|
95
85
|
|
96
|
-
0.3.7 (6/7/2011)
|
97
|
-
----------------
|
86
|
+
### 0.3.7 (6/7/2011)
|
98
87
|
|
99
88
|
* Added support for updating model indexes in bulk - [@dblock](https://github.com/dblock).
|
100
89
|
|
101
|
-
0.3.6 (5/27/2011)
|
102
|
-
-----------------
|
90
|
+
### 0.3.6 (5/27/2011)
|
103
91
|
|
104
92
|
* Skipping words that are shorter than the n-gram - [@dblock](https://github.com/dblock).
|
105
93
|
* Added `index_full_words` - [@dblock](https://github.com/dblock).
|
106
94
|
* Keeping max score of ngram in the ngram hash - [@dblock](https://github.com/dblock).
|
107
95
|
|
108
|
-
0.3.5 (5/25/2011)
|
109
|
-
-----------------
|
96
|
+
### 0.3.5 (5/25/2011)
|
110
97
|
|
111
98
|
* Added index on document_id for faster remove - [@dblock](https://github.com/dblock).
|
112
99
|
* Addeda way to return scored results - [@dblock](https://github.com/dblock).
|
113
100
|
|
114
|
-
0.3.4 (5/16/2011)
|
115
|
-
-----------------
|
101
|
+
### 0.3.4 (5/16/2011)
|
116
102
|
|
117
103
|
* Added support for array filters - [@dblock](https://github.com/dblock).
|
118
104
|
* Added support for Ruby 1.8.7 - [@dbussink](https://github.com/dbussink).
|
119
105
|
|
120
|
-
0.3.2 (4/19/2011)
|
121
|
-
-----------------
|
106
|
+
### 0.3.2 (4/19/2011)
|
122
107
|
|
123
|
-
Exposing `update_ngram_index` and `remove_from_ngram_index` for fast bulk-updating the index - [@aaw](https://github.com/aaw).
|
108
|
+
* Exposing `update_ngram_index` and `remove_from_ngram_index` for fast bulk-updating the index - [@aaw](https://github.com/aaw).
|
124
109
|
|
125
|
-
0.3.1 (4/14/2011)
|
126
|
-
-----------------
|
110
|
+
### 0.3.1 (4/14/2011)
|
127
111
|
|
128
112
|
* Support for mongo versions >= 1.7.4 - [@aaw](https://github.com/aaw).
|
129
113
|
|
130
|
-
0.3.0 (4/13/2011)
|
131
|
-
-----------------
|
114
|
+
### 0.3.0 (4/13/2011)
|
132
115
|
|
133
116
|
* Adding the ability to define filters on an index - [@aaw](https://github.com/aaw).
|
134
117
|
|
135
|
-
0.2.0 (4/13/2011)
|
136
|
-
-----------------
|
118
|
+
### 0.2.0 (4/13/2011)
|
137
119
|
|
138
120
|
* Multiple indexes per model, removing internal indexes entirely - [@aaw](https://github.com/aaw).
|
139
121
|
|
140
|
-
0.1.1 (4/11/2011)
|
141
|
-
-----------------
|
122
|
+
### 0.1.1 (4/11/2011)
|
142
123
|
|
143
124
|
* Keep garbage in the index from blowing up `fulltext_search` - [@aaw](https://github.com/aaw).
|
144
125
|
* Indexing the results of `to_s` if no fields are provided - [@aaw](https://github.com/aaw).
|
145
126
|
* Adding a `before_destroy` callback for external indexes - [@aaw](https://github.com/aaw).
|
146
127
|
|
147
|
-
0.1.0 (4/7/2011)
|
148
|
-
----------------
|
128
|
+
### 0.1.0 (4/7/2011)
|
149
129
|
|
150
130
|
* Initial public release - [@aaw](https://github.com/aaw).
|
data/Dangerfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
danger.import_dangerfile(gem: "mongoid-danger")
|
data/Gemfile
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
source 'http://rubygems.org'
|
2
2
|
|
3
|
-
case version = ENV['MONGOID_VERSION'] || '
|
3
|
+
case version = ENV['MONGOID_VERSION'] || '6'
|
4
|
+
when /6/
|
5
|
+
gem 'mongoid', '~> 6.0'
|
4
6
|
when /5/
|
5
7
|
gem 'mongoid', '~> 5.0'
|
6
8
|
when /4/
|
@@ -20,6 +22,7 @@ group :test do
|
|
20
22
|
end
|
21
23
|
|
22
24
|
group :development do
|
23
|
-
gem 'rake'
|
25
|
+
gem 'rake', '< 11'
|
24
26
|
gem 'rubocop', '0.34.1'
|
27
|
+
gem 'mongoid-danger', '~> 0.1.1'
|
25
28
|
end
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,25 +1,21 @@
|
|
1
1
|
Mongoid Fulltext Search
|
2
2
|
=======================
|
3
3
|
|
4
|
-
[![Build Status](https://secure.travis-ci.org/artsy/mongoid_fulltext.svg)](http://travis-ci.org/artsy/mongoid_fulltext)
|
5
4
|
[![Gem Version](https://badge.fury.io/rb/mongoid_fulltext.svg)](http://badge.fury.io/rb/mongoid_fulltext)
|
5
|
+
[![Build Status](https://secure.travis-ci.org/mongoid/mongoid_fulltext.svg)](http://travis-ci.org/mongoid/mongoid_fulltext)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/mongoid/mongoid_fulltext/badges/gpa.svg)](https://codeclimate.com/github/mongoid/mongoid_fulltext)
|
6
7
|
|
7
|
-
Full-text search using n-gram matching for the Mongoid ODM.
|
8
|
-
probably works on earlier versions as well.
|
8
|
+
Full-text search using n-gram matching for the Mongoid ODM.
|
9
9
|
|
10
|
-
MongoDB introduced full-text search capabilities in v2.4, so this gem is a good fit for cases
|
11
|
-
|
12
|
-
lets you do a fuzzy string search across relatively short strings, which makes it good for populating
|
13
|
-
autocomplete boxes based on the display names of your Rails models but not appropriate for, say,
|
14
|
-
indexing hundreds of thousands of HTML documents.
|
10
|
+
MongoDB introduced full-text search capabilities in v2.4, so this gem is a good fit for cases where you want something a little less than a full-blown indexing service. The mongoid_fulltext gem
|
11
|
+
lets you do a fuzzy string search across relatively short strings, which makes it good for populating autocomplete boxes based on the display names of your Rails models but not appropriate for, say, indexing hundreds of thousands of HTML documents.
|
15
12
|
|
16
13
|
Install
|
17
14
|
-------
|
18
15
|
|
19
|
-
Version 0.6.1 or newer of this gem requires Ruby 1.9.3 or newer and works with Mongoid 3, 4 and
|
16
|
+
Version 0.6.1 or newer of this gem requires Ruby 1.9.3 or newer and works with Mongoid 3, 4, 5 and 6.
|
20
17
|
Use version 0.5.x for Mongoid 2.4.x and Ruby 1.8.7, 1.9.2 or 1.9.3.
|
21
|
-
|
22
|
-
For Ruby 1.8.7 and/or Mongoid 2.x use [mongoid_fulltext 0.5.x](https://github.com/artsy/mongoid_fulltext/tree/0.5-stable).
|
18
|
+
For Ruby 1.8.7 and/or Mongoid 2.x use [mongoid_fulltext 0.5.x](https://github.com/mongoid/mongoid_fulltext/tree/0.5-stable).
|
23
19
|
|
24
20
|
``` ruby
|
25
21
|
gem 'mongoid_fulltext'
|
@@ -400,5 +396,5 @@ Copyright and License
|
|
400
396
|
|
401
397
|
MIT License, see [LICENSE](LICENSE) for details.
|
402
398
|
|
403
|
-
(c) 2011-
|
399
|
+
(c) 2011-2017 [Artsy Inc.](http://artsy.github.io)
|
404
400
|
|
@@ -95,7 +95,7 @@ module Mongoid::FullTextSearch
|
|
95
95
|
all_filter_keys |= keys.find_all { |key| key.starts_with?('filter_values.') }
|
96
96
|
next unless keys & correct_keys != correct_keys
|
97
97
|
Mongoid.logger.info "Dropping #{idef['name']} [#{keys & correct_keys} <=> #{correct_keys}]" if Mongoid.logger
|
98
|
-
if Mongoid::Compatibility::Version.mongoid5?
|
98
|
+
if Mongoid::Compatibility::Version.mongoid5? || Mongoid::Compatibility::Version.mongoid6?
|
99
99
|
coll.indexes.drop_one(idef['key'])
|
100
100
|
else
|
101
101
|
coll.indexes.drop(idef['key'])
|
@@ -108,14 +108,14 @@ module Mongoid::FullTextSearch
|
|
108
108
|
end
|
109
109
|
|
110
110
|
Mongoid.logger.info "Ensuring fts_index on #{coll.name}: #{index_definition}" if Mongoid.logger
|
111
|
-
if Mongoid::Compatibility::Version.mongoid5?
|
111
|
+
if Mongoid::Compatibility::Version.mongoid5? || Mongoid::Compatibility::Version.mongoid6?
|
112
112
|
coll.indexes.create_one(Hash[index_definition], name: 'fts_index')
|
113
113
|
else
|
114
114
|
coll.indexes.create(Hash[index_definition], name: 'fts_index')
|
115
115
|
end
|
116
116
|
|
117
117
|
Mongoid.logger.info "Ensuring document_id index on #{coll.name}" if Mongoid.logger
|
118
|
-
if Mongoid::Compatibility::Version.mongoid5?
|
118
|
+
if Mongoid::Compatibility::Version.mongoid5? || Mongoid::Compatibility::Version.mongoid6?
|
119
119
|
coll.indexes.create_one('document_id' => 1) # to make removes fast
|
120
120
|
else
|
121
121
|
coll.indexes.create('document_id' => 1) # to make removes fast
|
@@ -282,7 +282,7 @@ module Mongoid::FullTextSearch
|
|
282
282
|
def remove_from_ngram_index
|
283
283
|
mongoid_fulltext_config.each_pair do |index_name, _fulltext_config|
|
284
284
|
coll = collection.database[index_name]
|
285
|
-
if Mongoid::Compatibility::Version.mongoid5?
|
285
|
+
if Mongoid::Compatibility::Version.mongoid5? || Mongoid::Compatibility::Version.mongoid6?
|
286
286
|
coll.find('class' => name).delete_many
|
287
287
|
else
|
288
288
|
coll.find('class' => name).remove_all
|
@@ -328,7 +328,7 @@ module Mongoid::FullTextSearch
|
|
328
328
|
|
329
329
|
# remove existing ngrams from external index
|
330
330
|
coll = collection.database[index_name.to_sym]
|
331
|
-
if Mongoid::Compatibility::Version.mongoid5?
|
331
|
+
if Mongoid::Compatibility::Version.mongoid5? || Mongoid::Compatibility::Version.mongoid6?
|
332
332
|
coll.find('document_id' => _id).delete_many
|
333
333
|
else
|
334
334
|
coll.find('document_id' => _id).remove_all
|
@@ -352,7 +352,7 @@ module Mongoid::FullTextSearch
|
|
352
352
|
ngrams.each_pair do |ngram, score|
|
353
353
|
index_document = { 'ngram' => ngram, 'document_id' => _id, 'score' => score, 'class' => self.class.name }
|
354
354
|
index_document['filter_values'] = filter_values if fulltext_config.key?(:filters)
|
355
|
-
if Mongoid::Compatibility::Version.mongoid5?
|
355
|
+
if Mongoid::Compatibility::Version.mongoid5? || Mongoid::Compatibility::Version.mongoid6?
|
356
356
|
coll.insert_one(index_document)
|
357
357
|
else
|
358
358
|
coll.insert(index_document)
|
@@ -364,7 +364,7 @@ module Mongoid::FullTextSearch
|
|
364
364
|
def remove_from_ngram_index
|
365
365
|
mongoid_fulltext_config.each_pair do |index_name, _fulltext_config|
|
366
366
|
coll = collection.database[index_name]
|
367
|
-
if Mongoid::Compatibility::Version.mongoid5?
|
367
|
+
if Mongoid::Compatibility::Version.mongoid5? || Mongoid::Compatibility::Version.mongoid6?
|
368
368
|
coll.find('document_id' => _id).delete_many
|
369
369
|
else
|
370
370
|
coll.find('document_id' => _id).remove_all
|
data/mongoid_fulltext.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.required_rubygems_version = '>= 1.3.6'
|
11
11
|
s.files = `git ls-files`.split("\n")
|
12
12
|
s.require_paths = ['lib']
|
13
|
-
s.homepage = 'https://github.com/
|
13
|
+
s.homepage = 'https://github.com/mongoid/mongoid_fulltext'
|
14
14
|
s.licenses = ['MIT']
|
15
15
|
s.summary = 'Full-text search for the Mongoid ORM, using n-grams extracted from text.'
|
16
16
|
s.add_dependency 'mongoid', '>= 3.0'
|
@@ -597,7 +597,7 @@ describe Mongoid::FullTextSearch do
|
|
597
597
|
context 'incremental' do
|
598
598
|
it 'removes an existing record' do
|
599
599
|
coll = Mongoid.default_session['mongoid_fulltext.index_basicartwork_0']
|
600
|
-
if Mongoid::Compatibility::Version.mongoid5?
|
600
|
+
if Mongoid::Compatibility::Version.mongoid5? || Mongoid::Compatibility::Version.mongoid6?
|
601
601
|
coll.find('document_id' => flowers1._id).delete_many
|
602
602
|
else
|
603
603
|
coll.find('document_id' => flowers1._id).remove_all
|
data/spec/spec_helper.rb
CHANGED
@@ -7,6 +7,8 @@ require 'mongoid'
|
|
7
7
|
ENV['MONGOID_ENV'] = 'test'
|
8
8
|
|
9
9
|
require File.expand_path('../../lib/mongoid_fulltext', __FILE__)
|
10
|
+
|
11
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
10
12
|
Dir["#{File.dirname(__FILE__)}/models/**/*.rb"].each { |f| require f }
|
11
13
|
|
12
14
|
Mongoid.configure do |config|
|
@@ -22,6 +24,6 @@ RSpec.configure do |c|
|
|
22
24
|
end
|
23
25
|
c.before :all do
|
24
26
|
Mongoid.logger.level = Logger::INFO
|
25
|
-
Mongo::Logger.logger.level = Logger::INFO if Mongoid::Compatibility::Version.mongoid5?
|
27
|
+
Mongo::Logger.logger.level = Logger::INFO if Mongoid::Compatibility::Version.mongoid5? || Mongoid::Compatibility::Version.mongoid6?
|
26
28
|
end
|
27
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongoid_fulltext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aaron Windsor
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mongoid
|
@@ -65,6 +65,7 @@ files:
|
|
65
65
|
- ".rubocop_todo.yml"
|
66
66
|
- ".travis.yml"
|
67
67
|
- CHANGELOG.md
|
68
|
+
- Dangerfile
|
68
69
|
- Gemfile
|
69
70
|
- LICENSE
|
70
71
|
- README.md
|
@@ -96,7 +97,8 @@ files:
|
|
96
97
|
- spec/models/stopwords_artwork.rb
|
97
98
|
- spec/mongoid/full_text_search_spec.rb
|
98
99
|
- spec/spec_helper.rb
|
99
|
-
|
100
|
+
- spec/support/mongoid.rb
|
101
|
+
homepage: https://github.com/mongoid/mongoid_fulltext
|
100
102
|
licenses:
|
101
103
|
- MIT
|
102
104
|
metadata: {}
|
@@ -116,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
116
118
|
version: 1.3.6
|
117
119
|
requirements: []
|
118
120
|
rubyforge_project:
|
119
|
-
rubygems_version: 2.
|
121
|
+
rubygems_version: 2.5.1
|
120
122
|
signing_key:
|
121
123
|
specification_version: 4
|
122
124
|
summary: Full-text search for the Mongoid ORM, using n-grams extracted from text.
|