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 CHANGED
@@ -1,6 +1,7 @@
1
1
  source "http://rubygems.org"
2
2
 
3
3
  gem 'rake'
4
+ gem 'activerecord'
4
5
 
5
6
  # Specify your gem's dependencies in pg_search_scope.gemspec
6
7
  gemspec
@@ -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
- ActiveRecord::Migration.send :extend, PgSearchScope::MigrationHelper
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
@@ -1,3 +1,3 @@
1
1
  module PgSearchScope
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
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.3
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-08-09 00:00:00.000000000Z
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.6
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