pg_search_scope 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1 +1,3 @@
1
- require 'bundler/gem_tasks'
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
@@ -52,7 +52,7 @@ module PgSearchScope
52
52
  options = scope_options.merge(options || {})
53
53
  search_string ||= ''
54
54
 
55
- terms = search_string.strip.split(/[^\w\d\.']+/).map { |s| s.gsub /'/, "''" }
55
+ terms = search_string.scan(/'?([\w\.']+)/).map {|s,_| s.gsub /'/, "''"}
56
56
 
57
57
  if terms.present?
58
58
  prefix = arel_table.table_alias || arel_table.name
@@ -87,4 +87,4 @@ module PgSearchScope
87
87
  end
88
88
  end
89
89
 
90
- ActiveRecord::Base.send :extend, PgSearchScope::ModelHelper
90
+ ActiveRecord::Base.send :extend, PgSearchScope::ModelHelper
@@ -1,3 +1,3 @@
1
1
  module PgSearchScope
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
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.0
4
+ version: 0.1.1
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-07-11 00:00:00.000000000 +04:00
12
+ date: 2011-07-20 00:00:00.000000000 +04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
  description: ''