jipcode 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/Gemfile.lock +3 -1
- data/bin/update +11 -0
- data/jipcode.gemspec +1 -0
- data/lib/jipcode.rb +2 -11
- data/lib/jipcode/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9061e40ffd2f724d3807e569bbea5c2e21c78904c7ad02cce9f66950f1e17d2a
|
4
|
+
data.tar.gz: 86318a4c74ee141ce9384b8d8ed158c8ace0f2d1b2aa32a862645c1e62da225d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f697df606d3eea50ecde98620735cec9286a7c37071b1303d8a6b2336a516716cb750b3dd52138abbb3836ee702d72cf8942957875c09f3d897ecdaa50b63b29
|
7
|
+
data.tar.gz: 4932e3b5391ea7ec1b8f504c86d057651260c7d719d4c5ef7daac7da74ccf6be6575793e6df59c7e5542c8f04b402563c9ca6dde7bedc35068007cae2e4b1ac9
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jipcode (1.
|
4
|
+
jipcode (1.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
addressable (2.5.2)
|
10
10
|
public_suffix (>= 2.0.2, < 4.0)
|
11
|
+
bump (0.6.0)
|
11
12
|
crack (0.4.3)
|
12
13
|
safe_yaml (~> 1.0.0)
|
13
14
|
diff-lcs (1.3)
|
@@ -39,6 +40,7 @@ PLATFORMS
|
|
39
40
|
ruby
|
40
41
|
|
41
42
|
DEPENDENCIES
|
43
|
+
bump
|
42
44
|
bundler (~> 1.16)
|
43
45
|
jipcode!
|
44
46
|
rake (~> 10.0)
|
data/bin/update
ADDED
data/jipcode.gemspec
CHANGED
data/lib/jipcode.rb
CHANGED
@@ -8,8 +8,7 @@ module Jipcode
|
|
8
8
|
path = "#{ZIPCODE_PATH}/#{zipcode[0..2]}.csv"
|
9
9
|
return [] unless File.exist?(path)
|
10
10
|
|
11
|
-
|
12
|
-
addresses_array = CSV.parse(addresses_csv).select { |address| address[0] == zipcode }
|
11
|
+
addresses_array = CSV.read(path).select { |address| address[0] == zipcode }
|
13
12
|
addresses_array.map do |address_param|
|
14
13
|
{
|
15
14
|
zipcode: address_param[0],
|
@@ -20,13 +19,5 @@ module Jipcode
|
|
20
19
|
end
|
21
20
|
end
|
22
21
|
|
23
|
-
|
24
|
-
warn '[DEPRECATION] `search` is deprecated. Please use `locate` instead.'
|
25
|
-
path = "#{ZIPCODE_PATH}/#{zipcode[0..2]}.csv"
|
26
|
-
return [] unless File.exist?(path)
|
27
|
-
addresses = open(path) { |f| f.read }
|
28
|
-
CSV.parse(addresses).select { |address| address[0] == zipcode }
|
29
|
-
end
|
30
|
-
|
31
|
-
module_function :locate, :search
|
22
|
+
module_function :locate
|
32
23
|
end
|
data/lib/jipcode/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jipcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rinkei
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-04-
|
11
|
+
date: 2018-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: bump
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description: A gem for Japan Post's official zipcode data search & update.
|
98
112
|
email:
|
99
113
|
- kei.h.hayashi@gmail.com
|
@@ -112,6 +126,7 @@ files:
|
|
112
126
|
- Rakefile
|
113
127
|
- bin/console
|
114
128
|
- bin/setup
|
129
|
+
- bin/update
|
115
130
|
- jipcode.gemspec
|
116
131
|
- lib/jipcode.rb
|
117
132
|
- lib/jipcode/japan_post.rb
|