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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c4248cb5d49919c3127e58d42467c9ed70ba88dd4c177819195a38aded7d10bb
4
- data.tar.gz: 4604a3d5492402173b997b8d117803ac2de245ffdb9aff045c466147c8994e68
3
+ metadata.gz: 298668e8ec2b951d889abc29f581329a15d242f44a365e1050117623b3a0c8b3
4
+ data.tar.gz: 07da63a473d39b51c0176a1e6893111462e61480b6a6fdbd02cfac21986535a9
5
5
  SHA512:
6
- metadata.gz: 66f2654be6b58a5ff5b32bf02e1ffe9b1b76aa414e2239fd9767649fa96d682180bac60cc92c75051f7b9e61811dd8d81ea8cbfe53da3509ff0db36de8538ef9
7
- data.tar.gz: efe996eab95e4de4fdb814cbe2aadaaaa79b318eb389e89df8eb969a8de0b9ce580e38c92672dd66c24a2aa2d2f5bc718669b48b23fd65b114df757d9abfd793
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
@@ -17,3 +17,4 @@ node_modules
17
17
  test/reports
18
18
  package.json
19
19
  yarn.lock
20
+ .rubocop-http*
data/.rubocop.yml ADDED
@@ -0,0 +1,3 @@
1
+ inherit_from:
2
+ - https://raw.githubusercontent.com/workarea-commerce/workarea/master/.rubocop.yml
3
+
data/.stylelintrc.json ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "extends": "stylelint-config-recommended-scss",
3
+ "rules": {
4
+ "block-no-empty": null,
5
+ "no-descending-specificity": null,
6
+ "property-no-unknown": [true, { "ignoreProperties": ["mso-hide"] }]
7
+ }
8
+ }
data/Gemfile CHANGED
@@ -1,5 +1,5 @@
1
1
  source 'https://rubygems.org'
2
- git_source(:github) { |repo| "git@github.com:#{repo}.git" }
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
3
 
4
4
  gemspec
5
5
 
@@ -1,5 +1,5 @@
1
1
  module Workarea
2
2
  module Paypal
3
- VERSION = '2.0.8'.freeze
3
+ VERSION = '2.0.9'.freeze
4
4
  end
5
5
  end
@@ -148,36 +148,40 @@ module Workarea
148
148
  end
149
149
 
150
150
  def test_complete_redirects_to_address_if_paypal_address_invalid
151
- details.params['PaymentDetails']['ShipToAddress'] = {
152
- 'Name' => 'Test User',
153
- 'Street1' => 'PO Box 123',
154
- 'Street2' => nil,
155
- 'CityName' => 'San Jose',
156
- 'StateOrProvince' => 'CA',
157
- 'Country' => 'US',
158
- 'CountryName' => 'United States',
159
- 'Phone' => '610-867-5309',
160
- 'PostalCode' => '95131',
161
- 'AddressID' => nil,
162
- 'AddressOwner' => 'PayPal',
163
- 'ExternalAddressID' => nil,
164
- 'AddressStatus' => 'Confirmed'
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
- gateway.expects(:details_for).returns(details)
170
+ gateway.expects(:details_for).returns(details)
168
171
 
169
- product = create_product(variants: [{ sku: 'SKU', regular: 5 }])
172
+ product = create_product(variants: [{ sku: 'SKU', regular: 5 }])
170
173
 
171
- post storefront.cart_items_path, params: {
172
- product_id: product.id,
173
- sku: product.skus.first,
174
- quantity: 1
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
- order = Order.first
180
+ order = Order.first
178
181
 
179
- get storefront.complete_paypal_path(order_id: order.id)
180
- assert_redirected_to(storefront.checkout_addresses_path)
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.8
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-08-21 00:00:00.000000000 Z
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.4
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