contacts_txt 0.2.9 → 0.2.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9619a274fc9f79d914bab2e1dccc66d4a3745315fea3421161a8454a8e96e953
4
- data.tar.gz: 4986232a8a014cce1c7595ca2ed0571275c65c37bc351af12d9a7d62d03c1b63
3
+ metadata.gz: a7660cc63ae7ac5aaa629ace4cfaae96f7a2c12a55fafb93f9f48f8ff0dcd2c1
4
+ data.tar.gz: c8fbffbd8922c968b162c625ffc1f5e264e17d5c40cce8937ce8a615d533daa8
5
5
  SHA512:
6
- metadata.gz: efbac6ef2397c828acec0bb40450f041beb26fa67c86ee5f12e87b708319fc474c2c78166a01f40a4c87cc719f108051f183a3f8285480e6fe8bff0ff2dd4053
7
- data.tar.gz: e505035ed21b4bc6634b709539cd3c25887820f59065ab1292216aa34aa760b7d680eb4aac3a53e89f184a6d2cd396af9cd5a2e50fc3c448bff1fa4718ec5bca
6
+ metadata.gz: f4215ee5f3c8f25528b0292379276c7bf0718142a96f7d41125578ee62d513a8c95f54982f83dfe011e340c245107470fc0951843598c41d26ec01cb4dce8400
7
+ data.tar.gz: 84889d9acaba60a2fcbc9d5542fe2d17447a4c4203f06694ddd8e59adf1b1d0623a3b9007f1aa7d6b554ba2e89493f3a781a12b0ca91af373fee27f3c0ee0ed2
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/contacts_txt.rb CHANGED
@@ -50,9 +50,9 @@ class ContactsTxt
50
50
 
51
51
  def find_by_mobile(raw_number, countrycode='44')
52
52
 
53
- number = Regexp.new raw_number.sub(/^(?:0|#{countrycode})/,'').gsub(/ */,'')
53
+ number = Regexp.new raw_number.sub(/^(?:0|#{countrycode})/,'').gsub(/[ -]*/,'')
54
54
 
55
- @dx.all.find {|x| x.mobile.gsub(/ */,'') =~ number }
55
+ @dx.all.find {|x| x.mobile.gsub(/[ -]*/,'') =~ number }
56
56
 
57
57
  end
58
58
 
@@ -70,10 +70,10 @@ class ContactsTxt
70
70
  def find_by_sms(raw_number, countrycode='44')
71
71
 
72
72
  number = Regexp.new raw_number\
73
- .sub(/^(?:0|#{countrycode})/,'').gsub(/ */,'')
73
+ .sub(/^(?:0|#{countrycode})/,'').gsub(/[ -]*/,'')
74
74
 
75
- @dx.all.find {|x| x.sms.gsub(/ */,'') =~ number \
76
- or x.mobile.gsub(/ */,'') =~ number }
75
+ @dx.all.find {|x| x.sms.gsub(/[ -]*/,'') =~ number \
76
+ or x.mobile.gsub(/[ -]*/,'') =~ number }
77
77
 
78
78
  end
79
79
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: contacts_txt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.9
4
+ version: 0.2.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -30,7 +30,7 @@ cert_chain:
30
30
  Ms9N9IXVzqxWl6qaGY7lENrLhETsyyvXsYq+Djcg8A9Fvn3Fk3do1ooh9ePNno3a
31
31
  1G4=
32
32
  -----END CERTIFICATE-----
33
- date: 2018-12-08 00:00:00.000000000 Z
33
+ date: 2019-02-13 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: dynarex
@@ -41,7 +41,7 @@ dependencies:
41
41
  version: '1.8'
42
42
  - - ">="
43
43
  - !ruby/object:Gem::Version
44
- version: 1.8.10
44
+ version: 1.8.15
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
@@ -51,7 +51,7 @@ dependencies:
51
51
  version: '1.8'
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: 1.8.10
54
+ version: 1.8.15
55
55
  description:
56
56
  email: james@jamesrobertson.eu
57
57
  executables: []
@@ -78,8 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0'
80
80
  requirements: []
81
- rubyforge_project:
82
- rubygems_version: 2.7.6
81
+ rubygems_version: 3.0.2
83
82
  signing_key:
84
83
  specification_version: 4
85
84
  summary: Reads a contacts.txt file
metadata.gz.sig CHANGED
Binary file