From 6cc274c29fdc09decad287bf739172fb4b0e0210 Mon Sep 17 00:00:00 2001 From: Johnny Shields Date: Wed, 26 Apr 2023 18:24:57 +0900 Subject: [PATCH] Deep-freeze constants (#10) --- CHANGELOG.md | 4 ++++ lib/paygate.rb | 3 +++ lib/paygate/version.rb | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7722067..17fdf05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Next +## 0.2.1 - 2023-04-26 + +- [PR#11](https://github.com/tablecheck/paygate-ruby/pull/11) Deep freeze constants. ([johnnyshields](https://github.com/johnnyshields)) + ## 0.2.0 - 2023-04-26 - [PR#9](https://github.com/tablecheck/paygate-ruby/pull/9) Rename Paygate::FormHelper to Paygate::Rails::FormHelper. ([johnnyshields](https://github.com/johnnyshields)) diff --git a/lib/paygate.rb b/lib/paygate.rb index 13a1038..410b191 100644 --- a/lib/paygate.rb +++ b/lib/paygate.rb @@ -17,8 +17,11 @@ module Paygate CONFIG = YAML.safe_load(File.read(File.expand_path('../data/config.yml', __dir__)), permitted_classes: [Symbol]).freeze LOCALES_MAP = CONFIG[:locales].freeze + LOCALES_MAP.each { |k, v| k.freeze; v.freeze } # rubocop:disable Style/Semicolon INTL_BRANDS_MAP = CONFIG[:intl_brands].freeze + INTL_BRANDS_MAP.each_value(&:freeze) KOREA_BIN_NUMBERS = CONFIG[:korea_bin_numbers].freeze + KOREA_BIN_NUMBERS.each(&:freeze) DEFAULT_CURRENCY = 'WON' DEFAULT_LOCALE = 'US' diff --git a/lib/paygate/version.rb b/lib/paygate/version.rb index 814b10d..763e48c 100644 --- a/lib/paygate/version.rb +++ b/lib/paygate/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Paygate - VERSION = '0.2.0' + VERSION = '0.2.1' end