banktools-dk 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ci.yml +23 -0
- data/.gitignore +2 -0
- data/.rspec +1 -0
- data/.rubocop.yml +3 -0
- data/Gemfile +8 -1
- data/README.md +19 -14
- data/Rakefile +1 -1
- data/banktools-dk.gemspec +5 -10
- data/lib/banktools-dk/version.rb +1 -1
- metadata +10 -51
- data/.travis.yml +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 85a040d85a967a335f7e90c6e69ac44425424e4bf1e761904699eaf413e53cfc
|
4
|
+
data.tar.gz: 240307b08e7762dcb4b1f2fa7ccdb07c7aea283a31766554e51fecff1d032747
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15248bce3824994943ee1a0e8502c119fcd592641c21981526a9f6c861d1df22997b22b0bb29563901324d4a4a3ac7707ef9ef3e215b4ca44164d528aad63437
|
7
|
+
data.tar.gz: 84d99d7e23133a78e17c0ee22c1883a7dd693aa3ddba4b59cd507cab10e1e41e666c1a89341dbbd687b6a42106c4b1e28059067104af9afd564dfc2a0b7a779b
|
@@ -0,0 +1,23 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on: [push, pull_request]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
build:
|
7
|
+
runs-on: ubuntu-latest
|
8
|
+
|
9
|
+
strategy:
|
10
|
+
matrix:
|
11
|
+
ruby-version:
|
12
|
+
- 3.2
|
13
|
+
- 3.1
|
14
|
+
- '3.0'
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v3
|
17
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby-version }}
|
21
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
22
|
+
- name: Run tests
|
23
|
+
run: bundle exec rake
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.rubocop.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
# Danish
|
1
|
+
# Danish bank tools
|
2
|
+
|
3
|
+
[![CI](https://github.com/barsoom/banktools-dk/actions/workflows/ci.yml/badge.svg)](https://github.com/barsoom/banktools-dk/actions/workflows/ci.yml)
|
2
4
|
|
3
5
|
Ruby gem to validate and normalize Danish account numbers.
|
4
6
|
|
@@ -8,19 +10,21 @@ If we got anything wrong, please file an issue or contribute a fix yourself.
|
|
8
10
|
|
9
11
|
## Usage
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
13
|
+
```ruby
|
14
|
+
account = BankTools::DK::Account.new("12345678901")
|
15
|
+
account.valid? # => true
|
16
|
+
account.errors # => []
|
14
17
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
+
bad_account = BankTools::DK::Account.new("1")
|
19
|
+
bad_account.valid? # => false
|
20
|
+
bad_account.errors # => [:too_short]
|
18
21
|
|
19
|
-
|
22
|
+
# Error codes
|
20
23
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
+
BankTools::DK::Errors::TOO_SHORT # => :too_short
|
25
|
+
BankTools::DK::Errors::TOO_LONG # => :too_long
|
26
|
+
BankTools::DK::Errors::INVALID_CHARACTERS # => :invalid_characters
|
27
|
+
```
|
24
28
|
|
25
29
|
## Tests
|
26
30
|
|
@@ -32,7 +36,9 @@ If we got anything wrong, please file an issue or contribute a fix yourself.
|
|
32
36
|
|
33
37
|
Add this line to your application's Gemfile:
|
34
38
|
|
35
|
-
|
39
|
+
```ruby
|
40
|
+
gem 'banktools-dk'
|
41
|
+
```
|
36
42
|
|
37
43
|
And then execute:
|
38
44
|
|
@@ -49,8 +55,7 @@ Or install it yourself as:
|
|
49
55
|
|
50
56
|
## Also see
|
51
57
|
|
52
|
-
* [BankTools
|
53
|
-
* [BankTools::DE (German)](https://github.com/barsoom/banktools-de)
|
58
|
+
* [Our other BankTools](https://github.com/barsoom?q=banktools)
|
54
59
|
* [iban-tools](https://github.com/iulianu/iban-tools)
|
55
60
|
|
56
61
|
## License
|
data/Rakefile
CHANGED
data/banktools-dk.gemspec
CHANGED
@@ -6,19 +6,14 @@ require "banktools-dk/version"
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "banktools-dk"
|
8
8
|
spec.version = BankTools::DK::VERSION
|
9
|
-
spec.authors = ["Kim Persson"]
|
10
|
-
spec.email = ["kim@auctionet.com"]
|
9
|
+
spec.authors = [ "Kim Persson" ]
|
10
|
+
spec.email = [ "kim@auctionet.com" ]
|
11
11
|
|
12
12
|
spec.summary = %q{Validate and normalise Danish bank account numbers.}
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "https://github.com/barsoom/banktools-dk"
|
14
14
|
spec.license = "MIT"
|
15
|
+
spec.metadata = { "rubygems_mfa_required" => "true" }
|
15
16
|
|
16
17
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
-
spec.
|
18
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.11"
|
22
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
18
|
+
spec.require_paths = [ "lib" ]
|
24
19
|
end
|
data/lib/banktools-dk/version.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: banktools-dk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kim Persson
|
8
8
|
autorequire:
|
9
|
-
bindir:
|
9
|
+
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.11'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.11'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rake
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '10.0'
|
34
|
-
type: :development
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '10.0'
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rspec
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - "~>"
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '3.0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - "~>"
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '3.0'
|
11
|
+
date: 2023-06-26 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
55
13
|
description:
|
56
14
|
email:
|
57
15
|
- kim@auctionet.com
|
@@ -59,9 +17,10 @@ executables: []
|
|
59
17
|
extensions: []
|
60
18
|
extra_rdoc_files: []
|
61
19
|
files:
|
20
|
+
- ".github/workflows/ci.yml"
|
62
21
|
- ".gitignore"
|
63
22
|
- ".rspec"
|
64
|
-
- ".
|
23
|
+
- ".rubocop.yml"
|
65
24
|
- Gemfile
|
66
25
|
- LICENSE.txt
|
67
26
|
- README.md
|
@@ -73,10 +32,11 @@ files:
|
|
73
32
|
- lib/banktools-dk/account.rb
|
74
33
|
- lib/banktools-dk/errors.rb
|
75
34
|
- lib/banktools-dk/version.rb
|
76
|
-
homepage:
|
35
|
+
homepage: https://github.com/barsoom/banktools-dk
|
77
36
|
licenses:
|
78
37
|
- MIT
|
79
|
-
metadata:
|
38
|
+
metadata:
|
39
|
+
rubygems_mfa_required: 'true'
|
80
40
|
post_install_message:
|
81
41
|
rdoc_options: []
|
82
42
|
require_paths:
|
@@ -92,8 +52,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
92
52
|
- !ruby/object:Gem::Version
|
93
53
|
version: '0'
|
94
54
|
requirements: []
|
95
|
-
|
96
|
-
rubygems_version: 2.2.1
|
55
|
+
rubygems_version: 3.4.12
|
97
56
|
signing_key:
|
98
57
|
specification_version: 4
|
99
58
|
summary: Validate and normalise Danish bank account numbers.
|
data/.travis.yml
DELETED