contacts_txt 0.2.5 → 0.2.6

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
  SHA1:
3
- metadata.gz: f30081584d55a25cded5e381282e16ff7178d7f7
4
- data.tar.gz: d997433b728d628547289736c6dc22735e278cf9
3
+ metadata.gz: 5ddae45ca148ba5ee0369d867d7b70e77177b5b1
4
+ data.tar.gz: 05bdbb52835126daa081b2c6d543ea5bb8d52008
5
5
  SHA512:
6
- metadata.gz: 7c6fd58a3355932f1100c7057411fc48d1dd1127457a1f7b03a9c146c25d6e0067d1e8d2a722701cef33019ec0736df4599d8fac308210b830a4af15b0344d11
7
- data.tar.gz: 77bc470e038b871de2f746236b8e4db04cc3d6d4334e34fcfa1545b8ec7615cc4ac467f410d7f5f0d6eeed39cfc6e85871d8c43f8b0a18fcbd2589cb4ca5a84b
6
+ metadata.gz: c606d07d9205970259286045e14b7dbf53bfa2db714ba1697eb60670aef77f981e04c5b239a86281d128e2defa593c360447aa7413d5171196c2c5818f7414ee
7
+ data.tar.gz: 0db64c9bdfb2cfc1dcca68aa4a334e144d59e5dca54c53143ed424fe6a7c6db35f2f1f8878253fbd5ba98e50cd144dd6813df64ea5b24c81c1a1d1e94be6c7fe
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1 @@
1
- P�+�yq��X|�M-#!-�>~yt8�������q�E\�q��1κ����i��._�Nv�-��m�^Q? � �jy��n[j��]8��V}�+���`M��'}+*� �Z�#A������6ruY�[-�d�>~ϟ��sA���Q��,�#����������X")�a�s*nW�$^:z�c\Y=77y�����a6`3����e��?i��u�̊����ؠ��΋�}�ks�*E�=
1
+ :�l�Z�3(�X��)����M>�J�60uד��6��?�|��R�q���:��f<�Q��; �%�$T]����Z*��T�9��KNnp������1O��I:T��ʵ��1?����z��S��
@@ -12,8 +12,9 @@ class ContactsTxt
12
12
 
13
13
  def initialize(src=nil, fields: %w(role organisation mobile
14
14
  sms email dob tags address notes note),
15
- username: nil, password: nil)
15
+ username: nil, password: nil, debug: true)
16
16
 
17
+ @debug = debug
17
18
  @fields = %w(fullname firstname lastname tel) | fields
18
19
 
19
20
  txt, type = if src then
@@ -51,7 +52,8 @@ class ContactsTxt
51
52
 
52
53
  def find_by_name(raw_name)
53
54
 
54
- name = Regexp.new '\b' + raw_name + '\b', Regexp::IGNORECASE
55
+ name = Regexp.new "\b#{raw_name}\b|#{raw_name}", Regexp::IGNORECASE
56
+ puts 'name: ' + name.inspect if @debug
55
57
 
56
58
  @dx.all.select do |x|
57
59
  x.fullname =~ name or x.firstname =~ name or x.lastname =~ name
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.5
4
+ version: 0.2.6
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-08-02 00:00:00.000000000 Z
33
+ date: 2018-08-06 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: dynarex
metadata.gz.sig CHANGED
Binary file