mincer 0.2.1 → 0.2.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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d97a97f1c5f14b8411b406709621b4fe9f2c14b
|
4
|
+
data.tar.gz: bf7f943474b0fc73e112bb5d78ce0edf5f018dea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d01b5f077f72bb1e9b70b7f88bbe64a5afb92409d476a04a8200f15d02e95491cd4a0c6db067266d95c3beb377488fb58be3a77f34fdc47d80933c750f1238d0
|
7
|
+
data.tar.gz: 9bd281ba05fcd19e8f8ff96eb2da31eba134a9e163c925431e5b43f3564ad59aaaa567c882db7cb6128659fac58c1c12e666d267b058f4c1b67265854cf4267c
|
data/lib/mincer/version.rb
CHANGED
@@ -31,6 +31,12 @@ describe ::Mincer::Processors::PgSearch::Processor do
|
|
31
31
|
query.to_a.count.should eq(1)
|
32
32
|
end
|
33
33
|
|
34
|
+
it 'order by rank' do
|
35
|
+
query = subject.new(ActiveRecordModel, { 'pattern' => 'Bingo' })
|
36
|
+
query.to_sql.should include("(ts_rank((to_tsvector('simple', unaccent(coalesce(active_record_models.text, '')))), (to_tsquery('simple', unaccent('Bingo')))))")
|
37
|
+
query.to_a.count.should eq(1)
|
38
|
+
end
|
39
|
+
|
34
40
|
it 'avoids search when pattern is an empty string or spaces' do
|
35
41
|
query = subject.new(ActiveRecordModel, { 'pattern' => ' ' })
|
36
42
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mincer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Krasinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|