spree_cod_payment 2.0.2 → 2.1.0

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: 39ecf0af456a36d46a4b40b58c816cdccfcae92163a2c124c112df914b6b9911
4
- data.tar.gz: 7966157fcf2cb703dda249680996a8788f39d1bbdd608395b18953be97335f6e
3
+ metadata.gz: 9c1277b2df92b7f63f0d6aab54086e80e6670740f6b2901d43d510e2e4637cfd
4
+ data.tar.gz: 4e931b7b9eb550a7599b928abfbd3c41596e1e7e5fe51db21cc688e0fc1490bc
5
5
  SHA512:
6
- metadata.gz: bf8a61dcd4ff396d30dcc8877acc70e9f1105f5b87be01e08e1b7bb33207bf561a80151aaa0bb061f7b6fec8d21fea71716777665f13e60963d8bc6b20e2934d
7
- data.tar.gz: c6cb0dccdca0e90d0c24d7a57607e4264742383f42d16633d764f45f9e99f71ee546fd96164c25cb64ec76f4743e8254d7c7bf850468033599584243dbd9dfcd
6
+ metadata.gz: b1f7ff02f78eda8d44ca3f1af0bec2c645699c51923eb1f66a12f2bf74117dfe625fa2c2a67a6d84ccc8d95bf1cd2e5fdb891a5c1f1e81ebb4629f17c814a213
7
+ data.tar.gz: 8e9673e05a8d91755c10cf534894093a9c808ef4edb8e6ef4246b9ae293b0b9a343441c9ca799566344c4524a9a1f8cb441d210e95685a2ec2c2971d1e82ba7d
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.
data/README.md CHANGED
@@ -66,4 +66,4 @@ If you'd like to contribute, please take a look at the
66
66
  [instructions](CONTRIBUTING.md) for installing dependencies and crafting a good
67
67
  pull request.
68
68
 
69
- Copyright (c) 2025 OlympusOne, released under the New BSD License
69
+ Copyright (c) 2025 OlympusOne, released under the MIT
@@ -1,14 +1,12 @@
1
1
  module Spree
2
2
  module PaymentMethodDecorator
3
- def available_for_order?(order)
4
- return cod_payment? && super if order.shipping_method&.cod?
5
-
6
- !cod_payment? && super
7
- end
8
-
9
3
  def cod_payment?
10
4
  method_type == 'cod_payment'
11
5
  end
6
+
7
+ def cod_payment_available?(order)
8
+ order.shipping_method&.cod?
9
+ end
12
10
  end
13
11
  end
14
12
 
@@ -1,5 +1,5 @@
1
1
  module SpreeCodPayment
2
- VERSION = '2.0.2'.freeze
2
+ VERSION = '2.1.0'.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_cod_payment
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OlympusOne
@@ -110,10 +110,10 @@ licenses:
110
110
  - MIT
111
111
  metadata:
112
112
  bug_tracker_uri: https://github.com/olympusone/spree_cod_payment/issues
113
- changelog_uri: https://github.com/olympusone/spree_cod_payment/releases/tag/v2.0.2
113
+ changelog_uri: https://github.com/olympusone/spree_cod_payment/releases/tag/v2.1.0
114
114
  documentation_uri: https://github.com/olympusone/spree_cod_payment
115
115
  homepage_uri: https://github.com/olympusone/spree_cod_payment
116
- source_code_uri: https://github.com/olympusone/spree_cod_payment/tree/v2.0.2
116
+ source_code_uri: https://github.com/olympusone/spree_cod_payment/tree/v2.1.0
117
117
  rdoc_options: []
118
118
  require_paths:
119
119
  - lib