workarea-paypal 2.0.8 → 2.0.9
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 +4 -4
- data/.eslintrc.json +35 -0
- data/.github/workflows/ci.yml +57 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +3 -0
- data/.stylelintrc.json +8 -0
- data/Gemfile +1 -1
- data/lib/workarea/paypal/version.rb +1 -1
- data/test/integration/workarea/storefront/paypal_integration_test.rb +29 -25
- metadata +7 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 298668e8ec2b951d889abc29f581329a15d242f44a365e1050117623b3a0c8b3
|
|
4
|
+
data.tar.gz: 07da63a473d39b51c0176a1e6893111462e61480b6a6fdbd02cfac21986535a9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78fe19e9ef4c724f395fc0c07b77d610a4696d82550cea831bd16f227878a880467ebc1593d9601fb84c8cb6905657d4d523572c97aa19d56ffdaedb009211df
|
|
7
|
+
data.tar.gz: d82ba2eb4fcb99766bbeb1920512432af582bfcf0fac7316ff85e8ca565104f25d8084aab586413ca77f1736abbd2cb783e89642227cd0d4b710da7e0c32834b
|
data/.eslintrc.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "eslint:recommended",
|
|
3
|
+
"rules": {
|
|
4
|
+
"semi": ["error", "always"],
|
|
5
|
+
"eqeqeq": ["error", "always"]
|
|
6
|
+
},
|
|
7
|
+
"globals": {
|
|
8
|
+
"window": true,
|
|
9
|
+
"document": true,
|
|
10
|
+
"WORKAREA": true,
|
|
11
|
+
"$": true,
|
|
12
|
+
"jQuery": true,
|
|
13
|
+
"_": true,
|
|
14
|
+
"feature": true,
|
|
15
|
+
"JST": true,
|
|
16
|
+
"Turbolinks": true,
|
|
17
|
+
"I18n": true,
|
|
18
|
+
"Chart": true,
|
|
19
|
+
"Dropzone": true,
|
|
20
|
+
"strftime": true,
|
|
21
|
+
"Waypoint": true,
|
|
22
|
+
"wysihtml": true,
|
|
23
|
+
"LocalTime": true,
|
|
24
|
+
"describe": true,
|
|
25
|
+
"after": true,
|
|
26
|
+
"afterEach": true,
|
|
27
|
+
"before": true,
|
|
28
|
+
"beforeEach": true,
|
|
29
|
+
"it": true,
|
|
30
|
+
"expect": true,
|
|
31
|
+
"sinon": true,
|
|
32
|
+
"fixture": true,
|
|
33
|
+
"chai": true
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
on: [push]
|
|
3
|
+
|
|
4
|
+
jobs:
|
|
5
|
+
static_analysis:
|
|
6
|
+
runs-on: ubuntu-latest
|
|
7
|
+
steps:
|
|
8
|
+
- uses: actions/checkout@v1
|
|
9
|
+
- uses: workarea-commerce/ci/bundler-audit@v1
|
|
10
|
+
- uses: workarea-commerce/ci/rubocop@v1
|
|
11
|
+
- uses: workarea-commerce/ci/eslint@v1
|
|
12
|
+
with:
|
|
13
|
+
args: '**/*.js'
|
|
14
|
+
|
|
15
|
+
admin_tests:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v1
|
|
19
|
+
- uses: actions/setup-ruby@v1
|
|
20
|
+
with:
|
|
21
|
+
ruby-version: 2.6.x
|
|
22
|
+
- uses: workarea-commerce/ci/test@v1
|
|
23
|
+
with:
|
|
24
|
+
command: bin/rails app:workarea:test:admin
|
|
25
|
+
|
|
26
|
+
core_tests:
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v1
|
|
30
|
+
- uses: actions/setup-ruby@v1
|
|
31
|
+
with:
|
|
32
|
+
ruby-version: 2.6.x
|
|
33
|
+
- uses: workarea-commerce/ci/test@v1
|
|
34
|
+
with:
|
|
35
|
+
command: bin/rails app:workarea:test:core
|
|
36
|
+
|
|
37
|
+
storefront_tests:
|
|
38
|
+
runs-on: ubuntu-latest
|
|
39
|
+
steps:
|
|
40
|
+
- uses: actions/checkout@v1
|
|
41
|
+
- uses: actions/setup-ruby@v1
|
|
42
|
+
with:
|
|
43
|
+
ruby-version: 2.6.x
|
|
44
|
+
- uses: workarea-commerce/ci/test@v1
|
|
45
|
+
with:
|
|
46
|
+
command: bin/rails app:workarea:test:storefront
|
|
47
|
+
|
|
48
|
+
plugins_tests:
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
steps:
|
|
51
|
+
- uses: actions/checkout@v1
|
|
52
|
+
- uses: actions/setup-ruby@v1
|
|
53
|
+
with:
|
|
54
|
+
ruby-version: 2.6.x
|
|
55
|
+
- uses: workarea-commerce/ci/test@v1
|
|
56
|
+
with:
|
|
57
|
+
command: bin/rails app:workarea:test:plugins
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.stylelintrc.json
ADDED
data/Gemfile
CHANGED
|
@@ -148,36 +148,40 @@ module Workarea
|
|
|
148
148
|
end
|
|
149
149
|
|
|
150
150
|
def test_complete_redirects_to_address_if_paypal_address_invalid
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
'
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
151
|
+
Workarea.with_config do |config|
|
|
152
|
+
config.allow_shipping_address_po_box = false
|
|
153
|
+
|
|
154
|
+
details.params['PaymentDetails']['ShipToAddress'] = {
|
|
155
|
+
'Name' => 'Test User',
|
|
156
|
+
'Street1' => 'PO Box 123',
|
|
157
|
+
'Street2' => nil,
|
|
158
|
+
'CityName' => 'San Jose',
|
|
159
|
+
'StateOrProvince' => 'CA',
|
|
160
|
+
'Country' => 'US',
|
|
161
|
+
'CountryName' => 'United States',
|
|
162
|
+
'Phone' => '610-867-5309',
|
|
163
|
+
'PostalCode' => '95131',
|
|
164
|
+
'AddressID' => nil,
|
|
165
|
+
'AddressOwner' => 'PayPal',
|
|
166
|
+
'ExternalAddressID' => nil,
|
|
167
|
+
'AddressStatus' => 'Confirmed'
|
|
168
|
+
}
|
|
166
169
|
|
|
167
|
-
|
|
170
|
+
gateway.expects(:details_for).returns(details)
|
|
168
171
|
|
|
169
|
-
|
|
172
|
+
product = create_product(variants: [{ sku: 'SKU', regular: 5 }])
|
|
170
173
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
174
|
+
post storefront.cart_items_path, params: {
|
|
175
|
+
product_id: product.id,
|
|
176
|
+
sku: product.skus.first,
|
|
177
|
+
quantity: 1
|
|
178
|
+
}
|
|
176
179
|
|
|
177
|
-
|
|
180
|
+
order = Order.first
|
|
178
181
|
|
|
179
|
-
|
|
180
|
-
|
|
182
|
+
get storefront.complete_paypal_path(order_id: order.id)
|
|
183
|
+
assert_redirected_to(storefront.checkout_addresses_path)
|
|
184
|
+
end
|
|
181
185
|
end
|
|
182
186
|
|
|
183
187
|
private
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: workarea-paypal
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- bcrouse
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-10-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: workarea
|
|
@@ -34,12 +34,16 @@ files:
|
|
|
34
34
|
- ".editorconfig"
|
|
35
35
|
- ".eslintignore"
|
|
36
36
|
- ".eslintrc"
|
|
37
|
+
- ".eslintrc.json"
|
|
37
38
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
|
38
39
|
- ".github/ISSUE_TEMPLATE/documentation-request.md"
|
|
39
40
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
41
|
+
- ".github/workflows/ci.yml"
|
|
40
42
|
- ".gitignore"
|
|
41
43
|
- ".rspec"
|
|
44
|
+
- ".rubocop.yml"
|
|
42
45
|
- ".scss-lint.yml"
|
|
46
|
+
- ".stylelintrc.json"
|
|
43
47
|
- ".yardopts"
|
|
44
48
|
- CHANGELOG.md
|
|
45
49
|
- CODE_OF_CONDUCT.md
|
|
@@ -163,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
163
167
|
- !ruby/object:Gem::Version
|
|
164
168
|
version: '0'
|
|
165
169
|
requirements: []
|
|
166
|
-
rubygems_version: 3.0.
|
|
170
|
+
rubygems_version: 3.0.6
|
|
167
171
|
signing_key:
|
|
168
172
|
specification_version: 4
|
|
169
173
|
summary: PayPal integration for the Workarea Commerce Platform
|