Skip to content

Commit

Permalink
Deep-freeze constants (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields authored Apr 26, 2023
1 parent 54b8a59 commit 6cc274c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
3 changes: 3 additions & 0 deletions lib/paygate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion lib/paygate/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Paygate
VERSION = '0.2.0'
VERSION = '0.2.1'
end

0 comments on commit 6cc274c

Please sign in to comment.