banktools-se 0.10.0 → 0.11.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
  SHA1:
3
- metadata.gz: 56417ca1fa0b99e2d5c754563686051cc73c0387
4
- data.tar.gz: 7abf1933594e2ff146fe570a5b935e41ab996e14
3
+ metadata.gz: 10c053f2d5762e614cad39a501a08dd8ffab2526
4
+ data.tar.gz: b1c6e6cf66384a55799aa99b4a1cc8be62140830
5
5
  SHA512:
6
- metadata.gz: 920c68e4e3cdfed665e6242256952f5cd770ed3e25faab56cd8cbb33b76ffec39d38d1fcfed12a0a0cda67dde11cafc0b6a91c51274bcbc163d4108f18b6c2bc
7
- data.tar.gz: 3176a6146b0380d9db063b82e343dce699918ab2537fb7cd419d4bc3321fd07bd085a9d3847baf15abe7ad5068b4dbd9e00bfb5128d41978406fd41c203c7c7c
6
+ metadata.gz: 8e334a027c0367e992f80f813674ad6f8423817f0a12491ea2a885aa1a5a6c82ab2f43843625083dd3e494bd58d8cddef82c4a51f325f40b3f22c960acf05459
7
+ data.tar.gz: 19b36f3156e07f3bf2a2fc11de9cfb60f81493bc94d32b02f21487e6ec968695f45907e7d2d415048f600c8e08d0fdba1f87ef3c8b0ae97c0674ee734365ea90
@@ -18,7 +18,7 @@ module BankTools
18
18
  3782..3782 => { name: "Nordea", serial_number_length: 10, luhn_for_serial: true }, # Personkonto.
19
19
  3783..4999 => { name: "Nordea" },
20
20
  5000..5999 => { name: "SEB" },
21
- 6000..6999 => { name: "Handelsbanken", serial_number_length: 9 },
21
+ 6000..6999 => { name: "Handelsbanken", serial_number_length: 8..9 },
22
22
  7000..7999 => { name: "Swedbank" },
23
23
  # Can be fewer chars but must be zero-filled, so let's call it 10.
24
24
  8000..8999 => { name: "Swedbank", serial_number_length: 10, checksum_for_clearing: true, zerofill: true },
@@ -1,5 +1,5 @@
1
1
  module BankTools
2
2
  module SE
3
- VERSION = "0.10.0"
3
+ VERSION = "0.11.0"
4
4
  end
5
5
  end
data/spec/account_spec.rb CHANGED
@@ -38,6 +38,7 @@ describe BankTools::SE::Account do
38
38
  "3783-0000000", # Nordea.
39
39
  "5000-0000000", # SEB.
40
40
  "6000-000000000", # Handelsbanken.
41
+ "6000-00000000", # Handelsbanken.
41
42
  "7000-0000000", # Swedbank.
42
43
  "8000-2-0000000000", # Swedbank/Sparbanker with clearing number checksum.
43
44
  "9020-0000000", # Länsförsäkringar Bank.
@@ -95,8 +96,8 @@ describe BankTools::SE::Account do
95
96
  end
96
97
 
97
98
  it "should include :bad_checksum for Nordea personkonto if the serial Luhn/mod 10 checksum is incorrect" do
98
- BankTools::SE::Utils.valid_luhn?("800928-6249").should be_true
99
- BankTools::SE::Utils.valid_luhn?("3300-800928-6249").should be_false
99
+ BankTools::SE::Utils.valid_luhn?("800928-6249").should eq(true)
100
+ BankTools::SE::Utils.valid_luhn?("3300-800928-6249").should eq(false)
100
101
  BankTools::SE::Account.new("3300-800928-6249").errors.should_not include(BankTools::SE::Errors::BAD_CHECKSUM)
101
102
  end
102
103
 
data/spec/utils_spec.rb CHANGED
@@ -19,7 +19,7 @@ describe BankTools::SE::Utils, "valid_luhn?" do
19
19
  "5402-9681",
20
20
  ].each do |number|
21
21
  it "should allow a valid number like #{number}" do
22
- BankTools::SE::Utils.valid_luhn?(number).should be_true
22
+ BankTools::SE::Utils.valid_luhn?(number).should eq(true)
23
23
  end
24
24
  end
25
25
 
@@ -29,7 +29,7 @@ describe BankTools::SE::Utils, "valid_luhn?" do
29
29
  "5402-9682",
30
30
  ].each do |number|
31
31
  it "should disallow an invalid number like #{number}" do
32
- BankTools::SE::Utils.valid_luhn?(number).should be_false
32
+ BankTools::SE::Utils.valid_luhn?(number).should eq(false)
33
33
  end
34
34
  end
35
35
 
metadata CHANGED
@@ -1,69 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: banktools-se
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Nyh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-20 00:00:00.000000000 Z
11
+ date: 2015-01-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
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: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: guard
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
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
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: guard-rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  description:
@@ -73,8 +73,8 @@ executables: []
73
73
  extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
- - .gitignore
77
- - .travis.yml
76
+ - ".gitignore"
77
+ - ".travis.yml"
78
78
  - Gemfile
79
79
  - README.markdown
80
80
  - Rakefile
@@ -102,17 +102,17 @@ require_paths:
102
102
  - lib
103
103
  required_ruby_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
- - - '>='
105
+ - - ">="
106
106
  - !ruby/object:Gem::Version
107
107
  version: '0'
108
108
  required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  requirements:
110
- - - '>='
110
+ - - ">="
111
111
  - !ruby/object:Gem::Version
112
112
  version: '0'
113
113
  requirements: []
114
114
  rubyforge_project: banktools-se
115
- rubygems_version: 2.2.0
115
+ rubygems_version: 2.2.2
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: Validate and normalize Swedish bank account numbers, plusgiro and bankgiro.