workarea-flow_io 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (272) hide show
  1. checksums.yaml +7 -0
  2. data/.eslintignore +2 -0
  3. data/.eslintrc.json +37 -0
  4. data/.github/ISSUE_TEMPLATE/bug_report.md +37 -0
  5. data/.github/ISSUE_TEMPLATE/documentation-request.md +17 -0
  6. data/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
  7. data/.github/workflows/ci.yml +90 -0
  8. data/.gitignore +21 -0
  9. data/.rubocop.yml +2 -0
  10. data/.ruby-version +1 -0
  11. data/.stylelintrc.json +12 -0
  12. data/CHANGELOG.md +200 -0
  13. data/Gemfile +19 -0
  14. data/LICENSE +52 -0
  15. data/README.md +200 -0
  16. data/Rakefile +59 -0
  17. data/app/assets/javascripts/workarea/storefront/flow_io/adapters/flow_io_adapter.js +61 -0
  18. data/app/assets/javascripts/workarea/storefront/flow_io/configuration.js.erb +10 -0
  19. data/app/assets/javascripts/workarea/storefront/flow_io/flow.js +91 -0
  20. data/app/assets/stylesheets/flow_io/storefront/country_picker.scss +189 -0
  21. data/app/controllers/workarea/admin/application_controller.decorator +5 -0
  22. data/app/controllers/workarea/admin/catalog_categories_controller.decorator +9 -0
  23. data/app/controllers/workarea/admin/flow_imports_controller.rb +9 -0
  24. data/app/controllers/workarea/admin/orders_controller.decorator +6 -0
  25. data/app/controllers/workarea/admin/pricing_skus_controller.decorator +7 -0
  26. data/app/controllers/workarea/admin/search_settings_controller.decorator +27 -0
  27. data/app/controllers/workarea/storefront/application_controller.decorator +80 -0
  28. data/app/controllers/workarea/storefront/checkouts_controller.decorator +38 -0
  29. data/app/controllers/workarea/storefront/flow_io_webhook_controller.rb +49 -0
  30. data/app/controllers/workarea/storefront/recent_views_controller.decorator +15 -0
  31. data/app/controllers/workarea/storefront/searches_controller.decorator +11 -0
  32. data/app/helpers/workarea/admin/flow_helper.rb +13 -0
  33. data/app/helpers/workarea/storefront/flow_analytics_helper.rb +23 -0
  34. data/app/helpers/workarea/storefront/flow_content_helper.rb +21 -0
  35. data/app/middleware/workarea/flow_io/session_middleware.rb +68 -0
  36. data/app/models/workarea/address.decorator +12 -0
  37. data/app/models/workarea/catalog/category.decorator +8 -0
  38. data/app/models/workarea/checkout.decorator +26 -0
  39. data/app/models/workarea/flow_io/experience_geo.rb +18 -0
  40. data/app/models/workarea/flow_io/experience_summary.rb +15 -0
  41. data/app/models/workarea/flow_io/import.rb +31 -0
  42. data/app/models/workarea/flow_io/imported_item.rb +124 -0
  43. data/app/models/workarea/flow_io/local_item.rb +28 -0
  44. data/app/models/workarea/flow_io/localized_price.rb +30 -0
  45. data/app/models/workarea/flow_io/price.rb +12 -0
  46. data/app/models/workarea/flow_io/price_with_base.rb +7 -0
  47. data/app/models/workarea/flow_io/webhook/shared_secret.rb +12 -0
  48. data/app/models/workarea/flow_price_adjustment_set.rb +80 -0
  49. data/app/models/workarea/fulfillment.decorator +63 -0
  50. data/app/models/workarea/order.decorator +39 -0
  51. data/app/models/workarea/order/item.decorator +43 -0
  52. data/app/models/workarea/payment.decorator +11 -0
  53. data/app/models/workarea/payment/authorize/flow_payment.rb +48 -0
  54. data/app/models/workarea/payment/capture/flow_payment.rb +35 -0
  55. data/app/models/workarea/payment/flow_payment_data.rb +25 -0
  56. data/app/models/workarea/payment/flow_payment_operation.rb +20 -0
  57. data/app/models/workarea/payment/purchase/flow_payment.rb +44 -0
  58. data/app/models/workarea/payment/refund/flow_payment.rb +42 -0
  59. data/app/models/workarea/payment/store_flow_credit_card.rb +34 -0
  60. data/app/models/workarea/payment/tender.decorator +8 -0
  61. data/app/models/workarea/payment/tender/flow_payment.rb +15 -0
  62. data/app/models/workarea/payment/transaction.decorator +12 -0
  63. data/app/models/workarea/pricing/calculators/flow_localization_calculator.rb +30 -0
  64. data/app/models/workarea/pricing/calculators/item_calculator.decorator +39 -0
  65. data/app/models/workarea/pricing/collection.decorator +113 -0
  66. data/app/models/workarea/pricing/order_totals.decorator +53 -0
  67. data/app/models/workarea/pricing/price.decorator +17 -0
  68. data/app/models/workarea/pricing/price_distributor.decorator +51 -0
  69. data/app/models/workarea/pricing/request.decorator +17 -0
  70. data/app/models/workarea/pricing/shipping_totals.decorator +24 -0
  71. data/app/models/workarea/pricing/sku.decorator +46 -0
  72. data/app/models/workarea/search/settings.decorator +8 -0
  73. data/app/models/workarea/search/storefront/product.decorator +25 -0
  74. data/app/models/workarea/shipping.decorator +28 -0
  75. data/app/queries/workarea/order_metrics.decorator +23 -0
  76. data/app/queries/workarea/search/product_search.decorator +14 -0
  77. data/app/queries/workarea/search/storefront_search/response.decorator +40 -0
  78. data/app/services/workarea/flow_io/checkout.rb +242 -0
  79. data/app/services/workarea/flow_io/checkout_token_form.rb +36 -0
  80. data/app/services/workarea/flow_io/countries.rb +14 -0
  81. data/app/services/workarea/flow_io/detailed_shipping_notification_form.rb +84 -0
  82. data/app/services/workarea/flow_io/experiences.rb +24 -0
  83. data/app/services/workarea/flow_io/fulfillment_cancellation_form.rb +40 -0
  84. data/app/services/workarea/flow_io/item.rb +122 -0
  85. data/app/services/workarea/flow_io/item_importer.rb +108 -0
  86. data/app/services/workarea/flow_io/line_item_form.rb +72 -0
  87. data/app/services/workarea/flow_io/order_put_form.rb +62 -0
  88. data/app/services/workarea/flow_io/price_applier.rb +81 -0
  89. data/app/services/workarea/flow_io/price_applier/item_applier.rb +157 -0
  90. data/app/services/workarea/flow_io/routing_contraints.rb +10 -0
  91. data/app/services/workarea/flow_io/session.rb +90 -0
  92. data/app/services/workarea/flow_io/webhook.rb +28 -0
  93. data/app/services/workarea/flow_io/webhook/experience_deleted_v2.rb +9 -0
  94. data/app/services/workarea/flow_io/webhook/experience_upserted_v2.rb +9 -0
  95. data/app/services/workarea/flow_io/webhook/order_upserted_v2.rb +36 -0
  96. data/app/services/workarea/flow_io/webhook_request_signature.rb +19 -0
  97. data/app/view_models/workarea/admin/flow_imports_view_model.rb +36 -0
  98. data/app/view_models/workarea/storefront/cart_view_model.decorator +27 -0
  99. data/app/view_models/workarea/storefront/content_blocks/category_summary_view_model.decorator +11 -0
  100. data/app/view_models/workarea/storefront/content_blocks/product_insights_view_model.decorator +11 -0
  101. data/app/view_models/workarea/storefront/content_blocks/product_list_view_model.decorator +13 -0
  102. data/app/view_models/workarea/storefront/order_item_view_model.decorator +35 -0
  103. data/app/view_models/workarea/storefront/order_view_model.decorator +51 -0
  104. data/app/view_models/workarea/storefront/product_templates/option_set_view_model.decorator +20 -0
  105. data/app/view_models/workarea/storefront/product_templates/package_view_model.decorator +14 -0
  106. data/app/view_models/workarea/storefront/product_view_model.decorator +15 -0
  107. data/app/view_models/workarea/storefront/product_view_model/cache_key.decorator +7 -0
  108. data/app/view_models/workarea/storefront/recommendations_view_model.decorator +20 -0
  109. data/app/view_models/workarea/storefront/user_activity_view_model.decorator +18 -0
  110. data/app/views/workarea/admin/catalog_categories/edit.html.haml +85 -0
  111. data/app/views/workarea/admin/facets/_price_inputs.html.haml +50 -0
  112. data/app/views/workarea/admin/flow_imports/index.html.haml +44 -0
  113. data/app/views/workarea/admin/orders/_flow.html.haml +22 -0
  114. data/app/views/workarea/admin/orders/_flow_aux_navigation.html.haml +2 -0
  115. data/app/views/workarea/admin/orders/flow.html.haml +109 -0
  116. data/app/views/workarea/admin/orders/tenders/_flow_payment.html.haml +3 -0
  117. data/app/views/workarea/admin/pricing_skus/_cards.html.haml +83 -0
  118. data/app/views/workarea/admin/pricing_skus/flow.html.haml +60 -0
  119. data/app/views/workarea/admin/search_settings/show.html.haml +55 -0
  120. data/app/views/workarea/admin/shared/_flow_imports_link.html.haml +1 -0
  121. data/app/views/workarea/storefront/_flow_io_country_picker.html.haml +2 -0
  122. data/app/views/workarea/storefront/_flow_io_country_picker_javascript.html.haml +1 -0
  123. data/app/views/workarea/storefront/order_mailer/tenders/_flow_payment.html.haml +2 -0
  124. data/app/views/workarea/storefront/order_mailer/tenders/_flow_payment.text.erb +1 -0
  125. data/app/views/workarea/storefront/orders/tenders/_flow_payment.html.haml +3 -0
  126. data/app/views/workarea/storefront/products/_pricing.html.haml +41 -0
  127. data/app/workers/workarea/flow_io/delete_items.rb +30 -0
  128. data/app/workers/workarea/flow_io/fetch_import.rb +34 -0
  129. data/app/workers/workarea/flow_io/fulfillment_cancellation.rb +14 -0
  130. data/app/workers/workarea/flow_io/item_exporter.rb +47 -0
  131. data/app/workers/workarea/flow_io/process_import.rb +28 -0
  132. data/app/workers/workarea/flow_io/shipping_notifications.rb +13 -0
  133. data/bin/rails +25 -0
  134. data/config/initializers/appends.rb +39 -0
  135. data/config/initializers/freedom_patches.rb +23 -0
  136. data/config/initializers/middleware.rb +11 -0
  137. data/config/initializers/payment_proxy.rb +5 -0
  138. data/config/initializers/rack_attack.rb +15 -0
  139. data/config/initializers/scheduled_jobs.rb +9 -0
  140. data/config/initializers/workarea.rb +101 -0
  141. data/config/initializers/workarea_i18n.rb +11 -0
  142. data/config/locales/en.yml +72 -0
  143. data/config/routes.rb +21 -0
  144. data/lib/active_merchant/billing/bogus_flow_gateway.rb +16 -0
  145. data/lib/active_merchant/billing/flow_gateway.rb +48 -0
  146. data/lib/tasks/flow_io.rake +117 -0
  147. data/lib/workarea/flow_io.rb +73 -0
  148. data/lib/workarea/flow_io/bogus_client.rb +57 -0
  149. data/lib/workarea/flow_io/bogus_client/checkout_tokens.rb +25 -0
  150. data/lib/workarea/flow_io/bogus_client/experiences.rb +152 -0
  151. data/lib/workarea/flow_io/bogus_client/fulfillments.rb +9 -0
  152. data/lib/workarea/flow_io/bogus_client/items.rb +11 -0
  153. data/lib/workarea/flow_io/bogus_client/orders.rb +499 -0
  154. data/lib/workarea/flow_io/bogus_client/organizations.rb +42 -0
  155. data/lib/workarea/flow_io/bogus_client/proxy_client.rb +29 -0
  156. data/lib/workarea/flow_io/bogus_client/sessions.rb +115 -0
  157. data/lib/workarea/flow_io/bogus_client/shipping_notifications.rb +10 -0
  158. data/lib/workarea/flow_io/bogus_client/webhook_settings.rb +11 -0
  159. data/lib/workarea/flow_io/bogus_client/webhooks.rb +11 -0
  160. data/lib/workarea/flow_io/controller_log_subscriber.rb +21 -0
  161. data/lib/workarea/flow_io/engine.rb +8 -0
  162. data/lib/workarea/flow_io/http_handler.rb +27 -0
  163. data/lib/workarea/flow_io/version.rb +5 -0
  164. data/lib/workarea/freedom_patches/flow_io.rb +53 -0
  165. data/package.json +9 -0
  166. data/script/admin_ci +9 -0
  167. data/script/ci +11 -0
  168. data/script/core_ci +9 -0
  169. data/script/plugins_ci +9 -0
  170. data/script/storefront_ci +9 -0
  171. data/test/dummy/.ruby-version +1 -0
  172. data/test/dummy/Rakefile +6 -0
  173. data/test/dummy/bin/bundle +3 -0
  174. data/test/dummy/bin/rails +4 -0
  175. data/test/dummy/bin/rake +4 -0
  176. data/test/dummy/bin/setup +28 -0
  177. data/test/dummy/bin/update +28 -0
  178. data/test/dummy/bin/yarn +11 -0
  179. data/test/dummy/config.ru +5 -0
  180. data/test/dummy/config/application.rb +32 -0
  181. data/test/dummy/config/boot.rb +5 -0
  182. data/test/dummy/config/cable.yml +10 -0
  183. data/test/dummy/config/environment.rb +5 -0
  184. data/test/dummy/config/environments/development.rb +52 -0
  185. data/test/dummy/config/environments/production.rb +88 -0
  186. data/test/dummy/config/environments/test.rb +45 -0
  187. data/test/dummy/config/initializers/application_controller_renderer.rb +8 -0
  188. data/test/dummy/config/initializers/assets.rb +14 -0
  189. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  190. data/test/dummy/config/initializers/content_security_policy.rb +25 -0
  191. data/test/dummy/config/initializers/cookies_serializer.rb +5 -0
  192. data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
  193. data/test/dummy/config/initializers/inflections.rb +16 -0
  194. data/test/dummy/config/initializers/mime_types.rb +4 -0
  195. data/test/dummy/config/initializers/workarea.rb +5 -0
  196. data/test/dummy/config/initializers/wrap_parameters.rb +9 -0
  197. data/test/dummy/config/locales/en.yml +33 -0
  198. data/test/dummy/config/puma.rb +34 -0
  199. data/test/dummy/config/routes.rb +5 -0
  200. data/test/dummy/config/secrets.yml +22 -0
  201. data/test/dummy/config/spring.rb +6 -0
  202. data/test/dummy/db/seeds.rb +2 -0
  203. data/test/dummy/log/.keep +0 -0
  204. data/test/dummy/package.json +5 -0
  205. data/test/factories/workarea/flow_io.rb +136 -0
  206. data/test/factories/workarea/flow_io/euro_order_upserted_payload.rb +581 -0
  207. data/test/fixtures/files/example.csv +14 -0
  208. data/test/integration/workarea/admin/flow_imports_integration_test.rb +20 -0
  209. data/test/integration/workarea/admin/flow_order_integration_test.rb +37 -0
  210. data/test/integration/workarea/admin/search_settings_integration_test.decorator +44 -0
  211. data/test/integration/workarea/flow_locale_integration_test.rb +34 -0
  212. data/test/integration/workarea/storefront/copying_guest_order_integration_test.decorator +113 -0
  213. data/test/integration/workarea/storefront/flow_io_order_redirect_test.rb +55 -0
  214. data/test/integration/workarea/storefront/flow_io_session_integration_test.rb +122 -0
  215. data/test/integration/workarea/storefront/flow_io_webhooks/order_integration_test.rb +750 -0
  216. data/test/integration/workarea/storefront/flow_webhook_rack_attack_integration_test.rb +54 -0
  217. data/test/integration/workarea/storefront/search_integration_test.decorator +51 -0
  218. data/test/javascripts/flow_spec.js +39 -0
  219. data/test/javascripts/spec_helper.js +3 -0
  220. data/test/models/workarea/address_test.decorator +20 -0
  221. data/test/models/workarea/checkout_test.decorator +20 -0
  222. data/test/models/workarea/flow_io/imported_item_test.rb +50 -0
  223. data/test/models/workarea/fulfillment_test.decorator +12 -0
  224. data/test/models/workarea/oms_fulfillment_test.decorator +14 -0
  225. data/test/models/workarea/order/item_test.decorator +46 -0
  226. data/test/models/workarea/order_test.decorator +16 -0
  227. data/test/models/workarea/payment/flow_payment_integration_test.rb +163 -0
  228. data/test/models/workarea/price_adjustment_set_flow_test.rb +8 -0
  229. data/test/models/workarea/pricing/calculators/flow_localization_calculator_test.rb +152 -0
  230. data/test/models/workarea/pricing/calculators/item_calculator_test.decorator +59 -0
  231. data/test/models/workarea/pricing/collection_test.decorator +140 -0
  232. data/test/models/workarea/pricing/order_totals_test.rb +247 -0
  233. data/test/models/workarea/pricing/price_distributor_test.decorator +21 -0
  234. data/test/models/workarea/pricing/sku_test.decorator +113 -0
  235. data/test/models/workarea/shipping_test.decorator +70 -0
  236. data/test/queries/workarea/flow_order_metrics_test.rb +104 -0
  237. data/test/services/workarea/commit_shipments_test.decorator +14 -0
  238. data/test/services/workarea/flow_io/checkout_test.rb +43 -0
  239. data/test/services/workarea/flow_io/detailed_shipping_notification_form_test.rb +145 -0
  240. data/test/services/workarea/flow_io/experiences_test.rb +14 -0
  241. data/test/services/workarea/flow_io/fulfillment_cancellation_form_test.rb +46 -0
  242. data/test/services/workarea/flow_io/item_importer_test.rb +357 -0
  243. data/test/services/workarea/flow_io/item_test.rb +72 -0
  244. data/test/services/workarea/flow_io/line_item_form_test.rb +34 -0
  245. data/test/services/workarea/flow_io/order_put_form_test.rb +48 -0
  246. data/test/services/workarea/flow_io/price_applier_test.rb +916 -0
  247. data/test/support/flow_fixtures.rb +1362 -0
  248. data/test/support/webhook_integration_test.rb +43 -0
  249. data/test/support/workarea/flow_bogus_client_support.rb +18 -0
  250. data/test/support/workarea/flow_io_vcr_config.rb +22 -0
  251. data/test/system/workarea/admin/search_fulfillment_system_test.decorator +25 -0
  252. data/test/system/workarea/storefront/analytics_system_test.decorator +28 -0
  253. data/test/system/workarea/storefront/flow_cart_recommendations_system_test.rb +70 -0
  254. data/test/system/workarea/storefront/users_flow_orders_system_test.rb +25 -0
  255. data/test/teaspoon_env.rb +6 -0
  256. data/test/test_helper.rb +27 -0
  257. data/test/vcr_cassettes/payment/flow/auth_capture.yml +188 -0
  258. data/test/vcr_cassettes/payment/flow/auth_capture_refund.yml +249 -0
  259. data/test/vcr_cassettes/payment/flow/auth_void.yml +188 -0
  260. data/test/vcr_cassettes/payment/flow/purchase_refund.yml +249 -0
  261. data/test/vcr_cassettes/payment/flow/store_auth.yml +127 -0
  262. data/test/vcr_cassettes/payment/flow/store_purchase.yml +188 -0
  263. data/test/view_models/workarea/storefront/cart_view_model_test.decorator +19 -0
  264. data/test/view_models/workarea/storefront/order_item_view_model_test.decorator +24 -0
  265. data/test/view_models/workarea/storefront/order_view_model_test.decorator +41 -0
  266. data/test/view_models/workarea/storefront/package_view_model_test.decorator +11 -0
  267. data/test/workers/workarea/flow_io/delete_items_test.rb +37 -0
  268. data/test/workers/workarea/flow_io/fetch_import_test.rb +41 -0
  269. data/test/workers/workarea/flow_io/item_exporter_test.rb +47 -0
  270. data/test/workers/workarea/flow_io/process_import_test.rb +25 -0
  271. data/workarea-flow_io.gemspec +20 -0
  272. metadata +375 -0
@@ -0,0 +1,41 @@
1
+ require 'test_helper'
2
+
3
+ module Workarea
4
+ module FlowIo
5
+ class FetchImportTest < TestCase
6
+ def test_fetch_csv_from_ftp_and_store
7
+ username = 'admin'
8
+ password = 'hunter2'
9
+ fixture = FlowIo::Engine.root.join(
10
+ 'test', 'fixtures', 'files', 'example.csv'
11
+ )
12
+ path = Pathname.new('flow').join('from-flow', 'export')
13
+ dir = mock('Net::SFTP::Operations::Dir')
14
+ sftp = mock('Net::SFTP::Session')
15
+ entry = mock('Net::SFTP::Operations::Entry')
16
+
17
+ entry.expects(:name).at_least_once.returns(fixture.basename.to_s)
18
+ dir.expects(:glob).at_least_once.with(path.to_s, '*.csv').yields(entry)
19
+ sftp.expects(:dir).at_least_once.returns(dir)
20
+ sftp.expects(:download!).at_least_once.returns(fixture.read)
21
+ FlowIo.expects(:credentials).at_least_once.returns(
22
+ ftp_username: username,
23
+ ftp_password: password
24
+ )
25
+ Net::SFTP.expects(:start).twice.with(
26
+ FlowIo::FTP_HOST,
27
+ username,
28
+ password: password
29
+ ).yields(sftp)
30
+
31
+ assert_difference -> { Import.count } do
32
+ FetchImport.new.perform
33
+ end
34
+ assert_equal(fixture.basename.to_s, Import.all.first.name)
35
+ assert_no_difference -> { Import.count } do
36
+ FetchImport.new.perform
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,47 @@
1
+ require 'test_helper'
2
+
3
+ module Workarea
4
+ module FlowIo
5
+ class ItemExporterTest < Workarea::TestCase
6
+ include Workers
7
+
8
+ def test_exporting_from_product_save
9
+ Sidekiq::Callbacks.enable(FlowIo::ItemExporter) do
10
+ BogusClient::Items.any_instance.expects(:put_by_number).times(3)
11
+
12
+ create_product(
13
+ variants: [
14
+ { sku: 'SKU1', regular: 5.00 },
15
+ { sku: 'SKU2', regular: 5.00 },
16
+ ]
17
+ )
18
+ Pricing::Sku.find("SKU2").tap do |sku|
19
+ sku.prices.first.regular = 6.00
20
+ sku.save
21
+ end
22
+ end
23
+ end
24
+
25
+ def test_exporting_from_updating_price
26
+ create_product(
27
+ variants: [
28
+ { sku: 'SKU1', regular: 5.00 }
29
+ ]
30
+ )
31
+ pricing_sku = Pricing::Sku.find('SKU1')
32
+ price = pricing_sku.prices.first
33
+
34
+ Sidekiq::Callbacks.enable(FlowIo::ItemExporter) do
35
+ BogusClient::Items.any_instance.expects(:put_by_number).times(1)
36
+
37
+ price.update_attributes(
38
+ regular: 0.44,
39
+ sale: 0.30,
40
+ min_quantity: 1,
41
+ active: true
42
+ )
43
+ end
44
+ end
45
+ end
46
+ end
47
+ end
@@ -0,0 +1,25 @@
1
+ require 'test_helper'
2
+
3
+ module Workarea
4
+ module FlowIo
5
+ class ProcessImportTest < TestCase
6
+ def test_process_stored_csv
7
+ file_path = FlowIo::Engine.root.join('test', 'fixtures', 'files', 'example.csv')
8
+ file = file_path.open
9
+
10
+ assert_difference -> { Pricing::Sku.count }, 8 do
11
+ Sidekiq::Callbacks.enable ProcessImport do
12
+ Import.create!(name: file_path.basename, file: file)
13
+ end
14
+ end
15
+
16
+ import = Import.last
17
+
18
+ refute_nil(import.started_at)
19
+ refute_nil(import.completed_at)
20
+ ensure
21
+ file&.close
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,20 @@
1
+ $:.push File.expand_path("lib", __dir__)
2
+
3
+ require "workarea/flow_io/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "workarea-flow_io"
7
+ s.version = Workarea::FlowIo::VERSION
8
+ s.authors = ["Eric Pigeon"]
9
+ s.email = ["epigeon@weblinc.com"]
10
+ s.homepage = 'https://plugins.workarea.com/plugins/flow-io'
11
+ s.summary = 'Flow Commerce integration for the Workarea Commerce Platform'
12
+ s.description = "Integrate Flow Commerce's international payments into the Workarea Commerce Platform"
13
+
14
+ s.files = `git ls-files`.split("\n")
15
+
16
+ s.add_dependency 'workarea', '~> 3.x', ">= 3.4.0"
17
+ s.add_dependency 'flowcommerce', ">= 0.2.69"
18
+ s.add_dependency 'flowcommerce-activemerchant', ">= 0.1.3"
19
+ s.add_dependency 'net-sftp', '~> 2.1.2'
20
+ end
metadata ADDED
@@ -0,0 +1,375 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: workarea-flow_io
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.2.1
5
+ platform: ruby
6
+ authors:
7
+ - Eric Pigeon
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-01-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: workarea
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 3.x
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 3.4.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: 3.x
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 3.4.0
33
+ - !ruby/object:Gem::Dependency
34
+ name: flowcommerce
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 0.2.69
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 0.2.69
47
+ - !ruby/object:Gem::Dependency
48
+ name: flowcommerce-activemerchant
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 0.1.3
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 0.1.3
61
+ - !ruby/object:Gem::Dependency
62
+ name: net-sftp
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - "~>"
66
+ - !ruby/object:Gem::Version
67
+ version: 2.1.2
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - "~>"
73
+ - !ruby/object:Gem::Version
74
+ version: 2.1.2
75
+ description: Integrate Flow Commerce's international payments into the Workarea Commerce
76
+ Platform
77
+ email:
78
+ - epigeon@weblinc.com
79
+ executables: []
80
+ extensions: []
81
+ extra_rdoc_files: []
82
+ files:
83
+ - ".eslintignore"
84
+ - ".eslintrc.json"
85
+ - ".github/ISSUE_TEMPLATE/bug_report.md"
86
+ - ".github/ISSUE_TEMPLATE/documentation-request.md"
87
+ - ".github/ISSUE_TEMPLATE/feature_request.md"
88
+ - ".github/workflows/ci.yml"
89
+ - ".gitignore"
90
+ - ".rubocop.yml"
91
+ - ".ruby-version"
92
+ - ".stylelintrc.json"
93
+ - CHANGELOG.md
94
+ - Gemfile
95
+ - LICENSE
96
+ - README.md
97
+ - Rakefile
98
+ - app/assets/javascripts/workarea/storefront/flow_io/adapters/flow_io_adapter.js
99
+ - app/assets/javascripts/workarea/storefront/flow_io/configuration.js.erb
100
+ - app/assets/javascripts/workarea/storefront/flow_io/flow.js
101
+ - app/assets/stylesheets/flow_io/storefront/country_picker.scss
102
+ - app/controllers/workarea/admin/application_controller.decorator
103
+ - app/controllers/workarea/admin/catalog_categories_controller.decorator
104
+ - app/controllers/workarea/admin/flow_imports_controller.rb
105
+ - app/controllers/workarea/admin/orders_controller.decorator
106
+ - app/controllers/workarea/admin/pricing_skus_controller.decorator
107
+ - app/controllers/workarea/admin/search_settings_controller.decorator
108
+ - app/controllers/workarea/storefront/application_controller.decorator
109
+ - app/controllers/workarea/storefront/checkouts_controller.decorator
110
+ - app/controllers/workarea/storefront/flow_io_webhook_controller.rb
111
+ - app/controllers/workarea/storefront/recent_views_controller.decorator
112
+ - app/controllers/workarea/storefront/searches_controller.decorator
113
+ - app/helpers/workarea/admin/flow_helper.rb
114
+ - app/helpers/workarea/storefront/flow_analytics_helper.rb
115
+ - app/helpers/workarea/storefront/flow_content_helper.rb
116
+ - app/middleware/workarea/flow_io/session_middleware.rb
117
+ - app/models/workarea/address.decorator
118
+ - app/models/workarea/catalog/category.decorator
119
+ - app/models/workarea/checkout.decorator
120
+ - app/models/workarea/flow_io/experience_geo.rb
121
+ - app/models/workarea/flow_io/experience_summary.rb
122
+ - app/models/workarea/flow_io/import.rb
123
+ - app/models/workarea/flow_io/imported_item.rb
124
+ - app/models/workarea/flow_io/local_item.rb
125
+ - app/models/workarea/flow_io/localized_price.rb
126
+ - app/models/workarea/flow_io/price.rb
127
+ - app/models/workarea/flow_io/price_with_base.rb
128
+ - app/models/workarea/flow_io/webhook/shared_secret.rb
129
+ - app/models/workarea/flow_price_adjustment_set.rb
130
+ - app/models/workarea/fulfillment.decorator
131
+ - app/models/workarea/order.decorator
132
+ - app/models/workarea/order/item.decorator
133
+ - app/models/workarea/payment.decorator
134
+ - app/models/workarea/payment/authorize/flow_payment.rb
135
+ - app/models/workarea/payment/capture/flow_payment.rb
136
+ - app/models/workarea/payment/flow_payment_data.rb
137
+ - app/models/workarea/payment/flow_payment_operation.rb
138
+ - app/models/workarea/payment/purchase/flow_payment.rb
139
+ - app/models/workarea/payment/refund/flow_payment.rb
140
+ - app/models/workarea/payment/store_flow_credit_card.rb
141
+ - app/models/workarea/payment/tender.decorator
142
+ - app/models/workarea/payment/tender/flow_payment.rb
143
+ - app/models/workarea/payment/transaction.decorator
144
+ - app/models/workarea/pricing/calculators/flow_localization_calculator.rb
145
+ - app/models/workarea/pricing/calculators/item_calculator.decorator
146
+ - app/models/workarea/pricing/collection.decorator
147
+ - app/models/workarea/pricing/order_totals.decorator
148
+ - app/models/workarea/pricing/price.decorator
149
+ - app/models/workarea/pricing/price_distributor.decorator
150
+ - app/models/workarea/pricing/request.decorator
151
+ - app/models/workarea/pricing/shipping_totals.decorator
152
+ - app/models/workarea/pricing/sku.decorator
153
+ - app/models/workarea/search/settings.decorator
154
+ - app/models/workarea/search/storefront/product.decorator
155
+ - app/models/workarea/shipping.decorator
156
+ - app/queries/workarea/order_metrics.decorator
157
+ - app/queries/workarea/search/product_search.decorator
158
+ - app/queries/workarea/search/storefront_search/response.decorator
159
+ - app/services/workarea/flow_io/checkout.rb
160
+ - app/services/workarea/flow_io/checkout_token_form.rb
161
+ - app/services/workarea/flow_io/countries.rb
162
+ - app/services/workarea/flow_io/detailed_shipping_notification_form.rb
163
+ - app/services/workarea/flow_io/experiences.rb
164
+ - app/services/workarea/flow_io/fulfillment_cancellation_form.rb
165
+ - app/services/workarea/flow_io/item.rb
166
+ - app/services/workarea/flow_io/item_importer.rb
167
+ - app/services/workarea/flow_io/line_item_form.rb
168
+ - app/services/workarea/flow_io/order_put_form.rb
169
+ - app/services/workarea/flow_io/price_applier.rb
170
+ - app/services/workarea/flow_io/price_applier/item_applier.rb
171
+ - app/services/workarea/flow_io/routing_contraints.rb
172
+ - app/services/workarea/flow_io/session.rb
173
+ - app/services/workarea/flow_io/webhook.rb
174
+ - app/services/workarea/flow_io/webhook/experience_deleted_v2.rb
175
+ - app/services/workarea/flow_io/webhook/experience_upserted_v2.rb
176
+ - app/services/workarea/flow_io/webhook/order_upserted_v2.rb
177
+ - app/services/workarea/flow_io/webhook_request_signature.rb
178
+ - app/view_models/workarea/admin/flow_imports_view_model.rb
179
+ - app/view_models/workarea/storefront/cart_view_model.decorator
180
+ - app/view_models/workarea/storefront/content_blocks/category_summary_view_model.decorator
181
+ - app/view_models/workarea/storefront/content_blocks/product_insights_view_model.decorator
182
+ - app/view_models/workarea/storefront/content_blocks/product_list_view_model.decorator
183
+ - app/view_models/workarea/storefront/order_item_view_model.decorator
184
+ - app/view_models/workarea/storefront/order_view_model.decorator
185
+ - app/view_models/workarea/storefront/product_templates/option_set_view_model.decorator
186
+ - app/view_models/workarea/storefront/product_templates/package_view_model.decorator
187
+ - app/view_models/workarea/storefront/product_view_model.decorator
188
+ - app/view_models/workarea/storefront/product_view_model/cache_key.decorator
189
+ - app/view_models/workarea/storefront/recommendations_view_model.decorator
190
+ - app/view_models/workarea/storefront/user_activity_view_model.decorator
191
+ - app/views/workarea/admin/catalog_categories/edit.html.haml
192
+ - app/views/workarea/admin/facets/_price_inputs.html.haml
193
+ - app/views/workarea/admin/flow_imports/index.html.haml
194
+ - app/views/workarea/admin/orders/_flow.html.haml
195
+ - app/views/workarea/admin/orders/_flow_aux_navigation.html.haml
196
+ - app/views/workarea/admin/orders/flow.html.haml
197
+ - app/views/workarea/admin/orders/tenders/_flow_payment.html.haml
198
+ - app/views/workarea/admin/pricing_skus/_cards.html.haml
199
+ - app/views/workarea/admin/pricing_skus/flow.html.haml
200
+ - app/views/workarea/admin/search_settings/show.html.haml
201
+ - app/views/workarea/admin/shared/_flow_imports_link.html.haml
202
+ - app/views/workarea/storefront/_flow_io_country_picker.html.haml
203
+ - app/views/workarea/storefront/_flow_io_country_picker_javascript.html.haml
204
+ - app/views/workarea/storefront/order_mailer/tenders/_flow_payment.html.haml
205
+ - app/views/workarea/storefront/order_mailer/tenders/_flow_payment.text.erb
206
+ - app/views/workarea/storefront/orders/tenders/_flow_payment.html.haml
207
+ - app/views/workarea/storefront/products/_pricing.html.haml
208
+ - app/workers/workarea/flow_io/delete_items.rb
209
+ - app/workers/workarea/flow_io/fetch_import.rb
210
+ - app/workers/workarea/flow_io/fulfillment_cancellation.rb
211
+ - app/workers/workarea/flow_io/item_exporter.rb
212
+ - app/workers/workarea/flow_io/process_import.rb
213
+ - app/workers/workarea/flow_io/shipping_notifications.rb
214
+ - bin/rails
215
+ - config/initializers/appends.rb
216
+ - config/initializers/freedom_patches.rb
217
+ - config/initializers/middleware.rb
218
+ - config/initializers/payment_proxy.rb
219
+ - config/initializers/rack_attack.rb
220
+ - config/initializers/scheduled_jobs.rb
221
+ - config/initializers/workarea.rb
222
+ - config/initializers/workarea_i18n.rb
223
+ - config/locales/en.yml
224
+ - config/routes.rb
225
+ - lib/active_merchant/billing/bogus_flow_gateway.rb
226
+ - lib/active_merchant/billing/flow_gateway.rb
227
+ - lib/tasks/flow_io.rake
228
+ - lib/workarea/flow_io.rb
229
+ - lib/workarea/flow_io/bogus_client.rb
230
+ - lib/workarea/flow_io/bogus_client/checkout_tokens.rb
231
+ - lib/workarea/flow_io/bogus_client/experiences.rb
232
+ - lib/workarea/flow_io/bogus_client/fulfillments.rb
233
+ - lib/workarea/flow_io/bogus_client/items.rb
234
+ - lib/workarea/flow_io/bogus_client/orders.rb
235
+ - lib/workarea/flow_io/bogus_client/organizations.rb
236
+ - lib/workarea/flow_io/bogus_client/proxy_client.rb
237
+ - lib/workarea/flow_io/bogus_client/sessions.rb
238
+ - lib/workarea/flow_io/bogus_client/shipping_notifications.rb
239
+ - lib/workarea/flow_io/bogus_client/webhook_settings.rb
240
+ - lib/workarea/flow_io/bogus_client/webhooks.rb
241
+ - lib/workarea/flow_io/controller_log_subscriber.rb
242
+ - lib/workarea/flow_io/engine.rb
243
+ - lib/workarea/flow_io/http_handler.rb
244
+ - lib/workarea/flow_io/version.rb
245
+ - lib/workarea/freedom_patches/flow_io.rb
246
+ - package.json
247
+ - script/admin_ci
248
+ - script/ci
249
+ - script/core_ci
250
+ - script/plugins_ci
251
+ - script/storefront_ci
252
+ - test/dummy/.ruby-version
253
+ - test/dummy/Rakefile
254
+ - test/dummy/bin/bundle
255
+ - test/dummy/bin/rails
256
+ - test/dummy/bin/rake
257
+ - test/dummy/bin/setup
258
+ - test/dummy/bin/update
259
+ - test/dummy/bin/yarn
260
+ - test/dummy/config.ru
261
+ - test/dummy/config/application.rb
262
+ - test/dummy/config/boot.rb
263
+ - test/dummy/config/cable.yml
264
+ - test/dummy/config/environment.rb
265
+ - test/dummy/config/environments/development.rb
266
+ - test/dummy/config/environments/production.rb
267
+ - test/dummy/config/environments/test.rb
268
+ - test/dummy/config/initializers/application_controller_renderer.rb
269
+ - test/dummy/config/initializers/assets.rb
270
+ - test/dummy/config/initializers/backtrace_silencers.rb
271
+ - test/dummy/config/initializers/content_security_policy.rb
272
+ - test/dummy/config/initializers/cookies_serializer.rb
273
+ - test/dummy/config/initializers/filter_parameter_logging.rb
274
+ - test/dummy/config/initializers/inflections.rb
275
+ - test/dummy/config/initializers/mime_types.rb
276
+ - test/dummy/config/initializers/workarea.rb
277
+ - test/dummy/config/initializers/wrap_parameters.rb
278
+ - test/dummy/config/locales/en.yml
279
+ - test/dummy/config/puma.rb
280
+ - test/dummy/config/routes.rb
281
+ - test/dummy/config/secrets.yml
282
+ - test/dummy/config/spring.rb
283
+ - test/dummy/db/seeds.rb
284
+ - test/dummy/log/.keep
285
+ - test/dummy/package.json
286
+ - test/factories/workarea/flow_io.rb
287
+ - test/factories/workarea/flow_io/euro_order_upserted_payload.rb
288
+ - test/fixtures/files/example.csv
289
+ - test/integration/workarea/admin/flow_imports_integration_test.rb
290
+ - test/integration/workarea/admin/flow_order_integration_test.rb
291
+ - test/integration/workarea/admin/search_settings_integration_test.decorator
292
+ - test/integration/workarea/flow_locale_integration_test.rb
293
+ - test/integration/workarea/storefront/copying_guest_order_integration_test.decorator
294
+ - test/integration/workarea/storefront/flow_io_order_redirect_test.rb
295
+ - test/integration/workarea/storefront/flow_io_session_integration_test.rb
296
+ - test/integration/workarea/storefront/flow_io_webhooks/order_integration_test.rb
297
+ - test/integration/workarea/storefront/flow_webhook_rack_attack_integration_test.rb
298
+ - test/integration/workarea/storefront/search_integration_test.decorator
299
+ - test/javascripts/flow_spec.js
300
+ - test/javascripts/spec_helper.js
301
+ - test/models/workarea/address_test.decorator
302
+ - test/models/workarea/checkout_test.decorator
303
+ - test/models/workarea/flow_io/imported_item_test.rb
304
+ - test/models/workarea/fulfillment_test.decorator
305
+ - test/models/workarea/oms_fulfillment_test.decorator
306
+ - test/models/workarea/order/item_test.decorator
307
+ - test/models/workarea/order_test.decorator
308
+ - test/models/workarea/payment/flow_payment_integration_test.rb
309
+ - test/models/workarea/price_adjustment_set_flow_test.rb
310
+ - test/models/workarea/pricing/calculators/flow_localization_calculator_test.rb
311
+ - test/models/workarea/pricing/calculators/item_calculator_test.decorator
312
+ - test/models/workarea/pricing/collection_test.decorator
313
+ - test/models/workarea/pricing/order_totals_test.rb
314
+ - test/models/workarea/pricing/price_distributor_test.decorator
315
+ - test/models/workarea/pricing/sku_test.decorator
316
+ - test/models/workarea/shipping_test.decorator
317
+ - test/queries/workarea/flow_order_metrics_test.rb
318
+ - test/services/workarea/commit_shipments_test.decorator
319
+ - test/services/workarea/flow_io/checkout_test.rb
320
+ - test/services/workarea/flow_io/detailed_shipping_notification_form_test.rb
321
+ - test/services/workarea/flow_io/experiences_test.rb
322
+ - test/services/workarea/flow_io/fulfillment_cancellation_form_test.rb
323
+ - test/services/workarea/flow_io/item_importer_test.rb
324
+ - test/services/workarea/flow_io/item_test.rb
325
+ - test/services/workarea/flow_io/line_item_form_test.rb
326
+ - test/services/workarea/flow_io/order_put_form_test.rb
327
+ - test/services/workarea/flow_io/price_applier_test.rb
328
+ - test/support/flow_fixtures.rb
329
+ - test/support/webhook_integration_test.rb
330
+ - test/support/workarea/flow_bogus_client_support.rb
331
+ - test/support/workarea/flow_io_vcr_config.rb
332
+ - test/system/workarea/admin/search_fulfillment_system_test.decorator
333
+ - test/system/workarea/storefront/analytics_system_test.decorator
334
+ - test/system/workarea/storefront/flow_cart_recommendations_system_test.rb
335
+ - test/system/workarea/storefront/users_flow_orders_system_test.rb
336
+ - test/teaspoon_env.rb
337
+ - test/test_helper.rb
338
+ - test/vcr_cassettes/payment/flow/auth_capture.yml
339
+ - test/vcr_cassettes/payment/flow/auth_capture_refund.yml
340
+ - test/vcr_cassettes/payment/flow/auth_void.yml
341
+ - test/vcr_cassettes/payment/flow/purchase_refund.yml
342
+ - test/vcr_cassettes/payment/flow/store_auth.yml
343
+ - test/vcr_cassettes/payment/flow/store_purchase.yml
344
+ - test/view_models/workarea/storefront/cart_view_model_test.decorator
345
+ - test/view_models/workarea/storefront/order_item_view_model_test.decorator
346
+ - test/view_models/workarea/storefront/order_view_model_test.decorator
347
+ - test/view_models/workarea/storefront/package_view_model_test.decorator
348
+ - test/workers/workarea/flow_io/delete_items_test.rb
349
+ - test/workers/workarea/flow_io/fetch_import_test.rb
350
+ - test/workers/workarea/flow_io/item_exporter_test.rb
351
+ - test/workers/workarea/flow_io/process_import_test.rb
352
+ - workarea-flow_io.gemspec
353
+ homepage: https://plugins.workarea.com/plugins/flow-io
354
+ licenses: []
355
+ metadata: {}
356
+ post_install_message:
357
+ rdoc_options: []
358
+ require_paths:
359
+ - lib
360
+ required_ruby_version: !ruby/object:Gem::Requirement
361
+ requirements:
362
+ - - ">="
363
+ - !ruby/object:Gem::Version
364
+ version: '0'
365
+ required_rubygems_version: !ruby/object:Gem::Requirement
366
+ requirements:
367
+ - - ">="
368
+ - !ruby/object:Gem::Version
369
+ version: '0'
370
+ requirements: []
371
+ rubygems_version: 3.0.6
372
+ signing_key:
373
+ specification_version: 4
374
+ summary: Flow Commerce integration for the Workarea Commerce Platform
375
+ test_files: []