postnummer_norge 1.0.1 → 1.0.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: d7fcdf05ab133f2f6333b294e2b26f31a07d691bab837365284146df8ba26db0
4
- data.tar.gz: 43d5a0c202433172d249dff7422473c92643bfa677c13b9d73c9b0acc0b8e807
3
+ metadata.gz: af23dbeec9ec67009609603dde34c3c1d8be05e9dab108e13f2ca341bab1c1ae
4
+ data.tar.gz: 61ae6a78c1a30a1a9694728144a35034ad327aaa97e47081d0cbeda39bf662a4
5
5
  SHA512:
6
- metadata.gz: 26cffb57ae2012c2a8f624f5b82dbda87b8ef03d6ce9d9c067d4f8c1bf322cd0f4c4197252bab32865316c440600e47028be7d0d06414ce21336b71967f519e8
7
- data.tar.gz: a939c7f725044f8e7ebe7d5f77770c40b84f0efadcceeb6f5307bb691e828106663ee8de8f224ba358981ef2f5d975b7664015fef054963172fc7a97607e2aa9
6
+ metadata.gz: 72a1681268a8a50553eeddda46c50e00bd453bee75b780c45607ef99be84843fc769ebaee80f77627af8877ba295fde8fc6d03163ac08562d3fa5843af84f980
7
+ data.tar.gz: 626a5264f1b3766d016f75a5b66d6e0ab8464a10d766d9870d4f3a9eabcdd93e702fb438e9842387c8c967ff636b836e90d44aabe13a50cabd506065b485bf8d
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2012 Inge Jørgensen
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,6 +1,5 @@
1
- ![Build](https://github.com/anyone-oslo/postnummer_norge/workflows/Build/badge.svg)
2
- [![Maintainability](https://api.codeclimate.com/v1/badges/37b0128a6c9ccfb78ddb/maintainability)](https://codeclimate.com/github/anyone-oslo/postnummer_norge/maintainability)
3
- [![Test Coverage](https://api.codeclimate.com/v1/badges/37b0128a6c9ccfb78ddb/test_coverage)](https://codeclimate.com/github/anyone-oslo/postnummer_norge/test_coverage)
1
+ [![Version](https://img.shields.io/gem/v/postnummer_norge.svg?style=flat)](https://rubygems.org/gems/postnummer_norge)
2
+ [![Build](https://github.com/elektronaut/postnummer_norge/actions/workflows/build.yml/badge.svg)](https://github.com/elektronaut/postnummer_norge/actions/workflows/build.yml)
4
3
 
5
4
  # PostnummerNorge
6
5
 
@@ -15,3 +14,16 @@ PostalCode.exists?("0662") # => true
15
14
  PostalCode.find("0662").name # => 'OSLO'
16
15
  PostalCode.find_by_name("HUNDVÅG").first.code # => '4077'
17
16
  ```
17
+
18
+ ## Contributing
19
+
20
+ Bug reports, feature requests, and pull requests are welcome on
21
+ [GitHub](https://github.com/elektronaut/postnummer_norge). Read
22
+ [CONTRIBUTING.md](CONTRIBUTING.md) first; it also covers how to run the
23
+ tests and how commits are formatted. Report security vulnerabilities
24
+ privately as described in [SECURITY.md](SECURITY.md). Note that this
25
+ project ships with a [code of conduct](CODE_OF_CONDUCT.md).
26
+
27
+ ## License
28
+
29
+ Released under the [MIT License](LICENSE).
@@ -746,6 +746,7 @@
746
746
  1423 SKI 3207 NORDRE FOLLO G
747
747
  1424 SKI 3207 NORDRE FOLLO G
748
748
  1425 SKI 3207 NORDRE FOLLO G
749
+ 1426 SOLBERG 3218 ÅS G
749
750
  1429 VINTERBRO 3218 ÅS P
750
751
  1430 ÅS 3218 ÅS G
751
752
  1431 ÅS 3218 ÅS P
@@ -1220,7 +1221,7 @@
1220
1221
  2306 HAMAR 3403 HAMAR P
1221
1222
  2307 HAMAR 3403 HAMAR P
1222
1223
  2308 HAMAR 3403 HAMAR P
1223
- 2309 HAMAR 3403 HAMAR P
1224
+ 2309 HAMAR 3403 HAMAR G
1224
1225
  2311 HAMAR 3403 HAMAR P
1225
1226
  2312 OTTESTAD 3413 STANGE G
1226
1227
  2313 OTTESTAD 3413 STANGE P
@@ -1371,7 +1372,6 @@
1371
1372
  2617 LILLEHAMMER 3405 LILLEHAMMER P
1372
1373
  2618 LILLEHAMMER 3405 LILLEHAMMER G
1373
1374
  2619 LILLEHAMMER 3405 LILLEHAMMER G
1374
- 2620 MESNALI 3411 RINGSAKER P
1375
1375
  2621 VINGROM 3405 LILLEHAMMER P
1376
1376
  2622 LILLEHAMMER 3405 LILLEHAMMER P
1377
1377
  2623 LILLEHAMMER 3405 LILLEHAMMER P
@@ -1427,7 +1427,6 @@
1427
1427
  2677 NEDRE HEIDAL 3437 SEL G
1428
1428
  2678 SEL 3437 SEL P
1429
1429
  2680 VÅGÅ 3435 VÅGÅ G
1430
- 2681 LALM 3435 VÅGÅ P
1431
1430
  2682 LALM 3435 VÅGÅ G
1432
1431
  2683 TESSANDEN 3435 VÅGÅ G
1433
1432
  2684 VÅGÅ 3435 VÅGÅ P
@@ -1716,7 +1715,6 @@
1716
1715
  3194 HORTEN 3901 HORTEN P
1717
1716
  3195 SKOPPUM 3901 HORTEN P
1718
1717
  3196 HORTEN 3901 HORTEN P
1719
- 3197 NYKIRKE 3901 HORTEN P
1720
1718
  3199 BORRE 3901 HORTEN P
1721
1719
  3201 SANDEFJORD 3907 SANDEFJORD P
1722
1720
  3202 SANDEFJORD 3907 SANDEFJORD P
@@ -1762,7 +1760,6 @@
1762
1760
  3242 SANDEFJORD 3907 SANDEFJORD G
1763
1761
  3243 KODAL 3907 SANDEFJORD G
1764
1762
  3244 SANDEFJORD 3907 SANDEFJORD G
1765
- 3245 KODAL 3907 SANDEFJORD P
1766
1763
  3246 SANDEFJORD 3907 SANDEFJORD P
1767
1764
  3247 SANDEFJORD 3907 SANDEFJORD P
1768
1765
  3248 SANDEFJORD 3907 SANDEFJORD P
@@ -2806,7 +2803,6 @@
2806
2803
  5210 OS 4624 BJØRNAFJORDEN G
2807
2804
  5211 OS 4624 BJØRNAFJORDEN G
2808
2805
  5212 SØFTELAND 4624 BJØRNAFJORDEN G
2809
- 5213 LEPSØY 4624 BJØRNAFJORDEN P
2810
2806
  5215 LYSEKLOSTER 4624 BJØRNAFJORDEN G
2811
2807
  5216 LEPSØY 4624 BJØRNAFJORDEN G
2812
2808
  5217 HAGAVIK 4624 BJØRNAFJORDEN G
@@ -2830,6 +2826,7 @@
2830
2826
  5239 RÅDAL 4601 BERGEN G
2831
2827
  5243 FANA 4601 BERGEN G
2832
2828
  5244 FANA 4601 BERGEN G
2829
+ 5245 FANA 4601 BERGEN G
2833
2830
  5251 SØREIDGREND 4601 BERGEN G
2834
2831
  5252 SØREIDGREND 4601 BERGEN G
2835
2832
  5253 SANDSLI 4601 BERGEN G
@@ -3447,7 +3444,6 @@
3447
3444
  6315 INNFJORDEN 1539 RAUMA G
3448
3445
  6320 ISFJORDEN 1539 RAUMA G
3449
3446
  6330 VERMA 1539 RAUMA G
3450
- 6331 VERMA 1539 RAUMA P
3451
3447
  6339 ISFJORDEN 1539 RAUMA P
3452
3448
  6350 EIDSBYGDA 1539 RAUMA G
3453
3449
  6360 ÅFARNES 1539 RAUMA G
@@ -3572,7 +3568,6 @@
3572
3568
  6614 GJØRA 1563 SUNNDAL P
3573
3569
  6620 ÅLVUNDEID 1563 SUNNDAL G
3574
3570
  6622 ÅLVUNDFJORD 1563 SUNNDAL G
3575
- 6623 ÅLVUNDFJORD 1563 SUNNDAL P
3576
3571
  6627 TINGVOLL 1560 TINGVOLL P
3577
3572
  6628 MEISINGSET 1560 TINGVOLL G
3578
3573
  6629 TORJULVÅGEN 1560 TINGVOLL G
@@ -3851,7 +3846,7 @@
3851
3846
  7050 TRONDHEIM 5001 TRONDHEIM G
3852
3847
  7051 TRONDHEIM 5001 TRONDHEIM G
3853
3848
  7052 TRONDHEIM 5001 TRONDHEIM G
3854
- 7053 RANHEIM 5001 TRONDHEIM G
3849
+ 7053 CHARLOTTENLUND 5001 TRONDHEIM G
3855
3850
  7054 RANHEIM 5001 TRONDHEIM G
3856
3851
  7055 RANHEIM 5001 TRONDHEIM G
3857
3852
  7056 RANHEIM 5001 TRONDHEIM G
@@ -3904,7 +3899,6 @@
3904
3899
  7140 OPPHAUG 5057 ØRLAND G
3905
3900
  7142 UTHAUG 5057 ØRLAND G
3906
3901
  7150 STORFOSNA 5057 ØRLAND G
3907
- 7151 STORFOSNA 5057 ØRLAND P
3908
3902
  7152 KRÅKVÅG 5057 ØRLAND G
3909
3903
  7153 GARTEN 5057 ØRLAND G
3910
3904
  7156 LEKSA 5059 ORKLAND G
@@ -3997,7 +3991,6 @@
3997
3991
  7329 SVORKMO 5059 ORKLAND P
3998
3992
  7331 LØKKEN VERK 5059 ORKLAND P
3999
3993
  7332 LØKKEN VERK 5059 ORKLAND G
4000
- 7333 STORÅS 5059 ORKLAND P
4001
3994
  7334 STORÅS 5059 ORKLAND G
4002
3995
  7335 JERPSTAD 5059 ORKLAND G
4003
3996
  7336 MELDAL 5059 ORKLAND G
@@ -4502,7 +4495,6 @@
4502
4495
  8370 LEKNES 1860 VESTVÅGØY G
4503
4496
  8372 GRAVDAL 1860 VESTVÅGØY G
4504
4497
  8373 BALLSTAD 1860 VESTVÅGØY G
4505
- 8374 BALLSTAD 1860 VESTVÅGØY P
4506
4498
  8376 LEKNES 1860 VESTVÅGØY P
4507
4499
  8377 GRAVDAL 1860 VESTVÅGØY P
4508
4500
  8378 STAMSUND 1860 VESTVÅGØY P
@@ -4533,7 +4525,6 @@
4533
4525
  8414 HENNES 1866 HADSEL G
4534
4526
  8415 SORTLAND 1870 SORTLAND G
4535
4527
  8416 SORTLAND 1870 SORTLAND G
4536
- 8419 SORTLAND 1870 SORTLAND P
4537
4528
  8426 BARKESTAD 1868 ØKSNES G
4538
4529
  8428 TUNSTAD 1868 ØKSNES G
4539
4530
  8430 MYRE 1868 ØKSNES G
@@ -4912,7 +4903,6 @@
4912
4903
  9387 SENJAHOPEN 5530 SENJA P
4913
4904
  9388 FJORDGARD 5530 SENJA G
4914
4905
  9389 HUSØY I SENJA 5530 SENJA B
4915
- 9391 STONGLANDSEIDET 5530 SENJA P
4916
4906
  9392 STONGLANDSEIDET 5530 SENJA G
4917
4907
  9393 FLAKSTADVÅG 5530 SENJA G
4918
4908
  9395 KALDFARNES 5530 SENJA G
@@ -4952,7 +4942,6 @@
4952
4942
  9453 KRÅKRØHAMN 5514 IBESTAD G
4953
4943
  9454 ÅNSTAD 5514 IBESTAD G
4954
4944
  9455 ENGENES 5514 IBESTAD G
4955
- 9456 ENGENES 5514 IBESTAD P
4956
4945
  9470 GRATANGEN 5516 GRATANGEN G
4957
4946
  9471 GRATANGEN 5516 GRATANGEN P
4958
4947
  9475 BORKENES 5510 KVÆFJORD G
@@ -5036,6 +5025,7 @@
5036
5025
  9624 REVSNESHAMN 5603 HAMMERFEST G
5037
5026
  9650 AKKARFJORD 5603 HAMMERFEST B
5038
5027
  9651 LANGSTRAND 5603 HAMMERFEST G
5028
+ 9653 HELLEFJORD 5603 HAMMERFEST G
5039
5029
  9657 KÅRHAMN 5603 HAMMERFEST G
5040
5030
  9664 SANDØYBOTN 5603 HAMMERFEST G
5041
5031
  9670 TUFJORD 5618 MÅSØY B
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PostnummerNorge
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.2"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: postnummer_norge
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Inge Jørgensen
@@ -10,35 +10,26 @@ cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  email:
13
- - inge@anyone.no
13
+ - inge@elektronaut.no
14
14
  executables: []
15
15
  extensions: []
16
16
  extra_rdoc_files: []
17
17
  files:
18
- - ".github/workflows/build.yml"
19
- - ".github/workflows/update-postal-codes.yml"
20
- - ".gitignore"
21
- - ".release-please-manifest.json"
22
- - ".rubocop.yml"
23
- - ".tool-versions"
24
- - CHANGELOG.md
25
- - Gemfile
26
- - Gemfile.lock
18
+ - LICENSE
27
19
  - README.md
28
- - Rakefile
29
20
  - lib/postnummer_norge.rb
30
21
  - lib/postnummer_norge/postal_code.rb
31
22
  - lib/postnummer_norge/postal_codes.tab
32
23
  - lib/postnummer_norge/version.rb
33
- - mise.toml
34
- - postnummer_norge.gemspec
35
- - release-please-config.json
36
- - spec/postnummer_norge/postal_code_spec.rb
37
- - spec/spec_helper.rb
38
- homepage: ''
39
- licenses: []
24
+ homepage: https://github.com/elektronaut/postnummer_norge
25
+ licenses:
26
+ - MIT
40
27
  metadata:
28
+ bug_tracker_uri: https://github.com/elektronaut/postnummer_norge/issues
29
+ changelog_uri: https://github.com/elektronaut/postnummer_norge/blob/main/CHANGELOG.md
30
+ documentation_uri: https://www.rubydoc.info/gems/postnummer_norge
41
31
  rubygems_mfa_required: 'true'
32
+ source_code_uri: https://github.com/elektronaut/postnummer_norge
42
33
  rdoc_options: []
43
34
  require_paths:
44
35
  - lib
@@ -46,14 +37,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
46
37
  requirements:
47
38
  - - ">="
48
39
  - !ruby/object:Gem::Version
49
- version: 3.0.0
40
+ version: 3.2.0
50
41
  required_rubygems_version: !ruby/object:Gem::Requirement
51
42
  requirements:
52
43
  - - ">="
53
44
  - !ruby/object:Gem::Version
54
45
  version: '0'
55
46
  requirements: []
56
- rubygems_version: 4.0.3
47
+ rubygems_version: 4.0.20
57
48
  specification_version: 4
58
49
  summary: Norwegian postal codes
59
50
  test_files: []
@@ -1,63 +0,0 @@
1
- name: Build
2
- on:
3
- push:
4
- branches:
5
- - main
6
- - develop
7
- pull_request:
8
- permissions:
9
- contents: write
10
- issues: write
11
- pull-requests: write
12
- id-token: write
13
- jobs:
14
- rubocop-test:
15
- name: Rubocop
16
- runs-on: ubuntu-latest
17
- steps:
18
- - uses: actions/checkout@v6
19
- - uses: ruby/setup-ruby@v1
20
- with:
21
- ruby-version: '4.0'
22
- bundler-cache: true
23
- - name: Check code
24
- run: bundle exec rubocop
25
-
26
- rspec-test:
27
- name: RSpec
28
- runs-on: ubuntu-latest
29
- strategy:
30
- matrix:
31
- ruby: ['3.3', '3.4', '4.0']
32
- steps:
33
- - uses: actions/checkout@v6
34
- - uses: ruby/setup-ruby@v1
35
- with:
36
- ruby-version: ${{ matrix.ruby }}
37
- bundler-cache: true
38
- - name: Run tests
39
- run: bundle exec rspec
40
-
41
- release-please:
42
- needs: [rubocop-test, rspec-test]
43
- if: github.ref == 'refs/heads/main' && github.event_name == 'push'
44
- runs-on: ubuntu-latest
45
- outputs:
46
- release_created: ${{ steps.release.outputs.release_created }}
47
- steps:
48
- - uses: googleapis/release-please-action@v4
49
- id: release
50
- with:
51
- token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
52
-
53
- publish:
54
- needs: release-please
55
- if: ${{ needs.release-please.outputs.release_created }}
56
- runs-on: ubuntu-latest
57
- steps:
58
- - uses: actions/checkout@v6
59
- - uses: ruby/setup-ruby@v1
60
- with:
61
- ruby-version: "4.0"
62
- bundler-cache: true
63
- - uses: rubygems/release-gem@v1
@@ -1,28 +0,0 @@
1
- name: Update Postal Codes
2
- on:
3
- schedule:
4
- - cron: '0 8 1 * *'
5
- workflow_dispatch:
6
- permissions:
7
- contents: write
8
- pull-requests: write
9
- jobs:
10
- update:
11
- name: Update postal codes
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v6
15
- - uses: ruby/setup-ruby@v1
16
- with:
17
- ruby-version: '4.0'
18
- bundler-cache: true
19
- - name: Update postal codes
20
- run: bundle exec rake update_codes
21
- - name: Create Pull Request
22
- uses: peter-evans/create-pull-request@v7
23
- with:
24
- add-paths: lib/postnummer_norge/postal_codes.tab
25
- commit-message: 'fix: Update postal codes'
26
- title: 'Update postal codes'
27
- branch: update-postal-codes
28
- delete-branch: true
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- *.gem
2
- .bundle
3
- coverage/
4
- pkg/*
@@ -1,3 +0,0 @@
1
- {
2
- ".": "1.0.1"
3
- }
data/.rubocop.yml DELETED
@@ -1,21 +0,0 @@
1
- plugins:
2
- - rubocop-rake
3
- - rubocop-rspec
4
-
5
- AllCops:
6
- NewCops: enable
7
- TargetRubyVersion: 3.0
8
-
9
- Style/StringLiterals:
10
- EnforcedStyle: double_quotes
11
-
12
- Style/Documentation:
13
- Enabled: false
14
-
15
- Metrics/BlockLength:
16
- Exclude:
17
- - "*.gemspec"
18
- - "**/*_spec.rb"
19
-
20
- Naming/MethodName:
21
- Enabled: false
data/.tool-versions DELETED
@@ -1 +0,0 @@
1
- ruby 4.0
data/CHANGELOG.md DELETED
@@ -1,11 +0,0 @@
1
- # Changelog
2
-
3
- ## [1.0.1](https://github.com/elektronaut/postnummer_norge/compare/postnummer_norge-v1.0.0...postnummer_norge/v1.0.1) (2026-01-22)
4
-
5
-
6
- ### Bug Fixes
7
-
8
- * Add Gemfile.lock to release-please config ([d93030f](https://github.com/elektronaut/postnummer_norge/commit/d93030fbd9a7128305cd6316bc97a5ce4ceca490))
9
- * Limit PR to postal codes file only ([d4e5f33](https://github.com/elektronaut/postnummer_norge/commit/d4e5f3398415156b75ebc18b0670b65559963bef))
10
- * Update postal codes ([5cbac1a](https://github.com/elektronaut/postnummer_norge/commit/5cbac1a0a48f820c33f3a49917ff1ae95fad1e7f))
11
- * Use simple release type for plain VERSION file ([d80825c](https://github.com/elektronaut/postnummer_norge/commit/d80825cdab8db38fab4c1f3457e85f5258b09982))
data/Gemfile DELETED
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- source "http://rubygems.org"
4
-
5
- # Specify your gem's dependencies in postnummer_norge.gemspec
6
- gemspec
7
-
8
- group :development, :test do
9
- gem "rake"
10
- gem "rspec"
11
- gem "rubocop", require: false
12
- gem "rubocop-rake", require: false
13
- gem "rubocop-rspec", require: false
14
- gem "simplecov"
15
- end
data/Gemfile.lock DELETED
@@ -1,81 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- postnummer_norge (1.0.1)
5
-
6
- GEM
7
- remote: http://rubygems.org/
8
- specs:
9
- ast (2.4.3)
10
- diff-lcs (1.6.2)
11
- docile (1.4.1)
12
- json (2.18.0)
13
- language_server-protocol (3.17.0.5)
14
- lint_roller (1.1.0)
15
- parallel (1.27.0)
16
- parser (3.3.10.1)
17
- ast (~> 2.4.1)
18
- racc
19
- prism (1.8.0)
20
- racc (1.8.1)
21
- rainbow (3.1.1)
22
- rake (13.3.1)
23
- regexp_parser (2.11.3)
24
- rspec (3.13.2)
25
- rspec-core (~> 3.13.0)
26
- rspec-expectations (~> 3.13.0)
27
- rspec-mocks (~> 3.13.0)
28
- rspec-core (3.13.6)
29
- rspec-support (~> 3.13.0)
30
- rspec-expectations (3.13.5)
31
- diff-lcs (>= 1.2.0, < 2.0)
32
- rspec-support (~> 3.13.0)
33
- rspec-mocks (3.13.7)
34
- diff-lcs (>= 1.2.0, < 2.0)
35
- rspec-support (~> 3.13.0)
36
- rspec-support (3.13.6)
37
- rubocop (1.82.1)
38
- json (~> 2.3)
39
- language_server-protocol (~> 3.17.0.2)
40
- lint_roller (~> 1.1.0)
41
- parallel (~> 1.10)
42
- parser (>= 3.3.0.2)
43
- rainbow (>= 2.2.2, < 4.0)
44
- regexp_parser (>= 2.9.3, < 3.0)
45
- rubocop-ast (>= 1.48.0, < 2.0)
46
- ruby-progressbar (~> 1.7)
47
- unicode-display_width (>= 2.4.0, < 4.0)
48
- rubocop-ast (1.49.0)
49
- parser (>= 3.3.7.2)
50
- prism (~> 1.7)
51
- rubocop-rake (0.7.1)
52
- lint_roller (~> 1.1)
53
- rubocop (>= 1.72.1)
54
- rubocop-rspec (3.9.0)
55
- lint_roller (~> 1.1)
56
- rubocop (~> 1.81)
57
- ruby-progressbar (1.13.0)
58
- simplecov (0.22.0)
59
- docile (~> 1.1)
60
- simplecov-html (~> 0.11)
61
- simplecov_json_formatter (~> 0.1)
62
- simplecov-html (0.13.2)
63
- simplecov_json_formatter (0.1.4)
64
- unicode-display_width (3.2.0)
65
- unicode-emoji (~> 4.1)
66
- unicode-emoji (4.2.0)
67
-
68
- PLATFORMS
69
- ruby
70
-
71
- DEPENDENCIES
72
- postnummer_norge!
73
- rake
74
- rspec
75
- rubocop
76
- rubocop-rake
77
- rubocop-rspec
78
- simplecov
79
-
80
- BUNDLED WITH
81
- 4.0.4
data/Rakefile DELETED
@@ -1,14 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "bundler/gem_tasks"
4
- require "net/http"
5
- require "uri"
6
-
7
- desc "Update postal codes"
8
- task :update_codes do
9
- url = "https://www.bring.no/postnummerregister-ansi.txt"
10
- content = Net::HTTP.get(URI.parse(url))
11
- File.write("./lib/postnummer_norge/postal_codes.tab",
12
- content.force_encoding("iso-8859-1")
13
- .encode("UTF-8", universal_newline: true))
14
- end
data/mise.toml DELETED
@@ -1,2 +0,0 @@
1
- [tools]
2
- ruby = "4.0"
@@ -1,23 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- $LOAD_PATH.push File.expand_path("lib", __dir__)
4
- require "postnummer_norge/version"
5
-
6
- Gem::Specification.new do |s|
7
- s.name = "postnummer_norge"
8
- s.version = PostnummerNorge::VERSION
9
- s.authors = ["Inge Jørgensen"]
10
- s.email = ["inge@anyone.no"]
11
- s.homepage = ""
12
- s.summary = "Norwegian postal codes"
13
-
14
- s.required_ruby_version = ">= 3.0.0"
15
-
16
- s.files = `git ls-files`.split("\n")
17
- s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
18
- s.require_paths = ["lib"]
19
-
20
- # specify any dependencies here; for example:
21
- # s.add_runtime_dependency "rest-client"
22
- s.metadata["rubygems_mfa_required"] = "true"
23
- end
@@ -1,17 +0,0 @@
1
- {
2
- "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
3
- "packages": {
4
- ".": {
5
- "release-type": "ruby",
6
- "package-name": "postnummer_norge",
7
- "version-file": "lib/postnummer_norge/version.rb",
8
- "extra-files": [
9
- {
10
- "type": "generic",
11
- "path": "Gemfile.lock",
12
- "regex": "postnummer_norge \\((?<version>.+?)\\)"
13
- }
14
- ]
15
- }
16
- }
17
- }
@@ -1,62 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "spec_helper"
4
- require "postnummer_norge"
5
-
6
- describe PostnummerNorge::PostalCode do
7
- describe "#exists?" do
8
- subject { described_class.exists?(code) }
9
-
10
- context "when code exists" do
11
- let(:code) { "0662" }
12
-
13
- it { is_expected.to be(true) }
14
- end
15
-
16
- context "when code does not exist" do
17
- let(:code) { "0002" }
18
-
19
- it { is_expected.to be(false) }
20
- end
21
- end
22
-
23
- describe "#find" do
24
- subject(:postal_code) { described_class.find(code) }
25
-
26
- context "when code exists" do
27
- let(:code) { "4085" }
28
-
29
- it { is_expected.to be_a(described_class) }
30
- specify { expect(postal_code.name).to eq("HUNDVÅG") }
31
- specify { expect(postal_code.municipality).to eq("STAVANGER") }
32
- end
33
-
34
- context "when code does not exist" do
35
- let(:code) { "0002" }
36
-
37
- it { is_expected.to be_nil }
38
- end
39
- end
40
-
41
- describe "#find_by_name" do
42
- subject(:results) { described_class.find_by_name(name) }
43
-
44
- let(:postal_code) { results.first }
45
-
46
- context "when name exists" do
47
- let(:name) { "HUNDVÅG" }
48
-
49
- it { is_expected.to be_an(Array) }
50
- specify { expect(postal_code).to be_a(described_class) }
51
- specify { expect(postal_code.code).to eq("4077") }
52
- specify { expect(postal_code.name).to eq("HUNDVÅG") }
53
- specify { expect(postal_code.municipality).to eq("STAVANGER") }
54
- end
55
-
56
- context "when name does not exist" do
57
- let(:name) { "XYZZYX" }
58
-
59
- it { is_expected.to be_nil }
60
- end
61
- end
62
- end
data/spec/spec_helper.rb DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "rubygems"
4
-
5
- require "simplecov"
6
- SimpleCov.start
7
-
8
- require "postnummer_norge"