banktools-at 0.2.0 → 0.2.1
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 +26 -0
- data/.rubocop.yml +5 -0
- data/Gemfile +5 -0
- data/README.md +24 -18
- data/banktools-at.gemspec +4 -3
- data/lib/banktools-at/version.rb +1 -1
- metadata +7 -6
- 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: ac87da37e15a48db5a5d2b0a2e1df05927258714d163dbc72291f43d244532d3
|
4
|
+
data.tar.gz: d2cc0de4c2a5a99f08fdaef3da4817d1d762370d571fac6531a3cfe091d3dc9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a503ebc14bce0f38cdca635a2a95d6481276b672da5a8d96c44a13a88b43a78bdb0cf7c06b5c77d1f25349e831d2dfadd9a4092199fc7cb6da80e6cb81628e8
|
7
|
+
data.tar.gz: 5e4510367fad4392da83b8e601dcc96d83622cdb8d3b9e313d111fef5761a80498ff15b31b2a0317e4fe25bcf9996a6d27851455dc672fafdc15e87f3508932b
|
@@ -0,0 +1,26 @@
|
|
1
|
+
name: Ruby CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
test:
|
11
|
+
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
|
14
|
+
strategy:
|
15
|
+
matrix:
|
16
|
+
ruby-version: ["3.0", "2.7", "2.6", "2.5"]
|
17
|
+
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
21
|
+
uses: ruby/setup-ruby@ae9cb3b565e36682a2c6045e4f664388da4c73aa
|
22
|
+
with:
|
23
|
+
ruby-version: ${{ matrix.ruby-version }}
|
24
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
25
|
+
- name: Run tests
|
26
|
+
run: bundle exec rake
|
data/.rubocop.yml
ADDED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,30 +1,34 @@
|
|
1
1
|
# Austrian bank tools
|
2
2
|
|
3
|
+
[![Ruby CI](https://github.com/barsoom/banktools-at/actions/workflows/ci.yml/badge.svg)](https://github.com/barsoom/banktools-at/actions/workflows/ci.yml)
|
4
|
+
|
3
5
|
Ruby gem to validate Austrian bank account numbers.
|
4
6
|
|
5
7
|
## Usage
|
6
8
|
|
7
|
-
|
8
|
-
|
9
|
-
|
9
|
+
```ruby
|
10
|
+
account = BankTools::AT::Account.new("12345678901")
|
11
|
+
account.valid? # => true
|
12
|
+
account.errors # => []
|
10
13
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
+
bad_account = BankTools::AT::Account.new("1")
|
15
|
+
bad_account.valid? # => false
|
16
|
+
bad_account.errors # => [:too_short]
|
14
17
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
+
blz = BankTools::AT::BLZ.new("12345")
|
19
|
+
blz.valid? # => true
|
20
|
+
blz.errors # => []
|
18
21
|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
+
bad_blz = BankTools::AT::BLZ.new("1")
|
23
|
+
bad_blz.valid? # => false
|
24
|
+
bad_blz.errors # => [:too_short]
|
22
25
|
|
23
|
-
|
26
|
+
# Error codes
|
24
27
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
+
BankTools::AT::Errors::TOO_SHORT # => :too_short
|
29
|
+
BankTools::AT::Errors::TOO_LONG # => :too_long
|
30
|
+
BankTools::AT::Errors::INVALID_CHARACTERS # => :invalid_characters
|
31
|
+
```
|
28
32
|
|
29
33
|
## Tests
|
30
34
|
|
@@ -36,7 +40,9 @@ Ruby gem to validate Austrian bank account numbers.
|
|
36
40
|
|
37
41
|
Add this line to your application's Gemfile:
|
38
42
|
|
39
|
-
|
43
|
+
```ruby
|
44
|
+
gem "banktools-at"
|
45
|
+
```
|
40
46
|
|
41
47
|
And then execute:
|
42
48
|
|
@@ -48,7 +54,7 @@ Or install it yourself as:
|
|
48
54
|
|
49
55
|
## TODO
|
50
56
|
|
51
|
-
* Use [check digit](
|
57
|
+
* Use [check digit](https://www.cnb.cz/export/sites/cnb/cs/platebni-styk/.galleries/iban/download/TR201.pdf)
|
52
58
|
|
53
59
|
## Also see
|
54
60
|
|
data/banktools-at.gemspec
CHANGED
@@ -6,8 +6,8 @@ require "banktools-at/version"
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "banktools-at"
|
8
8
|
spec.version = BankTools::AT::VERSION
|
9
|
-
spec.authors = ["Henrik Nyh", "Kim Persson"]
|
10
|
-
spec.email = ["devs@auctionet.com"]
|
9
|
+
spec.authors = [ "Henrik Nyh", "Kim Persson" ]
|
10
|
+
spec.email = [ "devs@auctionet.com" ]
|
11
11
|
|
12
12
|
spec.summary = %q{Validate Austrian bank account numbers.}
|
13
13
|
spec.homepage = ""
|
@@ -16,7 +16,8 @@ Gem::Specification.new do |spec|
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
17
|
spec.bindir = "exe"
|
18
18
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
-
spec.require_paths = ["lib"]
|
19
|
+
spec.require_paths = [ "lib" ]
|
20
|
+
spec.metadata = { "rubygems_mfa_required" => "true" }
|
20
21
|
|
21
22
|
spec.add_dependency "attr_extras"
|
22
23
|
|
data/lib/banktools-at/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: banktools-at
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Henrik Nyh
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2021-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: attr_extras
|
@@ -74,8 +74,9 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
+
- ".github/workflows/ci.yml"
|
77
78
|
- ".gitignore"
|
78
|
-
- ".
|
79
|
+
- ".rubocop.yml"
|
79
80
|
- Gemfile
|
80
81
|
- README.md
|
81
82
|
- Rakefile
|
@@ -90,7 +91,8 @@ files:
|
|
90
91
|
homepage: ''
|
91
92
|
licenses:
|
92
93
|
- MIT
|
93
|
-
metadata:
|
94
|
+
metadata:
|
95
|
+
rubygems_mfa_required: 'true'
|
94
96
|
post_install_message:
|
95
97
|
rdoc_options: []
|
96
98
|
require_paths:
|
@@ -106,8 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
108
|
- !ruby/object:Gem::Version
|
107
109
|
version: '0'
|
108
110
|
requirements: []
|
109
|
-
|
110
|
-
rubygems_version: 2.6.11
|
111
|
+
rubygems_version: 3.2.28
|
111
112
|
signing_key:
|
112
113
|
specification_version: 4
|
113
114
|
summary: Validate Austrian bank account numbers.
|
data/.travis.yml
DELETED