jp_zip_code 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/.travis.yml +8 -6
- data/README.md +13 -13
- data/jp_zip_code.gemspec +1 -4
- data/lib/jp_zip_code.rb +1 -2
- data/lib/jp_zip_code/updater.rb +1 -1
- data/lib/jp_zip_code/version.rb +1 -1
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41de1da293a05ef9c1dfd14d81254e33ca4ea06e2e561a36613aaa938128f5c6
|
4
|
+
data.tar.gz: 85726ff95060365ba22954b8874bb793d271c12f42d80ad2e5c4ae783553d434
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c2536f0ef55e45c3c9b436ae4fa813de959de1eff510f1a504e0ed01fa2135c626180198a9954ee48fa03ff8bb85ffd37692cc82c62069b5b80c6ed4fac937e
|
7
|
+
data.tar.gz: 3290a359c0a8e8d59ab5adf732a0c440983eeb064ae38e80fd48a7ab78e78eff3eb4241d732aec5cd8ca14c128791f49ee3763b2137ef3e845d7b92c98218053
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -1,16 +1,18 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.
|
4
|
-
|
3
|
+
- 2.3
|
4
|
+
- 2.4
|
5
|
+
- 2.5
|
6
|
+
before_install: gem install bundler
|
5
7
|
script:
|
6
|
-
|
7
|
-
|
8
|
+
- bundle exec rspec
|
9
|
+
- bundle exec rubocop
|
8
10
|
addons:
|
9
11
|
code_climate:
|
10
12
|
repo_token: 5594e3f1541606356c57f9e1921f18506f63696bf118fbc3a5f57d630fe7affe
|
11
13
|
after_success:
|
12
|
-
|
14
|
+
- bundle exec codeclimate-test-reporter
|
13
15
|
notifications:
|
14
16
|
email: false
|
15
17
|
slack:
|
16
|
-
secure:
|
18
|
+
secure: LE5s1FN+qDXtnaOcIE+WUiKTiu0/Fj+9gfYUyidAUYXHGoXVeFKrw9n0iq5guzZFRROIG1KQUs9TFoRAuQXiy4QLkEmNG+KAXU6OqCDFI40+BPp1I3N9o4FXx2zSCApKwL6f7f9aEiLv1MS181UlLljnAlzrGu9+TdHYgnWJBLnFXHkW6lEpxmvm65ckPragZIj3Fvr4AY+flAUhYGNUX/3tkDH47NtkbzAmox8OJJxCpiczlFLLyMoJY+VEQUBn0QOg67BrBJ4Es9DU2RqJOetqOu9qTdm8NA8hGiL86HFtOrlgZFe8dguGk5cVoFPtkPJF+Rrx1s1wnvCDdDZQeP42sLUZFP54BqBwijy0gxAXG4KDbu613aypK6IWpBKsySriz+PGgpOfsKBCKfFZDZ2v28uSmivzW0g2arXKY0kNeZFHqByKEUWC56qeez6+XexQEBPm7h9Ci0jH6Du2WFOXj/kc2ZPuREEBTvHgmfmU++f51oZ5+98EIk0Rn/gvVrDF4jOHbwE8PnvULlocc4Q+YYMujeLTu4O3a9gDEtc7oPjCQhv7pnOA7IIdXfFxXNOrgILi/aq7PKFJZLHCOlTXtn/sGQufrT6kcZki4s+/dIvbZ+WaHx9MhichBoxWXXrZPrBj0He3ZwZOtGBxukkxnRCPVOoscRnm+aR+G60=
|
data/README.md
CHANGED
@@ -28,19 +28,19 @@ Or install it yourself as:
|
|
28
28
|
```
|
29
29
|
address = JpZipCode.search '100-0001'
|
30
30
|
|
31
|
-
address
|
32
|
-
address
|
33
|
-
address
|
34
|
-
address
|
35
|
-
address
|
36
|
-
address
|
37
|
-
address
|
38
|
-
address
|
39
|
-
address
|
40
|
-
address
|
41
|
-
address
|
42
|
-
|
43
|
-
JpZipCode.update
|
31
|
+
address['pref_code'] # => '13'
|
32
|
+
address['pref_kanji'] # => '東京都'
|
33
|
+
address['city_kanji'] # => '千代田区'
|
34
|
+
address['town_kanji'] # => '千代田'
|
35
|
+
address['pref_kana'] # => 'トウキョウト'
|
36
|
+
address['city_kana'] # => 'チヨダク'
|
37
|
+
address['town_kana'] # => 'チヨダ'
|
38
|
+
address['pref_roman'] # => 'Tokyo-To'
|
39
|
+
address['city_roman'] # => 'Chiyoda-Ku'
|
40
|
+
address['town_roman'] # => 'Chiyoda'
|
41
|
+
address['zip_code'] # => '1000001'
|
42
|
+
|
43
|
+
JpZipCode.update # update json file
|
44
44
|
```
|
45
45
|
|
46
46
|
## License
|
data/jp_zip_code.gemspec
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
3
|
require 'jp_zip_code/version'
|
6
4
|
|
@@ -21,7 +19,6 @@ Gem::Specification.new do |spec|
|
|
21
19
|
spec.require_paths = ['lib']
|
22
20
|
|
23
21
|
spec.add_dependency 'rubyzip'
|
24
|
-
spec.add_dependency 'rash_alt'
|
25
22
|
spec.add_development_dependency 'bundler', '~> 1.11'
|
26
23
|
spec.add_development_dependency 'rake', '~> 10.0'
|
27
24
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
data/lib/jp_zip_code.rb
CHANGED
@@ -2,7 +2,6 @@ require 'jp_zip_code/version'
|
|
2
2
|
require 'jp_zip_code/updater'
|
3
3
|
require 'jp_zip_code/filer'
|
4
4
|
require 'json'
|
5
|
-
require 'rash'
|
6
5
|
|
7
6
|
module JpZipCode
|
8
7
|
def self.search(zip_code)
|
@@ -12,7 +11,7 @@ module JpZipCode
|
|
12
11
|
json_file = "#{File.dirname(__FILE__)}/../data/zip_code/#{zip_code[0, 4]}.json"
|
13
12
|
if File.exist?(json_file)
|
14
13
|
data = File.open(json_file) { |json| JSON.load(json) }
|
15
|
-
|
14
|
+
convert(data[zip_code]) if data[zip_code]
|
16
15
|
end
|
17
16
|
end
|
18
17
|
|
data/lib/jp_zip_code/updater.rb
CHANGED
data/lib/jp_zip_code/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jp_zip_code
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kimromi
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rash_alt
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ">="
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: bundler
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|