spree_bank_transfer_payment 2.0.0 → 2.0.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ffc24fd7ef86c955818874c4f67749867b46de8fa7681ec8eb705bdab512252
4
- data.tar.gz: 45a64b39fd76f4e19a5deff89c3bbecbf2ae69e49a66a4c1938888701efd6bc7
3
+ metadata.gz: 40b56758e3c77c11557ebde92965b1af4aa6317794cdd8ae860046a745e8f870
4
+ data.tar.gz: 9792cddda02b8aada528154c0d3cc6d3104d2f6c0981689b13e79ba77fcb5e98
5
5
  SHA512:
6
- metadata.gz: 5f1b9caddf429021d8f4bb1d85f6dcab4aab9614040b821f2bd722e62479beb3327b757182cfaa13675af87f5b6e11ddfff5a10f2e73368feac87ba02fd8e8f1
7
- data.tar.gz: 56406587023a79394f97c5d4665629f625d97f7381944392018305476ea552bbf0a0ef6784032752afcac3505f9d249ca75d45b3244ff7f95db395d6784198af
6
+ metadata.gz: 9e7832f5c542a4312517baa9cce41a3127571d9be80c76d01930c42466cc2f4f1e8d3e7b62143cfa4ab8e54bed34150845a0a9fd9aa346c5a3cfe70ee02e3aee
7
+ data.tar.gz: ac0ca9d53d001762c6dd07342be4330cdc3ce74358ed9c1daedaf8a58c5ca0b16e3f027e11682622b43190e70936e4716970a6e96cb649bf27c95f08fc0800be
data/LICENSE.md CHANGED
@@ -1,8 +1,21 @@
1
1
  # MIT License
2
2
 
3
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
3
+ Copyright (c) 2025 OlympusOne
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
4
11
 
5
12
  The above copyright notice and this permission notice shall be included in all
6
13
  copies or substantial portions of the Software.
7
14
 
8
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,9 @@
1
+ module Spree
2
+ module PaymentMethodDecorator
3
+ def bank_transfer?
4
+ method_type == 'bank_transfer'
5
+ end
6
+ end
7
+ end
8
+
9
+ Spree::PaymentMethod.prepend Spree::PaymentMethodDecorator
@@ -0,0 +1,5 @@
1
+ Rails.application.config.after_initialize do
2
+ Rails.application.config.spree.payment_methods << Spree::PaymentMethod::BankTransfer
3
+
4
+ Spree::PermittedAttributes.payment_method_attributes << :instructions
5
+ end
@@ -9,12 +9,6 @@ module SpreeBankTransferPayment
9
9
  g.test_framework :rspec
10
10
  end
11
11
 
12
- config.after_initialize do |app|
13
- app.config.spree.payment_methods << Spree::PaymentMethod::BankTransfer
14
-
15
- Spree::PermittedAttributes.payment_method_attributes << :instructions
16
- end
17
-
18
12
  def self.activate
19
13
  Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/*_decorator*.rb')) do |c|
20
14
  Rails.configuration.cache_classes ? require(c) : load(c)
@@ -1,5 +1,5 @@
1
1
  module SpreeBankTransferPayment
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.0.2'.freeze
3
3
 
4
4
  def gem_version
5
5
  Gem::Version.new(VERSION)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_bank_transfer_payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - OlympusOne
@@ -89,12 +89,14 @@ files:
89
89
  - README.md
90
90
  - Rakefile
91
91
  - app/models/spree/payment_method/bank_transfer.rb
92
+ - app/models/spree/payment_method_decorator.rb
92
93
  - app/views/spree/admin/payment_methods/_bank_transfer.html.erb
93
94
  - app/views/spree/admin/payment_methods/custom_form_fields/_bank_transfer_instructions.html.erb
94
95
  - app/views/spree/admin/payment_methods/descriptions/_bank_transfer.html.erb
95
96
  - app/views/spree/admin/payments/source_views/_bank_transfer.html.erb
96
97
  - app/views/spree/admin/spree/checkout/payment/_bank_transfer.html.erb
97
98
  - app/views/spree/checkout/payment/_bank_transfer.html.erb
99
+ - config/initializers/spree.rb
98
100
  - config/locales/el.yml
99
101
  - config/locales/en.yml
100
102
  - config/routes.rb
@@ -109,10 +111,10 @@ licenses:
109
111
  - MIT
110
112
  metadata:
111
113
  bug_tracker_uri: https://github.com/olympusone/spree_bank_transfer_payment/issues
112
- changelog_uri: https://github.com/olympusone/spree_bank_transfer_payment/releases/tag/v2.0.0
114
+ changelog_uri: https://github.com/olympusone/spree_bank_transfer_payment/releases/tag/v2.0.2
113
115
  documentation_uri: https://github.com/olympusone/spree_bank_transfer_payment
114
116
  homepage_uri: https://github.com/olympusone/spree_bank_transfer_payment
115
- source_code_uri: https://github.com/olympusone/spree_bank_transfer_payment/tree/v2.0.0
117
+ source_code_uri: https://github.com/olympusone/spree_bank_transfer_payment/tree/v2.0.2
116
118
  rdoc_options: []
117
119
  require_paths:
118
120
  - lib