pg_search_scope 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/lib/pg_search_scope/migration_helper.rb +17 -1
- data/lib/pg_search_scope/version.rb +1 -1
- metadata +3 -9
data/Gemfile
CHANGED
@@ -17,6 +17,22 @@ module PgSearchScope
|
|
17
17
|
eosql
|
18
18
|
end
|
19
19
|
end
|
20
|
+
|
21
|
+
module CommandRecorder
|
22
|
+
def add_fulltext_index *args
|
23
|
+
record(:add_fulltext_index, args)
|
24
|
+
end
|
25
|
+
|
26
|
+
def invert_add_fulltext_index(args)
|
27
|
+
table, columns, options = *args
|
28
|
+
index_name = options.try(:[], :name)
|
29
|
+
options_hash = index_name ? {:name => index_name} : {:column => columns}
|
30
|
+
[:remove_fulltext_index, [table, options_hash]]
|
31
|
+
end
|
32
|
+
end
|
20
33
|
end
|
21
34
|
|
22
|
-
|
35
|
+
require 'active_record/connection_adapters/postgresql_adapter'
|
36
|
+
|
37
|
+
ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.send :include, PgSearchScope::MigrationHelper
|
38
|
+
ActiveRecord::Migration::CommandRecorder.send :include, PgSearchScope::CommandRecorder
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pg_search_scope
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-11-30 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ''
|
15
15
|
email:
|
@@ -41,21 +41,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
41
41
|
- - ! '>='
|
42
42
|
- !ruby/object:Gem::Version
|
43
43
|
version: '0'
|
44
|
-
segments:
|
45
|
-
- 0
|
46
|
-
hash: 3460535708868186688
|
47
44
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
45
|
none: false
|
49
46
|
requirements:
|
50
47
|
- - ! '>='
|
51
48
|
- !ruby/object:Gem::Version
|
52
49
|
version: '0'
|
53
|
-
segments:
|
54
|
-
- 0
|
55
|
-
hash: 3460535708868186688
|
56
50
|
requirements: []
|
57
51
|
rubyforge_project: pg_search_scope
|
58
|
-
rubygems_version: 1.8.
|
52
|
+
rubygems_version: 1.8.11
|
59
53
|
signing_key:
|
60
54
|
specification_version: 3
|
61
55
|
summary: PostgreSQL full text search using Rails 3 scopes
|