workarea-flow_io 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.eslintignore +2 -0
- data/.eslintrc.json +37 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
- data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- data/.github/workflows/ci.yml +90 -0
- data/.gitignore +21 -0
- data/.rubocop.yml +2 -0
- data/.ruby-version +1 -0
- data/.stylelintrc.json +12 -0
- data/CHANGELOG.md +200 -0
- data/Gemfile +19 -0
- data/LICENSE +52 -0
- data/README.md +200 -0
- data/Rakefile +59 -0
- data/app/assets/javascripts/workarea/storefront/flow_io/adapters/flow_io_adapter.js +61 -0
- data/app/assets/javascripts/workarea/storefront/flow_io/configuration.js.erb +10 -0
- data/app/assets/javascripts/workarea/storefront/flow_io/flow.js +91 -0
- data/app/assets/stylesheets/flow_io/storefront/country_picker.scss +189 -0
- data/app/controllers/workarea/admin/application_controller.decorator +5 -0
- data/app/controllers/workarea/admin/catalog_categories_controller.decorator +9 -0
- data/app/controllers/workarea/admin/flow_imports_controller.rb +9 -0
- data/app/controllers/workarea/admin/orders_controller.decorator +6 -0
- data/app/controllers/workarea/admin/pricing_skus_controller.decorator +7 -0
- data/app/controllers/workarea/admin/search_settings_controller.decorator +27 -0
- data/app/controllers/workarea/storefront/application_controller.decorator +80 -0
- data/app/controllers/workarea/storefront/checkouts_controller.decorator +38 -0
- data/app/controllers/workarea/storefront/flow_io_webhook_controller.rb +49 -0
- data/app/controllers/workarea/storefront/recent_views_controller.decorator +15 -0
- data/app/controllers/workarea/storefront/searches_controller.decorator +11 -0
- data/app/helpers/workarea/admin/flow_helper.rb +13 -0
- data/app/helpers/workarea/storefront/flow_analytics_helper.rb +23 -0
- data/app/helpers/workarea/storefront/flow_content_helper.rb +21 -0
- data/app/middleware/workarea/flow_io/session_middleware.rb +68 -0
- data/app/models/workarea/address.decorator +12 -0
- data/app/models/workarea/catalog/category.decorator +8 -0
- data/app/models/workarea/checkout.decorator +26 -0
- data/app/models/workarea/flow_io/experience_geo.rb +18 -0
- data/app/models/workarea/flow_io/experience_summary.rb +15 -0
- data/app/models/workarea/flow_io/import.rb +31 -0
- data/app/models/workarea/flow_io/imported_item.rb +124 -0
- data/app/models/workarea/flow_io/local_item.rb +28 -0
- data/app/models/workarea/flow_io/localized_price.rb +30 -0
- data/app/models/workarea/flow_io/price.rb +12 -0
- data/app/models/workarea/flow_io/price_with_base.rb +7 -0
- data/app/models/workarea/flow_io/webhook/shared_secret.rb +12 -0
- data/app/models/workarea/flow_price_adjustment_set.rb +80 -0
- data/app/models/workarea/fulfillment.decorator +63 -0
- data/app/models/workarea/order.decorator +39 -0
- data/app/models/workarea/order/item.decorator +43 -0
- data/app/models/workarea/payment.decorator +11 -0
- data/app/models/workarea/payment/authorize/flow_payment.rb +48 -0
- data/app/models/workarea/payment/capture/flow_payment.rb +35 -0
- data/app/models/workarea/payment/flow_payment_data.rb +25 -0
- data/app/models/workarea/payment/flow_payment_operation.rb +20 -0
- data/app/models/workarea/payment/purchase/flow_payment.rb +44 -0
- data/app/models/workarea/payment/refund/flow_payment.rb +42 -0
- data/app/models/workarea/payment/store_flow_credit_card.rb +34 -0
- data/app/models/workarea/payment/tender.decorator +8 -0
- data/app/models/workarea/payment/tender/flow_payment.rb +15 -0
- data/app/models/workarea/payment/transaction.decorator +12 -0
- data/app/models/workarea/pricing/calculators/flow_localization_calculator.rb +30 -0
- data/app/models/workarea/pricing/calculators/item_calculator.decorator +39 -0
- data/app/models/workarea/pricing/collection.decorator +113 -0
- data/app/models/workarea/pricing/order_totals.decorator +53 -0
- data/app/models/workarea/pricing/price.decorator +17 -0
- data/app/models/workarea/pricing/price_distributor.decorator +51 -0
- data/app/models/workarea/pricing/request.decorator +17 -0
- data/app/models/workarea/pricing/shipping_totals.decorator +24 -0
- data/app/models/workarea/pricing/sku.decorator +46 -0
- data/app/models/workarea/search/settings.decorator +8 -0
- data/app/models/workarea/search/storefront/product.decorator +25 -0
- data/app/models/workarea/shipping.decorator +28 -0
- data/app/queries/workarea/order_metrics.decorator +23 -0
- data/app/queries/workarea/search/product_search.decorator +14 -0
- data/app/queries/workarea/search/storefront_search/response.decorator +40 -0
- data/app/services/workarea/flow_io/checkout.rb +242 -0
- data/app/services/workarea/flow_io/checkout_token_form.rb +36 -0
- data/app/services/workarea/flow_io/countries.rb +14 -0
- data/app/services/workarea/flow_io/detailed_shipping_notification_form.rb +84 -0
- data/app/services/workarea/flow_io/experiences.rb +24 -0
- data/app/services/workarea/flow_io/fulfillment_cancellation_form.rb +40 -0
- data/app/services/workarea/flow_io/item.rb +122 -0
- data/app/services/workarea/flow_io/item_importer.rb +108 -0
- data/app/services/workarea/flow_io/line_item_form.rb +72 -0
- data/app/services/workarea/flow_io/order_put_form.rb +62 -0
- data/app/services/workarea/flow_io/price_applier.rb +81 -0
- data/app/services/workarea/flow_io/price_applier/item_applier.rb +157 -0
- data/app/services/workarea/flow_io/routing_contraints.rb +10 -0
- data/app/services/workarea/flow_io/session.rb +90 -0
- data/app/services/workarea/flow_io/webhook.rb +28 -0
- data/app/services/workarea/flow_io/webhook/experience_deleted_v2.rb +9 -0
- data/app/services/workarea/flow_io/webhook/experience_upserted_v2.rb +9 -0
- data/app/services/workarea/flow_io/webhook/order_upserted_v2.rb +36 -0
- data/app/services/workarea/flow_io/webhook_request_signature.rb +19 -0
- data/app/view_models/workarea/admin/flow_imports_view_model.rb +36 -0
- data/app/view_models/workarea/storefront/cart_view_model.decorator +27 -0
- data/app/view_models/workarea/storefront/content_blocks/category_summary_view_model.decorator +11 -0
- data/app/view_models/workarea/storefront/content_blocks/product_insights_view_model.decorator +11 -0
- data/app/view_models/workarea/storefront/content_blocks/product_list_view_model.decorator +13 -0
- data/app/view_models/workarea/storefront/order_item_view_model.decorator +35 -0
- data/app/view_models/workarea/storefront/order_view_model.decorator +51 -0
- data/app/view_models/workarea/storefront/product_templates/option_set_view_model.decorator +20 -0
- data/app/view_models/workarea/storefront/product_templates/package_view_model.decorator +14 -0
- data/app/view_models/workarea/storefront/product_view_model.decorator +15 -0
- data/app/view_models/workarea/storefront/product_view_model/cache_key.decorator +7 -0
- data/app/view_models/workarea/storefront/recommendations_view_model.decorator +20 -0
- data/app/view_models/workarea/storefront/user_activity_view_model.decorator +18 -0
- data/app/views/workarea/admin/catalog_categories/edit.html.haml +85 -0
- data/app/views/workarea/admin/facets/_price_inputs.html.haml +50 -0
- data/app/views/workarea/admin/flow_imports/index.html.haml +44 -0
- data/app/views/workarea/admin/orders/_flow.html.haml +22 -0
- data/app/views/workarea/admin/orders/_flow_aux_navigation.html.haml +2 -0
- data/app/views/workarea/admin/orders/flow.html.haml +109 -0
- data/app/views/workarea/admin/orders/tenders/_flow_payment.html.haml +3 -0
- data/app/views/workarea/admin/pricing_skus/_cards.html.haml +83 -0
- data/app/views/workarea/admin/pricing_skus/flow.html.haml +60 -0
- data/app/views/workarea/admin/search_settings/show.html.haml +55 -0
- data/app/views/workarea/admin/shared/_flow_imports_link.html.haml +1 -0
- data/app/views/workarea/storefront/_flow_io_country_picker.html.haml +2 -0
- data/app/views/workarea/storefront/_flow_io_country_picker_javascript.html.haml +1 -0
- data/app/views/workarea/storefront/order_mailer/tenders/_flow_payment.html.haml +2 -0
- data/app/views/workarea/storefront/order_mailer/tenders/_flow_payment.text.erb +1 -0
- data/app/views/workarea/storefront/orders/tenders/_flow_payment.html.haml +3 -0
- data/app/views/workarea/storefront/products/_pricing.html.haml +41 -0
- data/app/workers/workarea/flow_io/delete_items.rb +30 -0
- data/app/workers/workarea/flow_io/fetch_import.rb +34 -0
- data/app/workers/workarea/flow_io/fulfillment_cancellation.rb +14 -0
- data/app/workers/workarea/flow_io/item_exporter.rb +47 -0
- data/app/workers/workarea/flow_io/process_import.rb +28 -0
- data/app/workers/workarea/flow_io/shipping_notifications.rb +13 -0
- data/bin/rails +25 -0
- data/config/initializers/appends.rb +39 -0
- data/config/initializers/freedom_patches.rb +23 -0
- data/config/initializers/middleware.rb +11 -0
- data/config/initializers/payment_proxy.rb +5 -0
- data/config/initializers/rack_attack.rb +15 -0
- data/config/initializers/scheduled_jobs.rb +9 -0
- data/config/initializers/workarea.rb +101 -0
- data/config/initializers/workarea_i18n.rb +11 -0
- data/config/locales/en.yml +72 -0
- data/config/routes.rb +21 -0
- data/lib/active_merchant/billing/bogus_flow_gateway.rb +16 -0
- data/lib/active_merchant/billing/flow_gateway.rb +48 -0
- data/lib/tasks/flow_io.rake +117 -0
- data/lib/workarea/flow_io.rb +73 -0
- data/lib/workarea/flow_io/bogus_client.rb +57 -0
- data/lib/workarea/flow_io/bogus_client/checkout_tokens.rb +25 -0
- data/lib/workarea/flow_io/bogus_client/experiences.rb +152 -0
- data/lib/workarea/flow_io/bogus_client/fulfillments.rb +9 -0
- data/lib/workarea/flow_io/bogus_client/items.rb +11 -0
- data/lib/workarea/flow_io/bogus_client/orders.rb +499 -0
- data/lib/workarea/flow_io/bogus_client/organizations.rb +42 -0
- data/lib/workarea/flow_io/bogus_client/proxy_client.rb +29 -0
- data/lib/workarea/flow_io/bogus_client/sessions.rb +115 -0
- data/lib/workarea/flow_io/bogus_client/shipping_notifications.rb +10 -0
- data/lib/workarea/flow_io/bogus_client/webhook_settings.rb +11 -0
- data/lib/workarea/flow_io/bogus_client/webhooks.rb +11 -0
- data/lib/workarea/flow_io/controller_log_subscriber.rb +21 -0
- data/lib/workarea/flow_io/engine.rb +8 -0
- data/lib/workarea/flow_io/http_handler.rb +27 -0
- data/lib/workarea/flow_io/version.rb +5 -0
- data/lib/workarea/freedom_patches/flow_io.rb +53 -0
- data/package.json +9 -0
- data/script/admin_ci +9 -0
- data/script/ci +11 -0
- data/script/core_ci +9 -0
- data/script/plugins_ci +9 -0
- data/script/storefront_ci +9 -0
- data/test/dummy/.ruby-version +1 -0
- data/test/dummy/Rakefile +6 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/bin/setup +28 -0
- data/test/dummy/bin/update +28 -0
- data/test/dummy/bin/yarn +11 -0
- data/test/dummy/config.ru +5 -0
- data/test/dummy/config/application.rb +32 -0
- data/test/dummy/config/boot.rb +5 -0
- data/test/dummy/config/cable.yml +10 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +52 -0
- data/test/dummy/config/environments/production.rb +88 -0
- data/test/dummy/config/environments/test.rb +45 -0
- data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
- data/test/dummy/config/initializers/assets.rb +14 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/content_security_policy.rb +25 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +4 -0
- data/test/dummy/config/initializers/workarea.rb +5 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +9 -0
- data/test/dummy/config/locales/en.yml +33 -0
- data/test/dummy/config/puma.rb +34 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/config/secrets.yml +22 -0
- data/test/dummy/config/spring.rb +6 -0
- data/test/dummy/db/seeds.rb +2 -0
- data/test/dummy/log/.keep +0 -0
- data/test/dummy/package.json +5 -0
- data/test/factories/workarea/flow_io.rb +136 -0
- data/test/factories/workarea/flow_io/euro_order_upserted_payload.rb +581 -0
- data/test/fixtures/files/example.csv +14 -0
- data/test/integration/workarea/admin/flow_imports_integration_test.rb +20 -0
- data/test/integration/workarea/admin/flow_order_integration_test.rb +37 -0
- data/test/integration/workarea/admin/search_settings_integration_test.decorator +44 -0
- data/test/integration/workarea/flow_locale_integration_test.rb +34 -0
- data/test/integration/workarea/storefront/copying_guest_order_integration_test.decorator +113 -0
- data/test/integration/workarea/storefront/flow_io_order_redirect_test.rb +55 -0
- data/test/integration/workarea/storefront/flow_io_session_integration_test.rb +122 -0
- data/test/integration/workarea/storefront/flow_io_webhooks/order_integration_test.rb +750 -0
- data/test/integration/workarea/storefront/flow_webhook_rack_attack_integration_test.rb +54 -0
- data/test/integration/workarea/storefront/search_integration_test.decorator +51 -0
- data/test/javascripts/flow_spec.js +39 -0
- data/test/javascripts/spec_helper.js +3 -0
- data/test/models/workarea/address_test.decorator +20 -0
- data/test/models/workarea/checkout_test.decorator +20 -0
- data/test/models/workarea/flow_io/imported_item_test.rb +50 -0
- data/test/models/workarea/fulfillment_test.decorator +12 -0
- data/test/models/workarea/oms_fulfillment_test.decorator +14 -0
- data/test/models/workarea/order/item_test.decorator +46 -0
- data/test/models/workarea/order_test.decorator +16 -0
- data/test/models/workarea/payment/flow_payment_integration_test.rb +163 -0
- data/test/models/workarea/price_adjustment_set_flow_test.rb +8 -0
- data/test/models/workarea/pricing/calculators/flow_localization_calculator_test.rb +152 -0
- data/test/models/workarea/pricing/calculators/item_calculator_test.decorator +59 -0
- data/test/models/workarea/pricing/collection_test.decorator +140 -0
- data/test/models/workarea/pricing/order_totals_test.rb +247 -0
- data/test/models/workarea/pricing/price_distributor_test.decorator +21 -0
- data/test/models/workarea/pricing/sku_test.decorator +113 -0
- data/test/models/workarea/shipping_test.decorator +70 -0
- data/test/queries/workarea/flow_order_metrics_test.rb +104 -0
- data/test/services/workarea/commit_shipments_test.decorator +14 -0
- data/test/services/workarea/flow_io/checkout_test.rb +43 -0
- data/test/services/workarea/flow_io/detailed_shipping_notification_form_test.rb +145 -0
- data/test/services/workarea/flow_io/experiences_test.rb +14 -0
- data/test/services/workarea/flow_io/fulfillment_cancellation_form_test.rb +46 -0
- data/test/services/workarea/flow_io/item_importer_test.rb +357 -0
- data/test/services/workarea/flow_io/item_test.rb +72 -0
- data/test/services/workarea/flow_io/line_item_form_test.rb +34 -0
- data/test/services/workarea/flow_io/order_put_form_test.rb +48 -0
- data/test/services/workarea/flow_io/price_applier_test.rb +916 -0
- data/test/support/flow_fixtures.rb +1362 -0
- data/test/support/webhook_integration_test.rb +43 -0
- data/test/support/workarea/flow_bogus_client_support.rb +18 -0
- data/test/support/workarea/flow_io_vcr_config.rb +22 -0
- data/test/system/workarea/admin/search_fulfillment_system_test.decorator +25 -0
- data/test/system/workarea/storefront/analytics_system_test.decorator +28 -0
- data/test/system/workarea/storefront/flow_cart_recommendations_system_test.rb +70 -0
- data/test/system/workarea/storefront/users_flow_orders_system_test.rb +25 -0
- data/test/teaspoon_env.rb +6 -0
- data/test/test_helper.rb +27 -0
- data/test/vcr_cassettes/payment/flow/auth_capture.yml +188 -0
- data/test/vcr_cassettes/payment/flow/auth_capture_refund.yml +249 -0
- data/test/vcr_cassettes/payment/flow/auth_void.yml +188 -0
- data/test/vcr_cassettes/payment/flow/purchase_refund.yml +249 -0
- data/test/vcr_cassettes/payment/flow/store_auth.yml +127 -0
- data/test/vcr_cassettes/payment/flow/store_purchase.yml +188 -0
- data/test/view_models/workarea/storefront/cart_view_model_test.decorator +19 -0
- data/test/view_models/workarea/storefront/order_item_view_model_test.decorator +24 -0
- data/test/view_models/workarea/storefront/order_view_model_test.decorator +41 -0
- data/test/view_models/workarea/storefront/package_view_model_test.decorator +11 -0
- data/test/workers/workarea/flow_io/delete_items_test.rb +37 -0
- data/test/workers/workarea/flow_io/fetch_import_test.rb +41 -0
- data/test/workers/workarea/flow_io/item_exporter_test.rb +47 -0
- data/test/workers/workarea/flow_io/process_import_test.rb +25 -0
- data/workarea-flow_io.gemspec +20 -0
- metadata +375 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a9dbebf27c384925a6dcd87063b6af859e8f174ae693bcefe082d5a24e4241a5
|
4
|
+
data.tar.gz: d3a480e6ad61e970e9a1ff211218bf50a0dde4fcb6f316baeae822b1e8f80572
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5cb7e10c04b3bfdf8e29230cd5fd14794226a7dd0fc5073d2f9454a2e5ae6318006cb9d903ecefd16ae4322a605b0d30afcd0b3d88aabf53f8f704d63821ebb2
|
7
|
+
data.tar.gz: 6b9435cb22310fcbeb544deb97a136b930de26f624495ae2fad085642f562d523556160d56f77017027bd73a9d9caf83fcde741567000ab4e3f4a30e7da3743a
|
data/.eslintignore
ADDED
data/.eslintrc.json
ADDED
@@ -0,0 +1,37 @@
|
|
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
|
+
"flow": true,
|
35
|
+
"Promise": true
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
---
|
2
|
+
name: Bug report
|
3
|
+
about: Create a report to help us improve Workarea
|
4
|
+
title: ''
|
5
|
+
labels: bug
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
⚠️**Before you create**⚠️
|
11
|
+
Please verify the issue you're experiencing is not part of your Workarea project customizations. The best way to do this is with a [vanilla Workarea installation](https://developer.workarea.com/articles/create-a-new-host-application.html). This will help us spend time on fixes/improvements for the whole community. Thank you!
|
12
|
+
|
13
|
+
**Describe the bug**
|
14
|
+
A clear and concise description of what the bug is.
|
15
|
+
|
16
|
+
**To Reproduce**
|
17
|
+
Steps to reproduce the behavior:
|
18
|
+
1. Go to '...'
|
19
|
+
2. Click on '....'
|
20
|
+
3. Scroll down to '....'
|
21
|
+
4. See error
|
22
|
+
|
23
|
+
**Expected behavior**
|
24
|
+
A clear and concise description of what you expected to happen.
|
25
|
+
|
26
|
+
**Workarea Setup (please complete the following information):**
|
27
|
+
- Workarea Version: [e.g. v3.4.6]
|
28
|
+
- Plugins [e.g. workarea-blog, workarea-sitemaps]
|
29
|
+
|
30
|
+
**Attachments**
|
31
|
+
If applicable, add any attachments to help explain your problem, things like:
|
32
|
+
- screenshots
|
33
|
+
- Gemfile.lock
|
34
|
+
- test cases
|
35
|
+
|
36
|
+
**Additional context**
|
37
|
+
Add any other context about the problem here.
|
@@ -0,0 +1,17 @@
|
|
1
|
+
---
|
2
|
+
name: Documentation request
|
3
|
+
about: Suggest documentation
|
4
|
+
title: ''
|
5
|
+
labels: documentation
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Is your documentation related to a problem? Please describe.**
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm confused by [...]
|
12
|
+
|
13
|
+
**Describe the article you'd like**
|
14
|
+
A clear and concise description of what would be in the documentation article.
|
15
|
+
|
16
|
+
**Additional context**
|
17
|
+
Add any other context or screenshots about the feature request here.
|
@@ -0,0 +1,20 @@
|
|
1
|
+
---
|
2
|
+
name: Feature request
|
3
|
+
about: Suggest an idea for Workarea
|
4
|
+
title: ''
|
5
|
+
labels: enhancement
|
6
|
+
assignees: ''
|
7
|
+
|
8
|
+
---
|
9
|
+
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
12
|
+
|
13
|
+
**Describe the solution you'd like**
|
14
|
+
A clear and concise description of what you want to happen.
|
15
|
+
|
16
|
+
**Describe alternatives you've considered**
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
18
|
+
|
19
|
+
**Additional context**
|
20
|
+
Add any other context or screenshots about the feature request here.
|
@@ -0,0 +1,90 @@
|
|
1
|
+
name: CI
|
2
|
+
on: [push]
|
3
|
+
|
4
|
+
jobs:
|
5
|
+
rubocop:
|
6
|
+
runs-on: ubuntu-latest
|
7
|
+
steps:
|
8
|
+
- uses: actions/checkout@v1
|
9
|
+
- uses: workarea-commerce/ci/rubocop@ruby-2.4
|
10
|
+
env:
|
11
|
+
BUNDLE_GEMS__WEBLINC__COM: ${{ secrets.BUNDLE_GEMS__WEBLINC__COM }}
|
12
|
+
GITHUB_TOKEN: ${{ secrets.github_access_token }}
|
13
|
+
bundler_audit:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v1
|
17
|
+
- uses: workarea-commerce/ci/bundler-audit@ruby-2.4
|
18
|
+
env:
|
19
|
+
BUNDLE_GEMS__WEBLINC__COM: ${{ secrets.BUNDLE_GEMS__WEBLINC__COM }}
|
20
|
+
GITHUB_TOKEN: ${{ secrets.github_access_token }}
|
21
|
+
eslint:
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
steps:
|
24
|
+
- uses: actions/checkout@v1
|
25
|
+
- uses: workarea-commerce/ci/eslint@v1
|
26
|
+
with:
|
27
|
+
args: '**/*.js'
|
28
|
+
stylelint:
|
29
|
+
runs-on: ubuntu-latest
|
30
|
+
steps:
|
31
|
+
- uses: actions/checkout@v1
|
32
|
+
- uses: workarea-commerce/ci/stylelint@v1
|
33
|
+
with:
|
34
|
+
args: '**/*.scss'
|
35
|
+
|
36
|
+
admin_tests:
|
37
|
+
runs-on: ubuntu-latest
|
38
|
+
steps:
|
39
|
+
- uses: actions/checkout@v1
|
40
|
+
- uses: actions/setup-ruby@v1
|
41
|
+
with:
|
42
|
+
ruby-version: 2.4.x
|
43
|
+
- uses: workarea-commerce/ci/test@v1
|
44
|
+
with:
|
45
|
+
command: bin/rails app:workarea:test:admin
|
46
|
+
env:
|
47
|
+
BUNDLE_GEMS__WEBLINC__COM: ${{ secrets.BUNDLE_GEMS__WEBLINC__COM }}
|
48
|
+
GITHUB_TOKEN: ${{ secrets.github_access_token }}
|
49
|
+
|
50
|
+
core_tests:
|
51
|
+
runs-on: ubuntu-latest
|
52
|
+
steps:
|
53
|
+
- uses: actions/checkout@v1
|
54
|
+
- uses: actions/setup-ruby@v1
|
55
|
+
with:
|
56
|
+
ruby-version: 2.4.x
|
57
|
+
- uses: workarea-commerce/ci/test@v1
|
58
|
+
with:
|
59
|
+
command: bin/rails app:workarea:test:core
|
60
|
+
env:
|
61
|
+
BUNDLE_GEMS__WEBLINC__COM: ${{ secrets.BUNDLE_GEMS__WEBLINC__COM }}
|
62
|
+
GITHUB_TOKEN: ${{ secrets.github_access_token }}
|
63
|
+
|
64
|
+
storefront_tests:
|
65
|
+
runs-on: ubuntu-latest
|
66
|
+
steps:
|
67
|
+
- uses: actions/checkout@v1
|
68
|
+
- uses: actions/setup-ruby@v1
|
69
|
+
with:
|
70
|
+
ruby-version: 2.4.x
|
71
|
+
- uses: workarea-commerce/ci/test@v1
|
72
|
+
with:
|
73
|
+
command: bin/rails app:workarea:test:storefront
|
74
|
+
env:
|
75
|
+
BUNDLE_GEMS__WEBLINC__COM: ${{ secrets.BUNDLE_GEMS__WEBLINC__COM }}
|
76
|
+
GITHUB_TOKEN: ${{ secrets.github_access_token }}
|
77
|
+
|
78
|
+
plugins_tests:
|
79
|
+
runs-on: ubuntu-latest
|
80
|
+
steps:
|
81
|
+
- uses: actions/checkout@v1
|
82
|
+
- uses: actions/setup-ruby@v1
|
83
|
+
with:
|
84
|
+
ruby-version: 2.4.x
|
85
|
+
- uses: workarea-commerce/ci/test@v1
|
86
|
+
with:
|
87
|
+
command: bin/rails app:workarea:test:plugins
|
88
|
+
env:
|
89
|
+
BUNDLE_GEMS__WEBLINC__COM: ${{ secrets.BUNDLE_GEMS__WEBLINC__COM }}
|
90
|
+
GITHUB_TOKEN: ${{ secrets.github_access_token }}
|
data/.gitignore
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
.bundle/
|
2
|
+
log/*.log
|
3
|
+
pkg/
|
4
|
+
test/dummy/log/*.log
|
5
|
+
test/dummy/node_modules/
|
6
|
+
test/dummy/yarn-error.log
|
7
|
+
test/dummy/tmp/
|
8
|
+
.DS_Store
|
9
|
+
.byebug_history
|
10
|
+
.bundle/
|
11
|
+
.sass-cache/
|
12
|
+
Gemfile.lock
|
13
|
+
pkg/
|
14
|
+
test/dummy/public/
|
15
|
+
log/*.log
|
16
|
+
test/dummy/db/*.sqlite3
|
17
|
+
test/dummy/db/*.sqlite3-journal
|
18
|
+
coverage/
|
19
|
+
node_modules/
|
20
|
+
yarn.lock
|
21
|
+
.rubocop-http*
|
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.4.6
|
data/.stylelintrc.json
ADDED
@@ -0,0 +1,12 @@
|
|
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
|
+
"ignoreFiles": [
|
9
|
+
"vendor/**/*",
|
10
|
+
"coverage/**/*"
|
11
|
+
]
|
12
|
+
}
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,200 @@
|
|
1
|
+
Workarea Flow Io 1.2.1 (2020-01-21)
|
2
|
+
--------------------------------------------------------------------------------
|
3
|
+
|
4
|
+
* Fix syntax
|
5
|
+
|
6
|
+
Tom Scott
|
7
|
+
|
8
|
+
* Fix RuboCop config
|
9
|
+
|
10
|
+
Tom Scott
|
11
|
+
|
12
|
+
* Bump gems so they build for later versions
|
13
|
+
|
14
|
+
Tom Scott
|
15
|
+
|
16
|
+
* Revise Cart Pricing
|
17
|
+
|
18
|
+
Workarea now sends over the prices that were actually displayed to the
|
19
|
+
user in the cart to Flow's backend, eliminating any kind of price
|
20
|
+
discrepency between Flow and the Workarea application. Additionally, the
|
21
|
+
current experience is now being used to dictate the currency of all item
|
22
|
+
prices and discounts sent over in the `OrderPutForm`. In order to
|
23
|
+
prevent unnecessary test failures related to the year 2020, this gem now
|
24
|
+
depends on v3.3.36 or higher of the platform.
|
25
|
+
|
26
|
+
FLOW-9
|
27
|
+
Tom Scott
|
28
|
+
|
29
|
+
* Update how discounts are passed to Flow
|
30
|
+
|
31
|
+
Use flow's newer fields that accept an array of discounts instead of
|
32
|
+
having to pass a single discount adjustment
|
33
|
+
Eric Pigeon
|
34
|
+
|
35
|
+
* Add admin section for flow pricing imports
|
36
|
+
|
37
|
+
Eric Pigeon
|
38
|
+
|
39
|
+
* Fix Arity of initCountryPicker()
|
40
|
+
|
41
|
+
The `initCountryPicker()` function had its arity changed as a result of
|
42
|
+
wrapping the SDK loader in a promise.
|
43
|
+
|
44
|
+
FLOW-4
|
45
|
+
Tom Scott
|
46
|
+
|
47
|
+
* Download Full CSV File from SFTP
|
48
|
+
|
49
|
+
Apparently, `.gets` only grabs the first line of the file. Using
|
50
|
+
`sftp.download!` will output the whole contents of a file to String,
|
51
|
+
which is what we want here, and I couldn't figure out how to make it
|
52
|
+
stream `.gets` to more than one line.
|
53
|
+
|
54
|
+
FLOW-6
|
55
|
+
Tom Scott
|
56
|
+
|
57
|
+
* Update Local Items and Pricing with CSV
|
58
|
+
|
59
|
+
Workarea now adds the ability to periodically update local items using a
|
60
|
+
flat CSV file stored on Flow's SFTP server. This is the most common way
|
61
|
+
of integrating product data with Flow, and requires additional FTP
|
62
|
+
credentials in secrets. All CSV imports are uploaded with Dragonfly and
|
63
|
+
stored locally for archival purposes, and in case anything goes wrong.
|
64
|
+
Additionally, the `local_item_upserted` webhook is no longer created or
|
65
|
+
supported, as the plugin will now solely rely on flat file importing as
|
66
|
+
a means of integrating local item pricing with the Workarea pricing
|
67
|
+
system.
|
68
|
+
|
69
|
+
FLOW-6
|
70
|
+
Tom Scott
|
71
|
+
|
72
|
+
* Update Webhooks Setup
|
73
|
+
|
74
|
+
The webhook shared secret is now generated by the Workarea application
|
75
|
+
automatically as part of the install procedure for the plugin, right
|
76
|
+
before webhooks are created on Flow's side. Update README to include
|
77
|
+
information on new configuration settings, remove notes on the webhook
|
78
|
+
secret, and reformat the docs so they're friendly to total newbies as
|
79
|
+
well as an old Linuxbeard. Fix some typos and grammar in the README as
|
80
|
+
well. This also adds the `LICENSE` file to the repository for future open
|
81
|
+
source goodness.
|
82
|
+
|
83
|
+
FLOW-2
|
84
|
+
Tom Scott
|
85
|
+
|
86
|
+
* Add FlowJS for Real-Time Pricing Updates
|
87
|
+
|
88
|
+
It's possible that prices could change between the time they are synced
|
89
|
+
over to us via the (upcoming) CSV FTP upload, and they could change for
|
90
|
+
experiences that aren't explicitly configured in the Flow Console. In
|
91
|
+
order to address this, the FlowJS library has been integrated to provide
|
92
|
+
pricing updates to each product as it appears on screen. A future code
|
93
|
+
change will (probably) be made that addresses the consumption of this CSV
|
94
|
+
file, which is how we'll be obtaining prices from Flow instead of using
|
95
|
+
the webhooks.
|
96
|
+
|
97
|
+
In addition, this removes the old "Flow Beacon" and "Flow Country
|
98
|
+
Picker" scripts, since `flow.js` handles both of those use cases
|
99
|
+
out-of-box.
|
100
|
+
|
101
|
+
This JS integration is fully opt-in, and won't activate unless you
|
102
|
+
configure `config.flow_io.enable_javascript = true`.
|
103
|
+
|
104
|
+
FLOW-4
|
105
|
+
Tom Scott
|
106
|
+
|
107
|
+
* Add GitHub Workflow and Fix Tests
|
108
|
+
|
109
|
+
- Add static analysis configuration and run jobs in parallel
|
110
|
+
- Enforce Ruby 2.4 for local Workarea compatibility
|
111
|
+
- Run auto-corrections in RuboCop
|
112
|
+
- Fix plugin tests
|
113
|
+
|
114
|
+
FLOW-7
|
115
|
+
Tom Scott
|
116
|
+
|
117
|
+
* Add GitHub workflows and templates
|
118
|
+
|
119
|
+
Tom Scott
|
120
|
+
|
121
|
+
* Update setting site locale with multiste
|
122
|
+
|
123
|
+
Multisite uses it's own method to set I18n.locale; override this method
|
124
|
+
to prevent from setting the locale from a flow experience
|
125
|
+
|
126
|
+
FLOW-59
|
127
|
+
Eric Pigeon
|
128
|
+
|
129
|
+
* Upgrade for Workarea V3.4
|
130
|
+
|
131
|
+
Remove call to removed class `SaveOrderAnalytics` and update
|
132
|
+
`Workarea::OrderMetrics#discount_adjustments` to use `original_discounts`
|
133
|
+
for flow orders
|
134
|
+
|
135
|
+
FLOW-57
|
136
|
+
Eric Pigeon
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
Workarea Flow Io 1.2.0 (2019-05-14)
|
141
|
+
--------------------------------------------------------------------------------
|
142
|
+
|
143
|
+
* Upgrade for Workarea V3.4
|
144
|
+
|
145
|
+
Remove call to removed class `SaveOrderAnalytics` and update
|
146
|
+
`Workarea::OrderMetrics#discount_adjustments` to use `original_discounts`
|
147
|
+
for flow orders
|
148
|
+
|
149
|
+
FLOW-57
|
150
|
+
|
151
|
+
Workarea Flow Io 1.1.2 (2019-09-20)
|
152
|
+
--------------------------------------------------------------------------------
|
153
|
+
|
154
|
+
* Handle orders changing currency during flow checkout
|
155
|
+
|
156
|
+
Changing shipping address in flow checkout would update the experience
|
157
|
+
and currency causing the webhook to error. Update the
|
158
|
+
`Order#experience` when processing the order upserted webhook
|
159
|
+
|
160
|
+
FLOW-60
|
161
|
+
Eric Pigeon
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
Workarea Flow Io 1.1.1 (2019-07-18)
|
166
|
+
--------------------------------------------------------------------------------
|
167
|
+
|
168
|
+
* Update setting site locale with multiste
|
169
|
+
|
170
|
+
Multisite uses it's own method to set I18n.locale; override this method
|
171
|
+
to prevent from setting the locale from a flow experience
|
172
|
+
|
173
|
+
FLOW-59
|
174
|
+
Eric Pigeon
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
Workarea Flow Io 1.1.0 (2019-04-16)
|
179
|
+
--------------------------------------------------------------------------------
|
180
|
+
|
181
|
+
* Set payment token to correct value from activemerchant gateway
|
182
|
+
|
183
|
+
Properly set the stored credit card the value returned from the store
|
184
|
+
method on the activemerchant integration.
|
185
|
+
|
186
|
+
FLOW-58
|
187
|
+
Jeff Yucis
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
Workarea Flow Io 1.0.0 (2018-11-13)
|
192
|
+
--------------------------------------------------------------------------------
|
193
|
+
|
194
|
+
* Workarea Flow.io
|
195
|
+
|
196
|
+
Flow enables merchants to create localized shopping experiences,
|
197
|
+
including localized prices, payment and shipping options.
|
198
|
+
|
199
|
+
FLOW-1
|
200
|
+
Eric Pigeon
|