db_text_search 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +5 -0
- data/README.md +1 -1
- data/db_text_search.gemspec +2 -0
- data/lib/db_text_search.rb +1 -1
- data/lib/db_text_search/case_insensitive.rb +6 -3
- data/lib/db_text_search/case_insensitive/lower_adapter.rb +2 -1
- data/lib/db_text_search/full_text.rb +2 -1
- data/lib/db_text_search/version.rb +1 -1
- data/shared.gemfile +5 -1
- metadata +31 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 056fe218cb672b103fec059b95bf7327da5cdc12
|
4
|
+
data.tar.gz: b866b129a58f829aa4fdf0f658a052a28aaf0542
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6ee2bf4e5244a12808290ff0b5b00848c6718a97e1ff36291c746b45143068946f982e76c57c336d8741bcc6a30c0a4697ea18911744c48377610a7dfa7a66f
|
7
|
+
data.tar.gz: bb9f9f6c61b9be723fb62d7ea6c615f8e28db470a452347b871cb7574bda5b607906f03667a9fe1a57195101ddee484f546f1df6e9a08592180671131b5cc44f
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
data/db_text_search.gemspec
CHANGED
@@ -31,4 +31,6 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.add_development_dependency 'bundler', '~> 1.11'
|
32
32
|
s.add_development_dependency 'rake', '~> 11.0'
|
33
33
|
s.add_development_dependency 'rspec', '~> 3.4'
|
34
|
+
s.add_development_dependency 'simplecov'
|
35
|
+
s.add_development_dependency 'rubocop'
|
34
36
|
end
|
data/lib/db_text_search.rb
CHANGED
@@ -48,7 +48,8 @@ module DbTextSearch
|
|
48
48
|
else
|
49
49
|
['TEXT COLLATE NOCASE', options]
|
50
50
|
end
|
51
|
-
}
|
51
|
+
}
|
52
|
+
)
|
52
53
|
end
|
53
54
|
|
54
55
|
# Add an index for case-insensitive string search.
|
@@ -78,7 +79,8 @@ module DbTextSearch
|
|
78
79
|
postgres: lower_or_insensitive,
|
79
80
|
# Always use COLLATE NOCASE for SQLite, as we can't check if the column is case-sensitive.
|
80
81
|
# It has no performance impact apart from slightly longer query strings for case-insensitive columns.
|
81
|
-
sqlite: -> { CollateNocaseAdapter }
|
82
|
+
sqlite: -> { CollateNocaseAdapter }
|
83
|
+
)
|
82
84
|
end
|
83
85
|
|
84
86
|
# @param connection [ActiveRecord::ConnectionAdapters::AbstractAdapter]
|
@@ -93,7 +95,8 @@ module DbTextSearch
|
|
93
95
|
connection,
|
94
96
|
mysql: -> { column.case_sensitive? },
|
95
97
|
postgres: -> { column.sql_type !~ /citext/i },
|
96
|
-
sqlite: -> { DbTextSearch.unsupported_adapter! connection }
|
98
|
+
sqlite: -> { DbTextSearch.unsupported_adapter! connection }
|
99
|
+
)
|
97
100
|
end
|
98
101
|
end
|
99
102
|
end
|
data/shared.gemfile
CHANGED
@@ -1,7 +1,11 @@
|
|
1
1
|
if ENV['TRAVIS']
|
2
2
|
group :test do
|
3
3
|
gem 'codeclimate-test-reporter', require: false
|
4
|
-
gem 'codeclimate_batch', require: false
|
4
|
+
gem 'codeclimate_batch', require: false,
|
5
|
+
# TODO: use the released version once a new release that supports
|
6
|
+
# codeclimate-test-reporter v1.0+ is out.
|
7
|
+
git: 'https://github.com/sethherr/codeclimate_batch',
|
8
|
+
branch: 'new_simplecov'
|
5
9
|
end
|
6
10
|
else
|
7
11
|
group :test, :development do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: db_text_search
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gleb Mazovetskiy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -114,6 +114,34 @@ dependencies:
|
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '3.4'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: simplecov
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
131
|
+
- !ruby/object:Gem::Dependency
|
132
|
+
name: rubocop
|
133
|
+
requirement: !ruby/object:Gem::Requirement
|
134
|
+
requirements:
|
135
|
+
- - ">="
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
type: :development
|
139
|
+
prerelease: false
|
140
|
+
version_requirements: !ruby/object:Gem::Requirement
|
141
|
+
requirements:
|
142
|
+
- - ">="
|
143
|
+
- !ruby/object:Gem::Version
|
144
|
+
version: '0'
|
117
145
|
description: Different relational databases treat text search very differently. DbTextSearch
|
118
146
|
provides a unified interface on top of ActiveRecord for SQLite, MySQL, and PostgreSQL
|
119
147
|
to do case-insensitive string-in-set querying and CI index creation, and basic full-text
|
@@ -163,10 +191,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
191
|
version: '0'
|
164
192
|
requirements: []
|
165
193
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.5.
|
194
|
+
rubygems_version: 2.5.2
|
167
195
|
signing_key:
|
168
196
|
specification_version: 4
|
169
197
|
summary: A unified interface on top of ActiveRecord for SQLite, MySQL, and PostgreSQLfor
|
170
198
|
case-insensitive string search and basic full-text search.
|
171
199
|
test_files: []
|
172
|
-
has_rdoc:
|