paygate-ruby 0.2.1 → 0.2.2

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: 867c69bb85ba649dad9ea824991ca04590144909b2a6a6ee0fc084ff5ba72ba8
4
- data.tar.gz: 85c7e574a2dcd7dc3adb2e9e111628eec9c199cf45727aebec9b48ebf6217f62
3
+ metadata.gz: b39137d4e1ac524c5a7a97e89c0619d70bf55a77ac236f0e5d3b07bc7a8628c4
4
+ data.tar.gz: 811eeec4c2cde838b821e45316bb18709426414315b51cc1b2c322594257bac0
5
5
  SHA512:
6
- metadata.gz: c889a068601299a78a9c20d2eeccb96c397ad4acde7d396f5c0d6412f69526ac3b9a4abe62c8dfaea2053b92a878dcde81b7ca2b2c9cd17c42ed8c3c85bbbcb7
7
- data.tar.gz: ef08826c863b4f9bbef90fc9020193ee200457f7675b2734d3482c1c689ed43e0fba82eeb70592155a087cb4520c2330024dd065bd1db1972ccd7d151defcf88
6
+ metadata.gz: 485d2199abb2a2bb5dd216e4b150c9f6a38e94de806465f8876bdb5f73086b9f85748f779479ffb3ab0d7f5a3eedc6a86c8884e7da8b4356293886d6e1c06723
7
+ data.tar.gz: 4c9620b441fed34e1fe9d9989c2c73477f2b2a12179467d5e98f1422fe12c256e96c9f2790cb8cf0db40a71f6348ea534ed06d2952932ab7fcb0fd43ee949d48
data/CHANGELOG.md CHANGED
@@ -2,13 +2,18 @@
2
2
 
3
3
  ## Next
4
4
 
5
+ ## 0.2.2 - 2023-04-26
6
+
7
+ - [PR#12](https://github.com/tablecheck/paygate-ruby/pull/12) Re-add Rails Engine (was dropped in version 0.2.0) ([johnnyshields](https://github.com/johnnyshields))
8
+ - [PR#12](https://github.com/tablecheck/paygate-ruby/pull/12) Rename Paygate::ActionView::FormHelper to Paygate::Rails::FormHelper. ([johnnyshields](https://github.com/johnnyshields))
9
+
5
10
  ## 0.2.1 - 2023-04-26
6
11
 
7
12
  - [PR#11](https://github.com/tablecheck/paygate-ruby/pull/11) Deep freeze constants. ([johnnyshields](https://github.com/johnnyshields))
8
13
 
9
14
  ## 0.2.0 - 2023-04-26
10
15
 
11
- - [PR#9](https://github.com/tablecheck/paygate-ruby/pull/9) Rename Paygate::FormHelper to Paygate::Rails::FormHelper. ([johnnyshields](https://github.com/johnnyshields))
16
+ - [PR#9](https://github.com/tablecheck/paygate-ruby/pull/9) Rename Paygate::FormHelper to Paygate::ActionView::FormHelper. ([johnnyshields](https://github.com/johnnyshields))
12
17
  - [PR#9](https://github.com/tablecheck/paygate-ruby/pull/9) Do not include Paygate::FormHelper in ActionView::Base. ([johnnyshields](https://github.com/johnnyshields))
13
18
  - [PR#9](https://github.com/tablecheck/paygate-ruby/pull/9) Update BIN list. Note BINs can now be a flexible number of digits. ([johnnyshields](https://github.com/johnnyshields))
14
19
  - [PR#9](https://github.com/tablecheck/paygate-ruby/pull/9) Rename data config YAML keys. ([johnnyshields](https://github.com/johnnyshields))
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Paygate
4
+ module Rails
5
+ class Engine < ::Rails::Engine
6
+ end
7
+ end
8
+ end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paygate
4
- module ActionView
4
+ module Rails
5
5
  module FormHelper
6
- PAYGATE_FORM_TEXT_FIELDS = {
6
+ (PAYGATE_FORM_TEXT_FIELDS = {
7
7
  mid: {
8
8
  placeholder: 'Member ID'
9
9
  },
@@ -117,13 +117,13 @@ module Paygate
117
117
 
118
118
  profile_no: {
119
119
  placeholder: 'Profile No'
120
- },
120
+ }.freeze,
121
121
 
122
122
  hash_result: {
123
123
  name: 'hashresult',
124
124
  placeholder: 'Hash Result'
125
125
  }
126
- }.freeze
126
+ }.freeze).each_value(&:freeze)
127
127
 
128
128
  def paygate_open_pay_api_js_url
129
129
  if Paygate.configuration.mode == :live
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Paygate
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.2'
5
5
  end
data/lib/paygate.rb CHANGED
@@ -9,19 +9,20 @@ require 'paygate/member'
9
9
  require 'paygate/response'
10
10
  require 'paygate/transaction'
11
11
  require 'paygate/profile'
12
- require 'paygate/action_view/form_helper' if defined?(ActionView)
12
+
13
+ if defined?(Rails)
14
+ require 'paygate/rails/engine'
15
+ require 'paygate/rails/form_helper'
16
+ end
13
17
 
14
18
  module Paygate
15
19
  extend self
16
20
 
17
21
  CONFIG = YAML.safe_load(File.read(File.expand_path('../data/config.yml', __dir__)),
18
22
  permitted_classes: [Symbol]).freeze
19
- LOCALES_MAP = CONFIG[:locales].freeze
20
- LOCALES_MAP.each { |k, v| k.freeze; v.freeze } # rubocop:disable Style/Semicolon
21
- INTL_BRANDS_MAP = CONFIG[:intl_brands].freeze
22
- INTL_BRANDS_MAP.each_value(&:freeze)
23
- KOREA_BIN_NUMBERS = CONFIG[:korea_bin_numbers].freeze
24
- KOREA_BIN_NUMBERS.each(&:freeze)
23
+ (LOCALES_MAP = CONFIG[:locales].freeze).each { |k, v| k.freeze; v.freeze } # rubocop:disable Style/Semicolon
24
+ (INTL_BRANDS_MAP = CONFIG[:intl_brands].freeze).each_value(&:freeze)
25
+ (KOREA_BIN_NUMBERS = CONFIG[:korea_bin_numbers].freeze).each(&:freeze)
25
26
  DEFAULT_CURRENCY = 'WON'
26
27
  DEFAULT_LOCALE = 'US'
27
28
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paygate-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - jagdeepsingh
@@ -25,12 +25,13 @@ files:
25
25
  - data/config.yml
26
26
  - lib/paygate-ruby.rb
27
27
  - lib/paygate.rb
28
- - lib/paygate/action_view/form_helper.rb
29
28
  - lib/paygate/aes.rb
30
29
  - lib/paygate/aes_ctr.rb
31
30
  - lib/paygate/configuration.rb
32
31
  - lib/paygate/member.rb
33
32
  - lib/paygate/profile.rb
33
+ - lib/paygate/rails/engine.rb
34
+ - lib/paygate/rails/form_helper.rb
34
35
  - lib/paygate/response.rb
35
36
  - lib/paygate/transaction.rb
36
37
  - lib/paygate/version.rb