Module: Workarea

Defined in:
app/services/workarea/packaging.rb,
lib/workarea.rb,
lib/workarea/core.rb,
lib/workarea/i18n.rb,
lib/workarea/lint.rb,
lib/workarea/cache.rb,
lib/workarea/seeds.rb,
lib/workarea/visit.rb,
lib/workarea/plugin.rb,
lib/workarea/version.rb,
lib/workarea/warnings.rb,
lib/workarea/constants.rb,
lib/workarea/scheduler.rb,
lib/workarea/string_id.rb,
app/models/workarea/lock.rb,
app/models/workarea/sort.rb,
app/models/workarea/user.rb,
lib/workarea/core/engine.rb,
lib/workarea/geolocation.rb,
lib/workarea/mount_point.rb,
lib/workarea/paged_array.rb,
app/models/workarea/order.rb,
lib/workarea/bogus_carrier.rb,
lib/workarea/configuration.rb,
app/models/workarea/address.rb,
app/models/workarea/comment.rb,
app/models/workarea/content.rb,
app/models/workarea/details.rb,
app/models/workarea/inquiry.rb,
app/models/workarea/payment.rb,
app/models/workarea/pricing.rb,
app/models/workarea/release.rb,
app/models/workarea/segment.rb,
app/queries/workarea/alerts.rb,
app/services/workarea/login.rb,
lib/workarea/latest_version.rb,
lib/workarea/ping_home_base.rb,
lib/workarea/scheduled_jobs.rb,
lib/workarea/swappable_list.rb,
app/models/workarea/checkout.rb,
app/models/workarea/lockable.rb,
app/models/workarea/ordering.rb,
app/models/workarea/shipping.rb,
app/models/workarea/tax/rate.rb,
app/seeds/workarea/tax_seeds.rb,
app/models/workarea/inventory.rb,
app/models/workarea/navigable.rb,
app/queries/workarea/metadata.rb,
app/seeds/workarea/help_seeds.rb,
lib/workarea/configuration/s3.rb,
lib/workarea/mail_interceptor.rb,
lib/workarea/svg_asset_finder.rb,
app/models/workarea/help/asset.rb,
app/models/workarea/order/item.rb,
app/models/workarea/releasable.rb,
app/models/workarea/user/login.rb,
app/models/workarea/bulk_action.rb,
app/models/workarea/commentable.rb,
app/models/workarea/fulfillment.rb,
app/models/workarea/pricing/sku.rb,
app/models/workarea/search/help.rb,
app/models/workarea/segmentable.rb,
app/models/workarea/user/avatar.rb,
app/seeds/workarea/admins_seeds.rb,
app/seeds/workarea/assets_seeds.rb,
app/seeds/workarea/orders_seeds.rb,
app/workers/workarea/index_help.rb,
app/workers/workarea/index_page.rb,
app/workers/workarea/index_skus.rb,
lib/workarea/configuration/i18n.rb,
app/helpers/workarea/i18n_helper.rb,
app/models/workarea/content/page.rb,
app/models/workarea/discount_ids.rb,
app/models/workarea/email/signup.rb,
app/models/workarea/help/article.rb,
app/models/workarea/metrics/user.rb,
app/models/workarea/order/status.rb,
app/models/workarea/product_list.rb,
app/models/workarea/product_rule.rb,
app/models/workarea/query_string.rb,
app/models/workarea/search/admin.rb,
app/models/workarea/shipping/sku.rb,
app/models/workarea/tax/category.rb,
app/services/workarea/copy_order.rb,
app/services/workarea/tag_update.rb,
lib/workarea/configuration/redis.rb,
lib/workarea/elasticsearch/index.rb,
app/models/workarea/content/asset.rb,
app/models/workarea/content/block.rb,
app/models/workarea/content/email.rb,
app/models/workarea/content/field.rb,
app/models/workarea/data_file/csv.rb,
app/models/workarea/insights/base.rb,
app/models/workarea/inventory/sku.rb,
app/models/workarea/order/queries.rb,
app/models/workarea/pricing/price.rb,
app/models/workarea/shipping/rate.rb,
app/queries/workarea/search/facet.rb,
app/queries/workarea/search/query.rb,
app/seeds/workarea/insights_seeds.rb,
app/seeds/workarea/products_seeds.rb,
app/seeds/workarea/segments_seeds.rb,
app/services/workarea/hash_update.rb,
app/services/workarea/order_merge.rb,
app/workers/workarea/clean_orders.rb,
app/workers/workarea/save_metrics.rb,
lib/workarea/asset_endpoints/base.rb,
app/helpers/workarea/facets_helper.rb,
app/models/workarea/content/preset.rb,
app/models/workarea/data_file/json.rb,
app/models/workarea/metrics/by_day.rb,
app/models/workarea/payment/refund.rb,
app/models/workarea/payment/status.rb,
app/models/workarea/payment/tender.rb,
app/models/workarea/release/status.rb,
app/models/workarea/reports/export.rb,
app/models/workarea/user/addresses.rb,
app/models/workarea/user/passwords.rb,
app/queries/workarea/order_metrics.rb,
app/queries/workarea/search/facets.rb,
app/queries/workarea/search/filter.rb,
app/seeds/workarea/customers_seeds.rb,
app/seeds/workarea/discounts_seeds.rb,
app/seeds/workarea/inquiries_seeds.rb,
app/services/workarea/cancel_order.rb,
app/services/workarea/cart_cleaner.rb,
app/services/workarea/copy_product.rb,
app/services/workarea/new_discount.rb,
app/workers/workarea/index_product.rb,
lib/workarea/configuration/mongoid.rb,
lib/workarea/configuration/session.rb,
lib/workarea/configuration/sidekiq.rb,
lib/workarea/image_optim_processor.rb,
app/helpers/workarea/details_helper.rb,
app/helpers/workarea/plugins_helper.rb,
app/models/workarea/catalog/product.rb,
app/models/workarea/catalog/variant.rb,
app/models/workarea/fulfillment/sku.rb,
app/models/workarea/invalid_display.rb,
app/models/workarea/metrics/by_week.rb,
app/models/workarea/metrics/scoring.rb,
app/models/workarea/navigation/menu.rb,
app/models/workarea/payment/address.rb,
app/models/workarea/payment/capture.rb,
app/models/workarea/payment/profile.rb,
app/models/workarea/pricing/request.rb,
app/models/workarea/release/changes.rb,
app/models/workarea/release/preview.rb,
app/models/workarea/release_session.rb,
app/models/workarea/search/settings.rb,
app/models/workarea/shipping_option.rb,
app/models/workarea/tax/rate_lookup.rb,
app/queries/workarea/categorization.rb,
app/queries/workarea/reports/report.rb,
app/seeds/workarea/categories_seeds.rb,
app/services/workarea/direct_upload.rb,
app/services/workarea/export_report.rb,
app/services/workarea/save_taxonomy.rb,
app/services/workarea/set_navigable.rb,
app/workers/workarea/bust_sku_cache.rb,
app/workers/workarea/index_category.rb,
app/workers/workarea/order_reminder.rb,
app/workers/workarea/process_export.rb,
app/workers/workarea/process_import.rb,
lib/workarea/autoexpire_cache_redis.rb,
lib/workarea/elasticsearch/document.rb,
app/models/workarea/catalog/category.rb,
app/models/workarea/content/fieldset.rb,
app/models/workarea/data_file/export.rb,
app/models/workarea/data_file/format.rb,
app/models/workarea/data_file/import.rb,
app/models/workarea/fulfillment/item.rb,
app/models/workarea/metrics/affinity.rb,
app/models/workarea/navigation/taxon.rb,
app/models/workarea/price_adjustment.rb,
app/models/workarea/pricing/discount.rb,
app/models/workarea/pricing/override.rb,
app/models/workarea/search/hash_text.rb,
app/models/workarea/search/user_text.rb,
app/models/workarea/shipping/address.rb,
app/models/workarea/shipping/service.rb,
app/models/workarea/traffic_referrer.rb,
app/models/workarea/user/admin_visit.rb,
app/workers/workarea/publish_release.rb,
app/workers/workarea/status_reporter.rb,
lib/workarea/configuration/dragonfly.rb,
app/controllers/workarea/http_caching.rb,
app/controllers/workarea/style_guides.rb,
app/helpers/workarea/addresses_helper.rb,
app/models/workarea/featured_products.rb,
app/models/workarea/fulfillment/event.rb,
app/models/workarea/fulfillment/token.rb,
app/models/workarea/inventory/capture.rb,
app/models/workarea/payment/operation.rb,
app/models/workarea/payment_reference.rb,
app/models/workarea/pricing/cache_key.rb,
app/models/workarea/release/changeset.rb,
app/models/workarea/search/admin/user.rb,
app/models/workarea/search/order_text.rb,
app/models/workarea/search/storefront.rb,
app/models/workarea/status_calculator.rb,
app/models/workarea/user/system_users.rb,
app/queries/workarea/find_unique_slug.rb,
app/queries/workarea/product_releases.rb,
app/queries/workarea/reports/searches.rb,
app/queries/workarea/taxonomy_sitemap.rb,
app/services/workarea/save_publishing.rb,
app/workers/workarea/bulk_index_admin.rb,
lib/workarea/asset_endpoints/favicons.rb,
lib/workarea/configuration/asset_host.rb,
lib/workarea/elasticsearch/serializer.rb,
lib/workarea/monitoring/mongoid_check.rb,
app/controllers/workarea/authorization.rb,
app/controllers/workarea/impersonation.rb,
app/helpers/workarea/schema_org_helper.rb,
app/models/workarea/content/block_name.rb,
app/models/workarea/content/block_type.rb,
app/models/workarea/content/fields/url.rb,
app/models/workarea/fulfillment/status.rb,
app/models/workarea/metrics/sku_by_day.rb,
app/models/workarea/payment/processing.rb,
app/models/workarea/pricing/calculator.rb,
app/models/workarea/pricing/collection.rb,
app/models/workarea/release/activation.rb,
app/models/workarea/search/admin/order.rb,
app/models/workarea/segment/life_cycle.rb,
app/models/workarea/segment/rules/base.rb,
app/models/workarea/segment/rules/tags.rb,
app/models/workarea/user/authorization.rb,
app/models/workarea/user/saved_address.rb,
app/queries/workarea/reports/customers.rb,
app/queries/workarea/search/pagination.rb,
app/seeds/workarea/email_content_seeds.rb,
app/workers/workarea/generate_insights.rb,
app/workers/workarea/send_refund_email.rb,
lib/workarea/configuration/cache_store.rb,
lib/workarea/elasticsearch/query_cache.rb,
lib/workarea/lint/inconsistent_details.rb,
lib/workarea/lint/skus_missing_pricing.rb,
app/controllers/workarea/authentication.rb,
app/helpers/workarea/application_helper.rb,
app/mailers/workarea/application_mailer.rb,
app/models/workarea/checkout/steps/base.rb,
app/models/workarea/configuration/admin.rb,
app/models/workarea/content/block_draft.rb,
app/models/workarea/content/fields/text.rb,
app/models/workarea/data_file/operation.rb,
app/models/workarea/data_file/tax_rates.rb,
app/models/workarea/fulfillment/package.rb,
app/models/workarea/metrics/menu_by_day.rb,
app/models/workarea/navigation/redirect.rb,
app/models/workarea/payment/credit_card.rb,
app/models/workarea/payment/transaction.rb,
app/models/workarea/pricing/tax_applier.rb,
app/models/workarea/search/facet_values.rb,
app/models/workarea/user/admin_bookmark.rb,
app/models/workarea/user/password_reset.rb,
app/queries/workarea/find_taxonomy_slug.rb,
app/queries/workarea/metadata/home_page.rb,
app/queries/workarea/order_item_details.rb,
app/queries/workarea/search/admin_pages.rb,
app/queries/workarea/search/admin_users.rb,
app/queries/workarea/search/date_filter.rb,
app/queries/workarea/search/help_search.rb,
app/queries/workarea/search/range_facet.rb,
app/queries/workarea/search/term_filter.rb,
app/queries/workarea/search/terms_facet.rb,
app/seeds/workarea/browsing_pages_seeds.rb,
app/seeds/workarea/system_content_seeds.rb,
app/workers/workarea/index_admin_search.rb,
app/workers/workarea/index_product_rule.rb,
app/workers/workarea/save_order_metrics.rb,
lib/workarea/lint/skus_missing_variants.rb,
app/controllers/workarea/current_release.rb,
app/helpers/workarea/style_guides_helper.rb,
app/models/workarea/application_document.rb,
app/models/workarea/bulk_action/deletion.rb,
app/models/workarea/configuration/params.rb,
app/models/workarea/content/asset_lookup.rb,
app/models/workarea/content/fields/asset.rb,
app/models/workarea/content/fields/color.rb,
app/models/workarea/content/fields/range.rb,
app/models/workarea/data_file/csv_fields.rb,
app/models/workarea/data_file/tax_import.rb,
app/models/workarea/insights/non_sellers.rb,
app/models/workarea/inventory/collection.rb,
app/models/workarea/metrics/sales_by_day.rb,
app/models/workarea/order/fraud_decision.rb,
app/models/workarea/price_adjustment_set.rb,
app/models/workarea/pricing/order_totals.rb,
app/models/workarea/reports/custom_event.rb,
app/models/workarea/search/admin/content.rb,
app/models/workarea/search/admin/release.rb,
app/models/workarea/search/admin/segment.rb,
app/models/workarea/search/customization.rb,
app/models/workarea/segment/rules/orders.rb,
app/models/workarea/shipping/rate_lookup.rb,
app/models/workarea/user/recent_password.rb,
app/queries/workarea/find_pipeline_asset.rb,
app/queries/workarea/search/admin_assets.rb,
app/queries/workarea/search/admin_orders.rb,
app/queries/workarea/search/admin_search.rb,
app/queries/workarea/search/range_filter.rb,
app/queries/workarea/search/related_help.rb,
app/seeds/workarea/dynamic_content_seeds.rb,
app/seeds/workarea/search_settings_seeds.rb,
app/services/workarea/clean_range_facets.rb,
app/services/workarea/create_fulfillment.rb,
app/workers/workarea/bulk_index_products.rb,
app/workers/workarea/bulk_index_searches.rb,
app/workers/workarea/publish_bulk_action.rb,
lib/workarea/configuration/action_mailer.rb,
lib/workarea/configuration/elasticsearch.rb,
lib/workarea/lint/skus_missing_inventory.rb,
lib/workarea/plugin/asset_appends_helper.rb,
lib/workarea/routes_constraints/redirect.rb,
app/controllers/workarea/current_segments.rb,
app/controllers/workarea/current_tracking.rb,
app/models/workarea/catalog/clean_details.rb,
app/models/workarea/catalog/product_image.rb,
app/models/workarea/content/fields/string.rb,
app/models/workarea/insights/hot_products.rb,
app/models/workarea/insights/hot_searches.rb,
app/models/workarea/insights/new_products.rb,
app/models/workarea/insights/top_products.rb,
app/models/workarea/inventory/transaction.rb,
app/models/workarea/metrics/search_by_day.rb,
app/models/workarea/metrics/tender_by_day.rb,
app/models/workarea/order/items_extension.rb,
app/models/workarea/segment/rules/revenue.rb,
app/queries/workarea/reports/sales_by_sku.rb,
app/queries/workarea/search/admin_sorting.rb,
app/queries/workarea/search/facet_matches.rb,
app/queries/workarea/search/facet_sorting.rb,
app/queries/workarea/search/product_rules.rb,
app/services/workarea/direct_upload/asset.rb,
app/workers/workarea/generate_promo_codes.rb,
app/workers/workarea/index_categorization.rb,
lib/workarea/configuration/content_blocks.rb,
lib/workarea/configuration/error_handling.rb,
lib/workarea/configuration/mongoid_client.rb,
lib/workarea/lint/products_missing_images.rb,
app/helpers/workarea/content_assets_helper.rb,
app/models/workarea/checkout/auto_complete.rb,
app/models/workarea/checkout/steps/payment.rb,
app/models/workarea/content/fields/boolean.rb,
app/models/workarea/content/fields/integer.rb,
app/models/workarea/content/fields/options.rb,
app/models/workarea/insights/cold_products.rb,
app/models/workarea/insights/cold_searches.rb,
app/models/workarea/insights/star_products.rb,
app/models/workarea/insights/star_searches.rb,
app/models/workarea/insights/top_discounts.rb,
app/models/workarea/inventory/unit_of_work.rb,
app/models/workarea/metrics/country_by_day.rb,
app/models/workarea/metrics/product_by_day.rb,
app/models/workarea/metrics/revenue_change.rb,
app/models/workarea/metrics/search_by_week.rb,
app/models/workarea/metrics/segment_by_day.rb,
app/models/workarea/navigation/breadcrumbs.rb,
app/models/workarea/navigation/taxon_cache.rb,
app/models/workarea/pricing/discount/order.rb,
app/models/workarea/search/storefront/page.rb,
app/models/workarea/segment/loyal_customer.rb,
app/models/workarea/segment/rules/sessions.rb,
app/queries/workarea/admin_query_operation.rb,
app/queries/workarea/metadata/content_page.rb,
app/queries/workarea/reports/group_by_time.rb,
app/queries/workarea/reports/low_inventory.rb,
app/queries/workarea/reports/sales_by_menu.rb,
app/queries/workarea/search/admin_products.rb,
app/queries/workarea/search/admin_releases.rb,
app/queries/workarea/search/admin_segments.rb,
app/queries/workarea/search/categorization.rb,
app/queries/workarea/search/product_search.rb,
app/seeds/workarea/browse_navigation_seeds.rb,
app/seeds/workarea/shipping_services_seeds.rb,
app/services/workarea/inventory_adjustment.rb,
app/workers/workarea/bust_navigation_cache.rb,
app/workers/workarea/process_direct_upload.rb,
app/models/workarea/catalog/details_queries.rb,
app/models/workarea/checkout/fraud/analyzer.rb,
app/models/workarea/checkout/steps/shipping.rb,
app/models/workarea/content/fields/category.rb,
app/models/workarea/content/fields/products.rb,
app/models/workarea/content/fields/taxonomy.rb,
app/models/workarea/insights/best_customers.rb,
app/models/workarea/insights/top_categories.rb,
app/models/workarea/inventory/policies/base.rb,
app/models/workarea/metrics/category_by_day.rb,
app/models/workarea/metrics/discount_by_day.rb,
app/models/workarea/metrics/product_by_week.rb,
app/models/workarea/pricing/shipping_totals.rb,
app/models/workarea/pricing/tax_application.rb,
app/models/workarea/recommendation/settings.rb,
app/models/workarea/search/admin/navigation.rb,
app/models/workarea/search/admin/releasable.rb,
app/models/workarea/segment/rules/logged_in.rb,
app/models/workarea/shipping/location_query.rb,
app/queries/workarea/bulk_action_selections.rb,
app/queries/workarea/search/admin_discounts.rb,
app/queries/workarea/search/category_browse.rb,
app/queries/workarea/search/product_entries.rb,
app/queries/workarea/search/range_parameter.rb,
app/workers/workarea/index_category_changes.rb,
app/workers/workarea/index_product_children.rb,
app/workers/workarea/process_reports_export.rb,
lib/workarea/asset_endpoints/product_images.rb,
lib/workarea/lint/products_missing_variants.rb,
lib/workarea/monitoring/elasticsearch_check.rb,
lib/workarea/routes_constraints/super_admin.rb,
app/models/workarea/bulk_action/product_edit.rb,
app/models/workarea/calculate_percent_change.rb,
app/models/workarea/checkout/collect_payment.rb,
app/models/workarea/checkout/steps/addresses.rb,
app/models/workarea/pricing/discount/product.rb,
app/models/workarea/pricing/item_tax_applier.rb,
app/models/workarea/search/admin/pricing_sku.rb,
app/models/workarea/search/storefront/search.rb,
app/models/workarea/segment/rules/last_order.rb,
app/queries/workarea/featured_categorization.rb,
app/queries/workarea/pricing_override_params.rb,
app/queries/workarea/recommendation/searches.rb,
app/queries/workarea/reports/sales_by_tender.rb,
app/queries/workarea/reports/sales_over_time.rb,
app/queries/workarea/search/admin_categories.rb,
app/queries/workarea/search/related_products.rb,
app/workers/workarea/save_user_order_details.rb,
lib/workarea/monitoring/load_balancing_check.rb,
app/models/workarea/catalog/product_positions.rb,
app/models/workarea/checkout/shipping_options.rb,
app/models/workarea/fulfillment/policies/base.rb,
app/models/workarea/insights/popular_searches.rb,
app/models/workarea/insights/release_reminder.rb,
app/models/workarea/inventory/policies/ignore.rb,
app/models/workarea/navigation/search_results.rb,
app/models/workarea/payment/saved_credit_card.rb,
app/models/workarea/payment/store_credit_card.rb,
app/models/workarea/pricing/discount/category.rb,
app/models/workarea/pricing/discount/shipping.rb,
app/models/workarea/pricing/price_distributor.rb,
app/models/workarea/search/admin/content_page.rb,
app/models/workarea/search/storefront/product.rb,
app/models/workarea/segment/returning_visitor.rb,
app/models/workarea/segment/rules/geolocation.rb,
app/queries/workarea/reports/sales_by_country.rb,
app/queries/workarea/reports/sales_by_product.rb,
app/queries/workarea/search/admin_releasables.rb,
app/queries/workarea/search/query_suggestions.rb,
app/queries/workarea/search/storefront_search.rb,
app/services/workarea/add_multiple_cart_items.rb,
app/services/workarea/direct_upload/processor.rb,
app/workers/workarea/keep_product_index_fresh.rb,
app/workers/workarea/redirect_navigable_slugs.rb,
app/workers/workarea/synchronize_user_metrics.rb,
lib/generators/workarea/seeds/seeds_generator.rb,
app/middleware/workarea/application_middleware.rb,
app/middleware/workarea/i18n_client_middleware.rb,
app/middleware/workarea/i18n_server_middleware.rb,
app/middleware/workarea/query_cache_middleware.rb,
app/models/workarea/content/fields/breakpoints.rb,
app/models/workarea/insights/customers_at_risk.rb,
app/models/workarea/insights/low_aov_customers.rb,
app/models/workarea/insights/trending_products.rb,
app/models/workarea/insights/trending_searches.rb,
app/models/workarea/insights/upcoming_releases.rb,
app/models/workarea/inventory/transaction_item.rb,
app/models/workarea/payment/insufficient_funds.rb,
app/models/workarea/payment/refund/credit_card.rb,
app/models/workarea/payment/tender/credit_card.rb,
app/models/workarea/price_adjustment_extension.rb,
app/models/workarea/pricing/discount/code_list.rb,
app/models/workarea/pricing/discount/free_gift.rb,
app/models/workarea/search/admin/content_asset.rb,
app/models/workarea/search/admin/inventory_sku.rb,
app/models/workarea/search/storefront/category.rb,
app/models/workarea/segment/first_time_visitor.rb,
app/models/workarea/segment/returning_customer.rb,
app/models/workarea/segment/rules/browser_info.rb,
app/models/workarea/shipping/service_selection.rb,
app/queries/workarea/metadata/catalog_category.rb,
app/queries/workarea/product_primary_image_url.rb,
app/queries/workarea/reports/sales_by_category.rb,
app/queries/workarea/reports/sales_by_discount.rb,
app/queries/workarea/search/admin_index_search.rb,
app/queries/workarea/search/admin_pricing_skus.rb,
app/queries/workarea/search/facet_sorting/size.rb,
app/workers/workarea/generate_content_metadata.rb,
app/workers/workarea/index_fulfillment_changes.rb,
app/workers/workarea/verify_scheduled_releases.rb,
lib/workarea/configuration/administrable/field.rb,
app/controllers/workarea/application_controller.rb,
app/middleware/workarea/enforce_host_middleware.rb,
app/models/workarea/checkout/credit_card_params.rb,
app/models/workarea/insights/promising_products.rb,
app/models/workarea/inventory/collection_status.rb,
app/models/workarea/inventory/policies/standard.rb,
app/models/workarea/payment/capture/credit_card.rb,
app/models/workarea/payment/refund/store_credit.rb,
app/models/workarea/payment/tender/store_credit.rb,
app/models/workarea/pricing/discount/collection.rb,
app/models/workarea/pricing/discount/redemption.rb,
app/models/workarea/segment/first_time_customer.rb,
app/queries/workarea/admin_search_query_wrapper.rb,
app/queries/workarea/extract_content_block_text.rb,
app/queries/workarea/order_cancellation_metrics.rb,
app/queries/workarea/product_primary_navigation.rb,
app/queries/workarea/recommendation/order_based.rb,
app/queries/workarea/reports/searches_over_time.rb,
app/seeds/workarea/customer_service_pages_seeds.rb,
app/view_models/workarea/application_view_model.rb,
app/workers/workarea/deactivate_stale_discounts.rb,
app/workers/workarea/index_payment_transactions.rb,
app/workers/workarea/mark_discounts_as_redeemed.rb,
app/models/workarea/checkout/fraud/test_analyzer.rb,
app/models/workarea/insights/most_discount_given.rb,
app/models/workarea/insights/products_to_improve.rb,
app/models/workarea/insights/sales_by_navigation.rb,
app/models/workarea/insights/searches_to_improve.rb,
app/models/workarea/metrics/search_for_last_week.rb,
app/models/workarea/payment/capture/store_credit.rb,
app/models/workarea/payment/purchase/credit_card.rb,
app/models/workarea/pricing/discount/order_total.rb,
app/models/workarea/recommendation/user_activity.rb,
app/models/workarea/search/admin/catalog_product.rb,
app/models/workarea/search/admin/fulfillment_sku.rb,
app/models/workarea/search/admin/navigation_menu.rb,
app/queries/workarea/reports/average_order_value.rb,
app/queries/workarea/search/admin_inventory_skus.rb,
app/queries/workarea/search/load_product_results.rb,
app/workers/workarea/index_search_customizations.rb,
lib/workarea/configuration/administrable_options.rb,
lib/workarea/monitoring/sidekiq_queue_size_check.rb,
app/middleware/workarea/release_server_middleware.rb,
app/models/workarea/content/block_type_definition.rb,
app/models/workarea/fulfillment/policies/download.rb,
app/models/workarea/fulfillment/policies/shipping.rb,
app/models/workarea/insights/customer_acquisition.rb,
app/models/workarea/insights/repeat_purchase_rate.rb,
app/models/workarea/metrics/calculate_percentiles.rb,
app/models/workarea/metrics/product_for_last_week.rb,
app/models/workarea/payment/authorize/credit_card.rb,
app/models/workarea/payment/credit_card_operation.rb,
app/models/workarea/payment/purchase/store_credit.rb,
app/models/workarea/search/admin/catalog_category.rb,
app/models/workarea/search/admin/pricing_discount.rb,
app/queries/workarea/recommendation/product_based.rb,
app/queries/workarea/search/product_display_rules.rb,
app/services/workarea/direct_upload/product_image.rb,
app/workers/workarea/clean_inventory_transactions.rb,
app/workers/workarea/update_payment_profile_email.rb,
lib/generators/workarea/install/install_generator.rb,
lib/workarea/configuration/administrable/fieldset.rb,
app/middleware/workarea/skip_rack_cache_middleware.rb,
app/models/workarea/data_file/unknown_format_error.rb,
app/models/workarea/payment/authorize/store_credit.rb,
app/models/workarea/search/storefront/product/text.rb,
app/models/workarea/segment/rules/traffic_referrer.rb,
app/queries/workarea/search/admin_fulfillment_skus.rb,
app/services/workarea/add_multiple_cart_items/item.rb,
app/workers/workarea/clean_product_recommendations.rb,
app/workers/workarea/update_elasticsearch_settings.rb,
lib/workarea/configuration/localized_active_fields.rb,
lib/workarea/ext/jbuilder/jbuilder_append_partials.rb,
app/middleware/workarea/audit_log_client_middleware.rb,
app/middleware/workarea/audit_log_server_middleware.rb,
app/models/workarea/metrics/traffic_referrer_by_day.rb,
app/models/workarea/recommendation/search_predictor.rb,
app/queries/workarea/search/product_rules_filtering.rb,
app/workers/workarea/process_search_recommendations.rb,
lib/generators/workarea/discount/discount_generator.rb,
lib/generators/workarea/override/override_generator.rb,
lib/workarea/configuration/administrable/definition.rb,
app/models/workarea/metrics/update_user_aggregations.rb,
app/models/workarea/payment/operation_implementation.rb,
app/models/workarea/pricing/discount/reconcile_total.rb,
app/models/workarea/pricing/unsupported_segmentation.rb,
app/models/workarea/recommendation/product_predictor.rb,
app/models/workarea/search/admin/payment_transaction.rb,
app/models/workarea/search/storefront/category_query.rb,
app/models/workarea/search/storefront/product/facets.rb,
app/models/workarea/segment/rules/geolocation_option.rb,
app/queries/workarea/search/categorization_filtering.rb,
app/seeds/workarea/customer_service_navigation_seeds.rb,
app/view_models/workarea/shipping_carrier_view_model.rb,
app/workers/workarea/process_product_recommendations.rb,
app/workers/workarea/save_order_cancellation_metrics.rb,
app/middleware/workarea/strip_http_caching_middleware.rb,
app/models/workarea/catalog/product_placeholder_image.rb,
app/models/workarea/insights/most_discounted_products.rb,
app/models/workarea/search/storefront/product/pricing.rb,
app/models/workarea/search/storefront/product/sorting.rb,
app/services/workarea/sort_navigation_menus_by_orders.rb,
lib/generators/workarea/decorator/decorator_generator.rb,
lib/generators/workarea/js_module/js_module_generator.rb,
app/models/workarea/insights/best_full_price_customers.rb,
app/models/workarea/inventory/policies/allow_backorder.rb,
app/models/workarea/pricing/calculators/tax_calculator.rb,
app/models/workarea/pricing/discount/amount_calculator.rb,
app/models/workarea/pricing/discount/application_group.rb,
app/models/workarea/pricing/discount/buy_some_get_some.rb,
app/models/workarea/pricing/discount/product_attribute.rb,
app/queries/workarea/reports/sales_by_traffic_referrer.rb,
app/queries/workarea/search/admin_payment_transactions.rb,
app/queries/workarea/search/storefront_search/redirect.rb,
app/queries/workarea/search/storefront_search/response.rb,
app/queries/workarea/search/storefront_search/template.rb,
app/models/workarea/bulk_action/sequential_product_edit.rb,
app/models/workarea/checkout/fraud/no_decision_analyzer.rb,
app/models/workarea/pricing/calculators/item_calculator.rb,
app/models/workarea/search/storefront/product/analytics.rb,
app/models/workarea/search/storefront/product/inventory.rb,
app/queries/workarea/recommendation/user_activity_based.rb,
app/queries/workarea/search/admin_product_rules_preview.rb,
lib/generators/workarea/js_adapter/js_adapter_generator.rb,
lib/workarea/asset_endpoints/product_placeholder_images.rb,
app/models/workarea/insights/products_purchased_together.rb,
app/models/workarea/pricing/discount/flat_or_percent_off.rb,
app/models/workarea/search/storefront/product/categories.rb,
app/queries/workarea/search/storefront_search/middleware.rb,
app/models/workarea/pricing/discount/conditions/user_tags.rb,
app/models/workarea/pricing/discount/generated_promo_code.rb,
app/models/workarea/pricing/discount/quantity_fixed_price.rb,
lib/generators/workarea/style_guide/style_guide_generator.rb,
app/queries/workarea/reports/first_time_vs_returning_sales.rb,
app/models/workarea/pricing/calculators/discount_calculator.rb,
app/models/workarea/pricing/discount/conditions/order_total.rb,
app/models/workarea/pricing/discount/conditions/promo_codes.rb,
app/queries/workarea/search/storefront_search/exact_matches.rb,
app/models/workarea/pricing/calculators/overrides_calculator.rb,
app/models/workarea/insights/popular_searches_without_results.rb,
app/models/workarea/pricing/discount/conditions/item_quantity.rb,
app/queries/workarea/reports/searches_without_results_over_time.rb,
app/queries/workarea/search/storefront_search/product_multipass.rb,
app/models/workarea/pricing/calculators/customizations_calculator.rb,
app/queries/workarea/search/storefront_search/spelling_correction.rb,
app/queries/workarea/search/storefront_search/product_auto_redirect.rb,
lib/generators/workarea/product_template/product_template_generator.rb,
app/models/workarea/inventory/policies/displayable_when_out_of_stock.rb,
app/models/workarea/pricing/discount/product_attribute/item_qualifier.rb,
app/models/workarea/pricing/discount/quantity_fixed_price/item_shares.rb,
app/models/workarea/pricing/discount/buy_some_get_some/item_application.rb,
lib/generators/workarea/content_block_type/content_block_type_generator.rb,
lib/generators/workarea/pricing_calculator/pricing_calculator_generator.rb,
app/models/workarea/pricing/discount/buy_some_get_some/product_application.rb,
app/models/workarea/pricing/discount/buy_some_get_some/order_items_by_product.rb,
app/models/workarea/pricing/discount/quantity_fixed_price/application_calculator.rb

Overview

Query class for models to match the API of Search::Query. Used in exporting models that aren’t put into Elasticsearch.

Defined Under Namespace

Modules: AddressesHelper, ApplicationDocument, ApplicationHelper, AssetEndpoints, Authentication, Authorization, Cache, CalculatePercentChange, Catalog, Commentable, Configuration, Constants, ContentAssetsHelper, Contentable, Core, CurrentRelease, CurrentSegments, CurrentTracking, DataFile, Details, DetailsHelper, DiscountIds, Elasticsearch, Email, FacetsHelper, FeaturedProducts, Generators, GuardNegativePrice, Help, HttpCaching, I18n, I18nHelper, ImageOptimProcessor, Impersonation, Insights, Inventory, JbuilderAppendPartials, LatestVersion, Lockable, Metrics, Monitoring, MountPoint, Navigable, Navigation, NewDiscount, NormalizeEmail, Ordering, Plugin, PluginsHelper, PriceAdjustmentExtension, Pricing, ProductList, Recommendation, Releasable, Reports, RoutesConstraints, SaveMetrics, ScheduledJobs, SchemaOrgHelper, Search, Seeds, Segmentable, ShippingCarrierViewModel, StyleGuides, StyleGuidesHelper, Tax, UrlToken, VERSION, Warnings Classes: AddMultipleCartItems, Address, AdminQueryOperation, AdminSearchQueryWrapper, AdminsSeeds, Alerts, ApplicationController, ApplicationMailer, ApplicationMiddleware, ApplicationViewModel, AssetsSeeds, AuditLogClientMiddleware, AuditLogServerMiddleware, AutoexpireCacheRedis, BogusCarrier, BrowseNavigationSeeds, BrowsingPagesSeeds, BulkAction, BulkActionSelections, BulkIndexAdmin, BulkIndexProducts, BulkIndexSearches, BustNavigationCache, BustSkuCache, CancelOrder, CartCleaner, CategoriesSeeds, Categorization, Checkout, CleanInventoryTransactions, CleanOrders, CleanProductRecommendations, CleanRangeFacets, Comment, Content, ContentBlockTypeGenerator, CopyOrder, CopyProduct, CreateFulfillment, CustomerServiceNavigationSeeds, CustomerServicePagesSeeds, CustomersSeeds, DeactivateStaleDiscounts, DecoratorGenerator, DirectUpload, DiscountGenerator, DiscountsSeeds, DynamicContentSeeds, EmailContentSeeds, EnforceHostMiddleware, ExportReport, ExtractContentBlockText, FeaturedCategorization, FindPipelineAsset, FindTaxonomySlug, FindUniqueSlug, Fulfillment, GenerateContentMetadata, GenerateInsights, GeneratePromoCodes, Geolocation, HashUpdate, HelpSeeds, I18nClientMiddleware, I18nServerMiddleware, IndexAdminSearch, IndexCategorization, IndexCategory, IndexCategoryChanges, IndexFulfillmentChanges, IndexHelp, IndexPage, IndexPaymentTransactions, IndexProduct, IndexProductChildren, IndexProductRule, IndexSearchCustomizations, IndexSkus, InquiriesSeeds, Inquiry, InsightsSeeds, InstallGenerator, InvalidDisplay, InventoryAdjustment, JsAdapterGenerator, KeepProductIndexFresh, Lint, Lock, Login, MailInterceptor, MarkDiscountsAsRedeemed, Metadata, Order, OrderCancellationMetrics, OrderItemDetails, OrderMerge, OrderMetrics, OrderReminder, OrdersSeeds, OverrideGenerator, Packaging, PagedArray, Payment, PaymentReference, PingHomeBase, PriceAdjustment, PriceAdjustmentSet, PricingCalculatorGenerator, PricingOverrideParams, ProcessDirectUpload, ProcessExport, ProcessImport, ProcessProductRecommendations, ProcessReportsExport, ProcessSearchRecommendations, ProductPrimaryImageUrl, ProductPrimaryNavigation, ProductReleases, ProductRule, ProductTemplateGenerator, ProductsSeeds, PublishBulkAction, PublishRelease, QueryCacheMiddleware, QueryString, RedirectNavigableSlugs, Release, ReleaseServerMiddleware, ReleaseSession, SaveOrderCancellationMetrics, SaveOrderMetrics, SavePublishing, SaveTaxonomy, SaveUserOrderDetails, Scheduler, SearchSettingsSeeds, SeedsGenerator, Segment, SegmentsSeeds, SendRefundEmail, SetNavigable, Shipping, ShippingOption, ShippingServicesSeeds, SkipRackCacheMiddleware, Sort, SortNavigationMenusByOrders, StatusCalculator, StatusReporter, StringId, StripHttpCachingMiddleware, SvgAssetFinder, SwappableList, SynchronizeUserMetrics, SystemContentSeeds, TagUpdate, TaxSeeds, TaxonomySitemap, TrafficReferrer, UpdateElasticsearchSettings, UpdatePaymentProfileEmail, User, VerifyScheduledReleases, Visit

Constant Summary collapse

COLOR_CODES =

Colors used for styling executable output

{
  red: 31,
  green: 32,
  yellow: 33
}

Class Method Summary collapse

Class Method Details

.configWorkarea::Configuration::AdministrableOptions

A shortcut to the Rails’ application config relevant to Workarea.



34
35
36
# File 'lib/workarea.rb', line 34

def self.config
  @custom_config.presence || Configuration.config
end

.configure {|config| ... } ⇒ Object

Shortcut for configuration, passes config to the block given.

Examples:

Set an option

Workarea.configure do |config|
  config.some_value = true
end

Yields:



25
26
27
# File 'lib/workarea.rb', line 25

def self.configure
  yield(config)
end

.define_content_block_types(&block) ⇒ Object

Define block types for use by administrators. A block type represents a row of content on the storefront, self-contained with its own styles and responsive logic.

Defining new block types

Workarea.define_content_block_types do
  # Create a new block type called 2 Column Text
  # The ID or slug for this type will be :2_column_text
  block_type '2 Column Text' do
    # Set a description, which will be shown to admin users when
    # selecting a block type
    description 'Provides 2 columns of text'

    # Allows custom specification of which icon to use to display this
    # block type in the admin when selecting a new block. The default
    # is workarea/admin/content_block_types/#{block_type_id}
    icon 'workarea/admin/content_block_types/columns'

    # Tags are used for filtering content block types in the admin when
    # creating a new block and selecting its type
    tags %w(columns text)

    # You can also specify a custom view model to be used in the store
    # front when rendering. You could even share view models for
    # different blocks
    view_model 'Workarea::Storefront::ContentBlocks::ColumnsViewModel'

    # If your block type requires developer-facing configuration, you
    # you can specify any arbitrary attributes and they will be added
    # to the #config hash on the block type. For example, configuration
    # values tied to site design.
    height 960
    width 470

    # Use fieldset to group fields together for admin display. The
    # fieldset has no other use.
    fieldset 'Left Column' do
      # A field corresponds to one input in the admin and one key in
      # the Workarea::Content::Block#data hash. It will be referenced
      # by a systemized version of the name.

      # The second argument must be a type. Out-of-the-box valid types
      # include :asset, :category, :options, :products, :rich_text,
      # :string, and :url.

      # Options can be specific to the field type. All field types
      # support :default and :required.
      field 'Left Column Text', :text, required: true, default: 'Left Column'
    end

    fieldset 'Right Column' do
      field 'Right Column Text', :text, required: true, default: 'Right Column'
    end
  end
end

Overriding values for existing block types

To allow full customization, all details about a block type and its fields can be overridden. Here’s an example of overriding details on the Product List block type which ships out of the box.

Workarea.define_content_block_types do
  # Open the Product List block up again
  block_type 'Product List' do
    # Override the default on Title
    field 'Title', :string, default: 'Staff Picks'
    # Add a new field called description
    field 'Description', :text, default: 'Top picks by our staff

    # No need to touch other fields, they remain the same
  end
end

Admin UI

The admin UI for the block will be automatically generated based on the fields provided.



174
175
176
# File 'lib/workarea.rb', line 174

def self.define_content_block_types(&block)
  Configuration::ContentBlocks.building_blocks << block
end

.deprecationActiveSupport::Deprecation

Use this deprecation to warn about the next minor release.

Returns:

  • (ActiveSupport::Deprecation)


182
183
184
# File 'lib/workarea.rb', line 182

def self.deprecation
  @deprecation ||= ActiveSupport::Deprecation.new('3.6', 'Workarea')
end

.elasticsearchElasticsearch::Client

The [Elasticsearch::Client] for general application use.

Returns:

  • (Elasticsearch::Client)


57
58
59
60
61
# File 'lib/workarea.rb', line 57

def self.elasticsearch
  @elasticsearch ||= ::Elasticsearch::Client.new(
    Configuration::Elasticsearch.find
  )
end

.redisRedis

A [Redis] client for general application use.

Returns:

  • (Redis)


49
50
51
# File 'lib/workarea.rb', line 49

def self.redis
  @redis ||= Redis.new(Configuration::Redis.persistent.to_h)
end

.referrer_parserRefererParser::Parser

Use this to parse a referrer. It’s globalized here because each instantiation will read a file, and we may need an instance on every request if there’s a segment setup for referrer.



91
92
93
# File 'lib/workarea.rb', line 91

def self.referrer_parser
  @referrer_parser ||= RefererParser::Parser.new
end

.s3Fog::Storage::AWS

The [Fog::Storage::AWS] instance for internal application S3 use.

Returns:

  • (Fog::Storage::AWS)


67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# File 'lib/workarea.rb', line 67

def self.s3
  @s3 ||= begin
    options = { region: Configuration::S3.region.to_s }

    if Configuration::S3.use_iam_profile?
      options.merge!(use_iam_profile: true)
    else
      options.merge!(
        aws_access_key_id: Configuration::S3.access_key_id.to_s,
        aws_secret_access_key: Configuration::S3.secret_access_key.to_s
      )
    end

    Fog.mock! unless Configuration::S3.configured?
    Fog::AWS::Storage.new(options)
  end
end

.with_configObject



38
39
40
41
42
43
# File 'lib/workarea.rb', line 38

def self.with_config
  @custom_config ||= config.deep_dup
  yield(@custom_config)
ensure
  @custom_config = nil
end