fat_core 0.1.4 → 0.1.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 13a129f290fef37db1a33846fa4fa6aa183ed530
4
- data.tar.gz: bd5f34570185d9b556a5dcf6647c6dca13b21cd6
3
+ metadata.gz: d22516b0bf188041482f977b10cdb47002481d2f
4
+ data.tar.gz: 3c509e5d76c26c2f448a926ab2e96dd845fbb0fd
5
5
  SHA512:
6
- metadata.gz: 9c737d705f3b176ae808319cd7dbb0870bc2aafd2685b0bc5c11e4594990f5395b1d5ae1efd0b1b18ad723bc7357af9205cbcbdbe5b75ea0b610206f1cd62f6c
7
- data.tar.gz: 0cc5d64d64bc821ffbcb5f7ef4e13390d32788c4170f4eba7183ddbeb1e6f9f612e908d75e40f8669d326343df6e50e9617e34b0fc4bcb42dc6eff1ba9884d12
6
+ metadata.gz: 30675764560f16415003789d5b00feabaa4f6e6ca94f32f53dc757795460b8c3d9756c2d88ed28073f49eb349fb765d443773118a90aada1b02fa94a2cb22c89
7
+ data.tar.gz: 2e1c3bda9a0d99f0750037508b0ceee1fe4a40ed5433fc57005f058b2d4b062dd5aa09757e25577ca5dafa4f66afe8cc3a7b42d23a937d7a50b55af80a6308b8
@@ -4,8 +4,8 @@ class String
4
4
  # portion of self. Other cannot be a regex embedded in a string.
5
5
  def fuzzy_match(other)
6
6
  # Remove periods, commas, and apostrophes
7
- other = other.gsub(/[.,']/, '')
8
- target = self.gsub(/[.,']/, '')
7
+ other = other.gsub(/[\*.,']/, '')
8
+ target = self.gsub(/[\*.,']/, '')
9
9
  matched_text = nil
10
10
  matchers = other.split(/[: ]+/)
11
11
  regexp_string = matchers.map {|m| ".*?#{Regexp.escape(m)}.*?"}.join('[: ]')
@@ -1,7 +1,7 @@
1
1
  module FatCore
2
2
  MAJOR = 0
3
3
  MINOR = 1
4
- PATCH = 4
4
+ PATCH = 5
5
5
 
6
6
  VERSION = [MAJOR, MINOR, PATCH].compact.join('.')
7
7
  end
@@ -118,6 +118,7 @@ the people, for the people, shall not perish from the earth."
118
118
  expect("St. Luke's".fuzzy_match('st lukes')).to eq('St Lukes')
119
119
  expect("St Lukes".fuzzy_match('st. luke\'s')).to eq('St Lukes')
120
120
  expect("St Lukes, Inc.".fuzzy_match('st luke inc')).to eq('St Lukes Inc')
121
+ expect("E*TRADE".fuzzy_match('etrade')).to eq('ETRADE')
121
122
  end
122
123
 
123
124
  it "should be able to properly capitalize a string as a title" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fat_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel E. Doherty
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-04 00:00:00.000000000 Z
11
+ date: 2014-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler