ibandit 1.0.0 → 1.0.1

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
  SHA256:
3
- metadata.gz: 13ca505f43dfd880ea0de62afe35c6b6a18c5036b523f7656b0cc36983af4a06
4
- data.tar.gz: 913d870c4c191e184189c3872bbbdef83abe3f5074670856ef8eb2d4166988cc
3
+ metadata.gz: 29a9fc0b51d3da97442a468761fa927eb8912028030752acd47537b46b7fe2e1
4
+ data.tar.gz: 012dd0332664e89b2e95e43b0ef4888b74b1c4be673da954a7a85e6564d20c59
5
5
  SHA512:
6
- metadata.gz: 429b3a3de4af3d7b1a7620e7be46594f354e963bfedda97fcfb87ee983d17ae3cf87bcd7ae3891080e90392917b7c33955c0442efe38ab7404fd09484e55d1e9
7
- data.tar.gz: ac9ff959b43a974efc436dbe809784e33c6e68c8065421b9a5a194b5bf24a5e64fd469cc79223c36d70f2f8bd43a12d8af82f3fe1ec0c2ff32ce9b5d02c4261b
6
+ metadata.gz: 39984a7f77d2cfd7b8033869eb16ff3b27ed1e173e63ff8d31dbd8cefadeb3ed96bc3ddaa5144e5fa313c74e5979e1ecad8b7b840c4e684cf889ae212678e3ef
7
+ data.tar.gz: 8ca397438ee9ad97bbe3d7dbc33a1ea2950b29895f62f951a55ee92e05d5fca0599d58614a4730fc24efba39b600a5de4bb9173971473defa6002c90bd09ddd0
@@ -6,24 +6,24 @@ AllCops:
6
6
  TargetRubyVersion: 2.4
7
7
 
8
8
  # Limit lines to 80 characters.
9
- LineLength:
9
+ Metrics/LineLength:
10
10
  Max: 80
11
11
 
12
- ClassLength:
12
+ Metrics/ClassLength:
13
13
  Max: 400
14
14
 
15
15
  # Avoid single-line methods.
16
- SingleLineMethods:
16
+ Style/SingleLineMethods:
17
17
  AllowIfMethodIsEmpty: true
18
18
 
19
19
  # Wants underscores in all large numbers. Pain in the ass for things like
20
20
  # unix timestamps.
21
- NumericLiterals:
21
+ Style/NumericLiterals:
22
22
  Enabled: false
23
23
 
24
24
  # Wants you to use the same argument names for every reduce. This seems kinda
25
25
  # naff compared to naming them semantically
26
- SingleLineBlockParams:
26
+ Style/SingleLineBlockParams:
27
27
  Enabled: false
28
28
 
29
29
  Style/SignalException:
@@ -7,7 +7,7 @@ rvm:
7
7
  - 2.4
8
8
  - 2.5
9
9
  - 2.6
10
-
10
+ - 2.7
11
11
 
12
12
  sudo: false
13
13
 
@@ -1,3 +1,7 @@
1
+ ## 1.0.1 - January 9, 2019
2
+
3
+ - Add Ruby 2.7 support and fix deprecation warnings
4
+
1
5
  ## 1.0.0 - October 24, 2019
2
6
 
3
7
  - Discontinued support for older Ruby versions (2.1.10, 2.2.7, 2.3.4 and 2.4.1)
data/Gemfile CHANGED
@@ -5,5 +5,5 @@ source 'https://rubygems.org'
5
5
  gemspec
6
6
 
7
7
  group :development do
8
- gem "gc_ruboconfig"
8
+ gem 'gc_ruboconfig', "~> 2.5.0"
9
9
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
8
8
  gem.add_development_dependency "pry-nav", "~> 0.2"
9
9
  gem.add_development_dependency "rspec", "~> 3.3"
10
10
  gem.add_development_dependency "rspec-its", "~> 1.2"
11
- gem.add_development_dependency "rubocop", "~> 0.70.0"
11
+ gem.add_development_dependency "rubocop", "~> 0.75.1"
12
12
  gem.add_development_dependency "sax-machine", "~> 1.3"
13
13
 
14
14
  gem.add_runtime_dependency "i18n"
@@ -36,7 +36,7 @@ module Ibandit
36
36
  end
37
37
 
38
38
  def translate(key, options = {})
39
- I18n.translate(key, { scope: [:ibandit] }.merge(options))
39
+ I18n.translate(key, scope: [:ibandit], **options)
40
40
  end
41
41
  end
42
42
  end
@@ -23,7 +23,7 @@ module Ibandit
23
23
  end
24
24
  end
25
25
  remainder = digits.join.to_i % 97
26
- sprintf("%02d", 98 - remainder)
26
+ sprintf("%<check_digit>02d", check_digit: 98 - remainder)
27
27
  end
28
28
 
29
29
  def self.italian(string)
@@ -517,7 +517,7 @@ module Ibandit
517
517
  updated_account_number =
518
518
  case unpadded_account_number.size
519
519
  when 5, 6 then unpadded_account_number + "00"
520
- when 7 then
520
+ when 7
521
521
  if Check63.new(unpadded_account_number + "00").valid?
522
522
  unpadded_account_number + "00"
523
523
  else
@@ -460,12 +460,12 @@ module Ibandit
460
460
  @swift_branch_code = try_dup(local_details[:swift_branch_code])
461
461
  @swift_bank_code = try_dup(local_details[:swift_bank_code])
462
462
 
463
- @iban = IBANAssembler.assemble(swift_details)
463
+ @iban = IBANAssembler.assemble(swift_details)
464
464
 
465
465
  if source == :pseudo_iban
466
- @check_digits = try_dup(local_details[:check_digits])
466
+ @check_digits = try_dup(local_details[:check_digits])
467
467
  else
468
- @check_digits = @iban.slice(2, 2) unless @iban.nil?
468
+ @check_digits = @iban.slice(2, 2) unless @iban.nil?
469
469
  end
470
470
  end
471
471
 
@@ -198,7 +198,7 @@ module Ibandit
198
198
  bank_code, account_number = local_details[:account_number].split("-", 2)
199
199
  elsif local_details[:account_number].gsub(/\s/, "").length == 14
200
200
  cleaned_account_number = local_details[:account_number].gsub(/\s/, "")
201
- bank_code = cleaned_account_number.slice(0, 4)
201
+ bank_code = cleaned_account_number.slice(0, 4)
202
202
  account_number = cleaned_account_number.slice(4, 10)
203
203
  else
204
204
  return {}
@@ -573,7 +573,7 @@ module Ibandit
573
573
  ken_1 = parts[2].nil? ? "" : parts[2].rjust(6, "0")
574
574
  ken_2 = parts[3].nil? ? "" : parts[3].rjust(4, "0")
575
575
 
576
- kennitala = ken_1.empty? ? "" : (ken_1 + ken_2).rjust(10, "0")
576
+ kennitala = ken_1.empty? ? "" : (ken_1 + ken_2).rjust(10, "0")
577
577
 
578
578
  hufo + reikningsnumer + kennitala
579
579
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ibandit
4
- VERSION = "1.0.0"
4
+ VERSION = "1.0.1"
5
5
  end
@@ -3,7 +3,7 @@
3
3
  require "spec_helper"
4
4
 
5
5
  describe Ibandit::PseudoIBANAssembler do
6
- subject(:pseudo_iban) { described_class.new(local_details).assemble }
6
+ subject(:pseudo_iban) { described_class.new(**local_details).assemble }
7
7
 
8
8
  context "for Sweden" do
9
9
  context "with valid parameters" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ibandit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-24 00:00:00.000000000 Z
11
+ date: 2020-01-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.70.0
89
+ version: 0.75.1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.70.0
96
+ version: 0.75.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sax-machine
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -209,7 +209,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
209
209
  - !ruby/object:Gem::Version
210
210
  version: '0'
211
211
  requirements: []
212
- rubygems_version: 3.0.2
212
+ rubygems_version: 3.1.2
213
213
  signing_key:
214
214
  specification_version: 4
215
215
  summary: Convert national banking details into IBANs, and vice-versa.