address_tokens 0.1.3 → 0.1.5

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: dc428acad65025604ed184b2c5c243b48715fed99e00dc5b3bfee54208e169f5
4
- data.tar.gz: 791c48d742010fc338cae65e03471796b98867dce09d07d3697adad638c150fc
3
+ metadata.gz: 67224c3981213d1d9db250955d11fef6d4475fb7afbbe244119d661882d280b0
4
+ data.tar.gz: 6f8967dacb29132f3b9a9ba0695bc4b7ade6238dc9fbf4a874b8dab3f11b8fc5
5
5
  SHA512:
6
- metadata.gz: afc4a676c93f9e0d2aa6be9431acc7cdebb0113c192e93cde33f4053d3cf405e09024be3ed211705d514a02a1e1f61395b40f91c444271dba7e228b6dbc00ec2
7
- data.tar.gz: 5d49a5903fb85a89562a52151fd55aa394ec1528ea22558ccc6a4121e516c79ec7ef93c4a3aabdf56755ab3c6d3450e0a72e3ee280e6f65a3fc1fb2dc780a510
6
+ metadata.gz: 4743ced0df89e1012fc4b9b867d024a571e91fc74ab819dd7afcf38c500040cc4020b1fef981557629f59124ff7842c27aa8f966c815f909de43824c04ce82dc
7
+ data.tar.gz: 5cbffaf74365ee4a78dd782c62b8457a9512bd16ffc4288d8f9e9eb5780c56064f09e8f23817a5d42981278b3033b28ede2e8cc4ff03a430e8594649920eb561
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
@@ -1,3 +1 @@
1
- X�ٹ��d'
2
1
  ����N�,m��
3
- V �:��x��"Ɣ,��-V�@����0s�s/>������:^�ZlY*Lu��i���#S%
4
- �EɌq^s�y�X�ࢵ���T�Z[�EAr�:��
2
+ {�O��I�'�5�k��J)Y�K�0����J9 D:۬j��l=T��ZZ��ᥪ� N�r�rV����'����s���@��iyDT�'ʎYwh�BTSu�����,������@\q�>]P$�F�跗b��P�"�� ��H�X�9_�) ��������Xv��z���qWy|�ײ�vJN������ ���%/I� (BF�ʹJ�P��c������M{S���d_�R�g���N�n�ƻ��ǘ�y�
data/README.md CHANGED
@@ -95,6 +95,13 @@ p matches
95
95
  The `start_at` values shows where the strings were found. The `city_string` is
96
96
  the way the city name was found.
97
97
 
98
+ We can use the `find` method with an already instance of the `Finder` object
99
+ sending a string to it:
100
+
101
+ ```ruby
102
+ finder.find('my other string New York, Ny')
103
+ ```
104
+
98
105
  ### Custom options
99
106
 
100
107
  As we saw, the default city and states separator on USA is a comma (','), but on
@@ -142,7 +149,17 @@ release a new version, update the version number in `version.rb`, and then run
142
149
  git commits and tags, and push the `.gem` file to
143
150
  [rubygems.org](https://rubygems.org).
144
151
 
145
- Please run the tests using `rake test`.
152
+ ## Testing
153
+
154
+ You can find some states and cities to run the tests here:
155
+
156
+ - [https://github.com/taq/brstatescities/raw/master/states.yml](https://github.com/taq/brstatescities/raw/master/states.yml)
157
+ - [https://github.com/taq/brstatescities/raw/master/cities.yml](https://github.com/taq/brstatescities/raw/master/cities.yml)
158
+
159
+ Please insert `CA: California` on `states.yml` and `San Franscisco` on
160
+ `cities.yml` to run the tests, using:
161
+
162
+ `$ rake test`.
146
163
 
147
164
  ## Contributing
148
165
 
@@ -0,0 +1,22 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ MIIDjjCCAnagAwIBAgIBATANBgkqhkiG9w0BAQUFADBGMRgwFgYDVQQDDA9ldXN0
3
+ YXF1aW9yYW5nZWwxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT8ixk
4
+ ARkWA2NvbTAeFw0xNzA2MDMyMjM3MjdaFw0xODA2MDMyMjM3MjdaMEYxGDAWBgNV
5
+ BAMMD2V1c3RhcXVpb3JhbmdlbDEVMBMGCgmSJomT8ixkARkWBWdtYWlsMRMwEQYK
6
+ CZImiZPyLGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
7
+ pI58OaGELZWRnqvArECgbbOOU5ThDxGRoBz/91KaXysVAalPUVtEXQjsZSc6wOKb
8
+ a+m2vEZ6j1LWMfG1xKh07KN/EwcmUoG9uj/U+OcZ+M6YA+DSDBQJozXEUgKiD0e0
9
+ crZqrq+Qo9jg19lPvYcsFS4WumC3gtrx8Fe8K5JTEFR71Md3nnuBuKp1pouYTC3b
10
+ UQ2Xv1URDITKa3N3Kyu/6MJOYBJ2nvDKdEdMFbXxKiC/Njv7eIF+1iNWrzp8osgL
11
+ 5LWITluL2n+/14QVDJehLRuh9Zg9WGT6FEji4PsmNQtZKwYpGGzNX5dDeYZcbhPk
12
+ ri9MK8ztMYBLkNzd4sbbPQIDAQABo4GGMIGDMAkGA1UdEwQCMAAwCwYDVR0PBAQD
13
+ AgSwMB0GA1UdDgQWBBR9bkdMJUe5Lyc1V8NQm1hbjPpKBzAkBgNVHREEHTAbgRll
14
+ dXN0YXF1aW9yYW5nZWxAZ21haWwuY29tMCQGA1UdEgQdMBuBGWV1c3RhcXVpb3Jh
15
+ bmdlbEBnbWFpbC5jb20wDQYJKoZIhvcNAQEFBQADggEBAF8KZx0njczbBRXzjGo0
16
+ mTsAOlB474ZqQjKN1zL/sGw8G4Q/UpeVEclBZrP9P9PUomYliGP38oYM4DHHMpyd
17
+ Qh9Wsou0ZJ5oD0O3nRraOVGFN7Azm05+xJ4fV1Zi8nsUdpF3za7s27Non9cYF4/2
18
+ iwJPWOjl/AxvAS2efkECSGbuZtuNKWrWYMH+aGbtavd5hfb8voGbTFYB4azbQQf+
19
+ ESf+WEicRlMQuQUn314wSFq1pq65S9GrZWMmSP5gc0kKfa51fOmIYmO3eSlmWG/p
20
+ G+/hO8DFcpmRPCD/YXu/rFkKHquizBGSfr1BR/es/HhfrIoT3BUN2uDUT02aaWmB
21
+ JMg=
22
+ -----END CERTIFICATE-----
@@ -1,3 +1,3 @@
1
1
  module AddressTokens
2
- VERSION = "0.1.3"
2
+ VERSION = '0.1.5'
3
3
  end
data/lib/finder.rb CHANGED
@@ -17,11 +17,11 @@ module AddressTokens
17
17
  load_file(var, file)
18
18
  end
19
19
 
20
- def find
20
+ def find(str = nil)
21
21
  raise ArgumentError, 'No states found' if @states.size == 0
22
22
  raise ArgumentError, 'No cities found' if @cities.size == 0
23
23
  transliterate_cities
24
- Matcher.new(self).match(@string)
24
+ Matcher.new(self).match(str || @string)
25
25
  end
26
26
 
27
27
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: address_tokens
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eustaquio Rangel
@@ -31,7 +31,7 @@ cert_chain:
31
31
  G+/hO8DFcpmRPCD/YXu/rFkKHquizBGSfr1BR/es/HhfrIoT3BUN2uDUT02aaWmB
32
32
  JMg=
33
33
  -----END CERTIFICATE-----
34
- date: 2018-01-08 00:00:00.000000000 Z
34
+ date: 2018-01-09 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: bundler
@@ -105,6 +105,7 @@ files:
105
105
  - address_tokens.gemspec
106
106
  - bin/console
107
107
  - bin/setup
108
+ - gem-public_cert.pem
108
109
  - lib/address_tokens.rb
109
110
  - lib/address_tokens/version.rb
110
111
  - lib/city_not_found.rb
metadata.gz.sig CHANGED
Binary file