solidus_braintree 3.2.0 → 3.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +6 -7
- data/7.2 +0 -0
- data/Gemfile +1 -4
- data/app/models/solidus_braintree/base_record.rb +11 -0
- data/app/models/solidus_braintree/configuration.rb +1 -1
- data/app/models/solidus_braintree/customer.rb +1 -1
- data/app/models/solidus_braintree/gateway.rb +0 -1
- data/app/models/solidus_braintree/source.rb +4 -2
- data/bin/dummy-app +2 -1
- data/lib/solidus_braintree/version.rb +1 -1
- data/lib/solidus_braintree.rb +1 -3
- metadata +6 -8
- data/app/models/application_record.rb +0 -5
- /data/{app/decorators/controllers → lib/controllers/api}/solidus_braintree/client_tokens_controller.rb +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c477c4fb737d9baee566d1ab8b32a9c7392568ff6eeb50626fc6051a207a8bd
|
4
|
+
data.tar.gz: 571f9fcea4d239cba51c81df5f8b4ce311041531a1f1224d38f0958cdce662f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34832b18ee08aa908a519c85c3c4e5d1b2593a540503791105f7a49f23599d851aa58544795e8ae5e5e30c2e2feddc1e7762c9d0e7ee80a6ca682ec3848d66e0
|
7
|
+
data.tar.gz: '085b9c9baad9f06b98239ecaf625fdfe6b32aa025ebd58d5672d06a0202934416262f89675fdea4e9e1c6f0ac321872446e8cecb8e87cca0c4da609b2c7a0dae'
|
data/.circleci/config.yml
CHANGED
@@ -24,37 +24,36 @@ commands:
|
|
24
24
|
command: |
|
25
25
|
export FRONTEND=starter
|
26
26
|
sudo gem update --system
|
27
|
-
gem install bundler rails
|
28
|
-
|
29
|
-
bin/rspec
|
27
|
+
gem install bundler rails:'~>7.2'
|
28
|
+
bundle exec rake
|
30
29
|
- solidusio_extensions/store-test-results
|
31
30
|
|
32
31
|
jobs:
|
33
32
|
run-specs-with-postgres:
|
34
33
|
executor:
|
35
34
|
name: solidusio_extensions/postgres
|
36
|
-
ruby_version:
|
35
|
+
ruby_version: "3.2"
|
37
36
|
steps:
|
38
37
|
- test-with-starter-frontend
|
39
38
|
|
40
39
|
run-specs-with-mysql:
|
41
40
|
executor:
|
42
41
|
name: solidusio_extensions/mysql
|
43
|
-
ruby_version:
|
42
|
+
ruby_version: "3.1"
|
44
43
|
steps:
|
45
44
|
- test-with-starter-frontend
|
46
45
|
|
47
46
|
run-specs-with-sqlite:
|
48
47
|
executor:
|
49
48
|
name: solidusio_extensions/sqlite
|
50
|
-
ruby_version:
|
49
|
+
ruby_version: "3.1"
|
51
50
|
steps:
|
52
51
|
- test-with-starter-frontend
|
53
52
|
|
54
53
|
lint-code:
|
55
54
|
executor:
|
56
55
|
name: solidusio_extensions/sqlite-memory
|
57
|
-
ruby_version:
|
56
|
+
ruby_version: "3.1"
|
58
57
|
steps:
|
59
58
|
- solidusio_extensions/lint-code
|
60
59
|
|
data/7.2
ADDED
File without changes
|
data/Gemfile
CHANGED
@@ -6,10 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
|
6
6
|
branch = ENV.fetch('SOLIDUS_BRANCH', 'main')
|
7
7
|
gem 'solidus', github: 'solidusio/solidus', branch: branch
|
8
8
|
|
9
|
-
|
10
|
-
# otherwise it takes forever to resolve them.
|
11
|
-
# See https://github.com/bundler/bundler/issues/6677
|
12
|
-
gem 'rails', '>0.a'
|
9
|
+
gem 'rails', ENV.fetch('RAILS_VERSION', '~> 7.0')
|
13
10
|
|
14
11
|
# Provides basic authentication functionality for testing parts of your engine
|
15
12
|
gem 'solidus_auth_devise'
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module SolidusBraintree
|
4
|
-
class Configuration <
|
4
|
+
class Configuration < BaseRecord
|
5
5
|
PAYPAL_BUTTON_PREFERENCES = {
|
6
6
|
color: { availables: %w[gold blue silver white black], default: 'white' },
|
7
7
|
shape: { availables: %w[pill rect], default: 'rect' },
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module SolidusBraintree
|
4
|
-
class Customer <
|
4
|
+
class Customer < BaseRecord
|
5
5
|
belongs_to :user, class_name: ::Spree::UserClassHandle.new, optional: true
|
6
6
|
has_many :sources, class_name: "SolidusBraintree::Source", inverse_of: :customer, dependent: :destroy
|
7
7
|
end
|
@@ -6,16 +6,18 @@ module SolidusBraintree
|
|
6
6
|
class Source < ::Spree::PaymentSource
|
7
7
|
include RequestProtection
|
8
8
|
|
9
|
+
self.table_name = "solidus_paypal_braintree_sources"
|
10
|
+
|
9
11
|
PAYPAL = "PayPalAccount"
|
10
12
|
APPLE_PAY = "ApplePayCard"
|
11
13
|
VENMO = "VenmoAccount"
|
12
14
|
CREDIT_CARD = "CreditCard"
|
13
15
|
|
14
|
-
enum paypal_funding_source
|
16
|
+
enum :paypal_funding_source, {
|
15
17
|
applepay: 0, bancontact: 1, blik: 2, boleto: 3, card: 4, credit: 5, eps: 6, giropay: 7, ideal: 8,
|
16
18
|
itau: 9, maxima: 10, mercadopago: 11, mybank: 12, oxxo: 13, p24: 14, paylater: 15, paypal: 16, payu: 17,
|
17
19
|
sepa: 18, sofort: 19, trustly: 20, venmo: 21, verkkopankki: 22, wechatpay: 23, zimpler: 24
|
18
|
-
},
|
20
|
+
}, suffix: :funding
|
19
21
|
|
20
22
|
belongs_to :user, class_name: ::Spree::UserClassHandle.new, optional: true
|
21
23
|
belongs_to :payment_method, class_name: 'Spree::PaymentMethod'
|
data/bin/dummy-app
CHANGED
@@ -14,7 +14,8 @@ function unbundled {
|
|
14
14
|
test "$DB" = "sqlite" && export DB="sqlite3"
|
15
15
|
|
16
16
|
rm -rf ./dummy-app
|
17
|
-
|
17
|
+
rails_version=`bundle exec ruby -e'require "rails"; puts Rails.version'`
|
18
|
+
rails _${rails_version}_ new dummy-app \
|
18
19
|
--database=${DB:-sqlite3} \
|
19
20
|
--skip-git \
|
20
21
|
--skip-keeps \
|
data/lib/solidus_braintree.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require 'solidus_core'
|
4
4
|
require 'solidus_support'
|
5
|
+
require 'braintree'
|
5
6
|
|
6
7
|
require 'solidus_braintree/country_mapper'
|
7
8
|
require 'solidus_braintree/request_protection'
|
@@ -10,7 +11,4 @@ require 'solidus_braintree/version'
|
|
10
11
|
require 'solidus_braintree/engine'
|
11
12
|
|
12
13
|
module SolidusBraintree
|
13
|
-
def self.table_name_prefix
|
14
|
-
'solidus_paypal_braintree_'
|
15
|
-
end
|
16
14
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solidus_braintree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stembolt
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-01-22 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activemerchant
|
@@ -159,6 +158,7 @@ files:
|
|
159
158
|
- ".gitignore"
|
160
159
|
- ".rspec"
|
161
160
|
- ".rubocop.yml"
|
161
|
+
- '7.2'
|
162
162
|
- CHANGELOG.md
|
163
163
|
- Gemfile
|
164
164
|
- LICENSE
|
@@ -173,13 +173,12 @@ files:
|
|
173
173
|
- app/assets/javascripts/spree/backend/solidus_braintree/promise.js
|
174
174
|
- app/assets/stylesheets/spree/backend/solidus_braintree.scss
|
175
175
|
- app/decorators/controllers/solidus_braintree/admin_payments_controller_decorator.rb
|
176
|
-
- app/decorators/controllers/solidus_braintree/client_tokens_controller.rb
|
177
176
|
- app/decorators/models/solidus_braintree/spree_store_decorator.rb
|
178
177
|
- app/decorators/models/solidus_braintree/spree_user_decorator.rb
|
179
178
|
- app/helpers/solidus_braintree/braintree_admin_helper.rb
|
180
|
-
- app/models/application_record.rb
|
181
179
|
- app/models/solidus_braintree/address.rb
|
182
180
|
- app/models/solidus_braintree/avs_result.rb
|
181
|
+
- app/models/solidus_braintree/base_record.rb
|
183
182
|
- app/models/solidus_braintree/configuration.rb
|
184
183
|
- app/models/solidus_braintree/customer.rb
|
185
184
|
- app/models/solidus_braintree/gateway.rb
|
@@ -215,6 +214,7 @@ files:
|
|
215
214
|
- db/migrate/20220104150301_add_venmo_to_braintree_configuration.rb
|
216
215
|
- db/migrate/20230109080950_rename_solidus_paypal_braintree_source_type.rb
|
217
216
|
- db/migrate/20230210104310_add_device_data_to_braintree_sources.rb
|
217
|
+
- lib/controllers/api/solidus_braintree/client_tokens_controller.rb
|
218
218
|
- lib/controllers/backend/solidus_braintree/configurations_controller.rb
|
219
219
|
- lib/generators/solidus_braintree/install/install_generator.rb
|
220
220
|
- lib/generators/solidus_braintree/install/templates/app/assets/images/solidus_braintree/venmo/venmo_active_blue_button_280x48.svg
|
@@ -345,7 +345,6 @@ metadata:
|
|
345
345
|
homepage_uri: https://github.com/solidusio/solidus_braintree
|
346
346
|
source_code_uri: https://github.com/solidusio/solidus_braintree
|
347
347
|
changelog_uri: https://github.com/solidusio/solidus_braintree/releases
|
348
|
-
post_install_message:
|
349
348
|
rdoc_options: []
|
350
349
|
require_paths:
|
351
350
|
- lib
|
@@ -363,8 +362,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
363
362
|
- !ruby/object:Gem::Version
|
364
363
|
version: '0'
|
365
364
|
requirements: []
|
366
|
-
rubygems_version: 3.
|
367
|
-
signing_key:
|
365
|
+
rubygems_version: 3.6.3
|
368
366
|
specification_version: 4
|
369
367
|
summary: Officially supported Braintree extension
|
370
368
|
test_files:
|
File without changes
|