province-th-ruby 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ecf955ce3a25784878606d21035c14a8cd901fca3a7498e38affbba3345bc3d
4
- data.tar.gz: 02a1be0d9b302c002b3920989f3249ec845b57550163364c6974dbddeaf1037f
3
+ metadata.gz: 847640a2f54eee77cf79108179ba9bfbacf3b2ccbc19f901f4ba3a9db7267c2d
4
+ data.tar.gz: 79631fc5a595ae956f760affafc6f1a10b1e4d7e8dc7aa3a8602a14fa4ec8e2e
5
5
  SHA512:
6
- metadata.gz: 28edb0b86e17f4c64a5b6127590e881efb3712114a93a39b3aca741b0cc7e9bc7f823c0b8a70a7682888820f9c068f376ceb429103c4de13278a3154ea19e262
7
- data.tar.gz: 9fabe59426ce06d2e26ead97aa8bcd4136dff347cb79322c5ba4a6bb430337d86dd8fb8309dcc2f70e11cb8e9f54db2d6d901701cab84103f5b014bcf7f53122
6
+ metadata.gz: ce90ed6bb9ecabdf572333c0598abcb4b1524e4d349b67d09614ec73241273fa7c15dcad903a9a920f87454f99e96ce8d060c85771fcb7de5ffb341bd6eb7162
7
+ data.tar.gz: ef4d99bb56a8f754ad1e9139bc09b49ecf18f111af31627937edf60d37f93c514edcc5e7270563a9409ddd34f7281b3fa6f6e21474a9864b80074d1475dc69ea
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- province-th-ruby (0.1.0)
4
+ province-th-ruby (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Province::GK::Ruby
1
+ # Province::ThProvince::Ruby
2
2
 
3
3
  Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/province/th/ruby`. To experiment with that code, run `bin/console` for an interactive prompt.
4
4
 
@@ -40,4 +40,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
40
40
 
41
41
  ## Code of Conduct
42
42
 
43
- Everyone interacting in the Province::GK::Ruby project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/province-th-ruby/blob/master/CODE_OF_CONDUCT.md).
43
+ Everyone interacting in the Province::ThProvince::Ruby project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/province-th-ruby/blob/master/CODE_OF_CONDUCT.md).
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "gk"
4
+ require "th_province"
5
5
 
6
6
  # You can add fixtures and/or initialization code here to make experimenting
7
7
  # with your gem easier. You can also use a different console, if you like.
@@ -0,0 +1,10 @@
1
+ require "version"
2
+ require "json"
3
+ require "th_province/geography"
4
+ require "th_province/province"
5
+ require "th_province/amphur"
6
+ require "th_province/district"
7
+
8
+ module ThProvince
9
+ # Your code goes here...
10
+ end
@@ -1,4 +1,4 @@
1
- module GK
1
+ module ThProvince
2
2
  class Amphur
3
3
  @@data ||= JSON.parse(File.read("#{__dir__}/../data/amphur.json"))
4
4
  @@geography_id_to_data = @@data.values.group_by{|x| x["geography_id"]}
@@ -27,15 +27,15 @@ module GK
27
27
  end
28
28
 
29
29
  def geography
30
- GK::Geography.find(@json["geography_id"])
30
+ ThProvince::Geography.find(@json["geography_id"])
31
31
  end
32
32
 
33
33
  def province
34
- GK::Province.find(@json["province_id"])
34
+ ThProvince::Province.find(@json["province_id"])
35
35
  end
36
36
 
37
37
  def districts
38
- GK::District.districts_with_amphur_id(@json["id"])
38
+ ThProvince::District.districts_with_amphur_id(@json["id"])
39
39
  end
40
40
 
41
41
  def self.amphurs_with_geography_id(geography_id)
@@ -1,4 +1,4 @@
1
- module GK
1
+ module ThProvince
2
2
  class District
3
3
  @@data ||= JSON.parse(File.read("#{__dir__}/../data/district.json"))
4
4
  @@geography_id_to_data = @@data.values.group_by{|x| x["geography_id"]}
@@ -28,15 +28,15 @@ module GK
28
28
  end
29
29
 
30
30
  def geography
31
- GK::Geography.find(@json["geography_id"])
31
+ ThProvince::Geography.find(@json["geography_id"])
32
32
  end
33
33
 
34
34
  def province
35
- GK::Province.find(@json["province_id"])
35
+ ThProvince::Province.find(@json["province_id"])
36
36
  end
37
37
 
38
38
  def amphur
39
- GK::Amphur.find(@json["amphur_id"])
39
+ ThProvince::Amphur.find(@json["amphur_id"])
40
40
  end
41
41
 
42
42
  def self.districts_with_geography_id(geography_id)
@@ -1,4 +1,4 @@
1
- module GK
1
+ module ThProvince
2
2
  class Geography
3
3
 
4
4
  @@data ||= JSON.parse(File.read("#{__dir__}/../data/geography.json"))
@@ -26,15 +26,15 @@ module GK
26
26
  end
27
27
 
28
28
  def provinces
29
- GK::Province.provinces_with_geography_id(@json["id"])
29
+ ThProvince::Province.provinces_with_geography_id(@json["id"])
30
30
  end
31
31
 
32
32
  def amphurs
33
- GK::Amphur.amphur_with_geography_id(@json["id"])
33
+ ThProvince::Amphur.amphur_with_geography_id(@json["id"])
34
34
  end
35
35
 
36
36
  def districts
37
- GK::District.districts_with_geography_id(@json["id"])
37
+ ThProvince::District.districts_with_geography_id(@json["id"])
38
38
  end
39
39
 
40
40
  end
@@ -1,4 +1,4 @@
1
- module GK
1
+ module ThProvince
2
2
  class Province
3
3
 
4
4
  @@data ||= JSON.parse(File.read("#{__dir__}/../data/province.json"))
@@ -27,15 +27,15 @@ module GK
27
27
  end
28
28
 
29
29
  def geography
30
- GK::Geography.find(@json["geography_id"])
30
+ ThProvince::Geography.find(@json["geography_id"])
31
31
  end
32
32
 
33
33
  def amphurs
34
- GK::Amphur.amphurs_with_province_id(@json["id"])
34
+ ThProvince::Amphur.amphurs_with_province_id(@json["id"])
35
35
  end
36
36
 
37
37
  def districts
38
- GK::District.districts_with_province_id(@json["id"])
38
+ ThProvince::District.districts_with_province_id(@json["id"])
39
39
  end
40
40
 
41
41
  def self.provinces_with_geography_id(geography_id)
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
- module GK
2
- VERSION = "0.1.1"
1
+ module ThProvince
2
+ VERSION = "0.1.2"
3
3
  end
@@ -5,7 +5,7 @@ require "version"
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "province-th-ruby"
8
- spec.version = GK::VERSION
8
+ spec.version = ThProvince::VERSION
9
9
  spec.authors = ["SaKKo Sama"]
10
10
  spec.email = ["saklism@gmail.com"]
11
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: province-th-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - SaKKo Sama
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-02 00:00:00.000000000 Z
11
+ date: 2019-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -73,11 +73,11 @@ files:
73
73
  - lib/data/district.json
74
74
  - lib/data/geography.json
75
75
  - lib/data/province.json
76
- - lib/gk.rb
77
- - lib/gk/amphur.rb
78
- - lib/gk/district.rb
79
- - lib/gk/geography.rb
80
- - lib/gk/province.rb
76
+ - lib/th_province.rb
77
+ - lib/th_province/amphur.rb
78
+ - lib/th_province/district.rb
79
+ - lib/th_province/geography.rb
80
+ - lib/th_province/province.rb
81
81
  - lib/version.rb
82
82
  - province-th-ruby.gemspec
83
83
  homepage: https://github.com/sakko/province-th-ruby
data/lib/gk.rb DELETED
@@ -1,10 +0,0 @@
1
- require "version"
2
- require "json"
3
- require "gk/geography"
4
- require "gk/province"
5
- require "gk/amphur"
6
- require "gk/district"
7
-
8
- module GK
9
- # Your code goes here...
10
- end