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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d54f4d9595108776403b33c0e98021aad7e15589af3a9dc76eb1c5e41eacf096
4
- data.tar.gz: eb3b393f941a49eb3695d31e1ece5a03e3579b52dda47f6c683f6aa0de10a8c2
3
+ metadata.gz: 41de1da293a05ef9c1dfd14d81254e33ca4ea06e2e561a36613aaa938128f5c6
4
+ data.tar.gz: 85726ff95060365ba22954b8874bb793d271c12f42d80ad2e5c4ae783553d434
5
5
  SHA512:
6
- metadata.gz: f875facfad9359554c3d05335153929f8a90d6701fc6a218e94e91f243fcbacdc64a689a2c81a64721aee4f76b050bfd005d51ca03b032a5d4ff7209716fba61
7
- data.tar.gz: 370f4ea00466151f78407790fbd398b5d6c608aa6fa157689cafea9b3046a6e1ed96737766f55c35b769e43a7a1acaa0f8b3c95766081013d34718b81bace449
6
+ metadata.gz: 2c2536f0ef55e45c3c9b436ae4fa813de959de1eff510f1a504e0ed01fa2135c626180198a9954ee48fa03ff8bb85ffd37692cc82c62069b5b80c6ed4fac937e
7
+ data.tar.gz: 3290a359c0a8e8d59ab5adf732a0c440983eeb064ae38e80fd48a7ab78e78eff3eb4241d732aec5cd8ca14c128791f49ee3763b2137ef3e845d7b92c98218053
data/.rubocop.yml CHANGED
@@ -1 +1,4 @@
1
1
  inherit_from: .rubocop_todo.yml
2
+
3
+ Security/Open:
4
+ Enabled: false
data/.travis.yml CHANGED
@@ -1,16 +1,18 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.4
4
- before_install: gem install bundler -v 1.11.2
3
+ - 2.3
4
+ - 2.4
5
+ - 2.5
6
+ before_install: gem install bundler
5
7
  script:
6
- - bundle exec rspec
7
- - bundle exec rubocop
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
- - bundle exec codeclimate-test-reporter
14
+ - bundle exec codeclimate-test-reporter
13
15
  notifications:
14
16
  email: false
15
17
  slack:
16
- secure: EI+tiNEm2V0TmNBOmGVV40thHdFcxGhCO0hHL8skt3k6r2g+pgaeV6Zc7o25w7Vkb2ArpaqBJ/7QpIA76lkARZUgmLcaKJszo0rmQL5Od3PVPVhhNXYF4zbwTlCuLOm845iyg0FlWaHWUNuhkCcmk4F0M2lgGhgDhp/GVaQohe5vtPG8wBADppJRvIeeVtSWmu46erR7wySZu9nE05AVkBM3vnHifcSY1r9/YLJ12qm3lcJ2yzkdXmpfR1W2Y20iTLOy6nveoIt8GxMoMbWUrDIMsilFQrqqh8cVdVl4PGbsTlgmQP8ktcp75V8TllZYCIrZxRSeLHtwBNCS1ojjjs9R4gv9JOaHvwC7K30s6MLBLNpXGES8X9bYYuXt8D5U/6cTnSouz7dsAEVlb1Sgk6COFSFqLhAxAH/tLqSCn5tgIw+QON9ZknIvdNlj55ZqmZNgZ0/CWGNy32QmhIpjckofjwB6H1bxXXNsl7m8Ko+YKo/titdUZzCHbInkRZPWTR3cSuWhICSWjCj97KxCNIcN8wMPkxvjaRmX0CS4UPigvd8rsNGx4aSdxK9AtRxGDtww4lvpHryt+WzqiW1zIr1cjJWce5M9l7WvI48PG/ajNRe+9HQGO2gias6ZjjoCxboBfCJ9V0YZjY7EWZd6JFTDmbYTkTMbVJHwLxuaQ0c=
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.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
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
- # coding: utf-8
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
- Hashie::Mash::Rash.new(convert(data[zip_code])) if data[zip_code]
14
+ convert(data[zip_code]) if data[zip_code]
16
15
  end
17
16
  end
18
17
 
@@ -14,7 +14,7 @@ module JpZipCode
14
14
 
15
15
  [@jp_filer, @roman_filer].map(&:clean)
16
16
  true
17
- rescue => e
17
+ rescue StandardError => e
18
18
  puts "update failed. reason: #{e.message}"
19
19
  false
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module JpZipCode
2
- VERSION = '0.1.7'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
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.1.7
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