mainstreet 0.2.1 → 0.2.2

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: d74ee9bd034da5023b1d16a19814f8e921ac542f2cff1b209e2fbdc662d2a1d7
4
- data.tar.gz: 679a9cdfe1d892456372e9e422e0db93fa679fe7298c7a052a1e944a298792c3
3
+ metadata.gz: ea141646904d7888483a0d60e3f9a5623459c74b300faa25e400f3f8a8a2da7c
4
+ data.tar.gz: b51ba2b961151346b44554ecf1e55be1d88a4a195cd4f8ab1c0738a196473c31
5
5
  SHA512:
6
- metadata.gz: d70178c18422b36a12febca14d16a1907052bd30923f64625491607c03fb82822de72c980d3e032ccfa3336eae0487f3526e2f0c071f86b073e7ecf2da92fb71
7
- data.tar.gz: 25ba36dd066fc89578ddee0df29d29e70da4884f8eca1657acecec7608a418a40bb9ab34aa6538b2005d1848d7227ed8484994d70dfcc0c502dc3fbdfa66dee1
6
+ metadata.gz: 6822d52febf092b0901ff62d58dd84084efe9de00fe0da4ef9eefaceb40380b0df9d525786479a34a839dc47f99dae39e665368e89800d135ce1270e5f18e103
7
+ data.tar.gz: 0c6c0c6aa26aaa42841d7363b07c769e8b73279ce858bb8382fd499554d7139a2bf1ab2c4e80ad9e0cb17cf551c72b9273aa322d8d831d00ead889b0a93d81a3
@@ -1,20 +1,24 @@
1
- ## 0.2.1
1
+ ## 0.2.2 (2020-04-16)
2
+
3
+ - Fixed bug with SmartyStreets and ZIP code only addresses
4
+
5
+ ## 0.2.1 (2019-10-04)
2
6
 
3
7
  - Added support for i18n
4
8
  - Added support for more validation options like `if` and `on`
5
9
  - Specified minimum Geocoder version
6
10
 
7
- ## 0.2.0
11
+ ## 0.2.0 (2018-11-30)
8
12
 
9
13
  - Added `AddressVerifier`
10
14
  - Added `validates_address` method
11
15
  - Removed `acts_as_address` method
12
16
 
13
- ## 0.1.0
17
+ ## 0.1.0 (2017-05-01)
14
18
 
15
19
  - Added more validation
16
20
  - Fixed model generator for Rails 5
17
21
 
18
- ## 0.0.1
22
+ ## 0.0.1 (2015-03-14)
19
23
 
20
24
  - First release
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2019 Andrew Kane
3
+ Copyright (c) 2015-2020 Andrew Kane
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -164,3 +164,12 @@ Everyone is encouraged to help improve this project. Here are a few ways you can
164
164
  - Fix bugs and [submit pull requests](https://github.com/ankane/mainstreet/pulls)
165
165
  - Write, clarify, or fix documentation
166
166
  - Suggest or add new features
167
+
168
+ To get started with development:
169
+
170
+ ```sh
171
+ git clone https://github.com/ankane/mainstreet.git
172
+ cd mainstreet
173
+ bundle install
174
+ bundle exec rake test
175
+ ```
@@ -46,7 +46,12 @@ module MainStreet
46
46
  @result ||= begin
47
47
  options = {lookup: lookup}
48
48
  options[:country] = @country if @country && !usa?
49
- Geocoder.search(@address, options).first
49
+ # don't use smarty streets zipcode only API
50
+ # keep mirrored with geocoder gem, including \Z
51
+ # \Z is the same as \z when strip is used
52
+ if @address.to_s.strip !~ /\A\d{5}(-\d{4})?\Z/
53
+ Geocoder.search(@address, options).first
54
+ end
50
55
  end
51
56
  end
52
57
 
@@ -1,3 +1,3 @@
1
1
  module MainStreet
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mainstreet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-04 00:00:00.000000000 Z
11
+ date: 2020-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: geocoder
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  - !ruby/object:Gem::Version
169
169
  version: '0'
170
170
  requirements: []
171
- rubygems_version: 3.0.3
171
+ rubygems_version: 3.1.2
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: Address verification for Ruby and Rails