rifle 0.1.6 → 0.1.7

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.
Files changed (3) hide show
  1. data/lib/rifle.rb +3 -3
  2. data/lib/rifle/version.rb +1 -1
  3. metadata +2 -2
data/lib/rifle.rb CHANGED
@@ -110,9 +110,9 @@ module Rifle
110
110
  def get_metaphones_from_word_set(words)
111
111
  # Add extra search terms. EG, other phone number layouts
112
112
  words = Set.new(words.map { |w|
113
- # Here we have to strip all the front zeros and replace with 44.
114
- # Weirdly, the +can be ignored, it is not included in Redis keys.
115
- w.start_with?('0') ? "44#{w[1..-1]}" : w
113
+ # Here we have to strip all the front +44 and replace with 0.
114
+ w = w.start_with?('+44') ? "0#{w[3..-1]}" : w
115
+ w = w.start_with?('+') ? w[1..-1] : w # Also strip + signs, as they are ignored by Resque in keys
116
116
  })
117
117
 
118
118
  # Removed ignored words
data/lib/rifle/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rifle
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rifle
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
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: 2012-12-17 00:00:00.000000000 Z
12
+ date: 2012-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  type: :runtime