ibandit 1.13.0 → 1.15.0
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 +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +9 -0
- data/bin/build_structure_file.rb +221 -114
- data/config/locales/da.yml +7 -0
- data/config/locales/de.yml +7 -0
- data/config/locales/en.yml +7 -0
- data/config/locales/es.yml +7 -0
- data/config/locales/fr.yml +7 -0
- data/config/locales/it.yml +9 -1
- data/config/locales/nb.yml +7 -0
- data/config/locales/nl.yml +7 -0
- data/config/locales/pt.yml +7 -0
- data/config/locales/sl.yml +7 -0
- data/config/locales/sv.yml +7 -0
- data/data/raw/IBANSTRUCTURE.xml +1134 -292
- data/data/raw/IBAN_Registry.txt +51 -48
- data/data/raw/pseudo_ibans.yml +52 -0
- data/data/raw/structure_additions.yml +29 -1
- data/data/structures.yml +524 -25
- data/lib/ibandit/constants.rb +5 -1
- data/lib/ibandit/iban.rb +13 -13
- data/lib/ibandit/iban_assembler.rb +1 -1
- data/lib/ibandit/local_details_cleaner.rb +7 -7
- data/lib/ibandit/sweden/local_details_converter.rb +1 -1
- data/lib/ibandit/version.rb +1 -1
- data/lib/ibandit.rb +1 -1
- data/spec/ibandit/iban_assembler_spec.rb +48 -0
- data/spec/ibandit/iban_spec.rb +375 -2212
- data/spec/spec_helper.rb +6 -44
- metadata +4 -3
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -7,52 +7,14 @@ require "json" | |
| 7 7 | 
             
            RSpec.configure do |config|
         | 
| 8 8 | 
             
              config.mock_with(:rspec) { |mocks| mocks.verify_partial_doubles = true }
         | 
| 9 9 | 
             
              config.raise_errors_for_deprecations!
         | 
| 10 | 
            -
            end
         | 
| 11 | 
            -
             | 
| 12 | 
            -
            def json_fixture(filename)
         | 
| 13 | 
            -
              JSON.parse(File.read("spec/fixtures/#{filename}.json"))
         | 
| 14 | 
            -
            end
         | 
| 15 | 
            -
             | 
| 16 | 
            -
            RSpec.shared_context "locale en", locale: :en do
         | 
| 17 | 
            -
              around { |example| I18n.with_locale(:en) { example.run } }
         | 
| 18 | 
            -
            end
         | 
| 19 | 
            -
             | 
| 20 | 
            -
            RSpec.shared_context "locale fr", locale: :fr do
         | 
| 21 | 
            -
              around { |example| I18n.with_locale(:fr) { example.run } }
         | 
| 22 | 
            -
            end
         | 
| 23 | 
            -
             | 
| 24 | 
            -
            RSpec.shared_context "locale de", locale: :de do
         | 
| 25 | 
            -
              around { |example| I18n.with_locale(:de) { example.run } }
         | 
| 26 | 
            -
            end
         | 
| 27 | 
            -
             | 
| 28 | 
            -
            RSpec.shared_context "locale pt", locale: :pt do
         | 
| 29 | 
            -
              around { |example| I18n.with_locale(:pt) { example.run } }
         | 
| 30 | 
            -
            end
         | 
| 31 | 
            -
             | 
| 32 | 
            -
            RSpec.shared_context "locale es", locale: :es do
         | 
| 33 | 
            -
              around { |example| I18n.with_locale(:es) { example.run } }
         | 
| 34 | 
            -
            end
         | 
| 35 | 
            -
             | 
| 36 | 
            -
            RSpec.shared_context "locale it", locale: :it do
         | 
| 37 | 
            -
              around { |example| I18n.with_locale(:it) { example.run } }
         | 
| 38 | 
            -
            end
         | 
| 39 | 
            -
             | 
| 40 | 
            -
            RSpec.shared_context "locale nl", locale: :nl do
         | 
| 41 | 
            -
              around { |example| I18n.with_locale(:nl) { example.run } }
         | 
| 42 | 
            -
            end
         | 
| 43 | 
            -
             | 
| 44 | 
            -
            RSpec.shared_context "locale nb", locale: :nb do
         | 
| 45 | 
            -
              around { |example| I18n.with_locale(:nb) { example.run } }
         | 
| 46 | 
            -
            end
         | 
| 47 10 |  | 
| 48 | 
            -
             | 
| 49 | 
            -
             | 
| 50 | 
            -
            end
         | 
| 11 | 
            +
              config.around do |example|
         | 
| 12 | 
            +
                locale = example.metadata.fetch(:locale, :en)
         | 
| 51 13 |  | 
| 52 | 
            -
             | 
| 53 | 
            -
               | 
| 14 | 
            +
                I18n.with_locale(locale) { example.run }
         | 
| 15 | 
            +
              end
         | 
| 54 16 | 
             
            end
         | 
| 55 17 |  | 
| 56 | 
            -
             | 
| 57 | 
            -
               | 
| 18 | 
            +
            def json_fixture(filename)
         | 
| 19 | 
            +
              JSON.parse(File.read("spec/fixtures/#{filename}.json"))
         | 
| 58 20 | 
             
            end
         | 
    
        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. | 
| 4 | 
            +
              version: 1.15.0
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - GoCardless
         | 
| 8 8 | 
             
            autorequire:
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2023-03- | 
| 11 | 
            +
            date: 2023-03-29 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: gc_ruboconfig
         | 
| @@ -174,6 +174,7 @@ files: | |
| 174 174 | 
             
            - data/raw/BLZ2.txt
         | 
| 175 175 | 
             
            - data/raw/IBANSTRUCTURE.xml
         | 
| 176 176 | 
             
            - data/raw/IBAN_Registry.txt
         | 
| 177 | 
            +
            - data/raw/pseudo_ibans.yml
         | 
| 177 178 | 
             
            - data/raw/structure_additions.yml
         | 
| 178 179 | 
             
            - data/raw/swedish_bank_lookup.yml
         | 
| 179 180 | 
             
            - data/structures.yml
         | 
| @@ -227,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement | |
| 227 228 | 
             
                - !ruby/object:Gem::Version
         | 
| 228 229 | 
             
                  version: '0'
         | 
| 229 230 | 
             
            requirements: []
         | 
| 230 | 
            -
            rubygems_version: 3. | 
| 231 | 
            +
            rubygems_version: 3.1.6
         | 
| 231 232 | 
             
            signing_key:
         | 
| 232 233 | 
             
            specification_version: 4
         | 
| 233 234 | 
             
            summary: Convert national banking details into IBANs, and vice-versa.
         |