pumi 0.45.0 → 0.45.1

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: b9baeff58c6fa5a2c6779109dd5de67093225bf8ae91d0cd4ee88030cade3f0f
4
- data.tar.gz: 5b684d6feec7e8768512e7a866eced69356c147752db9f81dabc32b33f1f327e
3
+ metadata.gz: 4a33836ec5c4cf4bbea745ce517f4fac22ee6b9f354ab3425fc420a160cedb1b
4
+ data.tar.gz: b29653f837920b884eb1ae21fdf3b93175fca770fb379e5879a45b7942ce80d8
5
5
  SHA512:
6
- metadata.gz: 50c37471d799805b8cdb9a1e297cb559ef4e62dec046d536097c6af176f59e4129cf985ec659ee5a2bbe5e392c5d6bbcdba254424d120457e1db84730d07942a
7
- data.tar.gz: 3af81b80b5927442d85aea796cd056a86f09153f402f8e00cd3e2e5363ca0fab428feda158e266c2af693b1992cfd712ef260ba879f1d922fa0b687460123a60
6
+ metadata.gz: 47a515936b8376e728ad170ca4992316e5ff760abb61fb9eafdf909d3059159257a95d3141430e291b383839992f8ced9ea7cd913a39882fad688af9b3e3996a
7
+ data.tar.gz: 8b438493d30ef85eb575cfbd7e45b6067fb4a10a49d58ce308cf9249e663045e6feb7b43f236f555c9e30e029eaca3f7d87241939a5bd010b8b6d7e5c3a8e1c8
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.45.0"
2
+ ".": "0.45.1"
3
3
  }
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.45.1](https://github.com/dwilkie/pumi/compare/v0.45.0...v0.45.1) (2026-11-17)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * Add misspelling for Arey Ksat ([#145](https://github.com/dwilkie/pumi/issues/145)) ([5edbb03](https://github.com/dwilkie/pumi/commit/5edbb037b8a06479e66fbe56e892349ea6f1ab2e))
9
+
3
10
  ## [0.45.0](https://github.com/dwilkie/pumi/compare/v0.44.2...v0.45.0) (2026-11-17)
4
11
 
5
12
 
data/data/communes.yml CHANGED
@@ -11377,7 +11377,7 @@ communes:
11377
11377
  '081307':
11378
11378
  name:
11379
11379
  km: អរិយក្សត្រ
11380
- latin: Akreiy Ksatr
11380
+ latin: Arey Ksat
11381
11381
  administrative_unit:
11382
11382
  km: សង្កាត់
11383
11383
  latin: Sangkat
data/data/districts.yml CHANGED
@@ -1500,7 +1500,7 @@ districts:
1500
1500
  '0813':
1501
1501
  name:
1502
1502
  km: អរិយក្សត្រ
1503
- latin: Akreiy Ksatr
1503
+ latin: Arey Ksat
1504
1504
  ungegn: Ărĕy Ksăt
1505
1505
  administrative_unit:
1506
1506
  km: ក្រុង
data/data/villages.yml CHANGED
@@ -59772,7 +59772,7 @@ villages:
59772
59772
  '08130701':
59773
59773
  name:
59774
59774
  km: អរិយក្សត្រ
59775
- latin: Akreiy Ksatr
59775
+ latin: Arey Ksat
59776
59776
  administrative_unit:
59777
59777
  km: ភូមិ
59778
59778
  latin: Phum
@@ -6,6 +6,7 @@ module Pumi
6
6
  module Wikipedia
7
7
  class DistrictsInCambodiaArticle < Article
8
8
  PAGE_TITLE = "List_of_districts,_municipalities_and_sections_in_Cambodia".freeze
9
+ # PAGE_TITLE = "User:Dcwilkie%2Fsandbox%2FList_of_districts,_municipalities_and_sections_in_Cambodia".freeze
9
10
 
10
11
  INTRO_TEXT = "This is a list of [[Cambodia]]'s %<districts_count>s districts ({{lang|km|ស្រុក}} ''srok''), %<municipalities_count>s district-level municipalities ({{lang|km|ក្រុង}} ''krong'') and %<sections_count>s sections ({{lang|km|ខណ្ឌ}} ''khan'') organized by each [[Provinces of Cambodia|province]] and an [[Provinces of Cambodia|autonomous municipality]] ([[Phnom Penh]]).".freeze
11
12
  DISTRICTS_TEMPLATE = File.read("#{__dir__}/templates/district_list.wikitext.erb")
@@ -83,7 +84,9 @@ module Pumi
83
84
  misspelling = MISSPELLINGS.find { |m| m.correct_text == title }
84
85
  search_term = misspelling&.incorrect_text || title
85
86
 
86
- section = source.match(/==\s*\[\[[[:word:]\s]+\|#{Regexp.escape(search_term)}\]\].+?==(.+?(?===))/m)
87
+ section = source.match(
88
+ /==\s*\[\[[[:word:]\s]+\|#{Regexp.escape(search_term)}\]\]\s*==.+?(\n*<div id="province-districts-.+?(?===|\z))/m
89
+ )
87
90
 
88
91
  raise "Missing section for #{search_term}" if section.nil?
89
92
 
@@ -1,5 +1,5 @@
1
1
  <div id="province-districts-<%= province.id %>">
2
- <%= province.name_en %> contains <%= districts_summary %>.<ref>{{cite web|url=http://db.ncdd.gov.kh/gazetteer/view/province.castle?pv=<%= province.id %> |title=<%= province.name_en %> |publisher=National Committee for Sub-National Democratic Development }}</ref>
2
+ <%= province.name_en %> contains <%= districts_summary %>.<ref>{{cite web|url=https://db.ncdd.gov.kh/gazetteer/view/province.castle?pv=<%= province.id %> |title=<%= province.name_en %> |publisher=National Committee for Sub-National Democratic Development }}</ref>
3
3
 
4
4
  {| class="wikitable sortable"
5
5
  |-
@@ -13,8 +13,8 @@
13
13
  <% districts.each_with_index do |district, index| %>
14
14
  | <%= index + 1 %>
15
15
  <% if district.links[:wikipedia] -%>
16
- <% district_page = URI.parse(district.links[:wikipedia]).path.split("/").last -%>
17
- <% if district_page.gsub("_", " ") == district.name_en -%>
16
+ <% district_page = URI.decode_www_form_component(URI.parse(district.links[:wikipedia]).path.split("/").last).tr("_", " ") -%>
17
+ <% if district_page == district.name_en -%>
18
18
  | [[<%= district.name_en %>]]
19
19
  <% else -%>
20
20
  | [[<%= district_page %>|<%= district.name_en %>]]
@@ -27,7 +27,8 @@ module Pumi
27
27
  Misspelling.new(incorrect_text: "Mongkol Borei", correct_text: "Mongkol Borey"),
28
28
  Misspelling.new(incorrect_text: "wat Kor", correct_text: "Wat Kor"),
29
29
  Misspelling.new(incorrect_text: "OMal", correct_text: "Ou Mal"),
30
- Misspelling.new(incorrect_text: "Paoy Paet", correct_text: "Poipet")
30
+ Misspelling.new(incorrect_text: "Paoy Paet", correct_text: "Poipet"),
31
+ Misspelling.new(incorrect_text: "Akreiy Ksatr", correct_text: "Arey Ksat")
31
32
  ].freeze
32
33
 
33
34
  AdministrativeUnit = Struct.new(:en, :km, :latin, :ungegn, :code_length, :group, :type, keyword_init: true)
data/lib/pumi/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Pumi
2
- VERSION = "0.45.0".freeze
2
+ VERSION = "0.45.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pumi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.45.0
4
+ version: 0.45.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Wilkie