pg_search 1.0.6 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +16 -2
- data/.gitignore +1 -0
- data/.rubocop.yml +18 -0
- data/.travis.yml +17 -23
- data/CHANGELOG.md +7 -0
- data/Gemfile +0 -4
- data/LICENSE +1 -1
- data/README.md +39 -80
- data/Rakefile +8 -2
- data/lib/pg_search.rb +0 -4
- data/lib/pg_search/configuration.rb +0 -4
- data/lib/pg_search/configuration/association.rb +21 -8
- data/lib/pg_search/features/tsearch.rb +6 -29
- data/lib/pg_search/migration/templates/add_pg_search_dmetaphone_support_functions.rb.erb +0 -12
- data/lib/pg_search/normalizer.rb +1 -8
- data/lib/pg_search/scope_options.rb +4 -6
- data/lib/pg_search/version.rb +1 -1
- data/pg_search.gemspec +14 -12
- data/spec/integration/associations_spec.rb +9 -12
- data/spec/integration/pg_search_spec.rb +32 -50
- data/spec/lib/pg_search/configuration/association_spec.rb +96 -34
- data/spec/lib/pg_search/features/trigram_spec.rb +1 -1
- data/spec/lib/pg_search/multisearch/rebuilder_spec.rb +17 -34
- data/spec/lib/pg_search/normalizer_spec.rb +32 -56
- data/spec/spec_helper.rb +2 -2
- data/spec/support/database.rb +21 -33
- metadata +38 -18
- data/lib/pg_search/compatibility.rb +0 -11
- data/lib/pg_search/extensions/arel.rb +0 -10
- data/lib/pg_search/migration/associated_against_generator.rb +0 -11
- data/lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb +0 -21
- data/sql/array_agg.sql +0 -5
- data/sql/uninstall_array_agg.sql +0 -1
- data/sql/uninstall_unnest.sql +0 -1
- data/sql/unnest.sql +0 -8
@@ -1,10 +0,0 @@
|
|
1
|
-
require "arel/visitors/depth_first"
|
2
|
-
|
3
|
-
# Workaround for https://github.com/Casecommons/pg_search/issues/101
|
4
|
-
# Based on the solution from https://github.com/ernie/squeel/issues/122
|
5
|
-
Arel::Visitors::DepthFirst.class_eval do
|
6
|
-
unless method_defined?(:visit_Arel_Nodes_InfixOperation)
|
7
|
-
alias_method :visit_Arel_Nodes_InfixOperation, :binary
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
data/lib/pg_search/migration/templates/add_pg_search_associated_against_support_functions.rb.erb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
class AddPgSearchAssociatedAgainstSupportFunctions < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
say_with_time("Adding support functions for pg_search :associated_against") do
|
4
|
-
if ActiveRecord::Base.connection.send(:postgresql_version) < 80400
|
5
|
-
execute <<-'SQL'
|
6
|
-
<%= read_sql_file "array_agg" %>
|
7
|
-
SQL
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.down
|
13
|
-
say_with_time("Dropping support functions for pg_search :associated_against") do
|
14
|
-
if ActiveRecord::Base.connection.send(:postgresql_version) < 80400
|
15
|
-
execute <<-'SQL'
|
16
|
-
<%= read_sql_file "uninstall_array_agg" %>
|
17
|
-
SQL
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
data/sql/array_agg.sql
DELETED
data/sql/uninstall_array_agg.sql
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
DROP AGGREGATE array_agg(anyelement);
|
data/sql/uninstall_unnest.sql
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
DROP FUNCTION unnest(anyarray);
|