pumi 0.17.0 → 0.19.0

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: 5292b35d55909c67cc984178dd4d4f28a7a6054cb45148f62dcdfbdf171d1ad9
4
- data.tar.gz: 851e4eb11c886a7f4637063503234aa53e7229a7e0b834cac3dc56fcfc846a95
3
+ metadata.gz: 657c35491dda09dd16ab12cd3703f5891b5308fa6b8fae2849d20bde7850b2af
4
+ data.tar.gz: e1ac2b43734241e107db5698ffa9cd2eb871cb1ab1f3a7178a9e0f3a28cf78b4
5
5
  SHA512:
6
- metadata.gz: 7ce650a6a5a791a68d28ec26946bd6c8518fecbe9f7b3bdb1b1920cb4aec8a32fdf5ea947232d150a03d17bf55197ad6c147fc916e3a1516bfb710f2f90eec72
7
- data.tar.gz: af3ec2635388df2890b5b81f517b66c9af96b0a86d85b8bbca5638696faf4630a28b396cd86bfe0bf8852e704e8c23dc6080c787a1e0c2216e68244dc52c0cb0
6
+ metadata.gz: f96eea85912a349552953154296dabf92e7fd08df5102f30ff669d30fe641d6e676d81a978d56a24c2f9f41ece61c919a2e713525f094172894c9caf4b06393f
7
+ data.tar.gz: 6e22e3f369c93d15903cef7d707b076c19ec93f8a69f82a2ab008bb10bfd5b821aea86c7e87fa332a78a28ddf375689c59636b940993b8815793916c4dc17068
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.19.0](https://github.com/dwilkie/pumi/compare/v0.18.0...v0.19.0) (2023-06-04)
4
+
5
+
6
+ ### Features
7
+
8
+ * Update data ([7710de4](https://github.com/dwilkie/pumi/commit/7710de41d1eab48dead6a989bad92c4d9fac93aa))
9
+
10
+ ## [0.18.0](https://github.com/dwilkie/pumi/compare/v0.17.0...v0.18.0) (2023-05-27)
11
+
12
+
13
+ ### Features
14
+
15
+ * Add Wikipedia data ([#49](https://github.com/dwilkie/pumi/issues/49)) ([f1cca6f](https://github.com/dwilkie/pumi/commit/f1cca6f81588a94872910284f686846a7876b7fe))
16
+
3
17
  ## [0.17.0](https://github.com/dwilkie/pumi/compare/v0.16.0...v0.17.0) (2023-05-26)
4
18
 
5
19
 
data/README.md CHANGED
@@ -75,6 +75,11 @@ And then execute:
75
75
  # Find a province by its Khmer name
76
76
  Pumi::Province.where(name_km: "បន្ទាយមានជ័យ")
77
77
 
78
+ # Get a list of links for a province
79
+ province = Pumi::Province.find_by_id("12")
80
+ province.links
81
+ # => {:wikipedia=>"https://en.wikipedia.org/wiki/Phnom_Penh"}
82
+
78
83
  # Working with Districts (ស្រុក / ខណ្ឌ)
79
84
 
80
85
  # Get all districts
data/bin/parse_data CHANGED
@@ -7,6 +7,19 @@
7
7
  require "bundler/setup"
8
8
  require "pumi"
9
9
 
10
- data_parser = Pumi::DataParser.new
11
- data = data_parser.load_data!
12
- data_parser.write_data!(data)
10
+ Pumi::DataSource::NCDD.new.load_data!
11
+
12
+ Pumi::DataSource::Wikipedia.new(
13
+ scraper: Pumi::DataSource::Wikipedia::CambodianProvincesScraper.new,
14
+ data_file: Pumi::DataFile.new(:provinces)
15
+ ).load_data!
16
+
17
+ Pumi::DataSource::Wikipedia.new(
18
+ scraper: Pumi::DataSource::Wikipedia::CambodianDistrictsScraper.new,
19
+ data_file: Pumi::DataFile.new(:districts)
20
+ ).load_data!
21
+
22
+ Pumi::DataSource::Wikipedia.new(
23
+ scraper: Pumi::DataSource::Wikipedia::CambodianCommunesScraper.new,
24
+ data_file: Pumi::DataFile.new(:communes)
25
+ ).load_data!