textacular 5.5.0 → 5.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 974b8a8209d44a134f421db20f9ae6338c03057d8bcf26ce1e0c40778a29d6bf
4
- data.tar.gz: 422c096f881919e53eaaab5f530e26e0e5aeffe33a4c8646bcb7f3b367dc9084
3
+ metadata.gz: eddfcccc0eaadfc3ac88a01770041972e58ec6f15d040fc2edd0d86622b520ac
4
+ data.tar.gz: 7d726e410c01a0438f57424c051736d8b68df4371f6089794fd5da107fd661e6
5
5
  SHA512:
6
- metadata.gz: ab93dff1128025cc4615d29c819d104a9300bdbb0a88d9cc588940a1f630922a201b9f11449d610ba5cadc5ae85c2e761c0ad3ff5b8cb7a85f1fd3dd15acf744
7
- data.tar.gz: 2102ea9936a087f18ed4945ddb4213e93acb70dc4bc8d3281489664fda2968b635e024636f0f2112f0fa8fc7a13b5d2b7e728aa200ac7663b681ae287b7e6b5d
6
+ metadata.gz: b0d0e8a14b67b814d84f1f897a7c4c93fe1c9f3f6be1e9ca4d9749ced7b521c13144e21b06753a4b60620a31c4434828e515e8581c9267aba2794039a8517c8b
7
+ data.tar.gz: 55591215dc23ed584e9d2117215e4090479c9fd9e0e5cbae20a8f580656b3256bb6fc636228b42682dca461d231a89edf469c067f408bbbaa9bb716842dc9e8b
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 5.5.1
6
+
7
+ * Revert breaking change to fuzzy_search introduced in 49f09b389d2f2b18cbe9de565b7ac5fcac14d7c6
8
+
5
9
  ## 5.5.0
6
10
 
7
11
  * ActiveRecord 7.0 compatibility
data/Gemfile CHANGED
@@ -2,7 +2,12 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- git 'git://github.com/rails/rails.git', branch: 'main' do
5
+ git_source(:github) do |repo_name|
6
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
7
+ "https://github.com/#{repo_name}.git"
8
+ end
9
+
10
+ github 'rails/rails', branch: 'main' do
6
11
  gem 'activerecord'
7
12
  end
8
13
 
data/README.md CHANGED
@@ -1,10 +1,9 @@
1
1
  # textacular
2
2
  [![Gem Version](http://img.shields.io/gem/v/textacular.svg)][rubygems]
3
- [![Build Status](https://img.shields.io/travis/textacular/textacular/master.svg)][travis]
3
+ [![Build Status](https://github.com/textacular/textacular/actions/workflows/main.yml/badge.svg)](https://github.com/textacular/textacular/actions/workflows/main.yml)
4
4
  [![Code Climate](https://img.shields.io/codeclimate/github/textacular/textacular.svg)][codeclimate]
5
5
 
6
6
  [rubygems]: http://rubygems.org/gems/textacular
7
- [travis]: https://travis-ci.org/textacular/textacular
8
7
  [codeclimate]: https://codeclimate.com/github/textacular/textacular
9
8
 
10
9
  Further documentation available at http://textacular.github.com/textacular.
@@ -19,6 +18,8 @@ extending ActiveRecord with scopes making search easy and fun!
19
18
  ## FEATURES/PROBLEMS:
20
19
 
21
20
  * Only works with PostgreSQL
21
+ * Anything that mucks with the `SELECT` statement (notably `pluck`), is likely
22
+ to [cause problems](https://github.com/textacular/textacular/issues/28).
22
23
 
23
24
 
24
25
  ## SYNOPSIS:
@@ -1,5 +1,5 @@
1
1
  module Textacular
2
- VERSION = '5.5.0'
2
+ VERSION = '5.5.1'
3
3
 
4
4
  def self.version
5
5
  VERSION
data/lib/textacular.rb CHANGED
@@ -124,11 +124,7 @@ module Textacular
124
124
  end
125
125
 
126
126
  def fuzzy_condition_string(table_name, column, search_term)
127
- # At this point, search_term is already quoted and query ready. Insert % between the quotes and the actual string.
128
- search_term = search_term.gsub(/^(['"])/, '\1%')
129
- search_term = search_term.gsub(/(['"])$/, '%\1')
130
-
131
- "(#{table_name}.#{column}::text ILIKE #{search_term})"
127
+ "(#{table_name}.#{column}::text % #{search_term})"
132
128
  end
133
129
 
134
130
 
File without changes
@@ -289,12 +289,6 @@ RSpec.describe Textacular do
289
289
  end
290
290
  end
291
291
  end
292
-
293
- describe "#fuzzy_search" do
294
- it "works if column contains multiple space delimited strings" do
295
- expect(GameExtendedWithTextacular.fuzzy_search(title: 'mar')).to eq([mario])
296
- end
297
- end
298
292
  end
299
293
  end
300
294
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: textacular
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.5.0
4
+ version: 5.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Hamill
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-12-23 00:00:00.000000000 Z
14
+ date: 2022-01-03 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: pg
@@ -154,7 +154,7 @@ files:
154
154
  - lib/textacular/tasks.rb
155
155
  - lib/textacular/trigram_installer.rb
156
156
  - lib/textacular/version.rb
157
- - spec/config.travis.yml
157
+ - spec/config.github.yml
158
158
  - spec/config.yml.example
159
159
  - spec/spec_helper.rb
160
160
  - spec/support/ar_stand_in.rb
@@ -200,7 +200,7 @@ specification_version: 4
200
200
  summary: Textacular exposes full text search capabilities from PostgreSQL
201
201
  test_files:
202
202
  - spec/config.yml.example
203
- - spec/config.travis.yml
203
+ - spec/config.github.yml
204
204
  - spec/spec_helper.rb
205
205
  - spec/support/ar_stand_in.rb
206
206
  - spec/support/character.rb