pumi 0.16.0 → 0.18.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: 775c0dcab5266ef3f25f7d8a0523805999854a332a367fb42df76007b49969ae
4
- data.tar.gz: 3fd66de604016b6b828058b2994c66e45622ea7a772ac118d64193e446c7c2db
3
+ metadata.gz: 066cd0470f76fedc66d88f2798f1c3c539def95da58bbbae430fe84c96fd1ebc
4
+ data.tar.gz: b76d8d82cf50a5b24a177eb3749ae0ddb58ba52bfbdf7543ff166d227242ca07
5
5
  SHA512:
6
- metadata.gz: bb33a8fb37d22f5f62d8d78619aae9fb487b2b111d5de7b146cd33f82d87113402245eb702301f0c64fab4cc472bda3cbe72f4f3942b2622d904f452e91d439a
7
- data.tar.gz: bf1c72c9f9e242ed4761e1c8e69019d5ae94081efeb6ad309fa6d71785afc68da260fb2ab13c4cb10e6a4e971498f024d281cd23009feb5a8c6292df22c4d231
6
+ metadata.gz: ffb5c438c69836bb3476f755872f089b399ee6897d1e588b80ad0e8c17d15845a77a99555e1462e71c75104a1f79faf78ef1e0ae29b4314c11ffb92868e3f000
7
+ data.tar.gz: f091f341ec8749c4d392a11bf87a286315f626384a6c4ab5a5a14a712be4b8f73092439718f12b979166cf30a267c99180ca54c543583c8379bc1332a66ee9ba
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: 'bundler'
4
+ directory: '/'
5
+ schedule:
6
+ interval: 'daily'
7
+ - package-ecosystem: "github-actions"
8
+ directory: "/"
9
+ schedule:
10
+ interval: "daily"
@@ -0,0 +1,17 @@
1
+ name: Dependabot auto-merge
2
+ on: pull_request
3
+
4
+ permissions:
5
+ contents: write
6
+ pull-requests: write
7
+
8
+ jobs:
9
+ dependabot:
10
+ runs-on: ubuntu-latest
11
+ if: ${{ github.actor == 'dependabot[bot]' }}
12
+ steps:
13
+ - name: Enable auto-merge for Dependabot PRs
14
+ run: gh pr merge --auto --merge "$PR_URL"
15
+ env:
16
+ PR_URL: ${{github.event.pull_request.html_url}}
17
+ GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
@@ -23,7 +23,7 @@ jobs:
23
23
  run: ./bin/parse_data
24
24
 
25
25
  - name: Create Pull Request
26
- uses: peter-evans/create-pull-request@v3
26
+ uses: peter-evans/create-pull-request@v5
27
27
  with:
28
28
  token: ${{ secrets.REPO_TOKEN }}
29
29
  commit-message: "feat: Update data"
@@ -32,7 +32,7 @@ jobs:
32
32
  base: "master"
33
33
 
34
34
  - name: Upload Data
35
- uses: actions/upload-artifact@v2
35
+ uses: actions/upload-artifact@v3
36
36
  with:
37
37
  name: data_files
38
38
  path: tmp
data/.tool-versions CHANGED
@@ -1,2 +1,2 @@
1
- ruby 3.2.0
1
+ ruby 3.2.2
2
2
  nodejs 18.15.0
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.18.0](https://github.com/dwilkie/pumi/compare/v0.17.0...v0.18.0) (2023-05-27)
4
+
5
+
6
+ ### Features
7
+
8
+ * Add Wikipedia data ([#49](https://github.com/dwilkie/pumi/issues/49)) ([f1cca6f](https://github.com/dwilkie/pumi/commit/f1cca6f81588a94872910284f686846a7876b7fe))
9
+
10
+ ## [0.17.0](https://github.com/dwilkie/pumi/compare/v0.16.0...v0.17.0) (2023-05-26)
11
+
12
+
13
+ ### Features
14
+
15
+ * Update data ([#47](https://github.com/dwilkie/pumi/issues/47)) ([68dc668](https://github.com/dwilkie/pumi/commit/68dc668b809ba1259c985b49f503a08f4cfe2a28))
16
+
3
17
  ## [0.16.0](https://github.com/dwilkie/pumi/compare/v0.15.0...v0.16.0) (2023-04-24)
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!