japan_municipality 1.0.0 → 1.0.1

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: 77d609d0e3b6e55bf10ab63ceb1e65258c61e2f2ad88867c230f675beb51fa3a
4
- data.tar.gz: ffdb3c23ac74373d4eeb4e6c5fc82fe02311cf94e3931f72fc3c5902844ca040
3
+ metadata.gz: 4bc9fed41c1d50da0eb7956c30e75c3f29744c41cc98125e771eb61df692a810
4
+ data.tar.gz: 326d2725dd6a20806d16c2830815495f12726b2527c63cd47ff29af6bff539a1
5
5
  SHA512:
6
- metadata.gz: 614ea9e977a845808dcf1dfe76ba49b42f36ff6eb35bdb03fc5d26bece3f79694e24ccf30d8553bbd70b67823f1210d439e9691e09ef23c18501b9cccf550459
7
- data.tar.gz: 81fb2f590d7a93079988fe4f6b8c8be6df5c0950854b7883bcabda9341f2c6e622401eac07467a5a7a6d25c734c95ea6e1302ad65c09f16248f98c52127c6249
6
+ metadata.gz: 71267f3f516e7819ed3637570920b0ca97bed42b1fa86251d55cbeb38467ef95c6f6b3d8797c03e2705a2dbda45e2b1c16c7d6edd8cc13841759163da28634ab
7
+ data.tar.gz: efff0ca9af35c4d09e326d6448f60fc1dc94378abf796fa7aa5026869ae029c70e1af94407d638884d18ea02d514662103dcbc39442e5098146b4261a244dd52
data/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 1.0.1
6
+
7
+ 2018.10.23
8
+
9
+ - Adds missing method of JapanMunicipality object
10
+ - Fix CSV loading
11
+
5
12
  ## 1.0.0
6
13
 
7
14
  2018.10.19
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  class JapanMunicipality
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
@@ -4,6 +4,10 @@ require "japan_municipality/version"
4
4
  require "csv"
5
5
 
6
6
  class JapanMunicipality
7
+ attr_reader :area_code, :prefecture, :subprefecture
8
+ attr_reader :subprefecture_furigana, :municipality, :municipality_furigana
9
+ attr_reader :merger_dissolution_date, :has_merger_dissolution_infomation
10
+
7
11
  def self.all
8
12
  DATA[2..-1].map do |data|
9
13
  new(data)
@@ -22,6 +26,7 @@ class JapanMunicipality
22
26
  end
23
27
 
24
28
  # https://www.e-stat.go.jp/municipalities/cities/areacode
25
- DATA = CSV.read("data/municipalities.csv").freeze
26
- private_constant :DATA
29
+ CSV_PATH = File.expand_path("../../data/municipalities.csv", __FILE__)
30
+ DATA = CSV.read(CSV_PATH).freeze
31
+ private_constant :CSV_PATH, :DATA
27
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: japan_municipality
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juanito Fatas