diff --git a/.circleci/config.yml b/.circleci/config.yml index 8a55162..c1806c0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,4 +34,4 @@ workflows: name: Ruby << matrix.ruby-version >> matrix: parameters: - ruby-version: ["2.5.9", "2.6.7", "2.7.3", "3.0.1"] + ruby-version: ["2.6.7", "2.7.3", "3.0.1", "3.1.0"] diff --git a/.ruby-version b/.ruby-version index cb2b00e..fd2a018 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.1 +3.1.0 diff --git a/CHANGELOG.md b/CHANGELOG.md index 652d8e1..bc5d2eb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,12 @@ +## 1.8.0 - January 7, 2022 + +- Add Ruby 3.1 support +- Remove Ruby 2.5 support + ## 1.7.1 - November 25, 2021 - Update BLZ data - BLZ_20211206 - + ## 1.7.0 - Sept 8, 2021 - Stop padding out Australian account details to 10 digits diff --git a/bin/build_structure_file.rb b/bin/build_structure_file.rb index a430c48..406c774 100755 --- a/bin/build_structure_file.rb +++ b/bin/build_structure_file.rb @@ -153,8 +153,9 @@ def merge_structures(structures, additions) iban_registry_file, ) - structure_additions = YAML.load_file( - File.expand_path("../data/raw/structure_additions.yml", __dir__), + structure_additions = YAML.safe_load( + Pathname.new(__dir__).join("../data/raw/structure_additions.yml").read, + permitted_classes: [Range, Symbol], ) complete_structures = merge_structures(iban_structures, structure_additions) diff --git a/lib/ibandit.rb b/lib/ibandit.rb index d987947..5d155d1 100644 --- a/lib/ibandit.rb +++ b/lib/ibandit.rb @@ -30,8 +30,9 @@ def find_bic(country_code, national_id) end def structures - @structures ||= YAML.load_file( - File.expand_path("../data/structures.yml", __dir__), + @structures ||= YAML.safe_load( + Pathname.new(__dir__).join("../data/structures.yml").read, + permitted_classes: [Range, Symbol], ) end diff --git a/lib/ibandit/version.rb b/lib/ibandit/version.rb index 0f5623d..96428e0 100644 --- a/lib/ibandit/version.rb +++ b/lib/ibandit/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Ibandit - VERSION = "1.7.1" + VERSION = "1.8.0" end diff --git a/spec/ibandit/structure_spec.rb b/spec/ibandit/structure_spec.rb index 530792d..c15373e 100755 --- a/spec/ibandit/structure_spec.rb +++ b/spec/ibandit/structure_spec.rb @@ -3,8 +3,8 @@ require "spec_helper" describe "structures.yml" do - structure_file = File.expand_path("../../data/structures.yml", __dir__) - structures = YAML.load_file(structure_file) + structure_file = Pathname.new(__dir__).join("../../data/structures.yml").read + structures = YAML.safe_load(structure_file, permitted_classes: [Range, Symbol]) structures.each do |country, rules| context country do