ts_vector_tags 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,14 +28,14 @@ module TsVectorTags
28
28
  base.class_eval do
29
29
  # Accepts a comma separated list of tags and applies the 'and'-operator to them
30
30
  scope :with_tags, lambda { |tags|
31
- where("tags_vector @@ to_tsquery('simple', ?) ", TsVectorTags::Standardizer.tagify(tags).join(' & '))
31
+ where("tags_vector @@ ?::tsquery ", TsVectorTags::Standardizer.tagify(tags).join(' & '))
32
32
  }
33
33
 
34
34
  # Accepts a proper ts_query an allows complex logical expressions like "foo & !(bar | bling)"
35
35
  scope :with_tags_query, lambda { |query|
36
36
  raise InvalidTsQueryError, "Invalid tag query '#{query}'" unless TsVectorTags.acceptable_tsquery?(query)
37
37
  # "!foo" will not match empty tsvectors, so we have to cheat using coalesce :-(
38
- where("coalesce(tags_vector, '-invalid-tag-') @@ to_tsquery('simple', '#{query}')")
38
+ where("coalesce(tags_vector, '-invalid-tag-') @@ '#{query}'::tsquery")
39
39
  }
40
40
 
41
41
  # Make sure empty vectors are always saved as null values
@@ -2,7 +2,7 @@
2
2
  $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  module TsVectorTags
5
- VERSION = "0.0.9"
5
+ VERSION = "0.0.10"
6
6
  end
7
7
 
8
8
  Gem::Specification.new do |s|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ts_vector_tags
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-11-12 00:00:00.000000000 Z
13
+ date: 2013-03-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -75,7 +75,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  segments:
77
77
  - 0
78
- hash: -4383290063129500981
78
+ hash: 2492043440947131244
79
79
  required_rubygems_version: !ruby/object:Gem::Requirement
80
80
  none: false
81
81
  requirements:
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  segments:
86
86
  - 0
87
- hash: -4383290063129500981
87
+ hash: 2492043440947131244
88
88
  requirements: []
89
89
  rubyforge_project: ts_vector_tags
90
90
  rubygems_version: 1.8.24