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 +4 -4
- data/CHANGELOG.md +8 -4
- data/LICENSE.txt +1 -1
- data/README.md +9 -0
- data/lib/mainstreet/address_verifier.rb +6 -1
- data/lib/mainstreet/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea141646904d7888483a0d60e3f9a5623459c74b300faa25e400f3f8a8a2da7c
|
4
|
+
data.tar.gz: b51ba2b961151346b44554ecf1e55be1d88a4a195cd4f8ab1c0738a196473c31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6822d52febf092b0901ff62d58dd84084efe9de00fe0da4ef9eefaceb40380b0df9d525786479a34a839dc47f99dae39e665368e89800d135ce1270e5f18e103
|
7
|
+
data.tar.gz: 0c6c0c6aa26aaa42841d7363b07c769e8b73279ce858bb8382fd499554d7139a2bf1ab2c4e80ad9e0cb17cf551c72b9273aa322d8d831d00ead889b0a93d81a3
|
data/CHANGELOG.md
CHANGED
@@ -1,20 +1,24 @@
|
|
1
|
-
## 0.2.
|
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
|
data/LICENSE.txt
CHANGED
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
|
-
|
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
|
|
data/lib/mainstreet/version.rb
CHANGED
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.
|
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:
|
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.
|
171
|
+
rubygems_version: 3.1.2
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Address verification for Ruby and Rails
|