banktools-gb 0.13.0 → 0.13.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 +5 -5
- data/.github/workflows/ci.yml +26 -0
- data/.rubocop.yml +5 -0
- data/Gemfile +5 -0
- data/README.md +20 -16
- data/banktools-gb.gemspec +6 -5
- data/lib/banktools-gb/version.rb +1 -1
- metadata +13 -12
- data/.travis.yml +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8f241c891a2df2eb6956201979b16081156a886ca681486b1eeb66756275ba31
|
4
|
+
data.tar.gz: '0975475a825a66dc1b6653a17dd9fa8baa55dd9eac1866c8e140d31590caf62a'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1823f38ba139459d6dfde4d1732f14d9e7df62c77b99bede06de3d910a3df70a8df47c2f0e76bba5ea28f93061894499cc6edff816548d9eff0f323774895607
|
7
|
+
data.tar.gz: b89460ed009cd2c14d3c41ab527a183c30bc2a60413216ebce426d7e4d573ef0d7ae624ad1b0e68748faf331819e4e27fc28b518e276e63f09fbf8db430e6a27
|
@@ -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,6 +1,6 @@
|
|
1
1
|
# United Kingdom bank tools
|
2
2
|
|
3
|
-
[](https://github.com/barsoom/banktools-gb/actions/workflows/ci.yml)
|
4
4
|
|
5
5
|
Ruby gem to validate United Kingdom sort codes and bank account numbers.
|
6
6
|
|
@@ -10,31 +10,35 @@ If we got anything wrong, please file an issue or contribute a fix yourself.
|
|
10
10
|
|
11
11
|
## Usage
|
12
12
|
|
13
|
-
|
13
|
+
```ruby
|
14
|
+
# Sort code
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
sort_code = BankTools::GB::SortCode.new("60-16-13")
|
17
|
+
sort_code.valid? # => true
|
18
|
+
sort_code.errors # => []
|
18
19
|
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
bad_sort_code = BankTools::GB::SortCode.new("1X")
|
21
|
+
bad_sort_code.valid? # => false
|
22
|
+
bad_sort_code.errors # => [ :too_short, :invalid_characters ]
|
22
23
|
|
23
|
-
|
24
|
+
# Account
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
account = BankTools::GB::Account.new("31926819")
|
27
|
+
account.valid? # => true
|
28
|
+
account.errors # => []
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
30
|
+
bad_account = BankTools::GB::Account.new("1")
|
31
|
+
bad_account.valid? # => false
|
32
|
+
bad_account.errors # => [ :too_short ]
|
33
|
+
```
|
32
34
|
|
33
35
|
## Installation
|
34
36
|
|
35
37
|
Add this line to your application's Gemfile:
|
36
38
|
|
37
|
-
|
39
|
+
```ruby
|
40
|
+
gem "banktools-gb"
|
41
|
+
```
|
38
42
|
|
39
43
|
And then execute:
|
40
44
|
|
data/banktools-gb.gemspec
CHANGED
@@ -6,8 +6,8 @@ require "banktools-gb/version"
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "banktools-gb"
|
8
8
|
spec.version = BankTools::GB::VERSION
|
9
|
-
spec.authors = ["Tomas Skogberg"]
|
10
|
-
spec.email = ["tomas@auctionet.com"]
|
9
|
+
spec.authors = [ "Tomas Skogberg" ]
|
10
|
+
spec.email = [ "tomas@auctionet.com" ]
|
11
11
|
|
12
12
|
spec.summary = %q{Validate and normalise United Kingdom bank account numbers.}
|
13
13
|
spec.homepage = "https://github.com/barsoom/banktools-gb"
|
@@ -16,11 +16,12 @@ 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
|
|
23
|
-
spec.add_development_dependency "bundler", "
|
24
|
-
spec.add_development_dependency "rake", "
|
24
|
+
spec.add_development_dependency "bundler", ">= 1"
|
25
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
25
26
|
spec.add_development_dependency "rspec", "~> 3"
|
26
27
|
end
|
data/lib/banktools-gb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: banktools-gb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.13.
|
4
|
+
version: 0.13.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Skogberg
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: attr_extras
|
@@ -28,30 +28,30 @@ dependencies:
|
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 12.3.3
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 12.3.3
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -73,9 +73,10 @@ executables: []
|
|
73
73
|
extensions: []
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
|
+
- ".github/workflows/ci.yml"
|
76
77
|
- ".gitignore"
|
77
78
|
- ".rspec"
|
78
|
-
- ".
|
79
|
+
- ".rubocop.yml"
|
79
80
|
- Gemfile
|
80
81
|
- LICENSE.txt
|
81
82
|
- README.md
|
@@ -91,7 +92,8 @@ files:
|
|
91
92
|
homepage: https://github.com/barsoom/banktools-gb
|
92
93
|
licenses:
|
93
94
|
- MIT
|
94
|
-
metadata:
|
95
|
+
metadata:
|
96
|
+
rubygems_mfa_required: 'true'
|
95
97
|
post_install_message:
|
96
98
|
rdoc_options: []
|
97
99
|
require_paths:
|
@@ -107,8 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
107
109
|
- !ruby/object:Gem::Version
|
108
110
|
version: '0'
|
109
111
|
requirements: []
|
110
|
-
|
111
|
-
rubygems_version: 2.6.11
|
112
|
+
rubygems_version: 3.2.28
|
112
113
|
signing_key:
|
113
114
|
specification_version: 4
|
114
115
|
summary: Validate and normalise United Kingdom bank account numbers.
|