Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
49de11567b | ||
|
|
3af0365c6b | ||
|
|
be92b0049b | ||
|
|
a1c94d0d9f | ||
|
|
f6bb8a9a04 |
@@ -16,10 +16,6 @@ plugins:
|
||||
enabled: false
|
||||
PropertySortOrder:
|
||||
enabled: false
|
||||
StringQuotes:
|
||||
enabled: false
|
||||
DeclarationOrder:
|
||||
enabled: false
|
||||
duplication:
|
||||
enabled: true
|
||||
exclude_patterns:
|
||||
|
||||
1
.gitignore
vendored
@@ -31,7 +31,6 @@ public/system
|
||||
public/stylesheets
|
||||
public/images
|
||||
public/spree
|
||||
public/assets
|
||||
config/abr.yml
|
||||
config/initializers/feature_toggle.rb
|
||||
NERD_tree*
|
||||
|
||||
@@ -21,21 +21,27 @@
|
||||
Layout/LineLength:
|
||||
Max: 100
|
||||
Exclude:
|
||||
- Gemfile
|
||||
- app/controllers/admin/bulk_line_items_controller.rb
|
||||
- app/controllers/admin/contents_controller.rb
|
||||
- app/controllers/admin/customers_controller.rb
|
||||
- app/controllers/admin/enterprise_fees_controller.rb
|
||||
- app/controllers/admin/enterprise_groups_controller.rb
|
||||
- app/controllers/admin/enterprise_relationships_controller.rb
|
||||
- app/controllers/admin/enterprise_roles_controller.rb
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/admin/inventory_items_controller.rb
|
||||
- app/controllers/admin/manager_invitations_controller.rb
|
||||
- app/controllers/admin/product_import_controller.rb
|
||||
- app/controllers/admin/proxy_orders_controller.rb
|
||||
- app/controllers/admin/schedules_controller.rb
|
||||
- app/controllers/admin/subscriptions_controller.rb
|
||||
- app/controllers/admin/variant_overrides_controller.rb
|
||||
- app/controllers/api/enterprise_attachment_controller.rb
|
||||
- app/controllers/api/product_images_controller.rb
|
||||
- app/controllers/spree/admin/adjustments_controller_decorator.rb
|
||||
- app/controllers/spree/admin/orders_controller_decorator.rb
|
||||
- app/controllers/spree/credit_cards_controller.rb
|
||||
- app/controllers/spree/paypal_controller_decorator.rb
|
||||
- app/controllers/stripe/callbacks_controller.rb
|
||||
- app/helpers/angular_form_builder.rb
|
||||
@@ -45,6 +51,8 @@ Layout/LineLength:
|
||||
- app/helpers/injection_helper.rb
|
||||
- app/helpers/markdown_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/shop_helper.rb
|
||||
- app/helpers/spree/admin/base_helper_decorator.rb
|
||||
- app/helpers/spree/orders_helper.rb
|
||||
- app/jobs/subscription_confirm_job.rb
|
||||
- app/mailers/subscription_mailer.rb
|
||||
@@ -54,10 +62,14 @@ Layout/LineLength:
|
||||
- app/models/concerns/variant_stock.rb
|
||||
- app/models/content_configuration.rb
|
||||
- app/models/customer.rb
|
||||
- app/models/enterprise_fee.rb
|
||||
- app/models/enterprise_group.rb
|
||||
- app/models/enterprise_role.rb
|
||||
- app/models/inventory_item.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/product_import/product_importer.rb
|
||||
- app/models/product_import/spreadsheet_data.rb
|
||||
- app/models/product_import/spreadsheet_entry.rb
|
||||
- app/models/product_import/unit_converter.rb
|
||||
- app/models/proxy_order.rb
|
||||
@@ -74,23 +86,21 @@ Layout/LineLength:
|
||||
- app/models/spree/payment_method_decorator.rb
|
||||
- app/models/spree/product_decorator.rb
|
||||
- app/models/spree/shipping_method_decorator.rb
|
||||
- app/models/spree/taxon_decorator.rb
|
||||
- app/models/spree/tax_rate_decorator.rb
|
||||
- app/models/spree/taxon_decorator.rb
|
||||
- app/models/spree/user.rb
|
||||
- app/models/spree/variant_decorator.rb
|
||||
- app/models/subscription.rb
|
||||
- app/models/variant_override.rb
|
||||
- app/models/variant_override_set.rb
|
||||
- app/serializers/api/admin/subscription_line_item_serializer.rb
|
||||
- app/services/cart_service.rb
|
||||
- app/services/default_stock_location.rb
|
||||
- app/services/embedded_page_service.rb
|
||||
- app/services/order_cycle_form.rb
|
||||
- app/services/order_factory.rb
|
||||
- engines/order_management/app/services/order_management/subscriptions/validator.rb
|
||||
- app/services/subscriptions_count.rb
|
||||
- app/services/variants_stock_levels.rb
|
||||
- engines/web/app/helpers/web/cookies_policy_helper.rb
|
||||
- engines/web/config/routes.rb
|
||||
- engines/web/spec/features/consumer/cookies_spec.rb
|
||||
- Gemfile
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/available_payment_method_filter.rb
|
||||
- lib/open_food_network/bulk_coop_report.rb
|
||||
@@ -105,11 +115,12 @@ Layout/LineLength:
|
||||
- lib/open_food_network/payments_report.rb
|
||||
- lib/open_food_network/reports/bulk_coop_allocation_report.rb
|
||||
- lib/open_food_network/sales_tax_report.rb
|
||||
- lib/open_food_network/scope_variants_for_search.rb
|
||||
- lib/open_food_network/variant_and_line_item_naming.rb
|
||||
- lib/open_food_network/xero_invoices_report.rb
|
||||
- lib/spree/core/controller_helpers/respond_with_decorator.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- lib/spree/product_filters.rb
|
||||
- lib/stripe/profile_storer.rb
|
||||
- lib/tasks/data.rake
|
||||
- lib/tasks/enterprises.rake
|
||||
- spec/controllers/admin/bulk_line_items_controller_spec.rb
|
||||
@@ -134,6 +145,7 @@ Layout/LineLength:
|
||||
- spec/controllers/api/product_images_controller_spec.rb
|
||||
- spec/controllers/api/products_controller_spec.rb
|
||||
- spec/controllers/api/promo_images_controller_spec.rb
|
||||
- spec/controllers/api/shipments_controller_spec.rb
|
||||
- spec/controllers/api/variants_controller_spec.rb
|
||||
- spec/controllers/cart_controller_spec.rb
|
||||
- spec/controllers/checkout_controller_spec.rb
|
||||
@@ -143,21 +155,20 @@ Layout/LineLength:
|
||||
- spec/controllers/shops_controller_spec.rb
|
||||
- spec/controllers/spree/admin/adjustments_controller_spec.rb
|
||||
- spec/controllers/spree/admin/base_controller_spec.rb
|
||||
- spec/controllers/spree/admin/orders_controller_spec.rb
|
||||
- spec/controllers/spree/admin/orders/customer_details_controller_spec.rb
|
||||
- spec/controllers/spree/admin/orders_controller_spec.rb
|
||||
- spec/controllers/spree/admin/payment_methods_controller_spec.rb
|
||||
- spec/controllers/spree/admin/payments_controller_spec.rb
|
||||
- spec/controllers/spree/admin/products_controller_spec.rb
|
||||
- spec/controllers/spree/admin/reports_controller_spec.rb
|
||||
- spec/controllers/spree/admin/variants_controller_spec.rb
|
||||
- spec/controllers/spree/credit_cards_controller_spec.rb
|
||||
- spec/controllers/spree/orders_controller_spec.rb
|
||||
- spec/controllers/spree/users_controller_spec.rb
|
||||
- spec/controllers/spree/user_sessions_controller_spec.rb
|
||||
- spec/controllers/spree/users_controller_spec.rb
|
||||
- spec/controllers/stripe/callbacks_controller_spec.rb
|
||||
- spec/controllers/stripe/webhooks_controller_spec.rb
|
||||
- spec/controllers/user_confirmations_controller_spec.rb
|
||||
- spec/factories/order_factory.rb
|
||||
- spec/factories.rb
|
||||
- spec/features/admin/adjustments_spec.rb
|
||||
- spec/features/admin/bulk_order_management_spec.rb
|
||||
- spec/features/admin/bulk_product_update_spec.rb
|
||||
@@ -165,19 +176,14 @@ Layout/LineLength:
|
||||
- spec/features/admin/enterprise_fees_spec.rb
|
||||
- spec/features/admin/enterprise_relationships_spec.rb
|
||||
- spec/features/admin/enterprise_roles_spec.rb
|
||||
- spec/features/admin/enterprise_user_spec.rb
|
||||
- spec/features/admin/enterprises/images_spec.rb
|
||||
- spec/features/admin/enterprises/index_spec.rb
|
||||
- spec/features/admin/enterprises_spec.rb
|
||||
- spec/features/admin/enterprise_user_spec.rb
|
||||
- spec/features/admin/image_settings_spec.rb
|
||||
- spec/features/admin/multilingual_spec.rb
|
||||
- spec/features/admin/order_cycles/complex_creating_specific_time_spec.rb
|
||||
- spec/features/admin/order_cycles/complex_editing_multiple_product_pages_spec.rb
|
||||
- spec/features/admin/order_cycles/complex_editing_spec.rb
|
||||
- spec/features/admin/order_cycles/complex_updating_specific_time_spec.rb
|
||||
- spec/features/admin/order_cycles/list_spec.rb
|
||||
- spec/features/admin/order_cycles/simple_spec.rb
|
||||
- spec/features/admin/order_spec.rb
|
||||
- spec/features/admin/order_cycles_spec.rb
|
||||
- spec/features/admin/orders_spec.rb
|
||||
- spec/features/admin/overview_spec.rb
|
||||
- spec/features/admin/payment_method_spec.rb
|
||||
- spec/features/admin/product_import_spec.rb
|
||||
@@ -193,11 +199,9 @@ Layout/LineLength:
|
||||
- spec/features/consumer/account/settings_spec.rb
|
||||
- spec/features/consumer/account_spec.rb
|
||||
- spec/features/consumer/authentication_spec.rb
|
||||
- spec/features/consumer/caching/darkwarm_caching_spec.rb
|
||||
- spec/features/consumer/caching/shops_caching_spec.rb
|
||||
- spec/features/consumer/cookies_spec.rb
|
||||
- spec/features/consumer/groups_spec.rb
|
||||
- spec/features/consumer/multilingual_spec.rb
|
||||
- spec/features/consumer/producers_spec.rb
|
||||
- spec/features/consumer/registration_spec.rb
|
||||
- spec/features/consumer/shopping/cart_spec.rb
|
||||
- spec/features/consumer/shopping/checkout_auth_spec.rb
|
||||
@@ -227,6 +231,7 @@ Layout/LineLength:
|
||||
- spec/lib/open_food_network/group_buy_report_spec.rb
|
||||
- spec/lib/open_food_network/lettuce_share_report_spec.rb
|
||||
- spec/lib/open_food_network/option_value_namer_spec.rb
|
||||
- spec/lib/open_food_network/order_and_distributor_report_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_form_applicator_spec.rb
|
||||
- spec/lib/open_food_network/order_cycle_permissions_spec.rb
|
||||
- spec/lib/open_food_network/order_grouper_spec.rb
|
||||
@@ -234,9 +239,11 @@ Layout/LineLength:
|
||||
- spec/lib/open_food_network/packing_report_spec.rb
|
||||
- spec/lib/open_food_network/permissions_spec.rb
|
||||
- spec/lib/open_food_network/products_and_inventory_report_spec.rb
|
||||
- spec/lib/open_food_network/proxy_order_syncer_spec.rb
|
||||
- spec/lib/open_food_network/scope_variant_to_hub_spec.rb
|
||||
- spec/lib/open_food_network/subscription_payment_updater_spec.rb
|
||||
- spec/lib/open_food_network/subscription_summarizer_spec.rb
|
||||
- spec/lib/open_food_network/tag_rule_applicator_spec.rb
|
||||
- spec/lib/open_food_network/user_balance_calculator_spec.rb
|
||||
- spec/lib/open_food_network/users_and_enterprises_report_spec.rb
|
||||
- spec/lib/open_food_network/xero_invoices_report_spec.rb
|
||||
- spec/lib/stripe/account_connector_spec.rb
|
||||
@@ -257,8 +264,8 @@ Layout/LineLength:
|
||||
- spec/models/exchange_spec.rb
|
||||
- spec/models/model_set_spec.rb
|
||||
- spec/models/order_cycle_spec.rb
|
||||
- spec/models/producer_property_spec.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
- spec/models/product_import/reset_absent_spec.rb
|
||||
- spec/models/proxy_order_spec.rb
|
||||
- spec/models/spree/ability_spec.rb
|
||||
- spec/models/spree/adjustment_spec.rb
|
||||
@@ -272,9 +279,10 @@ Layout/LineLength:
|
||||
- spec/models/spree/payment_spec.rb
|
||||
- spec/models/spree/product_set_spec.rb
|
||||
- spec/models/spree/product_spec.rb
|
||||
- spec/models/spree/property_spec.rb
|
||||
- spec/models/spree/shipping_method_spec.rb
|
||||
- spec/models/spree/taxon_spec.rb
|
||||
- spec/models/spree/tax_rate_spec.rb
|
||||
- spec/models/spree/taxon_spec.rb
|
||||
- spec/models/spree/user_spec.rb
|
||||
- spec/models/spree/variant_spec.rb
|
||||
- spec/models/stripe_account_spec.rb
|
||||
@@ -287,10 +295,10 @@ Layout/LineLength:
|
||||
- spec/performance/orders_controller_spec.rb
|
||||
- spec/performance/shop_controller_spec.rb
|
||||
- spec/requests/checkout/failed_checkout_spec.rb
|
||||
- spec/requests/checkout/stripe_sca_spec.rb
|
||||
- spec/requests/embedded_shopfronts_headers_spec.rb
|
||||
- spec/serializers/api/admin/customer_serializer_spec.rb
|
||||
- spec/serializers/api/admin/exchange_serializer_spec.rb
|
||||
- spec/serializers/api/admin/for_order_cycle/enterprise_serializer_spec.rb
|
||||
- spec/serializers/api/admin/for_order_cycle/supplied_product_serializer_spec.rb
|
||||
- spec/serializers/api/admin/order_cycle_serializer_spec.rb
|
||||
- spec/serializers/api/admin/subscription_customer_serializer_spec.rb
|
||||
@@ -299,7 +307,6 @@ Layout/LineLength:
|
||||
- spec/serializers/api/enterprise_shopfront_serializer_spec.rb
|
||||
- spec/serializers/api/order_serializer_spec.rb
|
||||
- spec/services/cart_service_spec.rb
|
||||
- spec/services/checkout/form_data_adapter_spec.rb
|
||||
- spec/services/embedded_page_service_spec.rb
|
||||
- spec/services/exchange_products_renderer_spec.rb
|
||||
- spec/services/order_cycle_distributed_products_spec.rb
|
||||
@@ -307,17 +314,20 @@ Layout/LineLength:
|
||||
- spec/services/order_cycle_form_spec.rb
|
||||
- spec/services/order_factory_spec.rb
|
||||
- spec/services/order_syncer_spec.rb
|
||||
- spec/services/order_tax_adjustments_fetcher_spec.rb
|
||||
- spec/services/permissions/order_spec.rb
|
||||
- spec/services/permitted_attributes/order_cycle_spec.rb
|
||||
- spec/services/products_renderer_spec.rb
|
||||
- spec/services/product_tag_rules_filterer_spec.rb
|
||||
- spec/services/products_renderer_spec.rb
|
||||
- spec/services/subscription_estimator_spec.rb
|
||||
- spec/services/subscription_form_spec.rb
|
||||
- spec/services/subscription_validator_spec.rb
|
||||
- spec/services/subscription_variants_service_spec.rb
|
||||
- spec/spec_helper.rb
|
||||
- spec/support/cancan_helper.rb
|
||||
- spec/support/delayed_job_helper.rb
|
||||
- spec/support/matchers/delegate_matchers.rb
|
||||
- spec/support/matchers/select2_matchers.rb
|
||||
- spec/support/matchers/table_matchers.rb
|
||||
- spec/support/request/authentication_workflow.rb
|
||||
- spec/support/request/shop_workflow.rb
|
||||
- spec/support/request/web_helper.rb
|
||||
- spec/support/seeds.rb
|
||||
@@ -331,6 +341,7 @@ Metrics/AbcSize:
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/admin/order_cycles_controller.rb
|
||||
- app/controllers/admin/product_import_controller.rb
|
||||
- app/controllers/admin/schedules_controller.rb
|
||||
- app/controllers/admin/stripe_accounts_controller.rb
|
||||
- app/controllers/admin/subscription_line_items_controller.rb
|
||||
- app/controllers/admin/subscriptions_controller.rb
|
||||
@@ -340,12 +351,14 @@ Metrics/AbcSize:
|
||||
- app/controllers/api/shipments_controller.rb
|
||||
- app/controllers/api/taxons_controller.rb
|
||||
- app/controllers/api/variants_controller.rb
|
||||
- app/controllers/base_controller.rb
|
||||
- app/controllers/cart_controller.rb
|
||||
- app/controllers/discourse_sso_controller.rb
|
||||
- app/controllers/enterprises_controller.rb
|
||||
- app/controllers/spree/admin/adjustments_controller_decorator.rb
|
||||
- app/controllers/spree/admin/image_settings_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/orders/customer_details_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/overview_controller.rb
|
||||
- app/controllers/spree/admin/payment_methods_controller.rb
|
||||
- app/controllers/spree/admin/payments_controller.rb
|
||||
@@ -355,12 +368,13 @@ Metrics/AbcSize:
|
||||
- app/controllers/spree/admin/search_controller.rb
|
||||
- app/controllers/spree/admin/taxons_controller.rb
|
||||
- app/controllers/spree/admin/users_controller.rb
|
||||
- app/controllers/spree/admin/variants_controller.rb
|
||||
- app/controllers/spree/credit_cards_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/controllers/spree/user_passwords_controller.rb
|
||||
- app/controllers/spree/user_registrations_controller.rb
|
||||
- app/controllers/spree/users_controller.rb
|
||||
- app/controllers/spree/user_sessions_controller.rb
|
||||
- app/controllers/spree/users_controller.rb
|
||||
- app/controllers/stripe/callbacks_controller.rb
|
||||
- app/controllers/user_confirmations_controller.rb
|
||||
- app/controllers/user_passwords_controller.rb
|
||||
@@ -368,19 +382,19 @@ Metrics/AbcSize:
|
||||
- app/helpers/checkout_helper.rb
|
||||
- app/helpers/i18n_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/helpers/spree/admin/zones_helper.rb
|
||||
- app/helpers/spree/orders_helper.rb
|
||||
- app/mailers/producer_mailer.rb
|
||||
- app/models/calculator/flat_percent_per_item.rb
|
||||
- app/models/column_preference.rb
|
||||
- app/models/enterprise_group.rb
|
||||
- app/models/enterprise.rb
|
||||
- app/models/enterprise_group.rb
|
||||
- app/models/enterprise_relationship.rb
|
||||
- app/models/model_set.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/product_import/product_importer.rb
|
||||
- app/models/proxy_order.rb
|
||||
- app/models/spree/ability_decorator.rb
|
||||
- app/models/spree/calculator/default_tax_decorator.rb
|
||||
@@ -389,20 +403,15 @@ Metrics/AbcSize:
|
||||
- app/models/spree/order_decorator.rb
|
||||
- app/models/spree/payment_decorator.rb
|
||||
- app/models/spree/product_decorator.rb
|
||||
- app/models/spree/shipment.rb
|
||||
- app/models/spree/taxon_decorator.rb
|
||||
- app/models/spree/tax_rate_decorator.rb
|
||||
- app/serializers/api/admin/enterprise_serializer.rb
|
||||
- app/serializers/api/admin/order_cycle_serializer.rb
|
||||
- app/serializers/api/product_serializer.rb
|
||||
- app/serializers/api/variant_serializer.rb
|
||||
- app/services/cart_service.rb
|
||||
- app/services/create_order_cycle.rb
|
||||
- app/services/order_cycle_form.rb
|
||||
- app/services/order_syncer.rb
|
||||
- engines/order_management/app/services/order_management/stock/estimator.rb
|
||||
- engines/order_management/app/services/order_management/stock/package.rb
|
||||
- engines/order_management/app/services/order_management/stock/packer.rb
|
||||
- engines/order_management/app/services/order_management/subscriptions/validator.rb
|
||||
- app/services/subscription_validator.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_decorator.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
@@ -420,29 +429,26 @@ Metrics/AbcSize:
|
||||
- lib/open_food_network/payments_report.rb
|
||||
- lib/open_food_network/permissions.rb
|
||||
- lib/open_food_network/products_and_inventory_report.rb
|
||||
- lib/open_food_network/rack_request_blocker.rb
|
||||
- lib/open_food_network/reports/line_items.rb
|
||||
- lib/open_food_network/sales_tax_report.rb
|
||||
- lib/open_food_network/users_and_enterprises_report.rb
|
||||
- lib/open_food_network/variant_and_line_item_naming.rb
|
||||
- lib/open_food_network/xero_invoices_report.rb
|
||||
- lib/spree/api/controller_setup.rb
|
||||
- lib/spree/core/controller_helpers/order.rb
|
||||
- lib/spree/core/controller_helpers/respond_with.rb
|
||||
- lib/spree/core/controller_helpers/ssl.rb
|
||||
- lib/spree/core/controller_helpers/respond_with_decorator.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- lib/stripe/account_connector.rb
|
||||
- lib/tasks/enterprises.rake
|
||||
- lib/tasks/sample_data/order_factory.rb
|
||||
- lib/tasks/sample_data/product_factory.rb
|
||||
- spec/features/admin/product_import_spec.rb
|
||||
- spec/features/admin/reports_spec.rb
|
||||
- spec/features/admin/subscriptions_spec.rb
|
||||
- spec/features/consumer/shopping/checkout_paypal_spec.rb
|
||||
- spec/features/consumer/shopping/shopping_spec.rb
|
||||
- spec/features/consumer/shopping/variant_overrides_spec.rb
|
||||
- spec/models/enterprise_spec.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
- spec/services/order_checkout_restart_spec.rb
|
||||
- spec/services/restart_checkout_spec.rb
|
||||
- spec/support/performance_helper.rb
|
||||
|
||||
Metrics/BlockLength:
|
||||
@@ -461,20 +467,17 @@ Metrics/BlockLength:
|
||||
"scenario"
|
||||
]
|
||||
Exclude:
|
||||
- app/models/spree/shipment.rb
|
||||
- lib/spree/core/controller_helpers/common.rb
|
||||
- lib/spree/core/controller_helpers/ssl.rb
|
||||
- lib/tasks/data.rake
|
||||
- spec/controllers/spree/admin/invoices_controller_spec.rb
|
||||
- spec/factories.rb
|
||||
- spec/factories/enterprise_factory.rb
|
||||
- spec/factories/order_cycle_factory.rb
|
||||
- spec/factories/order_factory.rb
|
||||
- spec/factories/product_factory.rb
|
||||
- spec/factories.rb
|
||||
- spec/factories/shipping_method_factory.rb
|
||||
- spec/factories/subscription_factory.rb
|
||||
- spec/factories/user_factory.rb
|
||||
- spec/factories/variant_factory.rb
|
||||
- spec/features/admin/orders_spec.rb
|
||||
- spec/features/consumer/shopping/embedded_shopfronts_spec.rb
|
||||
- spec/lib/open_food_network/group_buy_report_spec.rb
|
||||
- spec/models/tag_rule/discount_order_spec.rb
|
||||
@@ -493,24 +496,23 @@ Metrics/CyclomaticComplexity:
|
||||
- app/helpers/checkout_helper.rb
|
||||
- app/helpers/i18n_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/models/enterprise.rb
|
||||
- app/models/enterprise_relationship.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/spree/ability_decorator.rb
|
||||
- app/models/spree/payment_decorator.rb
|
||||
- app/models/spree/payment_method_decorator.rb
|
||||
- app/models/spree/product_decorator.rb
|
||||
- app/models/variant_override_set.rb
|
||||
- app/services/cart_service.rb
|
||||
- engines/order_management/app/services/order_management/stock/estimator.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/bulk_coop_report.rb
|
||||
- lib/open_food_network/enterprise_issue_validator.rb
|
||||
- lib/spree/core/controller_helpers/order.rb
|
||||
- lib/spree/core/controller_helpers/respond_with.rb
|
||||
- lib/spree/core/controller_helpers/ssl.rb
|
||||
- lib/spree/core/controller_helpers/order_decorator.rb
|
||||
- lib/spree/core/controller_helpers/respond_with_decorator.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
|
||||
@@ -526,24 +528,23 @@ Metrics/PerceivedComplexity:
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/models/enterprise_relationship.rb
|
||||
- app/models/product_import/entry_processor.rb
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/spree/ability_decorator.rb
|
||||
- app/models/spree/order_decorator.rb
|
||||
- app/models/spree/product_decorator.rb
|
||||
- engines/order_management/app/services/order_management/stock/estimator.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/bulk_coop_report.rb
|
||||
- lib/open_food_network/enterprise_issue_validator.rb
|
||||
- lib/spree/core/controller_helpers/order.rb
|
||||
- lib/spree/core/controller_helpers/respond_with.rb
|
||||
- lib/spree/core/controller_helpers/ssl.rb
|
||||
- lib/spree/core/controller_helpers/order_decorator.rb
|
||||
- lib/spree/core/controller_helpers/respond_with_decorator.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- spec/models/product_importer_spec.rb
|
||||
|
||||
Metrics/MethodLength:
|
||||
Max: 10
|
||||
Exclude:
|
||||
- app/controllers/admin/contents_controller.rb
|
||||
- app/controllers/admin/customers_controller.rb
|
||||
- app/controllers/admin/enterprise_fees_controller.rb
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
@@ -555,11 +556,12 @@ Metrics/MethodLength:
|
||||
- app/controllers/api/shipments_controller.rb
|
||||
- app/controllers/api/taxons_controller.rb
|
||||
- app/controllers/api/variants_controller.rb
|
||||
- app/controllers/base_controller.rb
|
||||
- app/controllers/cart_controller.rb
|
||||
- app/controllers/shop_controller.rb
|
||||
- app/controllers/spree/admin/image_settings_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/orders/customer_details_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/payment_methods_controller.rb
|
||||
- app/controllers/spree/admin/payments_controller.rb
|
||||
- app/controllers/spree/admin/products_controller.rb
|
||||
@@ -578,8 +580,9 @@ Metrics/MethodLength:
|
||||
- app/controllers/user_registrations_controller.rb
|
||||
- app/helpers/checkout_helper.rb
|
||||
- app/helpers/order_cycles_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/jobs/subscription_placement_job.rb
|
||||
- app/mailers/producer_mailer.rb
|
||||
- app/models/column_preference.rb
|
||||
- app/models/enterprise.rb
|
||||
@@ -596,14 +599,10 @@ Metrics/MethodLength:
|
||||
- app/models/spree/payment_decorator.rb
|
||||
- app/models/spree/payment_method_decorator.rb
|
||||
- app/models/spree/product_decorator.rb
|
||||
- app/models/spree/shipment.rb
|
||||
- app/serializers/api/admin/order_cycle_serializer.rb
|
||||
- app/serializers/api/cached_enterprise_serializer.rb
|
||||
- app/services/order_cycle_form.rb
|
||||
- app/services/permitted_attributes/checkout.rb
|
||||
- engines/order_management/app/services/order_management/reports/enterprise_fee_summary/scope.rb
|
||||
- engines/order_management/app/services/order_management/stock/estimator.rb
|
||||
- engines/order_management/app/services/order_management/stock/package.rb
|
||||
- lib/active_merchant/billing/gateways/stripe_payment_intents.rb
|
||||
- lib/discourse/single_sign_on.rb
|
||||
- lib/open_food_network/bulk_coop_report.rb
|
||||
@@ -631,15 +630,9 @@ Metrics/MethodLength:
|
||||
- lib/open_food_network/users_and_enterprises_report.rb
|
||||
- lib/open_food_network/xero_invoices_report.rb
|
||||
- lib/spree/api/controller_setup.rb
|
||||
- lib/spree/core/controller_helpers/auth.rb
|
||||
- lib/spree/core/controller_helpers/order.rb
|
||||
- lib/spree/core/controller_helpers/respond_with.rb
|
||||
- lib/spree/core/controller_helpers/ssl.rb
|
||||
- lib/spree/core/controller_helpers/respond_with_decorator.rb
|
||||
- lib/spree/localized_number.rb
|
||||
- lib/stripe/profile_storer.rb
|
||||
- lib/tasks/data/truncate_data.rb
|
||||
- lib/tasks/sample_data/group_factory.rb
|
||||
- lib/tasks/sample_data/order_factory.rb
|
||||
- lib/tasks/sample_data/product_factory.rb
|
||||
- spec/features/consumer/shopping/checkout_paypal_spec.rb
|
||||
- spec/features/consumer/shopping/variant_overrides_spec.rb
|
||||
@@ -651,16 +644,16 @@ Metrics/ClassLength:
|
||||
Exclude:
|
||||
- app/controllers/admin/enterprises_controller.rb
|
||||
- app/controllers/admin/order_cycles_controller.rb
|
||||
- app/controllers/admin/schedules_controller.rb
|
||||
- app/controllers/admin/subscriptions_controller.rb
|
||||
- app/controllers/api/products_controller.rb
|
||||
- app/controllers/application_controller.rb
|
||||
- app/controllers/checkout_controller.rb
|
||||
- app/controllers/spree/admin/base_controller.rb
|
||||
- app/controllers/spree/admin/orders_controller.rb
|
||||
- app/controllers/spree/admin/payment_methods_controller.rb
|
||||
- app/controllers/spree/admin/products_controller.rb
|
||||
- app/controllers/spree/admin/reports_controller.rb
|
||||
- app/controllers/spree/admin/resource_controller.rb
|
||||
- app/controllers/spree/admin/products_controller.rb
|
||||
- app/controllers/spree/admin/users_controller.rb
|
||||
- app/controllers/spree/orders_controller.rb
|
||||
- app/models/enterprise.rb
|
||||
@@ -669,7 +662,6 @@ Metrics/ClassLength:
|
||||
- app/models/product_import/entry_validator.rb
|
||||
- app/models/product_import/product_importer.rb
|
||||
- app/models/spree/ability_decorator.rb
|
||||
- app/models/spree/shipment.rb
|
||||
- app/models/spree/user.rb
|
||||
- app/serializers/api/cached_enterprise_serializer.rb
|
||||
- app/serializers/api/enterprise_shopfront_serializer.rb
|
||||
@@ -692,15 +684,8 @@ Metrics/ModuleLength:
|
||||
Exclude:
|
||||
- app/helpers/admin/injection_helper.rb
|
||||
- app/helpers/injection_helper.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- app/helpers/spree/admin/navigation_helper.rb
|
||||
- engines/order_management/spec/services/order_management/stock/package_spec.rb
|
||||
- engines/order_management/spec/services/order_management/subscriptions/estimator_spec.rb
|
||||
- engines/order_management/spec/services/order_management/subscriptions/form_spec.rb
|
||||
- engines/order_management/spec/services/order_management/subscriptions/proxy_order_syncer_spec.rb
|
||||
- engines/order_management/spec/services/order_management/subscriptions/summarizer_spec.rb
|
||||
- engines/order_management/spec/services/order_management/subscriptions/validator_spec.rb
|
||||
- engines/order_management/spec/services/order_management/subscriptions/variants_list_spec.rb
|
||||
- app/helpers/spree/admin/base_helper.rb
|
||||
- lib/open_food_network/column_preference_defaults.rb
|
||||
- spec/controllers/admin/enterprises_controller_spec.rb
|
||||
- spec/controllers/admin/order_cycles_controller_spec.rb
|
||||
@@ -716,9 +701,10 @@ Metrics/ModuleLength:
|
||||
- spec/lib/open_food_network/order_grouper_spec.rb
|
||||
- spec/lib/open_food_network/permissions_spec.rb
|
||||
- spec/lib/open_food_network/products_and_inventory_report_spec.rb
|
||||
- spec/lib/open_food_network/proxy_order_syncer_spec.rb
|
||||
- spec/lib/open_food_network/scope_variant_to_hub_spec.rb
|
||||
- spec/lib/open_food_network/subscription_payment_updater_spec.rb
|
||||
- spec/lib/open_food_network/tag_rule_applicator_spec.rb
|
||||
- spec/lib/open_food_network/user_balance_calculator_spec.rb
|
||||
- spec/lib/open_food_network/users_and_enterprises_report_spec.rb
|
||||
- spec/models/spree/ability_spec.rb
|
||||
- spec/models/spree/adjustment_spec.rb
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
# rubocop locally, the default configuration file `.rubocop.yml` loads
|
||||
# our "todo lists" to ignore all current violations.
|
||||
AllCops:
|
||||
TargetRailsVersion: 4.0
|
||||
TargetRailsVersion: 3.2
|
||||
Exclude:
|
||||
- 'bin/**/*'
|
||||
- 'db/**/*'
|
||||
@@ -20,6 +20,9 @@ AllCops:
|
||||
#
|
||||
# Cop settings that have been agreed upon by the OFN community
|
||||
|
||||
Rails:
|
||||
Enabled: true
|
||||
|
||||
Style/Documentation:
|
||||
Enabled: false
|
||||
|
||||
@@ -40,12 +43,6 @@ Layout/MultilineMethodCallIndentation:
|
||||
Layout/LineLength:
|
||||
Max: 100
|
||||
|
||||
Lint/RaiseException:
|
||||
Enabled: true
|
||||
|
||||
Lint/StructNewOverride:
|
||||
Enabled: true
|
||||
|
||||
## TEMPORARY/CONTESTED SETTINGS
|
||||
#
|
||||
# These are still to be decided upon, but recommended for inclusion by
|
||||
@@ -64,6 +61,24 @@ Lint/UselessAssignment:
|
||||
Exclude:
|
||||
- spec/**/*
|
||||
|
||||
# AFAIK, there is no good alternative to dynamic matchers until we upgrade
|
||||
# to Rails 4 and can use #find_by. If there is a better approach, let's do it.
|
||||
Rails/DynamicFindBy:
|
||||
Enabled: false
|
||||
|
||||
# Same as above, #find_by is not available until Rails 4
|
||||
Rails/FindBy:
|
||||
Enabled: false
|
||||
|
||||
# Same as above, #update! is not available until Rails 4
|
||||
Rails/ActiveRecordAliases:
|
||||
Enabled: false
|
||||
|
||||
# This should be the programmer's discretion, perhaps we should review all of
|
||||
# the uses of it an make specific exceptions though.
|
||||
Rails/SkipsModelValidations:
|
||||
Enabled: false
|
||||
|
||||
## Relaxed.Ruby.Style SETTINGS
|
||||
#
|
||||
# These styles are a starting point for the conversation around conventions
|
||||
|
||||
@@ -1,24 +1,79 @@
|
||||
# This configuration was generated by
|
||||
# `rubocop --auto-gen-config --exclude-limit 1400`
|
||||
# on 2020-06-22 13:28:10 +0100 using RuboCop version 0.81.0.
|
||||
# on 2020-01-09 11:26:09 +1100 using RuboCop version 0.79.0.
|
||||
# The point is for the user to remove these configuration records
|
||||
# one by one as the offenses are removed from the code base.
|
||||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 139
|
||||
# Offense count: 6
|
||||
# Cop supports --auto-correct.
|
||||
Layout/EmptyLineAfterGuardClause:
|
||||
Exclude:
|
||||
- 'lib/open_food_network/bulk_coop_report.rb'
|
||||
- 'lib/open_food_network/orders_and_fulfillments_report.rb'
|
||||
- 'lib/open_food_network/packing_report.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
Layout/EmptyLines:
|
||||
Exclude:
|
||||
- 'spec/features/admin/order_cycles_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: empty_lines, no_empty_lines
|
||||
Layout/EmptyLinesAroundBlockBody:
|
||||
Exclude:
|
||||
- 'spec/controllers/api/orders_controller_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
||||
# SupportedHashRocketStyles: key, separator, table
|
||||
# SupportedColonStyles: key, separator, table
|
||||
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
||||
Layout/HashAlignment:
|
||||
Exclude:
|
||||
- 'spec/lib/open_food_network/orders_and_fulfillments_report/customer_totals_report_spec.rb'
|
||||
|
||||
# Offense count: 27
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
||||
# URISchemes: http, https
|
||||
Layout/LineLength:
|
||||
Max: 268
|
||||
Max: 129
|
||||
|
||||
# Offense count: 2
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
|
||||
# SupportedStylesForExponentOperator: space, no_space
|
||||
Layout/SpaceAroundOperators:
|
||||
Exclude:
|
||||
- 'app/services/cart_service.rb'
|
||||
- 'spec/support/cancan_helper.rb'
|
||||
|
||||
# Offense count: 4
|
||||
Lint/AmbiguousOperator:
|
||||
Exclude:
|
||||
- 'app/controllers/spree/admin/orders/customer_details_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/orders_controller_decorator.rb'
|
||||
- 'spec/controllers/api/enterprise_fees_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/payments_controller_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Lint/DuplicateHashKey:
|
||||
Exclude:
|
||||
- 'spec/models/calculator/weight_spec.rb'
|
||||
|
||||
# Offense count: 4
|
||||
Lint/DuplicateMethods:
|
||||
Exclude:
|
||||
- 'lib/discourse/single_sign_on.rb'
|
||||
- 'lib/open_food_network/subscription_summary.rb'
|
||||
|
||||
# Offense count: 9
|
||||
# Offense count: 10
|
||||
Lint/IneffectiveAccessModifier:
|
||||
Exclude:
|
||||
- 'app/models/column_preference.rb'
|
||||
@@ -27,6 +82,31 @@ Lint/IneffectiveAccessModifier:
|
||||
- 'lib/open_food_network/feature_toggle.rb'
|
||||
- 'spec/lib/open_food_network/reports/report_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Lint/InterpolationCheck:
|
||||
Exclude:
|
||||
- 'spec/features/consumer/shopping/embedded_groups_spec.rb'
|
||||
|
||||
# Offense count: 3
|
||||
# Cop supports --auto-correct.
|
||||
Lint/NonDeterministicRequireOrder:
|
||||
Exclude:
|
||||
- 'engines/order_management/spec/spec_helper.rb'
|
||||
- 'engines/web/spec/spec_helper.rb'
|
||||
- 'spec/spec_helper.rb'
|
||||
|
||||
# Offense count: 3
|
||||
Lint/ShadowingOuterLocalVariable:
|
||||
Exclude:
|
||||
- 'app/models/model_set.rb'
|
||||
- 'spec/models/model_set_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: AllowKeywordBlockArguments.
|
||||
Lint/UnderscorePrefixedVariableName:
|
||||
Exclude:
|
||||
- 'spec/support/cancan_helper.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
||||
Lint/UselessAccessModifier:
|
||||
@@ -37,36 +117,16 @@ Lint/UselessAccessModifier:
|
||||
- 'lib/open_food_network/reports/bulk_coop_report.rb'
|
||||
- 'spec/lib/open_food_network/reports/report_spec.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# Configuration parameters: IgnoredMethods.
|
||||
Metrics/AbcSize:
|
||||
Max: 37
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: CountComments, ExcludedMethods.
|
||||
# ExcludedMethods: refine
|
||||
Metrics/BlockLength:
|
||||
Max: 27
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: CountComments.
|
||||
Metrics/ClassLength:
|
||||
Max: 101
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: IgnoredMethods.
|
||||
Metrics/CyclomaticComplexity:
|
||||
Max: 7
|
||||
|
||||
# Offense count: 6
|
||||
# Configuration parameters: CountComments, ExcludedMethods.
|
||||
Metrics/MethodLength:
|
||||
Max: 20
|
||||
# Configuration parameters: CheckForMethodsWithNoSideEffects.
|
||||
Lint/Void:
|
||||
Exclude:
|
||||
- 'app/serializers/api/enterprise_serializer.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: CountComments.
|
||||
Metrics/ModuleLength:
|
||||
Max: 121
|
||||
Max: 114
|
||||
|
||||
# Offense count: 8
|
||||
Naming/AccessorMethodName:
|
||||
@@ -89,10 +149,23 @@ Naming/HeredocDelimiterNaming:
|
||||
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
|
||||
Naming/MemoizedInstanceVariableName:
|
||||
Exclude:
|
||||
- 'app/mailers/producer_mailer.rb'
|
||||
- 'app/controllers/spree/admin/payments_controller_decorator.rb'
|
||||
- 'lib/open_food_network/address_finder.rb'
|
||||
|
||||
# Offense count: 19
|
||||
# Offense count: 8
|
||||
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
|
||||
# AllowedNames: io, id, to, by, on, in, at, ip, db, os
|
||||
Naming/MethodParameterName:
|
||||
Exclude:
|
||||
- 'app/helpers/spree/admin/base_helper_decorator.rb'
|
||||
- 'app/helpers/spree/base_helper_decorator.rb'
|
||||
- 'app/services/subscription_validator.rb'
|
||||
- 'lib/open_food_network/reports/bulk_coop_report.rb'
|
||||
- 'lib/open_food_network/xero_invoices_report.rb'
|
||||
- 'spec/lib/open_food_network/reports/report_spec.rb'
|
||||
- 'spec/mailers/producer_mailer_spec.rb'
|
||||
|
||||
# Offense count: 22
|
||||
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
|
||||
# NamePrefix: is_, has_, have_
|
||||
# ForbiddenPrefixes: is_, has_, have_
|
||||
@@ -101,6 +174,7 @@ Naming/MemoizedInstanceVariableName:
|
||||
Naming/PredicateName:
|
||||
Exclude:
|
||||
- 'spec/**/*'
|
||||
- 'app/mailers/producer_mailer.rb'
|
||||
- 'app/models/enterprise.rb'
|
||||
- 'app/models/enterprise_relationship.rb'
|
||||
- 'app/models/order_cycle.rb'
|
||||
@@ -110,6 +184,7 @@ Naming/PredicateName:
|
||||
- 'app/models/spree/order_decorator.rb'
|
||||
- 'app/models/spree/payment_method_decorator.rb'
|
||||
- 'app/models/spree/preferences/file_configuration.rb'
|
||||
- 'app/models/spree/product_decorator.rb'
|
||||
- 'app/models/spree/shipping_method_decorator.rb'
|
||||
- 'lib/open_food_network/customers_report.rb'
|
||||
- 'lib/open_food_network/order_cycle_management_report.rb'
|
||||
@@ -117,6 +192,71 @@ Naming/PredicateName:
|
||||
- 'lib/open_food_network/packing_report.rb'
|
||||
- 'lib/tasks/data.rake'
|
||||
|
||||
# Offense count: 152
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, Include.
|
||||
# SupportedStyles: action, filter
|
||||
# Include: app/controllers/**/*.rb
|
||||
Rails/ActionFilter:
|
||||
Exclude:
|
||||
- 'app/controllers/admin/column_preferences_controller.rb'
|
||||
- 'app/controllers/admin/customers_controller.rb'
|
||||
- 'app/controllers/admin/enterprise_fees_controller.rb'
|
||||
- 'app/controllers/admin/enterprise_groups_controller.rb'
|
||||
- 'app/controllers/admin/enterprises_controller.rb'
|
||||
- 'app/controllers/admin/order_cycles_controller.rb'
|
||||
- 'app/controllers/admin/producer_properties_controller.rb'
|
||||
- 'app/controllers/admin/product_import_controller.rb'
|
||||
- 'app/controllers/admin/schedules_controller.rb'
|
||||
- 'app/controllers/admin/stripe_connect_settings_controller.rb'
|
||||
- 'app/controllers/admin/subscription_line_items_controller.rb'
|
||||
- 'app/controllers/admin/subscriptions_controller.rb'
|
||||
- 'app/controllers/admin/variant_overrides_controller.rb'
|
||||
- 'app/controllers/api/base_controller.rb'
|
||||
- 'app/controllers/api/enterprise_attachment_controller.rb'
|
||||
- 'app/controllers/api/enterprises_controller.rb'
|
||||
- 'app/controllers/api/shipments_controller.rb'
|
||||
- 'app/controllers/api/variants_controller.rb'
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'app/controllers/base_controller.rb'
|
||||
- 'app/controllers/cart_controller.rb'
|
||||
- 'app/controllers/checkout_controller.rb'
|
||||
- 'app/controllers/discourse_sso_controller.rb'
|
||||
- 'app/controllers/enterprises_controller.rb'
|
||||
- 'app/controllers/home_controller.rb'
|
||||
- 'app/controllers/line_items_controller.rb'
|
||||
- 'app/controllers/producers_controller.rb'
|
||||
- 'app/controllers/registration_controller.rb'
|
||||
- 'app/controllers/shop_controller.rb'
|
||||
- 'app/controllers/shops_controller.rb'
|
||||
- 'app/controllers/spree/admin/adjustments_controller.rb'
|
||||
- 'app/controllers/spree/admin/base_controller.rb'
|
||||
- 'app/controllers/spree/admin/images_controller.rb'
|
||||
- 'app/controllers/spree/admin/mail_methods_controller.rb'
|
||||
- 'app/controllers/spree/admin/orders/customer_details_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/orders_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/payment_methods_controller.rb'
|
||||
- 'app/controllers/spree/admin/payments_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/product_properties_controller.rb'
|
||||
- 'app/controllers/spree/admin/products_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/reports/enterprise_fee_summaries_controller.rb'
|
||||
- 'app/controllers/spree/admin/reports_controller.rb'
|
||||
- 'app/controllers/spree/admin/shipping_methods_controller.rb'
|
||||
- 'app/controllers/spree/admin/states_controller.rb'
|
||||
- 'app/controllers/spree/admin/tax_rates_controller.rb'
|
||||
- 'app/controllers/spree/admin/users_controller.rb'
|
||||
- 'app/controllers/spree/admin/zones_controller.rb'
|
||||
- 'app/controllers/spree/checkout_controller.rb'
|
||||
- 'app/controllers/spree/orders_controller.rb'
|
||||
- 'app/controllers/spree/paypal_controller_decorator.rb'
|
||||
- 'app/controllers/spree/store_controller.rb'
|
||||
- 'app/controllers/spree/user_registrations_controller.rb'
|
||||
- 'app/controllers/spree/user_sessions_controller.rb'
|
||||
- 'app/controllers/spree/users_controller.rb'
|
||||
- 'app/controllers/stripe/webhooks_controller.rb'
|
||||
- 'app/controllers/user_passwords_controller.rb'
|
||||
- 'app/controllers/user_registrations_controller.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: strict, flexible
|
||||
@@ -124,14 +264,6 @@ Rails/Date:
|
||||
Exclude:
|
||||
- 'app/models/order_cycle.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Whitelist.
|
||||
# Whitelist: find_by_sql
|
||||
Rails/DynamicFindBy:
|
||||
Exclude:
|
||||
- 'app/controllers/spree/admin/orders/customer_details_controller.rb'
|
||||
|
||||
# Offense count: 16
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: slashes, arguments
|
||||
@@ -151,36 +283,18 @@ Rails/FilePath:
|
||||
- 'spec/support/downloads_helper.rb'
|
||||
|
||||
# Offense count: 7
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/FindBy:
|
||||
Exclude:
|
||||
- 'app/models/enterprise.rb'
|
||||
- 'app/models/product_import/entry_processor.rb'
|
||||
- 'app/models/product_import/entry_validator.rb'
|
||||
- 'app/models/product_import/spreadsheet_data.rb'
|
||||
- 'app/models/spree/user.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/FindEach:
|
||||
Exclude:
|
||||
- 'app/models/spree/order_decorator.rb'
|
||||
|
||||
# Offense count: 5
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/HasAndBelongsToMany:
|
||||
Exclude:
|
||||
- 'app/models/enterprise.rb'
|
||||
- 'app/models/enterprise_group.rb'
|
||||
- 'app/models/order_cycle.rb'
|
||||
- 'app/models/schedule.rb'
|
||||
- 'app/models/spree/concerns/payment_method_distributors.rb'
|
||||
- 'app/models/spree/line_item_decorator.rb'
|
||||
|
||||
# Offense count: 25
|
||||
# Offense count: 26
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/HasManyOrHasOneDependent:
|
||||
@@ -191,13 +305,13 @@ Rails/HasManyOrHasOneDependent:
|
||||
- 'app/models/spree/adjustment_decorator.rb'
|
||||
- 'app/models/spree/order_decorator.rb'
|
||||
- 'app/models/spree/payment_method_decorator.rb'
|
||||
- 'app/models/spree/property.rb'
|
||||
- 'app/models/spree/property_decorator.rb'
|
||||
- 'app/models/spree/shipping_method_decorator.rb'
|
||||
- 'app/models/spree/user.rb'
|
||||
- 'app/models/spree/variant_decorator.rb'
|
||||
- 'app/models/subscription.rb'
|
||||
|
||||
# Offense count: 84
|
||||
# Offense count: 78
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/helpers/**/*.rb
|
||||
Rails/HelperInstanceVariable:
|
||||
@@ -209,55 +323,28 @@ Rails/HelperInstanceVariable:
|
||||
- 'app/helpers/injection_helper.rb'
|
||||
- 'app/helpers/order_cycles_helper.rb'
|
||||
- 'app/helpers/shared_helper.rb'
|
||||
- 'app/helpers/shop_helper.rb'
|
||||
- 'app/helpers/spree/admin/orders_helper.rb'
|
||||
- 'app/helpers/spree/admin/orders_helper_decorator.rb'
|
||||
- 'app/helpers/spree/orders_helper.rb'
|
||||
|
||||
# Offense count: 35
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/controllers/**/*.rb
|
||||
Rails/LexicallyScopedActionFilter:
|
||||
Exclude:
|
||||
- 'app/controllers/admin/enterprise_groups_controller.rb'
|
||||
- 'app/controllers/admin/enterprises_controller.rb'
|
||||
- 'app/controllers/admin/order_cycles_controller.rb'
|
||||
- 'app/controllers/admin/producer_properties_controller.rb'
|
||||
- 'app/controllers/admin/product_import_controller.rb'
|
||||
- 'app/controllers/admin/schedules_controller.rb'
|
||||
- 'app/controllers/admin/subscriptions_controller.rb'
|
||||
- 'app/controllers/registration_controller.rb'
|
||||
- 'app/controllers/spree/admin/adjustments_controller.rb'
|
||||
- 'app/controllers/spree/admin/payment_methods_controller.rb'
|
||||
- 'app/controllers/spree/admin/payments_controller.rb'
|
||||
- 'app/controllers/spree/admin/product_properties_controller.rb'
|
||||
- 'app/controllers/spree/admin/products_controller.rb'
|
||||
- 'app/controllers/spree/admin/search_controller.rb'
|
||||
- 'app/controllers/spree/admin/shipping_methods_controller.rb'
|
||||
- 'app/controllers/spree/admin/users_controller.rb'
|
||||
- 'app/controllers/spree/admin/zones_controller.rb'
|
||||
- 'app/controllers/spree/users_controller.rb'
|
||||
- 'app/controllers/user_passwords_controller.rb'
|
||||
|
||||
# Offense count: 12
|
||||
# Offense count: 6
|
||||
Rails/OutputSafety:
|
||||
Exclude:
|
||||
- 'app/controllers/spree/admin/reports_controller.rb'
|
||||
- 'app/helpers/angular_form_helper.rb'
|
||||
- 'app/helpers/spree/admin/base_helper.rb'
|
||||
- 'app/helpers/spree/admin/navigation_helper.rb'
|
||||
- 'app/helpers/spree/admin/orders_helper.rb'
|
||||
- 'app/helpers/spree/admin/zones_helper.rb'
|
||||
- 'app/helpers/spree/reports_helper.rb'
|
||||
- 'app/helpers/spree/admin/navigation_helper.rb'
|
||||
- 'app/helpers/spree/admin/orders_helper.rb'
|
||||
- 'app/serializers/api/product_serializer.rb'
|
||||
- 'lib/spree/money_decorator.rb'
|
||||
- 'spec/features/admin/order_print_ticket_spec.rb'
|
||||
- 'spec/features/admin/orders_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: Include.
|
||||
# Include: **/Rakefile, **/*.rake
|
||||
Rails/RakeEnvironment:
|
||||
Exclude:
|
||||
- 'lib/capistrano/tasks/**/*.rake'
|
||||
- 'lib/tasks/specs.rake'
|
||||
|
||||
# Offense count: 9
|
||||
@@ -268,108 +355,6 @@ Rails/ReflectionClassName:
|
||||
- 'app/models/enterprise_role.rb'
|
||||
- 'app/models/subscription.rb'
|
||||
|
||||
# Offense count: 227
|
||||
# Configuration parameters: Blacklist, Whitelist.
|
||||
# Blacklist: decrement!, decrement_counter, increment!, increment_counter, toggle!, touch, update_all, update_attribute, update_column, update_columns, update_counters
|
||||
Rails/SkipsModelValidations:
|
||||
Exclude:
|
||||
- 'app/controllers/spree/admin/payment_methods_controller.rb'
|
||||
- 'app/controllers/spree/admin/resource_controller.rb'
|
||||
- 'app/controllers/spree/admin/shipping_methods_controller.rb'
|
||||
- 'app/controllers/spree/admin/taxons_controller.rb'
|
||||
- 'app/controllers/spree/orders_controller.rb'
|
||||
- 'app/jobs/subscription_confirm_job.rb'
|
||||
- 'app/jobs/subscription_placement_job.rb'
|
||||
- 'app/models/enterprise.rb'
|
||||
- 'app/models/enterprise_relationship.rb'
|
||||
- 'app/models/product_import/inventory_reset_strategy.rb'
|
||||
- 'app/models/proxy_order.rb'
|
||||
- 'app/models/spree/address_decorator.rb'
|
||||
- 'app/models/spree/credit_card_decorator.rb'
|
||||
- 'app/models/spree/order_decorator.rb'
|
||||
- 'app/models/spree/payment_decorator.rb'
|
||||
- 'app/models/spree/shipping_method_decorator.rb'
|
||||
- 'app/models/subscription.rb'
|
||||
- 'app/models/variant_override.rb'
|
||||
- 'app/services/order_factory.rb'
|
||||
- 'engines/order_management/spec/performance/order_management/subscriptions/proxy_order_syncer_spec.rb'
|
||||
- 'engines/order_management/spec/services/order_management/reports/enterprise_fee_summary/report_service_spec.rb'
|
||||
- 'engines/order_management/spec/services/order_management/subscriptions/stripe_payment_setup_spec.rb'
|
||||
- 'lib/tasks/data/anonymize_data.rake'
|
||||
- 'lib/tasks/sample_data/product_factory.rb'
|
||||
- 'lib/tasks/users.rake'
|
||||
- 'spec/controllers/admin/subscription_line_items_controller_spec.rb'
|
||||
- 'spec/controllers/admin/variant_overrides_controller_spec.rb'
|
||||
- 'spec/controllers/api/order_cycles_controller_spec.rb'
|
||||
- 'spec/controllers/api/orders_controller_spec.rb'
|
||||
- 'spec/controllers/api/products_controller_spec.rb'
|
||||
- 'spec/controllers/api/shipments_controller_spec.rb'
|
||||
- 'spec/controllers/api/variants_controller_spec.rb'
|
||||
- 'spec/controllers/checkout_controller_spec.rb'
|
||||
- 'spec/controllers/enterprises_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/orders_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/overview_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/payment_methods_controller_spec.rb'
|
||||
- 'spec/controllers/spree/credit_cards_controller_spec.rb'
|
||||
- 'spec/factories.rb'
|
||||
- 'spec/factories/order_factory.rb'
|
||||
- 'spec/features/admin/bulk_order_management_spec.rb'
|
||||
- 'spec/features/admin/bulk_product_update_spec.rb'
|
||||
- 'spec/features/admin/configuration/tax_rates_spec.rb'
|
||||
- 'spec/features/admin/order_cycles/complex_editing_spec.rb'
|
||||
- 'spec/features/admin/order_cycles/simple_spec.rb'
|
||||
- 'spec/features/admin/order_spec.rb'
|
||||
- 'spec/features/admin/payments_spec.rb'
|
||||
- 'spec/features/admin/reports_spec.rb'
|
||||
- 'spec/features/consumer/caching/shops_caching_spec.rb'
|
||||
- 'spec/features/consumer/shopping/checkout_spec.rb'
|
||||
- 'spec/features/consumer/shopping/products_spec.rb'
|
||||
- 'spec/features/consumer/shopping/shopping_spec.rb'
|
||||
- 'spec/helpers/enterprises_helper_spec.rb'
|
||||
- 'spec/helpers/order_cycles_helper_spec.rb'
|
||||
- 'spec/jobs/subscription_placement_job_spec.rb'
|
||||
- 'spec/lib/open_food_network/address_finder_spec.rb'
|
||||
- 'spec/lib/open_food_network/enterprise_fee_calculator_spec.rb'
|
||||
- 'spec/lib/open_food_network/permissions_spec.rb'
|
||||
- 'spec/lib/open_food_network/products_and_inventory_report_spec.rb'
|
||||
- 'spec/lib/open_food_network/scope_variant_to_hub_spec.rb'
|
||||
- 'spec/lib/stripe/credit_card_cloner_spec.rb'
|
||||
- 'spec/models/calculator/weight_spec.rb'
|
||||
- 'spec/models/concerns/variant_stock_spec.rb'
|
||||
- 'spec/models/enterprise_relationship_spec.rb'
|
||||
- 'spec/models/exchange_spec.rb'
|
||||
- 'spec/models/spree/adjustment_spec.rb'
|
||||
- 'spec/models/spree/line_item_spec.rb'
|
||||
- 'spec/models/spree/order_spec.rb'
|
||||
- 'spec/models/spree/variant_spec.rb'
|
||||
- 'spec/models/tag_rule/discount_order_spec.rb'
|
||||
- 'spec/serializers/api/admin/subscription_line_item_serializer_spec.rb'
|
||||
- 'spec/services/cache_service_spec.rb'
|
||||
- 'spec/services/order_cart_reset_spec.rb'
|
||||
- 'spec/services/order_checkout_restart_spec.rb'
|
||||
- 'spec/services/order_cycle_distributed_products_spec.rb'
|
||||
- 'spec/services/order_factory_spec.rb'
|
||||
- 'spec/services/order_syncer_spec.rb'
|
||||
- 'spec/services/product_tag_rules_filterer_spec.rb'
|
||||
- 'spec/services/products_renderer_spec.rb'
|
||||
- 'spec/support/request/shop_workflow.rb'
|
||||
- 'spec/views/spree/shared/_order_details.html.haml_spec.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/UniqueValidationWithoutIndex:
|
||||
Exclude:
|
||||
- 'app/models/customer.rb'
|
||||
- 'app/models/exchange.rb'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: Include.
|
||||
# Include: app/models/**/*.rb
|
||||
Rails/UniqueValidationWithoutIndex:
|
||||
Exclude:
|
||||
- 'app/models/spree/stock_item.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Configuration parameters: Environments.
|
||||
# Environments: development, test, production
|
||||
@@ -383,12 +368,13 @@ Style/CaseEquality:
|
||||
- 'app/helpers/angular_form_helper.rb'
|
||||
- 'spec/models/spree/payment_spec.rb'
|
||||
|
||||
# Offense count: 75
|
||||
# Offense count: 76
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect, EnforcedStyle.
|
||||
# SupportedStyles: nested, compact
|
||||
Style/ClassAndModuleChildren:
|
||||
Exclude:
|
||||
- 'app/helpers/angular_form_helper.rb'
|
||||
- 'app/models/calculator/flat_percent_per_item.rb'
|
||||
- 'app/models/spree/concerns/payment_method_distributors.rb'
|
||||
- 'app/models/spree/gateway/migs.rb'
|
||||
@@ -467,18 +453,32 @@ Style/ClassVars:
|
||||
Exclude:
|
||||
- 'lib/open_food_network/rack_request_blocker.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Offense count: 1
|
||||
Style/CommentedKeyword:
|
||||
Exclude:
|
||||
- 'app/controllers/application_controller.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
|
||||
# SupportedStyles: assign_to_condition, assign_inside_condition
|
||||
Style/ConditionalAssignment:
|
||||
Exclude:
|
||||
- 'app/controllers/api/taxons_controller.rb'
|
||||
|
||||
# Offense count: 6
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: annotated, template, unannotated
|
||||
Style/FormatStringToken:
|
||||
Exclude:
|
||||
- 'app/helpers/order_cycles_helper.rb'
|
||||
- 'lib/open_food_network/sales_tax_report.rb'
|
||||
- 'spec/features/admin/bulk_order_management_spec.rb'
|
||||
|
||||
# Offense count: 874
|
||||
# Offense count: 928
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: always, always_true, never
|
||||
# SupportedStyles: always, never
|
||||
Style/FrozenStringLiteralComment:
|
||||
Exclude:
|
||||
- 'Gemfile'
|
||||
@@ -510,8 +510,10 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/controllers/admin/variant_overrides_controller.rb'
|
||||
- 'app/controllers/api/base_controller.rb'
|
||||
- 'app/controllers/api/customers_controller.rb'
|
||||
- 'app/controllers/api/enterprise_attachment_controller.rb'
|
||||
- 'app/controllers/api/enterprise_fees_controller.rb'
|
||||
- 'app/controllers/api/enterprises_controller.rb'
|
||||
- 'app/controllers/api/exchange_products_controller.rb'
|
||||
- 'app/controllers/api/logos_controller.rb'
|
||||
- 'app/controllers/api/order_cycles_controller.rb'
|
||||
- 'app/controllers/api/orders_controller.rb'
|
||||
@@ -526,6 +528,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'app/controllers/base_controller.rb'
|
||||
- 'app/controllers/cart_controller.rb'
|
||||
- 'app/controllers/checkout_controller.rb'
|
||||
- 'app/controllers/discourse_sso_controller.rb'
|
||||
- 'app/controllers/enterprises_controller.rb'
|
||||
- 'app/controllers/groups_controller.rb'
|
||||
@@ -546,17 +549,19 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/controllers/spree/admin/images_controller.rb'
|
||||
- 'app/controllers/spree/admin/invoices_controller.rb'
|
||||
- 'app/controllers/spree/admin/mail_methods_controller.rb'
|
||||
- 'app/controllers/spree/admin/orders/customer_details_controller.rb'
|
||||
- 'app/controllers/spree/admin/orders_controller.rb'
|
||||
- 'app/controllers/spree/admin/orders/customer_details_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/orders_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/overview_controller.rb'
|
||||
- 'app/controllers/spree/admin/payment_methods_controller.rb'
|
||||
- 'app/controllers/spree/admin/payments_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/product_properties_controller.rb'
|
||||
- 'app/controllers/spree/admin/products_controller.rb'
|
||||
- 'app/controllers/spree/admin/products_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/properties_controller.rb'
|
||||
- 'app/controllers/spree/admin/reports/enterprise_fee_summaries_controller.rb'
|
||||
- 'app/controllers/spree/admin/reports_controller.rb'
|
||||
- 'app/controllers/spree/admin/resource_controller.rb'
|
||||
- 'app/controllers/spree/admin/resource_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/return_authorizations_controller.rb'
|
||||
- 'app/controllers/spree/admin/search_controller.rb'
|
||||
- 'app/controllers/spree/admin/search_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/shipping_categories_controller.rb'
|
||||
- 'app/controllers/spree/admin/shipping_methods_controller.rb'
|
||||
- 'app/controllers/spree/admin/states_controller.rb'
|
||||
@@ -566,11 +571,13 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/controllers/spree/admin/taxonomies_controller.rb'
|
||||
- 'app/controllers/spree/admin/taxons_controller.rb'
|
||||
- 'app/controllers/spree/admin/users_controller.rb'
|
||||
- 'app/controllers/spree/admin/variants_controller.rb'
|
||||
- 'app/controllers/spree/admin/variants_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/zones_controller.rb'
|
||||
- 'app/controllers/spree/checkout_controller.rb'
|
||||
- 'app/controllers/spree/credit_cards_controller.rb'
|
||||
- 'app/controllers/spree/home_controller.rb'
|
||||
- 'app/controllers/spree/orders_controller.rb'
|
||||
- 'app/controllers/spree/paypal_controller_decorator.rb'
|
||||
- 'app/controllers/spree/store_controller.rb'
|
||||
- 'app/controllers/spree/user_passwords_controller.rb'
|
||||
- 'app/controllers/spree/user_registrations_controller.rb'
|
||||
@@ -581,7 +588,6 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/controllers/user_confirmations_controller.rb'
|
||||
- 'app/controllers/user_passwords_controller.rb'
|
||||
- 'app/controllers/user_registrations_controller.rb'
|
||||
- 'app/helpers/admin/enterprises_helper.rb'
|
||||
- 'app/helpers/admin/image_settings_helper.rb'
|
||||
- 'app/helpers/admin/injection_helper.rb'
|
||||
- 'app/helpers/admin/orders_helper.rb'
|
||||
@@ -600,19 +606,20 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/helpers/injection_helper.rb'
|
||||
- 'app/helpers/map_helper.rb'
|
||||
- 'app/helpers/markdown_helper.rb'
|
||||
- 'app/helpers/order_cycles_helper.rb'
|
||||
- 'app/helpers/serializer_helper.rb'
|
||||
- 'app/helpers/shared_helper.rb'
|
||||
- 'app/helpers/shop_helper.rb'
|
||||
- 'app/helpers/shop_mail_helper.rb'
|
||||
- 'app/helpers/spree/admin/base_helper.rb'
|
||||
- 'app/helpers/spree/admin/base_helper_decorator.rb'
|
||||
- 'app/helpers/spree/admin/general_settings_helper.rb'
|
||||
- 'app/helpers/spree/admin/orders_helper.rb'
|
||||
- 'app/helpers/spree/admin/payments_helper.rb'
|
||||
- 'app/helpers/spree/admin/navigation_helper_decorator.rb'
|
||||
- 'app/helpers/spree/admin/orders_helper_decorator.rb'
|
||||
- 'app/helpers/spree/admin/taxons_helper.rb'
|
||||
- 'app/helpers/spree/admin/zones_helper.rb'
|
||||
- 'app/helpers/spree/api/api_helpers.rb'
|
||||
- 'app/helpers/spree/base_helper_decorator.rb'
|
||||
- 'app/helpers/spree/orders_helper.rb'
|
||||
- 'app/helpers/spree/products_helper_decorator.rb'
|
||||
- 'app/helpers/spree/reports_helper.rb'
|
||||
- 'app/helpers/spree_currency_helper.rb'
|
||||
- 'app/jobs/confirm_order_job.rb'
|
||||
@@ -624,6 +631,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/jobs/subscription_placement_job.rb'
|
||||
- 'app/jobs/welcome_enterprise_job.rb'
|
||||
- 'app/mailers/enterprise_mailer.rb'
|
||||
- 'app/mailers/producer_mailer.rb'
|
||||
- 'app/mailers/spree/base_mailer_decorator.rb'
|
||||
- 'app/mailers/spree/order_mailer_decorator.rb'
|
||||
- 'app/mailers/spree/user_mailer.rb'
|
||||
@@ -700,6 +708,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/models/spree/gateway_decorator.rb'
|
||||
- 'app/models/spree/image_decorator.rb'
|
||||
- 'app/models/spree/line_item_decorator.rb'
|
||||
- 'app/models/spree/money_decorator.rb'
|
||||
- 'app/models/spree/option_type_decorator.rb'
|
||||
- 'app/models/spree/order_decorator.rb'
|
||||
- 'app/models/spree/payment_decorator.rb'
|
||||
@@ -711,7 +720,9 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/models/spree/product_property_decorator.rb'
|
||||
- 'app/models/spree/product_set.rb'
|
||||
- 'app/models/spree/property.rb'
|
||||
- 'app/models/spree/property_decorator.rb'
|
||||
- 'app/models/spree/shipment_decorator.rb'
|
||||
- 'app/models/spree/shipping_category_decorator.rb'
|
||||
- 'app/models/spree/shipping_method_decorator.rb'
|
||||
- 'app/models/spree/stock/availability_validator_decorator.rb'
|
||||
- 'app/models/spree/stock_location_decorator.rb'
|
||||
@@ -731,6 +742,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/models/tag_rule/filter_shipping_methods.rb'
|
||||
- 'app/models/variant_override.rb'
|
||||
- 'app/models/variant_override_set.rb'
|
||||
- 'app/presenters/variant_presenter.rb'
|
||||
- 'app/serializers/api/address_serializer.rb'
|
||||
- 'app/serializers/api/adjustment_serializer.rb'
|
||||
- 'app/serializers/api/admin/basic_enterprise_fee_serializer.rb'
|
||||
@@ -810,7 +822,6 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/serializers/api/uncached_enterprise_serializer.rb'
|
||||
- 'app/serializers/api/user_serializer.rb'
|
||||
- 'app/serializers/api/variant_serializer.rb'
|
||||
- 'app/services/action_callbacks.rb'
|
||||
- 'app/services/advance_order_service.rb'
|
||||
- 'app/services/bulk_invoice_service.rb'
|
||||
- 'app/services/cart_service.rb'
|
||||
@@ -819,6 +830,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/services/default_shipping_category.rb'
|
||||
- 'app/services/default_stock_location.rb'
|
||||
- 'app/services/embedded_page_service.rb'
|
||||
- 'app/services/exchange_products_renderer.rb'
|
||||
- 'app/services/exchange_variant_bulk_updater.rb'
|
||||
- 'app/services/exchange_variant_deleter.rb'
|
||||
- 'app/services/invoice_renderer.rb'
|
||||
@@ -834,7 +846,14 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/services/permissions/order.rb'
|
||||
- 'app/services/product_tag_rules_filterer.rb'
|
||||
- 'app/services/products_renderer.rb'
|
||||
- 'app/services/reset_order_service.rb'
|
||||
- 'app/services/restart_checkout.rb'
|
||||
- 'app/services/search_orders.rb'
|
||||
- 'app/services/subscription_estimator.rb'
|
||||
- 'app/services/subscription_form.rb'
|
||||
- 'app/services/subscription_validator.rb'
|
||||
- 'app/services/subscription_variants_service.rb'
|
||||
- 'app/services/subscriptions_count.rb'
|
||||
- 'app/services/tax_rate_finder.rb'
|
||||
- 'app/services/upload_sanitizer.rb'
|
||||
- 'app/services/variant_deleter.rb'
|
||||
@@ -842,6 +861,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'app/validators/date_time_string_validator.rb'
|
||||
- 'app/validators/distributors_validator.rb'
|
||||
- 'app/validators/integer_array_validator.rb'
|
||||
- 'app/views/spree/admin/taxons/search.rabl'
|
||||
- 'config.ru'
|
||||
- 'engines/order_management/app/controllers/order_management/application_controller.rb'
|
||||
- 'engines/order_management/app/services/order_management/reports/enterprise_fee_summary/authorizer.rb'
|
||||
@@ -879,6 +899,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'engines/order_management/spec/services/order_management/reports/enterprise_fee_summary/renderers/html_renderer_spec.rb'
|
||||
- 'engines/order_management/spec/services/order_management/reports/enterprise_fee_summary/report_data/enterprise_fee_type_total_spec.rb'
|
||||
- 'engines/order_management/spec/services/order_management/reports/enterprise_fee_summary/report_service_spec.rb'
|
||||
- 'engines/order_management/spec/spec_helper.rb'
|
||||
- 'engines/web/app/controllers/web/angular_templates_controller.rb'
|
||||
- 'engines/web/app/controllers/web/api/cookies_consent_controller.rb'
|
||||
- 'engines/web/app/controllers/web/application_controller.rb'
|
||||
@@ -889,6 +910,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'engines/web/lib/web/engine.rb'
|
||||
- 'engines/web/lib/web/version.rb'
|
||||
- 'engines/web/spec/helpers/cookies_policy_helper_spec.rb'
|
||||
- 'engines/web/spec/spec_helper.rb'
|
||||
- 'engines/web/web.gemspec'
|
||||
- 'lib/discourse/single_sign_on.rb'
|
||||
- 'lib/open_food_network/address_finder.rb'
|
||||
@@ -907,6 +929,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'lib/open_food_network/lettuce_share_report.rb'
|
||||
- 'lib/open_food_network/locking.rb'
|
||||
- 'lib/open_food_network/model_class_from_controller_name.rb'
|
||||
- 'lib/open_food_network/option_value_namer.rb'
|
||||
- 'lib/open_food_network/order_and_distributor_report.rb'
|
||||
- 'lib/open_food_network/order_cycle_form_applicator.rb'
|
||||
- 'lib/open_food_network/order_cycle_management_report.rb'
|
||||
@@ -926,6 +949,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'lib/open_food_network/products_and_inventory_report.rb'
|
||||
- 'lib/open_food_network/products_and_inventory_report_base.rb'
|
||||
- 'lib/open_food_network/property_merge.rb'
|
||||
- 'lib/open_food_network/proxy_order_syncer.rb'
|
||||
- 'lib/open_food_network/rack_request_blocker.rb'
|
||||
- 'lib/open_food_network/referer_parser.rb'
|
||||
- 'lib/open_food_network/reports/bulk_coop_allocation_report.rb'
|
||||
@@ -941,6 +965,9 @@ Style/FrozenStringLiteralComment:
|
||||
- 'lib/open_food_network/scope_variant_to_hub.rb'
|
||||
- 'lib/open_food_network/scope_variants_for_search.rb'
|
||||
- 'lib/open_food_network/spree_api_key_loader.rb'
|
||||
- 'lib/open_food_network/subscription_payment_updater.rb'
|
||||
- 'lib/open_food_network/subscription_summarizer.rb'
|
||||
- 'lib/open_food_network/subscription_summary.rb'
|
||||
- 'lib/open_food_network/tag_rule_applicator.rb'
|
||||
- 'lib/open_food_network/user_balance_calculator.rb'
|
||||
- 'lib/open_food_network/users_and_enterprises_report.rb'
|
||||
@@ -960,6 +987,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'lib/stripe/webhook_handler.rb'
|
||||
- 'lib/tasks/data.rake'
|
||||
- 'lib/tasks/data/anonymize_data.rake'
|
||||
- 'lib/tasks/data/truncate_data.rake'
|
||||
- 'lib/tasks/enterprises.rake'
|
||||
- 'lib/tasks/karma.rake'
|
||||
- 'lib/tasks/missing_payments.rake'
|
||||
@@ -1000,6 +1028,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/controllers/api/customers_controller_spec.rb'
|
||||
- 'spec/controllers/api/enterprise_fees_controller_spec.rb'
|
||||
- 'spec/controllers/api/enterprises_controller_spec.rb'
|
||||
- 'spec/controllers/api/exchange_products_controller_spec.rb'
|
||||
- 'spec/controllers/api/logos_controller_spec.rb'
|
||||
- 'spec/controllers/api/order_cycles_controller_spec.rb'
|
||||
- 'spec/controllers/api/orders_controller_spec.rb'
|
||||
@@ -1032,13 +1061,16 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/controllers/spree/admin/payment_methods_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/payments_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/products_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/reports/enterprise_fee_summaries_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/reports_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/search_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/shipping_methods_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/users_controller_spec.rb'
|
||||
- 'spec/controllers/spree/admin/variants_controller_spec.rb'
|
||||
- 'spec/controllers/spree/checkout_controller_spec.rb'
|
||||
- 'spec/controllers/spree/credit_cards_controller_spec.rb'
|
||||
- 'spec/controllers/spree/orders_controller_spec.rb'
|
||||
- 'spec/controllers/spree/paypal_controller_spec.rb'
|
||||
- 'spec/controllers/spree/store_controller_spec.rb'
|
||||
- 'spec/controllers/spree/user_sessions_controller_spec.rb'
|
||||
- 'spec/controllers/spree/users_controller_spec.rb'
|
||||
@@ -1086,11 +1118,14 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/features/admin/external_services_spec.rb'
|
||||
- 'spec/features/admin/image_settings_spec.rb'
|
||||
- 'spec/features/admin/multilingual_spec.rb'
|
||||
- 'spec/features/admin/order_cycles_spec.rb'
|
||||
- 'spec/features/admin/orders_spec.rb'
|
||||
- 'spec/features/admin/overview_spec.rb'
|
||||
- 'spec/features/admin/payment_method_spec.rb'
|
||||
- 'spec/features/admin/payments_spec.rb'
|
||||
- 'spec/features/admin/product_import_spec.rb'
|
||||
- 'spec/features/admin/products_spec.rb'
|
||||
- 'spec/features/admin/reports/enterprise_fee_summaries_spec.rb'
|
||||
- 'spec/features/admin/reports/packing_report_spec.rb'
|
||||
- 'spec/features/admin/reports_spec.rb'
|
||||
- 'spec/features/admin/schedules_spec.rb'
|
||||
@@ -1106,6 +1141,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/features/consumer/account_spec.rb'
|
||||
- 'spec/features/consumer/authentication_spec.rb'
|
||||
- 'spec/features/consumer/confirm_invitation_spec.rb'
|
||||
- 'spec/features/consumer/cookies_spec.rb'
|
||||
- 'spec/features/consumer/footer_links_spec.rb'
|
||||
- 'spec/features/consumer/groups_spec.rb'
|
||||
- 'spec/features/consumer/multilingual_spec.rb'
|
||||
@@ -1133,6 +1169,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/helpers/injection_helper_spec.rb'
|
||||
- 'spec/helpers/navigation_helper_spec.rb'
|
||||
- 'spec/helpers/order_cycles_helper_spec.rb'
|
||||
- 'spec/helpers/products_helper_spec.rb'
|
||||
- 'spec/helpers/serializer_helper_spec.rb'
|
||||
- 'spec/helpers/shared_helper_spec.rb'
|
||||
- 'spec/helpers/shop_helper_spec.rb'
|
||||
@@ -1172,6 +1209,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/lib/open_food_network/permissions_spec.rb'
|
||||
- 'spec/lib/open_food_network/products_and_inventory_report_spec.rb'
|
||||
- 'spec/lib/open_food_network/property_merge_spec.rb'
|
||||
- 'spec/lib/open_food_network/proxy_order_syncer_spec.rb'
|
||||
- 'spec/lib/open_food_network/referer_parser_spec.rb'
|
||||
- 'spec/lib/open_food_network/reports/report_spec.rb'
|
||||
- 'spec/lib/open_food_network/reports/row_spec.rb'
|
||||
@@ -1179,6 +1217,9 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/lib/open_food_network/sales_tax_report_spec.rb'
|
||||
- 'spec/lib/open_food_network/scope_variant_to_hub_spec.rb'
|
||||
- 'spec/lib/open_food_network/scope_variants_to_search_spec.rb'
|
||||
- 'spec/lib/open_food_network/subscription_payment_updater_spec.rb'
|
||||
- 'spec/lib/open_food_network/subscription_summarizer_spec.rb'
|
||||
- 'spec/lib/open_food_network/subscription_summary_spec.rb'
|
||||
- 'spec/lib/open_food_network/tag_rule_applicator_spec.rb'
|
||||
- 'spec/lib/open_food_network/user_balance_calculator_spec.rb'
|
||||
- 'spec/lib/open_food_network/users_and_enterprises_report_spec.rb'
|
||||
@@ -1212,6 +1253,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/models/model_set_spec.rb'
|
||||
- 'spec/models/order_cycle_spec.rb'
|
||||
- 'spec/models/order_updater_spec.rb'
|
||||
- 'spec/models/producer_property_spec.rb'
|
||||
- 'spec/models/product_import/entry_processor_spec.rb'
|
||||
- 'spec/models/product_import/inventory_reset_strategy_spec.rb'
|
||||
- 'spec/models/product_import/reset_absent_spec.rb'
|
||||
@@ -1230,6 +1272,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/models/spree/classification_spec.rb'
|
||||
- 'spec/models/spree/credit_card_spec.rb'
|
||||
- 'spec/models/spree/gateway/stripe_connect_spec.rb'
|
||||
- 'spec/models/spree/gateway_tagging_spec.rb'
|
||||
- 'spec/models/spree/image_spec.rb'
|
||||
- 'spec/models/spree/line_item_spec.rb'
|
||||
- 'spec/models/spree/order/checkout_spec.rb'
|
||||
@@ -1240,6 +1283,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/models/spree/price_spec.rb'
|
||||
- 'spec/models/spree/product_set_spec.rb'
|
||||
- 'spec/models/spree/product_spec.rb'
|
||||
- 'spec/models/spree/property_spec.rb'
|
||||
- 'spec/models/spree/shipment_spec.rb'
|
||||
- 'spec/models/spree/shipping_method_spec.rb'
|
||||
- 'spec/models/spree/stock/availability_validator_spec.rb'
|
||||
@@ -1260,6 +1304,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/models/variant_override_spec.rb'
|
||||
- 'spec/performance/injection_helper_spec.rb'
|
||||
- 'spec/performance/orders_controller_spec.rb'
|
||||
- 'spec/performance/proxy_order_syncer_spec.rb'
|
||||
- 'spec/performance/shop_controller_spec.rb'
|
||||
- 'spec/requests/checkout/failed_checkout_spec.rb'
|
||||
- 'spec/requests/checkout/paypal_spec.rb'
|
||||
@@ -1302,13 +1347,19 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/services/order_cycle_distributed_products_spec.rb'
|
||||
- 'spec/services/order_cycle_distributed_variants_spec.rb'
|
||||
- 'spec/services/order_cycle_form_spec.rb'
|
||||
- 'spec/services/order_cycle_warning_spec.rb'
|
||||
- 'spec/services/order_factory_spec.rb'
|
||||
- 'spec/services/order_syncer_spec.rb'
|
||||
- 'spec/services/permissions/order_spec.rb'
|
||||
- 'spec/services/product_tag_rules_filterer_spec.rb'
|
||||
- 'spec/services/products_renderer_spec.rb'
|
||||
- 'spec/services/reset_order_service_spec.rb'
|
||||
- 'spec/services/restart_checkout_spec.rb'
|
||||
- 'spec/services/search_orders_spec.rb'
|
||||
- 'spec/services/subscription_estimator_spec.rb'
|
||||
- 'spec/services/subscription_form_spec.rb'
|
||||
- 'spec/services/subscription_validator_spec.rb'
|
||||
- 'spec/services/subscription_variants_service_spec.rb'
|
||||
- 'spec/services/subscriptions_count_spec.rb'
|
||||
- 'spec/services/tax_rate_finder_spec.rb'
|
||||
- 'spec/services/upload_sanitizer_spec.rb'
|
||||
- 'spec/services/variants_stock_levels_spec.rb'
|
||||
@@ -1316,6 +1367,7 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/support/ability_helper.rb'
|
||||
- 'spec/support/api_helper.rb'
|
||||
- 'spec/support/cancan_helper.rb'
|
||||
- 'spec/support/controller_hacks.rb'
|
||||
- 'spec/support/controller_helper.rb'
|
||||
- 'spec/support/delayed_job_helper.rb'
|
||||
- 'spec/support/downloads_helper.rb'
|
||||
@@ -1356,17 +1408,20 @@ Style/FrozenStringLiteralComment:
|
||||
- 'spec/views/spree/admin/orders/edit.html.haml_spec.rb'
|
||||
- 'spec/views/spree/admin/orders/index.html.haml_spec.rb'
|
||||
|
||||
# Offense count: 51
|
||||
# Offense count: 58
|
||||
# Configuration parameters: MinBodyLength.
|
||||
Style/GuardClause:
|
||||
Exclude:
|
||||
- 'app/controllers/admin/enterprises_controller.rb'
|
||||
- 'app/controllers/admin/order_cycles_controller.rb'
|
||||
- 'app/controllers/admin/product_import_controller.rb'
|
||||
- 'app/controllers/api/shipments_controller.rb'
|
||||
- 'app/controllers/application_controller.rb'
|
||||
- 'app/controllers/base_controller.rb'
|
||||
- 'app/controllers/checkout_controller.rb'
|
||||
- 'app/controllers/home_controller.rb'
|
||||
- 'app/controllers/spree/admin/orders_controller_decorator.rb'
|
||||
- 'app/controllers/spree/admin/variants_controller_decorator.rb'
|
||||
- 'app/controllers/spree/checkout_controller.rb'
|
||||
- 'app/controllers/spree/orders_controller.rb'
|
||||
- 'app/controllers/spree/paypal_controller_decorator.rb'
|
||||
- 'app/models/enterprise.rb'
|
||||
@@ -1388,19 +1443,49 @@ Style/GuardClause:
|
||||
- 'spec/support/request/distribution_helper.rb'
|
||||
- 'spec/support/request/shop_workflow.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Configuration parameters: AllowIfModifier.
|
||||
Style/IfInsideElse:
|
||||
Exclude:
|
||||
- 'app/controllers/admin/column_preferences_controller.rb'
|
||||
- 'app/controllers/admin/variant_overrides_controller.rb'
|
||||
- 'app/controllers/api/taxons_controller.rb'
|
||||
- 'app/controllers/spree/admin/products_controller_decorator.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: InverseMethods, InverseBlocks.
|
||||
Style/InverseMethods:
|
||||
Exclude:
|
||||
- 'lib/open_food_network/reports/line_items.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Style/MissingRespondToMissing:
|
||||
Exclude:
|
||||
- 'app/helpers/application_helper.rb'
|
||||
|
||||
# Offense count: 4
|
||||
# Offense count: 5
|
||||
Style/MixinUsage:
|
||||
Exclude:
|
||||
- 'lib/open_food_network/orders_and_fulfillments_report.rb'
|
||||
- 'spec/features/admin/orders_spec.rb'
|
||||
- 'spec/lib/open_food_network/bulk_coop_report_spec.rb'
|
||||
- 'spec/lib/open_food_network/order_cycle_management_report_spec.rb'
|
||||
- 'spec/lib/open_food_network/packing_report_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
Style/MultipleComparison:
|
||||
Exclude:
|
||||
- 'spec/models/product_importer_spec.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle.
|
||||
# SupportedStyles: both, prefix, postfix
|
||||
Style/NegatedUnless:
|
||||
Exclude:
|
||||
- 'app/services/cart_service.rb'
|
||||
|
||||
# Offense count: 41
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
|
||||
@@ -1433,9 +1518,27 @@ Style/NumericPredicate:
|
||||
- 'lib/spree/money_decorator.rb'
|
||||
- 'lib/tasks/sample_data.rake'
|
||||
|
||||
# Offense count: 231
|
||||
# Offense count: 15
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
|
||||
# AllowedMethods: present?, blank?, presence, try, try!
|
||||
Style/SafeNavigation:
|
||||
Exclude:
|
||||
- 'app/controllers/checkout_controller.rb'
|
||||
- 'app/controllers/spree/credit_cards_controller.rb'
|
||||
- 'app/controllers/spree/orders_controller.rb'
|
||||
- 'app/helpers/i18n_helper.rb'
|
||||
- 'app/models/producer_property.rb'
|
||||
- 'app/models/product_import/entry_validator.rb'
|
||||
- 'app/models/product_import/product_importer.rb'
|
||||
- 'app/models/proxy_order.rb'
|
||||
- 'lib/discourse/single_sign_on.rb'
|
||||
- 'spec/factories.rb'
|
||||
|
||||
# Offense count: 235
|
||||
Style/Send:
|
||||
Exclude:
|
||||
- 'app/controllers/spree/checkout_controller.rb'
|
||||
- 'app/models/spree/shipping_method_decorator.rb'
|
||||
- 'spec/controllers/admin/subscriptions_controller_spec.rb'
|
||||
- 'spec/controllers/checkout_controller_spec.rb'
|
||||
@@ -1453,6 +1556,8 @@ Style/Send:
|
||||
- 'spec/lib/open_food_network/permissions_spec.rb'
|
||||
- 'spec/lib/open_food_network/products_and_inventory_report_spec.rb'
|
||||
- 'spec/lib/open_food_network/sales_tax_report_spec.rb'
|
||||
- 'spec/lib/open_food_network/subscription_payment_updater_spec.rb'
|
||||
- 'spec/lib/open_food_network/subscription_summarizer_spec.rb'
|
||||
- 'spec/lib/open_food_network/tag_rule_applicator_spec.rb'
|
||||
- 'spec/lib/open_food_network/xero_invoices_report_spec.rb'
|
||||
- 'spec/lib/stripe/webhook_handler_spec.rb'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Contributing
|
||||
We love pull requests from everyone. Any contribution is valuable!
|
||||
We love pull requests from everyone. Any contribution is valuable, but there are two issue streams that we especially love people to work on:
|
||||
|
||||
If you have some time and are interested in working on some issues please make yourself known on the [#dev][slack-dev] channel on Slack.
|
||||
1) Our delivery backlog, is managed via a ZenHub board (ZenHub extensions are available for most major browsers). We use a Kanban-style approach, whereby devs pick issues from the top of the backlog which has been organised according to current priorities. If you have some time and are interested in working on some issues from the backlog, please make yourself known on the [#dev][slack-dev] channel on Slack and we can direct you to the most appropriate issue to pick up.
|
||||
|
||||
We have curated all issues we consider to be a good starting point for new members of the community within the [Welcome New Developers project board][welcome-dev]. Have a look and pick the one you would prefer working on!
|
||||
2) Our list of bugs and other self-contained issues that we consider to be a good starting point for new contributors, or devs who aren’t able to commit to seeing a whole feature through. These issues are marked with the `# good first issue` label.
|
||||
|
||||
## Set up
|
||||
|
||||
@@ -19,6 +19,10 @@ If you want to run the whole test suite, we recommend using a free CI service to
|
||||
|
||||
bundle exec rspec spec
|
||||
|
||||
## Which issue to pick first?
|
||||
|
||||
We have curated all issues interesting for new members of the community within the [Welcome New Developers project board][welcome-dev]. Have a look and pick the one you would prefer working on!
|
||||
|
||||
## Internationalisation (i18n)
|
||||
|
||||
The locale `en` is maintained in the source code, but other locales are managed at [Transifex][ofn-transifex]. Read more about [internationalisation][i18n] in the developer wiki.
|
||||
|
||||
21
DOCKER.md
@@ -17,13 +17,7 @@ Better to have at least 2GB free on your computer in order to download images an
|
||||
|
||||
Open a terminal with a shell.
|
||||
|
||||
Clone the repository. If you're planning on contributing code to the project (which we [LOVE](CONTRIBUTING.md)), it is a good idea to begin by forking this repo using the Fork button in the top-right corner of this screen. You should then be able to use git clone to copy your fork onto your local machine.
|
||||
|
||||
```sh
|
||||
$ git clone https://github.com/YOUR_GITHUB_USERNAME_HERE/openfoodnetwork
|
||||
```
|
||||
|
||||
Otherwise, if you just want to get things running, clone from the OFN main repo:
|
||||
Clone the repository:
|
||||
|
||||
```sh
|
||||
$ git clone git@github.com:openfoodfoundation/openfoodnetwork.git
|
||||
@@ -41,22 +35,13 @@ Download the Docker images and build the containers:
|
||||
$ docker-compose build
|
||||
```
|
||||
|
||||
Setup the database and seed it with sample data:
|
||||
```sh
|
||||
$ docker-compose run web bundle exec rake db:reset
|
||||
$ docker-compose run web bundle exec rake db:test:prepare
|
||||
$ docker-compose run web bundle exec rake ofn:sample_data
|
||||
```
|
||||
|
||||
Finally, run the app with all the required containers:
|
||||
Run the app with all the required containers:
|
||||
|
||||
```sh
|
||||
$ docker-compose up
|
||||
```
|
||||
|
||||
The default admin user is 'ofn@example.com' with 'ofn123' password.
|
||||
This command will setup the database and seed it with sample data. The default admin user is 'ofn@example.com' with 'ofn123' password.
|
||||
Check the app in the browser at `http://localhost:3000`.
|
||||
|
||||
You will then get the trace of the containers in the terminal. You can stop the containers using Ctrl-C in the terminal.
|
||||
|
||||
You can find some useful tips and commands [here](https://github.com/openfoodfoundation/openfoodnetwork/wiki/Docker:-useful-tips-and-commands).
|
||||
|
||||
14
Dockerfile
@@ -12,24 +12,21 @@ ENV BUNDLE_PATH /bundles
|
||||
WORKDIR /usr/src/app
|
||||
COPY .ruby-version .
|
||||
|
||||
# Install Rbenv & Ruby
|
||||
RUN git clone --depth 1 --branch v1.1.2 https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
|
||||
git clone --depth 1 --branch v20200520 https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \
|
||||
# Rbenv & Ruby part
|
||||
RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \
|
||||
git clone https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \
|
||||
${RBENV_ROOT}/plugins/ruby-build/install.sh && \
|
||||
echo 'eval "$(rbenv init -)"' >> /etc/profile.d/rbenv.sh && \
|
||||
rbenv install $(cat .ruby-version) && \
|
||||
rbenv global $(cat .ruby-version) && \
|
||||
gem install bundler --version=1.17.2
|
||||
|
||||
# Install Postgres
|
||||
# Postgres
|
||||
RUN sh -c "echo 'deb https://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main' > /etc/apt/sources.list.d/pgdg.list" && \
|
||||
wget --quiet -O - https://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | apt-key add - && \
|
||||
apt-get update && \
|
||||
apt-get install -yqq --no-install-recommends postgresql-client-9.5 libpq-dev
|
||||
|
||||
# Install node
|
||||
RUN apt-get install -y nodejs
|
||||
|
||||
# Install Chrome
|
||||
RUN wget --quiet -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
sh -c "echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' >> /etc/apt/sources.list.d/google-chrome.list" && \
|
||||
@@ -41,7 +38,4 @@ RUN wget https://chromedriver.storage.googleapis.com/2.41/chromedriver_linux64.z
|
||||
unzip chromedriver_linux64.zip -d /usr/bin && \
|
||||
chmod u+x /usr/bin/chromedriver
|
||||
|
||||
# Copy code and install app dependencies
|
||||
COPY . /usr/src/app/
|
||||
# Run bundler install in parallel with the amount of available CPUs
|
||||
RUN bundle install --jobs="$(nproc)"
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
### Getting Started
|
||||
|
||||
This is a general guide to setting up an Open Food Network **development environment on your local machine**. If you want to setup OFN on a server, please have a look at the [ofn-install deployment guide](https://github.com/openfoodfoundation/ofn-install/wiki).
|
||||
This is a general guide to setting up an Open Food Network development environment on your local machine.
|
||||
|
||||
### Requirements
|
||||
The following guides are located in the wiki and provide more OS-specific step-by-step instructions:
|
||||
|
||||
The fastest way to make it work locally is to use Docker, you only need to setup git, see the [Docker setup guide](DOCKER.md).
|
||||
Otherwise, for a local setup you will need:
|
||||
* Ruby 2.3.7 and bundler
|
||||
* PostgreSQL database
|
||||
* Chrome (for testing)
|
||||
|
||||
The following guides will provide OS-specific step-by-step instructions to get these requirements installed:
|
||||
- [Ubuntu Setup Guide][ubuntu]
|
||||
- [OSX Setup Guide][osx]
|
||||
- [macOS Sierra Setup Guide][sierra]
|
||||
- [OSX El Capitan Setup Guide][el-capitan]
|
||||
|
||||
### Dependencies
|
||||
|
||||
* Rails 3.2.x
|
||||
* Ruby 2.1.9
|
||||
* PostgreSQL database
|
||||
* PhantomJS (for testing)
|
||||
* See Gemfile for a list of gems required
|
||||
|
||||
If you are likely to need to manage multiple version of ruby on your local machine, we recommend version managers such as [rbenv](https://github.com/rbenv/rbenv) or [RVM](https://rvm.io/).
|
||||
|
||||
@@ -48,16 +50,18 @@ This will create the "ofn" user as superuser and allowing it to create databases
|
||||
|
||||
Once done, run `script/setup`. If the script succeeds you're ready to start developing. If not, take a look at the output as it should be informative enough to help you troubleshoot.
|
||||
|
||||
If you run into any other issues getting your local environment up and running please consult [the wiki][wiki].
|
||||
|
||||
If still you get stuck do not hesitate to open an issue reporting the full output of the script.
|
||||
|
||||
Now, your dreams of spinning up a development server can be realised:
|
||||
|
||||
bundle exec rails server
|
||||
|
||||
Go to [http://localhost:3000](http://localhost:3000) to play around!
|
||||
To login as Spree default user, use:
|
||||
|
||||
To login as the default user, use:
|
||||
|
||||
email: ofn@example.com
|
||||
password: ofn123
|
||||
email: spree@example.com
|
||||
password: spree123
|
||||
|
||||
### Testing
|
||||
|
||||
@@ -73,7 +77,7 @@ The tests of all custom engines can be run with:
|
||||
|
||||
bundle exec rake ofn:specs:engines:rspec
|
||||
|
||||
Note: If your OS is not explicitly supported in the setup guides then not all tests may pass. However, you may still be able to develop.
|
||||
Note: If your OS is not explicitly supported in the setup guides then not all tests may pass. However, you may still be able to develop. Get in touch with the [#dev][slack-dev] channel on Slack to troubleshoot issues and determine if they will preclude you from contributing to OFN.
|
||||
|
||||
Note: The time zone on your machine should match the one defined in `config/application.yml`.
|
||||
|
||||
@@ -114,7 +118,8 @@ $ createdb open_food_network_test --owner=ofn
|
||||
If these commands succeed, you should be able to [continue the setup process](#get-it-running).
|
||||
|
||||
[developer-wiki]: https://github.com/openfoodfoundation/openfoodnetwork/wiki
|
||||
[osx]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup:-OS-X
|
||||
[sierra]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup%3A-macOS-%28Sierra%2C-HighSierra-and-Mojave%29
|
||||
[el-capitan]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup:-OS-X-(El-Capitan)
|
||||
[ubuntu]: https://github.com/openfoodfoundation/openfoodnetwork/wiki/Development-Environment-Setup:-Ubuntu
|
||||
[wiki]: https://github.com/openfoodfoundation/openfoodnetwork/wiki
|
||||
[zeus]: https://github.com/burke/zeus
|
||||
|
||||
85
Gemfile
@@ -3,15 +3,16 @@ ruby "2.3.7"
|
||||
git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }
|
||||
|
||||
gem 'i18n', '~> 0.6.11'
|
||||
gem 'i18n-js', '~> 3.7.1'
|
||||
gem 'rails', '~> 4.0.13'
|
||||
gem 'rails-i18n', '~> 4.0'
|
||||
gem 'i18n-js', '~> 3.6.0'
|
||||
gem 'rails', '~> 3.2.22'
|
||||
gem 'rails-i18n', '~> 3.0.0'
|
||||
gem 'rails_safe_tasks', '~> 1.0'
|
||||
|
||||
gem "activerecord-import"
|
||||
# Patched version. See http://rubysec.com/advisories/CVE-2015-5312/.
|
||||
gem 'nokogiri', '>= 1.6.7.1'
|
||||
|
||||
gem "catalog", path: "./engines/catalog"
|
||||
gem 'dfc_provider', path: './engines/dfc_provider'
|
||||
gem "order_management", path: "./engines/order_management"
|
||||
gem 'web', path: './engines/web'
|
||||
|
||||
@@ -21,37 +22,22 @@ gem 'pg', '~> 0.21.0'
|
||||
# OFN-maintained and patched version of Spree v2.0.4. See
|
||||
# https://github.com/openfoodfoundation/openfoodnetwork/wiki/Tech-Doc:-OFN's-Spree-fork%F0%9F%8D%B4
|
||||
# for details.
|
||||
gem 'spree_core', github: 'openfoodfoundation/spree', branch: '2-1-0-stable'
|
||||
|
||||
### Dependencies brought from spree core
|
||||
gem 'acts_as_list', '= 0.2.0'
|
||||
gem 'awesome_nested_set', '~> 3.0.0.rc.1'
|
||||
gem 'cancan', '~> 1.6.10'
|
||||
gem 'ffaker', '~> 1.16'
|
||||
gem 'highline', '= 1.6.18' # Necessary for the install generator
|
||||
gem 'httparty', '~> 0.18' # Used to check alerts in spree_core, this is not used in OFN.
|
||||
gem 'json', '>= 1.7.7'
|
||||
gem 'money', '5.1.1'
|
||||
gem 'paranoia', '~> 2.0'
|
||||
gem 'ransack', '~> 1.8.10'
|
||||
gem 'state_machine', '1.2.0'
|
||||
gem 'stringex', '~> 1.5.1'
|
||||
gem 'spree_core', github: 'openfoodfoundation/spree', branch: '2-0-4-stable'
|
||||
|
||||
gem 'spree_i18n', github: 'spree/spree_i18n', branch: '1-3-stable'
|
||||
|
||||
# Our branch contains two changes
|
||||
# - Pass customer email and phone number to PayPal (merged to upstream master)
|
||||
# - Change type of password from string to password to hide it in the form
|
||||
gem 'spree_paypal_express', github: 'openfoodfoundation/better_spree_paypal_express', branch: '2-1-0-stable'
|
||||
gem 'spree_paypal_express', github: "openfoodfoundation/better_spree_paypal_express", branch: "2-0-stable"
|
||||
gem 'stripe'
|
||||
|
||||
# We need at least this version to have Digicert's root certificate
|
||||
# which is needed for Pin Payments (and possibly others).
|
||||
gem 'activemerchant', '~> 1.78.0'
|
||||
gem 'activemerchant', '~> 1.78'
|
||||
|
||||
gem 'devise', '~> 3.5.10' # v4.0.0 needs rails 4.1
|
||||
gem 'devise-encryptable'
|
||||
gem 'devise-token_authenticatable', '~> 0.4.10' # v0.5.0 needs devise v4
|
||||
gem 'devise', '~> 2.2.5'
|
||||
gem 'devise-encryptable', '0.2.0'
|
||||
gem 'jwt', '~> 2.2'
|
||||
gem 'oauth2', '~> 1.4.4' # Used for Stripe Connect
|
||||
|
||||
@@ -59,31 +45,36 @@ gem 'daemons'
|
||||
gem 'delayed_job_active_record'
|
||||
gem 'delayed_job_web'
|
||||
|
||||
# Fix bug in simple_form preventing collection_check_boxes usage within form_for block
|
||||
# When merged, revert to upstream gem
|
||||
gem 'simple_form', github: 'RohanM/simple_form'
|
||||
|
||||
# Spree's default pagination gem (locked to the current version used by Spree)
|
||||
# We use it's methods in OFN code as well, so this is a direct dependency
|
||||
gem 'kaminari', '~> 0.14.1'
|
||||
|
||||
gem 'andand'
|
||||
gem 'angularjs-rails', '1.5.5'
|
||||
gem 'aws-sdk', '1.11.1' # temporarily locked down due to https://github.com/aws/aws-sdk-ruby/issues/273
|
||||
gem 'aws-sdk'
|
||||
gem 'bugsnag'
|
||||
gem 'db2fog'
|
||||
gem 'haml'
|
||||
gem 'rabl'
|
||||
gem 'redcarpet'
|
||||
gem 'sass'
|
||||
gem 'sass-rails'
|
||||
gem 'truncate_html', '0.9.2'
|
||||
gem 'sass', "~> 3.3"
|
||||
gem 'sass-rails', '~> 3.2.3'
|
||||
gem 'truncate_html'
|
||||
gem 'unicorn'
|
||||
|
||||
gem 'actionpack-action_caching'
|
||||
# AMS 0.9.x and 0.10.x are very different from 0.8.4 and the upgrade is not straight forward
|
||||
# AMS is deprecated, we will introduce an alternative at some point
|
||||
# AMS is pinned to 0.8.4 because 0.9.x is a complete re-write, as is 0.10.x
|
||||
# Once Rails is updated to 5.x we should bump directly to 0.10.x
|
||||
gem "active_model_serializers", "0.8.4"
|
||||
gem 'activerecord-session_store'
|
||||
gem 'acts-as-taggable-on', '~> 4.0'
|
||||
gem 'acts-as-taggable-on', '~> 3.4'
|
||||
gem 'angularjs-file-upload-rails', '~> 2.4.1'
|
||||
gem 'blockenspiel'
|
||||
gem 'custom_error_message', github: 'jeremydurham/custom-err-msg'
|
||||
gem 'dalli'
|
||||
gem 'deface', '1.0.2'
|
||||
gem 'diffy'
|
||||
gem 'figaro'
|
||||
gem 'geocoder'
|
||||
@@ -94,6 +85,7 @@ gem 'paperclip', '~> 3.4.1'
|
||||
gem 'rack-rewrite'
|
||||
gem 'rack-ssl', require: 'rack/ssl'
|
||||
gem 'roadie-rails', '~> 1.3.0'
|
||||
gem 'spinjs-rails'
|
||||
|
||||
gem 'combine_pdf'
|
||||
gem 'wicked_pdf'
|
||||
@@ -107,45 +99,45 @@ gem 'whenever', require: false
|
||||
|
||||
gem 'test-unit', '~> 3.3'
|
||||
|
||||
gem 'coffee-rails', '~> 4.2.2'
|
||||
gem 'coffee-rails', '~> 3.2.1'
|
||||
gem 'compass-rails'
|
||||
|
||||
gem 'mini_racer', '0.2.15'
|
||||
gem 'mini_racer', '0.2.9'
|
||||
|
||||
gem 'uglifier', '>= 1.0.3'
|
||||
|
||||
gem 'angular-rails-templates', '~> 0.3.0'
|
||||
gem 'foundation-icons-sass-rails'
|
||||
gem 'momentjs-rails'
|
||||
gem 'turbo-sprockets-rails3'
|
||||
|
||||
gem 'foundation-rails', '= 5.5.2.1'
|
||||
gem "foundation-rails"
|
||||
gem 'foundation_rails_helper', github: 'willrjmarshall/foundation_rails_helper', branch: "rails3"
|
||||
|
||||
gem 'jquery-migrate-rails'
|
||||
gem 'jquery-rails', '3.1.5'
|
||||
gem 'jquery-ui-rails', '~> 4.2'
|
||||
gem 'jquery-ui-rails', '~> 4.0.0'
|
||||
gem 'select2-rails', '~> 3.4.7'
|
||||
|
||||
gem 'ofn-qz', github: 'openfoodfoundation/ofn-qz', branch: 'ofn-rails-4'
|
||||
gem 'ofn-qz', github: 'openfoodfoundation/ofn-qz', ref: '60da2ae4c44cbb4c8d602f59fb5fff8d0f21db3c'
|
||||
|
||||
group :production, :staging do
|
||||
gem 'ddtrace'
|
||||
gem 'unicorn-worker-killer'
|
||||
end
|
||||
|
||||
group :test, :development do
|
||||
# Pretty printed test output
|
||||
gem 'atomic'
|
||||
gem 'awesome_print'
|
||||
gem 'capybara', '>= 2.18.0' # 3.0 requires rack 1.6 that only works with Rails 4.2
|
||||
gem 'database_cleaner', require: false
|
||||
gem "factory_bot_rails", '4.10.0', require: false
|
||||
gem 'capybara', '>= 2.18.0' # 3.0 requires nokogiri 1.8
|
||||
gem 'database_cleaner', '0.7.1', require: false
|
||||
gem "factory_bot_rails", require: false
|
||||
gem 'fuubar', '~> 2.5.0'
|
||||
gem 'json_spec', '~> 1.1.4'
|
||||
gem 'knapsack'
|
||||
gem 'letter_opener', '>= 1.4.1'
|
||||
gem 'rspec-rails', ">= 3.5.2"
|
||||
gem 'rspec-retry'
|
||||
gem 'rswag'
|
||||
gem 'selenium-webdriver'
|
||||
gem 'shoulda-matchers'
|
||||
gem 'timecop'
|
||||
@@ -161,14 +153,13 @@ group :test do
|
||||
end
|
||||
|
||||
group :development do
|
||||
gem 'byebug', '~> 11.0.0' # 11.1 requires ruby 2.4
|
||||
gem 'byebug', '~> 9.0.0' # 9.1 requires ruby 2.2
|
||||
gem 'debugger-linecache'
|
||||
gem "newrelic_rpm", "~> 3.0"
|
||||
gem "pry", "~> 0.12.0" # pry 0.13 is not compatible with pry-byebug 3.7
|
||||
gem 'pry-byebug', '~> 3.7.0' # 3.8 requires ruby 2.4
|
||||
gem 'pry-byebug', '>= 3.4.3'
|
||||
gem 'rubocop'
|
||||
gem 'rubocop-rails'
|
||||
gem 'spring'
|
||||
gem 'spring', '1.7.2'
|
||||
gem 'spring-commands-rspec'
|
||||
|
||||
# 1.0.9 fixed openssl issues on macOS https://github.com/eventmachine/eventmachine/issues/602
|
||||
|
||||
456
Gemfile.lock
@@ -1,3 +1,11 @@
|
||||
GIT
|
||||
remote: https://github.com/RohanM/simple_form.git
|
||||
revision: 45f08a213b40f3d4bda5f5398db841137587160a
|
||||
specs:
|
||||
simple_form (2.0.2)
|
||||
actionpack (~> 3.0)
|
||||
activemodel (~> 3.0)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/jeremydurham/custom-err-msg.git
|
||||
revision: 3a8ec9dddc7a5b0aab7c69a6060596de300c68f4
|
||||
@@ -6,41 +14,43 @@ GIT
|
||||
|
||||
GIT
|
||||
remote: https://github.com/openfoodfoundation/better_spree_paypal_express.git
|
||||
revision: 1736e3268239a841576d2719a1f276cf9b74c5c5
|
||||
branch: 2-1-0-stable
|
||||
revision: 27ad7165ea4c6e8c5f120b42b676cb9c2c272100
|
||||
branch: 2-0-stable
|
||||
specs:
|
||||
spree_paypal_express (2.0.3)
|
||||
paypal-sdk-merchant (= 1.106.1)
|
||||
spree_core (~> 2.1.0)
|
||||
spree_core (~> 2.0.3)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/openfoodfoundation/ofn-qz.git
|
||||
revision: 467f6ea1c44529c7c91cac4c8211bbd863588c0b
|
||||
branch: ofn-rails-4
|
||||
revision: 60da2ae4c44cbb4c8d602f59fb5fff8d0f21db3c
|
||||
ref: 60da2ae4c44cbb4c8d602f59fb5fff8d0f21db3c
|
||||
specs:
|
||||
ofn-qz (0.1.0)
|
||||
railties (~> 3.1)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/openfoodfoundation/spree.git
|
||||
revision: 0b0c422369c82b6dd7e7cb627a24e3a9fca19a6c
|
||||
branch: 2-1-0-stable
|
||||
revision: 8a8585a43cd04d1a50dc65227f337a91b18d66d5
|
||||
branch: 2-0-4-stable
|
||||
specs:
|
||||
spree_core (2.1.0)
|
||||
activemerchant (= 1.78.0)
|
||||
spree_core (2.0.4)
|
||||
activemerchant (~> 1.34)
|
||||
acts_as_list (= 0.2.0)
|
||||
awesome_nested_set (~> 3.0.0.rc.1)
|
||||
aws-sdk (= 1.11.1)
|
||||
awesome_nested_set (= 2.1.5)
|
||||
aws-sdk (~> 1.11.1)
|
||||
cancan (~> 1.6.10)
|
||||
deface (>= 0.9.1)
|
||||
ffaker (~> 1.16)
|
||||
highline (= 1.6.18)
|
||||
httparty (~> 0.11)
|
||||
json (>= 1.7.7)
|
||||
kaminari (~> 0.14.1)
|
||||
money (= 5.1.1)
|
||||
paperclip (~> 3.4.1)
|
||||
paranoia (~> 2.0)
|
||||
rails (~> 4.0)
|
||||
ransack (~> 1.0)
|
||||
paperclip (~> 3.0)
|
||||
paranoia (~> 1.3)
|
||||
rails (~> 3.2.14)
|
||||
ransack (= 0.7.2)
|
||||
state_machine (= 1.2.0)
|
||||
stringex (~> 1.5.1)
|
||||
truncate_html (= 0.9.2)
|
||||
@@ -55,18 +65,21 @@ GIT
|
||||
rails-i18n
|
||||
spree_core (>= 1.1)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/willrjmarshall/foundation_rails_helper.git
|
||||
revision: 4d5d53fdc4b1fb71e66524d298c5c635de82cfbb
|
||||
branch: rails3
|
||||
specs:
|
||||
foundation_rails_helper (0.4)
|
||||
actionpack (>= 3.0)
|
||||
activemodel (>= 3.0)
|
||||
railties (>= 3.0)
|
||||
|
||||
PATH
|
||||
remote: engines/catalog
|
||||
specs:
|
||||
catalog (0.0.1)
|
||||
|
||||
PATH
|
||||
remote: engines/dfc_provider
|
||||
specs:
|
||||
dfc_provider (0.0.1)
|
||||
jwt (~> 2.2)
|
||||
rspec (~> 3.9)
|
||||
|
||||
PATH
|
||||
remote: engines/order_management
|
||||
specs:
|
||||
@@ -81,17 +94,19 @@ GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
CFPropertyList (2.3.6)
|
||||
actionmailer (4.0.13)
|
||||
actionpack (= 4.0.13)
|
||||
mail (~> 2.5, >= 2.5.4)
|
||||
actionpack (4.0.13)
|
||||
activesupport (= 4.0.13)
|
||||
builder (~> 3.1.0)
|
||||
actionmailer (3.2.22.5)
|
||||
actionpack (= 3.2.22.5)
|
||||
mail (~> 2.5.4)
|
||||
actionpack (3.2.22.5)
|
||||
activemodel (= 3.2.22.5)
|
||||
activesupport (= 3.2.22.5)
|
||||
builder (~> 3.0.0)
|
||||
erubis (~> 2.7.0)
|
||||
rack (~> 1.5.2)
|
||||
rack-test (~> 0.6.2)
|
||||
actionpack-action_caching (1.2.1)
|
||||
actionpack (>= 4.0.0)
|
||||
journey (~> 1.0.4)
|
||||
rack (~> 1.4.5)
|
||||
rack-cache (~> 1.2)
|
||||
rack-test (~> 0.6.1)
|
||||
sprockets (~> 2.2.1)
|
||||
active_model_serializers (0.8.4)
|
||||
activemodel (>= 3.0)
|
||||
activemerchant (1.78.0)
|
||||
@@ -99,33 +114,26 @@ GEM
|
||||
builder (>= 2.1.2, < 4.0.0)
|
||||
i18n (>= 0.6.9)
|
||||
nokogiri (~> 1.4)
|
||||
activemodel (4.0.13)
|
||||
activesupport (= 4.0.13)
|
||||
builder (~> 3.1.0)
|
||||
activerecord (4.0.13)
|
||||
activemodel (= 4.0.13)
|
||||
activerecord-deprecated_finders (~> 1.0.2)
|
||||
activesupport (= 4.0.13)
|
||||
arel (~> 4.0.0)
|
||||
activerecord-deprecated_finders (1.0.4)
|
||||
activerecord-import (1.0.5)
|
||||
activemodel (3.2.22.5)
|
||||
activesupport (= 3.2.22.5)
|
||||
builder (~> 3.0.0)
|
||||
activerecord (3.2.22.5)
|
||||
activemodel (= 3.2.22.5)
|
||||
activesupport (= 3.2.22.5)
|
||||
arel (~> 3.0.2)
|
||||
tzinfo (~> 0.3.29)
|
||||
activerecord-import (1.0.4)
|
||||
activerecord (>= 3.2)
|
||||
activerecord-postgresql-adapter (0.0.1)
|
||||
pg
|
||||
activerecord-session_store (1.1.3)
|
||||
actionpack (>= 4.0)
|
||||
activerecord (>= 4.0)
|
||||
multi_json (~> 1.11, >= 1.11.2)
|
||||
rack (>= 1.5.2, < 3)
|
||||
railties (>= 4.0)
|
||||
activesupport (4.0.13)
|
||||
i18n (~> 0.6, >= 0.6.9)
|
||||
minitest (~> 4.2)
|
||||
multi_json (~> 1.3)
|
||||
thread_safe (~> 0.1)
|
||||
tzinfo (~> 0.3.37)
|
||||
acts-as-taggable-on (4.0.0)
|
||||
activerecord (>= 4.0)
|
||||
activeresource (3.2.22.5)
|
||||
activemodel (= 3.2.22.5)
|
||||
activesupport (= 3.2.22.5)
|
||||
activesupport (3.2.22.5)
|
||||
i18n (~> 0.6, >= 0.6.4)
|
||||
multi_json (~> 1.0)
|
||||
acts-as-taggable-on (3.5.0)
|
||||
activerecord (>= 3.2, < 5)
|
||||
acts_as_list (0.2.0)
|
||||
activerecord (>= 3.0)
|
||||
addressable (2.7.0)
|
||||
@@ -137,21 +145,24 @@ GEM
|
||||
tilt
|
||||
angularjs-file-upload-rails (2.4.1)
|
||||
angularjs-rails (1.5.5)
|
||||
arel (4.0.2)
|
||||
arel (3.0.3)
|
||||
ast (2.4.0)
|
||||
atomic (1.1.101)
|
||||
awesome_nested_set (3.0.3)
|
||||
activerecord (>= 4.0.0, < 5)
|
||||
awesome_nested_set (2.1.5)
|
||||
activerecord (>= 3.0.0)
|
||||
awesome_print (1.8.0)
|
||||
aws-sdk (1.11.1)
|
||||
json (~> 1.4)
|
||||
nokogiri (>= 1.4.4)
|
||||
uuidtools (~> 2.1)
|
||||
bcrypt (3.1.13)
|
||||
bugsnag (6.14.0)
|
||||
bcrypt-ruby (3.1.5)
|
||||
bcrypt (>= 3.1.3)
|
||||
blockenspiel (0.5.0)
|
||||
bugsnag (6.13.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
builder (3.1.4)
|
||||
byebug (11.0.1)
|
||||
builder (3.0.4)
|
||||
byebug (9.0.6)
|
||||
cancan (1.6.10)
|
||||
capybara (2.18.0)
|
||||
addressable
|
||||
@@ -162,18 +173,19 @@ GEM
|
||||
xpath (>= 2.0, < 4.0)
|
||||
childprocess (3.0.0)
|
||||
chronic (0.10.2)
|
||||
chunky_png (1.3.11)
|
||||
chunky_png (1.3.10)
|
||||
climate_control (0.2.0)
|
||||
cocaine (0.5.8)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
coderay (1.1.2)
|
||||
coffee-rails (4.2.2)
|
||||
coffee-rails (3.2.2)
|
||||
coffee-script (>= 2.2.0)
|
||||
railties (>= 4.0.0)
|
||||
railties (~> 3.2.0)
|
||||
coffee-script (2.4.1)
|
||||
coffee-script-source
|
||||
execjs
|
||||
coffee-script-source (1.12.2)
|
||||
coffee-script-source (1.10.0)
|
||||
colorize (0.8.1)
|
||||
combine_pdf (1.0.16)
|
||||
ruby-rc4 (>= 0.1.5)
|
||||
compass (1.0.3)
|
||||
@@ -188,25 +200,30 @@ GEM
|
||||
sass (>= 3.3.0, < 3.5)
|
||||
compass-import-once (1.0.5)
|
||||
sass (>= 3.2, < 3.5)
|
||||
compass-rails (4.0.0)
|
||||
compass-rails (3.1.0)
|
||||
compass (~> 1.0.0)
|
||||
sass-rails (< 5.1)
|
||||
sprockets (< 4.0)
|
||||
concurrent-ruby (1.1.6)
|
||||
concurrent-ruby (1.1.5)
|
||||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
css_parser (1.7.1)
|
||||
css_parser (1.7.0)
|
||||
addressable
|
||||
daemons (1.3.1)
|
||||
dalli (2.7.10)
|
||||
database_cleaner (1.8.5)
|
||||
database_cleaner (0.7.1)
|
||||
db2fog (0.9.0)
|
||||
activerecord (>= 3.2.0, < 5.0)
|
||||
fog (~> 1.0)
|
||||
rails (>= 3.2.0, < 5.0)
|
||||
ddtrace (0.38.0)
|
||||
ddtrace (0.33.1)
|
||||
msgpack
|
||||
debugger-linecache (1.2.0)
|
||||
deface (1.0.2)
|
||||
colorize (>= 0.5.8)
|
||||
nokogiri (~> 1.6.0)
|
||||
polyglot
|
||||
rails (>= 3.1)
|
||||
delayed_job (4.1.8)
|
||||
activesupport (>= 3.0, < 6.1)
|
||||
delayed_job_active_record (4.1.4)
|
||||
@@ -217,17 +234,13 @@ GEM
|
||||
delayed_job (> 2.0.3)
|
||||
rack-protection (>= 1.5.5)
|
||||
sinatra (>= 1.4.4)
|
||||
devise (3.5.10)
|
||||
bcrypt (~> 3.0)
|
||||
devise (2.2.8)
|
||||
bcrypt-ruby (~> 3.0)
|
||||
orm_adapter (~> 0.1)
|
||||
railties (>= 3.2.6, < 5)
|
||||
responders
|
||||
thread_safe (~> 0.1)
|
||||
warden (~> 1.2.3)
|
||||
railties (~> 3.1)
|
||||
warden (~> 1.2.1)
|
||||
devise-encryptable (0.2.0)
|
||||
devise (>= 2.1.0)
|
||||
devise-token_authenticatable (0.4.10)
|
||||
devise (>= 3.5.2, < 4.0.0)
|
||||
diff-lcs (1.3)
|
||||
diffy (3.3.0)
|
||||
docile (1.3.2)
|
||||
@@ -243,8 +256,8 @@ GEM
|
||||
railties (>= 3.0.0)
|
||||
faraday (1.0.0)
|
||||
multipart-post (>= 1.2, < 3)
|
||||
ffaker (1.32.1)
|
||||
ffi (1.12.2)
|
||||
ffaker (1.22.1)
|
||||
ffi (1.11.3)
|
||||
figaro (1.1.1)
|
||||
thor (~> 0.14)
|
||||
fission (0.5.0)
|
||||
@@ -283,7 +296,7 @@ GEM
|
||||
fog-xml (~> 0.1.1)
|
||||
ipaddress (~> 0.5)
|
||||
json (>= 1.8, < 2.0)
|
||||
fog-aliyun (0.3.5)
|
||||
fog-aliyun (0.3.2)
|
||||
fog-core
|
||||
fog-json
|
||||
ipaddress (~> 0.8)
|
||||
@@ -341,8 +354,8 @@ GEM
|
||||
multi_json (~> 1.10)
|
||||
fog-local (0.6.0)
|
||||
fog-core (>= 1.27, < 3.0)
|
||||
fog-openstack (0.3.10)
|
||||
fog-core (>= 1.45, <= 2.1.0)
|
||||
fog-openstack (0.1.25)
|
||||
fog-core (~> 1.40)
|
||||
fog-json (>= 1.0)
|
||||
ipaddress (>= 0.8)
|
||||
fog-powerdns (0.2.0)
|
||||
@@ -386,13 +399,12 @@ GEM
|
||||
fog-voxel (0.1.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
fog-vsphere (3.2.1)
|
||||
fog-vsphere (2.3.0)
|
||||
fog-core
|
||||
rbvmomi (>= 1.9, < 3)
|
||||
fog-xenserver (1.0.0)
|
||||
rbvmomi (~> 1.9)
|
||||
fog-xenserver (0.3.0)
|
||||
fog-core
|
||||
fog-xml
|
||||
xmlrpc
|
||||
fog-xml (0.1.3)
|
||||
fog-core
|
||||
nokogiri (>= 1.5.11, < 2.0.0)
|
||||
@@ -408,35 +420,30 @@ GEM
|
||||
fuubar (2.5.0)
|
||||
rspec-core (~> 3.0)
|
||||
ruby-progressbar (~> 1.4)
|
||||
geocoder (1.6.3)
|
||||
get_process_mem (0.2.5)
|
||||
ffi (~> 1.0)
|
||||
gmaps4rails (2.1.2)
|
||||
haml (5.1.2)
|
||||
temple (>= 0.8.0)
|
||||
geocoder (1.1.8)
|
||||
gmaps4rails (1.5.6)
|
||||
haml (4.0.7)
|
||||
tilt
|
||||
hashdiff (1.0.1)
|
||||
highline (1.6.18)
|
||||
hike (1.2.3)
|
||||
httparty (0.18.1)
|
||||
mime-types (~> 3.0)
|
||||
httparty (0.16.2)
|
||||
multi_xml (>= 0.5.2)
|
||||
i18n (0.6.11)
|
||||
i18n-js (3.7.1)
|
||||
i18n-js (3.6.0)
|
||||
i18n (>= 0.6.6)
|
||||
immigrant (0.3.6)
|
||||
activerecord (>= 3.0)
|
||||
ipaddress (0.8.3)
|
||||
jaro_winkler (1.5.4)
|
||||
journey (1.0.4)
|
||||
jquery-migrate-rails (1.2.1)
|
||||
jquery-rails (3.1.5)
|
||||
railties (>= 3.0, < 5.0)
|
||||
thor (>= 0.14, < 2.0)
|
||||
jquery-ui-rails (4.2.1)
|
||||
railties (>= 3.2.16)
|
||||
jquery-ui-rails (4.0.5)
|
||||
railties (>= 3.1.0)
|
||||
json (1.8.6)
|
||||
json-schema (2.8.1)
|
||||
addressable (>= 2.4)
|
||||
json_spec (1.1.5)
|
||||
multi_json (~> 1.0)
|
||||
rspec (>= 2.0, < 4.0)
|
||||
@@ -452,17 +459,15 @@ GEM
|
||||
letter_opener (1.7.0)
|
||||
launchy (~> 2.2)
|
||||
libv8 (7.3.492.27.1)
|
||||
mail (2.7.1)
|
||||
mini_mime (>= 0.1.1)
|
||||
mail (2.5.5)
|
||||
mime-types (~> 1.16)
|
||||
treetop (~> 1.4.8)
|
||||
method_source (0.9.2)
|
||||
mime-types (3.3.1)
|
||||
mime-types-data (~> 3.2015)
|
||||
mime-types-data (3.2020.0512)
|
||||
mini_mime (1.0.2)
|
||||
mini_portile2 (2.4.0)
|
||||
mini_racer (0.2.15)
|
||||
libv8 (> 7.3)
|
||||
minitest (4.7.5)
|
||||
mime-types (1.25.1)
|
||||
mini_mime (1.0.1)
|
||||
mini_portile2 (2.1.0)
|
||||
mini_racer (0.2.9)
|
||||
libv8 (>= 6.9.411)
|
||||
momentjs-rails (2.20.1)
|
||||
railties (>= 3.1)
|
||||
money (5.1.1)
|
||||
@@ -472,16 +477,15 @@ GEM
|
||||
multi_xml (0.6.0)
|
||||
multipart-post (2.1.1)
|
||||
newrelic_rpm (3.18.1.330)
|
||||
nokogiri (1.10.9)
|
||||
mini_portile2 (~> 2.4.0)
|
||||
nokogiri (1.6.8.1)
|
||||
mini_portile2 (~> 2.1.0)
|
||||
oauth2 (1.4.4)
|
||||
faraday (>= 0.8, < 2.0)
|
||||
jwt (>= 1.0, < 3.0)
|
||||
multi_json (~> 1.3)
|
||||
multi_xml (~> 0.5)
|
||||
rack (>= 1.2, < 3)
|
||||
oj (3.10.8)
|
||||
optimist (3.0.0)
|
||||
oj (3.10.5)
|
||||
orm_adapter (0.5.0)
|
||||
paper_trail (5.2.3)
|
||||
activerecord (>= 3.0, < 6.0)
|
||||
@@ -493,9 +497,9 @@ GEM
|
||||
cocaine (~> 0.5.0)
|
||||
mime-types
|
||||
parallel (1.19.1)
|
||||
paranoia (2.4.2)
|
||||
activerecord (>= 4.0, < 6.1)
|
||||
parser (2.7.1.0)
|
||||
paranoia (1.3.4)
|
||||
activerecord (~> 3.1)
|
||||
parser (2.7.0.5)
|
||||
ast (~> 2.4.0)
|
||||
paypal-sdk-core (0.2.10)
|
||||
multi_json (~> 1.0)
|
||||
@@ -503,62 +507,70 @@ GEM
|
||||
paypal-sdk-merchant (1.106.1)
|
||||
paypal-sdk-core (~> 0.2.3)
|
||||
pg (0.21.0)
|
||||
power_assert (1.2.0)
|
||||
polyamorous (0.5.0)
|
||||
activerecord (~> 3.0)
|
||||
polyglot (0.3.5)
|
||||
power_assert (1.1.5)
|
||||
pry (0.12.2)
|
||||
coderay (~> 1.1.0)
|
||||
method_source (~> 0.9.0)
|
||||
pry-byebug (3.7.0)
|
||||
byebug (~> 11.0)
|
||||
pry-byebug (3.4.3)
|
||||
byebug (>= 9.0, < 9.1)
|
||||
pry (~> 0.10)
|
||||
public_suffix (4.0.3)
|
||||
rack (1.5.5)
|
||||
rack-mini-profiler (2.0.2)
|
||||
rabl (0.8.4)
|
||||
activesupport (>= 2.3.14)
|
||||
rack (1.4.7)
|
||||
rack-cache (1.11.0)
|
||||
rack (>= 0.4)
|
||||
rack-mini-profiler (2.0.1)
|
||||
rack (>= 1.2.0)
|
||||
rack-protection (1.5.5)
|
||||
rack
|
||||
rack-rewrite (1.5.1)
|
||||
rack-ssl (1.4.1)
|
||||
rack-ssl (1.3.4)
|
||||
rack
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
rails (4.0.13)
|
||||
actionmailer (= 4.0.13)
|
||||
actionpack (= 4.0.13)
|
||||
activerecord (= 4.0.13)
|
||||
activesupport (= 4.0.13)
|
||||
bundler (>= 1.3.0, < 2.0)
|
||||
railties (= 4.0.13)
|
||||
sprockets-rails (~> 2.0)
|
||||
rails-i18n (4.0.5)
|
||||
i18n (~> 0.6)
|
||||
railties (~> 4.0)
|
||||
rails (3.2.22.5)
|
||||
actionmailer (= 3.2.22.5)
|
||||
actionpack (= 3.2.22.5)
|
||||
activerecord (= 3.2.22.5)
|
||||
activeresource (= 3.2.22.5)
|
||||
activesupport (= 3.2.22.5)
|
||||
bundler (~> 1.0)
|
||||
railties (= 3.2.22.5)
|
||||
rails-i18n (3.0.1)
|
||||
i18n (~> 0.5)
|
||||
rails (>= 3.0.0, < 4.0.0)
|
||||
rails_safe_tasks (1.0.0)
|
||||
railties (4.0.13)
|
||||
actionpack (= 4.0.13)
|
||||
activesupport (= 4.0.13)
|
||||
railties (3.2.22.5)
|
||||
actionpack (= 3.2.22.5)
|
||||
activesupport (= 3.2.22.5)
|
||||
rack-ssl (~> 1.3.2)
|
||||
rake (>= 0.8.7)
|
||||
thor (>= 0.18.1, < 2.0)
|
||||
rdoc (~> 3.4)
|
||||
thor (>= 0.14.6, < 2.0)
|
||||
rainbow (3.0.0)
|
||||
raindrops (0.19.1)
|
||||
rake (13.0.1)
|
||||
ransack (1.8.10)
|
||||
actionpack (>= 3.0, < 5.2)
|
||||
activerecord (>= 3.0, < 5.2)
|
||||
activesupport (>= 3.0, < 5.2)
|
||||
i18n
|
||||
ransack (0.7.2)
|
||||
actionpack (~> 3.0)
|
||||
activerecord (~> 3.0)
|
||||
polyamorous (~> 0.5.0)
|
||||
rb-fsevent (0.10.3)
|
||||
rb-inotify (0.10.1)
|
||||
ffi (~> 1.0)
|
||||
rbvmomi (2.2.0)
|
||||
rb-inotify (0.9.10)
|
||||
ffi (>= 0.5.0, < 2)
|
||||
rbvmomi (1.13.0)
|
||||
builder (~> 3.0)
|
||||
json (>= 1.8)
|
||||
nokogiri (~> 1.5)
|
||||
optimist (~> 3.0)
|
||||
trollop (~> 2.1)
|
||||
rdoc (3.12.2)
|
||||
json (~> 1.4)
|
||||
redcarpet (3.5.0)
|
||||
request_store (1.4.1)
|
||||
rack (>= 1.4)
|
||||
responders (1.1.2)
|
||||
railties (>= 3.2, < 4.2)
|
||||
rexml (3.2.4)
|
||||
roadie (3.4.0)
|
||||
css_parser (~> 1.4)
|
||||
@@ -592,28 +604,15 @@ GEM
|
||||
rspec-retry (0.6.2)
|
||||
rspec-core (> 3.3)
|
||||
rspec-support (3.9.2)
|
||||
rswag (2.2.0)
|
||||
rswag-api (= 2.2.0)
|
||||
rswag-specs (= 2.2.0)
|
||||
rswag-ui (= 2.2.0)
|
||||
rswag-api (2.2.0)
|
||||
railties (>= 3.1, < 6.1)
|
||||
rswag-specs (2.2.0)
|
||||
activesupport (>= 3.1, < 6.1)
|
||||
json-schema (~> 2.2)
|
||||
railties (>= 3.1, < 6.1)
|
||||
rswag-ui (2.2.0)
|
||||
actionpack (>= 3.1, < 6.1)
|
||||
railties (>= 3.1, < 6.1)
|
||||
rubocop (0.81.0)
|
||||
rubocop (0.80.1)
|
||||
jaro_winkler (~> 1.5.1)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 2.7.0.1)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
rexml
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 2.0)
|
||||
rubocop-rails (2.5.2)
|
||||
unicode-display_width (>= 1.4.0, < 1.7)
|
||||
rubocop-rails (2.5.0)
|
||||
activesupport
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 0.72.0)
|
||||
@@ -621,66 +620,64 @@ GEM
|
||||
ruby-rc4 (0.1.5)
|
||||
rubyzip (1.3.0)
|
||||
safe_yaml (1.0.5)
|
||||
sass (3.4.25)
|
||||
sass-rails (5.0.7)
|
||||
railties (>= 4.0.0, < 6)
|
||||
sass (~> 3.1)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
sprockets-rails (>= 2.0, < 4.0)
|
||||
tilt (>= 1.1, < 3)
|
||||
sass (3.3.14)
|
||||
sass-rails (3.2.6)
|
||||
railties (~> 3.2.0)
|
||||
sass (>= 3.1.10)
|
||||
tilt (~> 1.3)
|
||||
select2-rails (3.4.9)
|
||||
sass-rails
|
||||
thor (~> 0.14)
|
||||
selenium-webdriver (3.142.7)
|
||||
childprocess (>= 0.5, < 4.0)
|
||||
rubyzip (>= 1.2.2)
|
||||
shoulda-matchers (3.1.3)
|
||||
activesupport (>= 4.0.0)
|
||||
shoulda-matchers (2.8.0)
|
||||
activesupport (>= 3.0.0)
|
||||
simplecov (0.17.1)
|
||||
docile (~> 1.1)
|
||||
json (>= 1.8, < 3)
|
||||
simplecov-html (~> 0.10.0)
|
||||
simplecov-html (0.10.2)
|
||||
sinatra (1.4.8)
|
||||
rack (~> 1.5)
|
||||
sinatra (1.4.6)
|
||||
rack (~> 1.4)
|
||||
rack-protection (~> 1.4)
|
||||
tilt (>= 1.3, < 3)
|
||||
spinjs-rails (1.4)
|
||||
rails (>= 3.1)
|
||||
spring (1.7.2)
|
||||
spring-commands-rspec (1.0.4)
|
||||
spring (>= 0.9.1)
|
||||
sprockets (2.12.5)
|
||||
sprockets (2.2.3)
|
||||
hike (~> 1.2)
|
||||
multi_json (~> 1.0)
|
||||
rack (~> 1.0)
|
||||
tilt (~> 1.1, != 1.3.0)
|
||||
sprockets-rails (2.3.3)
|
||||
actionpack (>= 3.0)
|
||||
activesupport (>= 3.0)
|
||||
sprockets (>= 2.8, < 4.0)
|
||||
state_machine (1.2.0)
|
||||
stringex (1.5.1)
|
||||
stripe (5.22.0)
|
||||
temple (0.8.2)
|
||||
test-unit (3.3.6)
|
||||
stripe (5.15.0)
|
||||
test-unit (3.3.5)
|
||||
power_assert
|
||||
thor (0.20.3)
|
||||
thread_safe (0.3.6)
|
||||
tilt (1.4.1)
|
||||
timecop (0.9.1)
|
||||
treetop (1.4.15)
|
||||
polyglot
|
||||
polyglot (>= 0.3.1)
|
||||
trollop (2.9.9)
|
||||
truncate_html (0.9.2)
|
||||
tzinfo (0.3.57)
|
||||
turbo-sprockets-rails3 (0.3.14)
|
||||
railties (> 3.2.8, < 4.0.0)
|
||||
sprockets (>= 2.2.0)
|
||||
tzinfo (0.3.56)
|
||||
uglifier (4.2.0)
|
||||
execjs (>= 0.3.0, < 3)
|
||||
unicode-display_width (1.7.0)
|
||||
unicorn (5.6.0)
|
||||
unicode-display_width (1.6.1)
|
||||
unicorn (5.5.4)
|
||||
kgio (~> 2.6)
|
||||
raindrops (~> 0.7)
|
||||
unicorn-rails (2.2.1)
|
||||
rack
|
||||
unicorn
|
||||
unicorn-worker-killer (0.4.4)
|
||||
get_process_mem (~> 0)
|
||||
unicorn (>= 4, < 6)
|
||||
uuidtools (2.1.5)
|
||||
warden (1.2.7)
|
||||
rack (>= 1.0)
|
||||
@@ -692,13 +689,11 @@ GEM
|
||||
addressable (>= 2.3.6)
|
||||
crack (>= 0.3.2)
|
||||
hashdiff (>= 0.4.0, < 2.0.0)
|
||||
whenever (1.0.0)
|
||||
whenever (0.11.0)
|
||||
chronic (>= 0.6.3)
|
||||
wicked_pdf (2.1.0)
|
||||
activesupport
|
||||
wicked_pdf (1.1.0)
|
||||
wkhtmltopdf-binary (0.12.5)
|
||||
xml-simple (1.1.5)
|
||||
xmlrpc (0.3.0)
|
||||
xpath (2.1.0)
|
||||
nokogiri (~> 1.3)
|
||||
|
||||
@@ -706,119 +701,108 @@ PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
actionpack-action_caching
|
||||
active_model_serializers (= 0.8.4)
|
||||
activemerchant (~> 1.78.0)
|
||||
activemerchant (~> 1.78)
|
||||
activerecord-import
|
||||
activerecord-postgresql-adapter
|
||||
activerecord-session_store
|
||||
acts-as-taggable-on (~> 4.0)
|
||||
acts_as_list (= 0.2.0)
|
||||
acts-as-taggable-on (~> 3.4)
|
||||
andand
|
||||
angular-rails-templates (~> 0.3.0)
|
||||
angularjs-file-upload-rails (~> 2.4.1)
|
||||
angularjs-rails (= 1.5.5)
|
||||
atomic
|
||||
awesome_nested_set (~> 3.0.0.rc.1)
|
||||
awesome_print
|
||||
aws-sdk (= 1.11.1)
|
||||
aws-sdk
|
||||
blockenspiel
|
||||
bugsnag
|
||||
byebug (~> 11.0.0)
|
||||
cancan (~> 1.6.10)
|
||||
byebug (~> 9.0.0)
|
||||
capybara (>= 2.18.0)
|
||||
catalog!
|
||||
coffee-rails (~> 4.2.2)
|
||||
coffee-rails (~> 3.2.1)
|
||||
combine_pdf
|
||||
compass-rails
|
||||
custom_error_message!
|
||||
daemons
|
||||
dalli
|
||||
database_cleaner
|
||||
database_cleaner (= 0.7.1)
|
||||
db2fog
|
||||
ddtrace
|
||||
debugger-linecache
|
||||
deface (= 1.0.2)
|
||||
delayed_job_active_record
|
||||
delayed_job_web
|
||||
devise (~> 3.5.10)
|
||||
devise-encryptable
|
||||
devise-token_authenticatable (~> 0.4.10)
|
||||
dfc_provider!
|
||||
devise (~> 2.2.5)
|
||||
devise-encryptable (= 0.2.0)
|
||||
diffy
|
||||
eventmachine (>= 1.2.3)
|
||||
factory_bot_rails (= 4.10.0)
|
||||
ffaker (~> 1.16)
|
||||
factory_bot_rails
|
||||
figaro
|
||||
foreigner
|
||||
foundation-icons-sass-rails
|
||||
foundation-rails (= 5.5.2.1)
|
||||
foundation-rails
|
||||
foundation_rails_helper!
|
||||
fuubar (~> 2.5.0)
|
||||
geocoder
|
||||
gmaps4rails
|
||||
haml
|
||||
highline (= 1.6.18)
|
||||
httparty (~> 0.18)
|
||||
i18n (~> 0.6.11)
|
||||
i18n-js (~> 3.7.1)
|
||||
i18n-js (~> 3.6.0)
|
||||
immigrant
|
||||
jquery-migrate-rails
|
||||
jquery-rails (= 3.1.5)
|
||||
jquery-ui-rails (~> 4.2)
|
||||
json (>= 1.7.7)
|
||||
jquery-ui-rails (~> 4.0.0)
|
||||
json_spec (~> 1.1.4)
|
||||
jwt (~> 2.2)
|
||||
kaminari (~> 0.14.1)
|
||||
knapsack
|
||||
letter_opener (>= 1.4.1)
|
||||
mini_racer (= 0.2.15)
|
||||
mini_racer (= 0.2.9)
|
||||
momentjs-rails
|
||||
money (= 5.1.1)
|
||||
newrelic_rpm (~> 3.0)
|
||||
nokogiri (>= 1.6.7.1)
|
||||
oauth2 (~> 1.4.4)
|
||||
ofn-qz!
|
||||
oj
|
||||
order_management!
|
||||
paper_trail (~> 5.2.3)
|
||||
paperclip (~> 3.4.1)
|
||||
paranoia (~> 2.0)
|
||||
pg (~> 0.21.0)
|
||||
pry (~> 0.12.0)
|
||||
pry-byebug (~> 3.7.0)
|
||||
pry-byebug (>= 3.4.3)
|
||||
rabl
|
||||
rack-mini-profiler (< 3.0.0)
|
||||
rack-rewrite
|
||||
rack-ssl
|
||||
rails (~> 4.0.13)
|
||||
rails-i18n (~> 4.0)
|
||||
rails (~> 3.2.22)
|
||||
rails-i18n (~> 3.0.0)
|
||||
rails_safe_tasks (~> 1.0)
|
||||
ransack (~> 1.8.10)
|
||||
redcarpet
|
||||
roadie-rails (~> 1.3.0)
|
||||
roo (~> 2.8.3)
|
||||
rspec-rails (>= 3.5.2)
|
||||
rspec-retry
|
||||
rswag
|
||||
rubocop
|
||||
rubocop-rails
|
||||
sass
|
||||
sass-rails
|
||||
sass (~> 3.3)
|
||||
sass-rails (~> 3.2.3)
|
||||
select2-rails (~> 3.4.7)
|
||||
selenium-webdriver
|
||||
shoulda-matchers
|
||||
simple_form!
|
||||
simplecov
|
||||
spinjs-rails
|
||||
spree_core!
|
||||
spree_i18n!
|
||||
spree_paypal_express!
|
||||
spring
|
||||
spring (= 1.7.2)
|
||||
spring-commands-rspec
|
||||
state_machine (= 1.2.0)
|
||||
stringex (~> 1.5.1)
|
||||
stripe
|
||||
test-unit (~> 3.3)
|
||||
timecop
|
||||
truncate_html (= 0.9.2)
|
||||
truncate_html
|
||||
turbo-sprockets-rails3
|
||||
uglifier (>= 1.0.3)
|
||||
unicorn
|
||||
unicorn-rails
|
||||
unicorn-worker-killer
|
||||
web!
|
||||
webdrivers
|
||||
webmock
|
||||
@@ -830,4 +814,4 @@ RUBY VERSION
|
||||
ruby 2.3.7p456
|
||||
|
||||
BUNDLED WITH
|
||||
1.17.3
|
||||
1.17.2
|
||||
|
||||
1051
app/assets/images/home/groups-bg.svg
Normal file
|
After Width: | Height: | Size: 107 KiB |
BIN
app/assets/images/home/home-apples.jpg
Normal file
|
After Width: | Height: | Size: 138 KiB |
BIN
app/assets/images/home/home-oranges.jpg
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
app/assets/images/home/home-strawberries.jpg
Normal file
|
After Width: | Height: | Size: 570 KiB |
|
Before Width: | Height: | Size: 283 KiB After Width: | Height: | Size: 283 KiB |
BIN
app/assets/images/home/home1.jpg
Normal file
|
After Width: | Height: | Size: 206 KiB |
BIN
app/assets/images/home/home2.jpg
Normal file
|
After Width: | Height: | Size: 244 KiB |
BIN
app/assets/images/home/home3.jpg
Normal file
|
After Width: | Height: | Size: 195 KiB |
BIN
app/assets/images/home/macbook.png
Normal file
|
After Width: | Height: | Size: 34 KiB |
1090
app/assets/images/home/maps-bg.svg
Normal file
|
After Width: | Height: | Size: 123 KiB |
72
app/assets/images/home/producers-bg.svg
Normal file
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="386.638px" height="320px" viewBox="-31.319 2 386.638 320" enable-background="new -31.319 2 386.638 320"
|
||||
xml:space="preserve">
|
||||
<g>
|
||||
<path fill="#ABDBD0" d="M331.518,159.254c-13.147,0-23.805,26.723-23.805,59.69c0,32.96,10.658,59.685,23.805,59.685
|
||||
c13.142,0,23.801-26.725,23.801-59.685C355.319,185.977,344.66,159.254,331.518,159.254z M332.114,255.185
|
||||
c-8.06,0-14.593-15.746-14.593-35.167s6.533-35.165,14.593-35.165c8.059,0,14.594,15.743,14.594,35.165
|
||||
S340.173,255.185,332.114,255.185z"/>
|
||||
<path fill="#ABDBD0" d="M304.557,219.468c0-36.244,11.718-65.623,26.171-65.623c2.107,0,4.154,0.642,6.116,1.823
|
||||
c-10.469-8.709-35.108-4.515-46.498-2.514c-2.139,3.216-3.572,6.079-4.237,7.624c-3.91,9.023-7.063,22.001-7.063,22.001
|
||||
l-11.863-0.291l11.689,55.666h-17.909c2.54,25.911,10.809,43.072,25.314,46.94c0,0,30.567,4.944,45.693-0.081
|
||||
c-0.414,0.046-0.828,0.081-1.243,0.081C316.273,285.091,304.557,255.707,304.557,219.468z"/>
|
||||
<path fill="#ABDBD0" d="M64.393,237.666c0-46.574,34.058-84.332,76.072-84.332c1.812,0,3.605,0.095,5.386,0.234
|
||||
c-5.466-1.08-11.117-1.655-16.903-1.655c-47.453,0-85.919,38.074-85.919,85.044c0,46.967,38.467,85.042,85.919,85.042
|
||||
c2.052,0,4.08-0.097,6.096-0.238C95.562,318.679,64.393,282.219,64.393,237.666z"/>
|
||||
<path fill="#ABDBD0" d="M122.02,149.109c44.188-2.104,67.371,17.402,79.829,34.057l3.027-2.314l4.452-5.008l28.39,7.793
|
||||
l10.02,52.325h27.275l-11.689-55.667l11.861,0.291c0,0,3.157-12.974,7.066-22c1.977-4.57,10.576-20.597,24.492-23.378
|
||||
c13.917-2.784,26.31,15.218,26.31,15.218l-6.824-19.114l-25.606-9.464l-7.794-42.304l11.689-7.236l-1.114-11.69l-64.57-23.38
|
||||
l-82.387,19.483V66.74l13.361,3.341l-8.908,25.608c0,0-23.709-3.198-47.031-1.02c-27.244,2.543-54.707,10.521-54.707,10.521
|
||||
l-7.365,14.434l-5.009,66.242l2.983,0.565l5.182-59.414l70.49-6.662L122.02,149.109L122.02,149.109z M65.958,118.276
|
||||
c-3.541,0.556-6.775-1.29-7.219-4.123c-0.446-2.835,2.065-5.583,5.606-6.139c3.543-0.556,6.776,1.288,7.22,4.124
|
||||
C72.011,114.972,69.5,117.719,65.958,118.276z M107.793,115.428c-4.711,0.741-9.011-1.713-9.603-5.483
|
||||
c-0.592-3.77,2.748-7.425,7.458-8.167c4.713-0.741,9.014,1.717,9.604,5.484C115.845,111.034,112.505,114.689,107.793,115.428z
|
||||
M225.388,109.481h-19.989L166.472,98.96l7.715-25.25l57.162-10.17L225.388,109.481z M252.39,181.723l-17.886-0.702l7.015-117.482
|
||||
l30.508,9.469l5.612,49.447L252.39,181.723z M282.025,122.017l-6.135-47.956l14.378,7.715l7.015,43.925L282.025,122.017z"/>
|
||||
<path fill="#ABDBD0" d="M147.008,91.476V57.053h-6.84V41.534c-0.001-8.57-6.945-15.515-15.517-15.519v6.314
|
||||
c5.083,0.008,9.198,4.123,9.206,9.204v15.519h-6.312v33.7C134.962,90.733,141.75,91.082,147.008,91.476z"/>
|
||||
<path fill="#ABDBD0" d="M-22.811,227.408c0-33.523,28.628-60.694,63.942-60.694c1.17,0,2.333,0.034,3.487,0.094l0.406-5.338
|
||||
c-2.084-0.176-4.193-0.274-6.325-0.274c-38.67-0.001-70.018,29.602-70.018,66.12c0,36.522,31.348,66.125,70.018,66.125
|
||||
c6.585,0,12.95-0.877,18.994-2.483c-1.019-1.387-1.98-2.814-2.918-4.26c-4.397,0.909-8.959,1.4-13.642,1.4
|
||||
C5.817,288.099-22.811,260.925-22.811,227.408z"/>
|
||||
<path fill="#ABDBD0" d="M10.539,226.003c0-18.358,16.222-33.24,36.233-33.24c2.119,0,4.189,0.176,6.207,0.497
|
||||
c0.214-0.435,0.437-0.864,0.675-1.295l-10.952-2.055l1.408-18.469c-1.078-0.059-2.159-0.087-3.249-0.087
|
||||
c-32.898,0-59.568,25.249-59.568,56.395c0,31.139,26.67,56.388,59.568,56.388c4.363,0,8.614-0.457,12.71-1.299
|
||||
c-4.71-7.248-8.31-15.242-10.552-23.764C24.771,257.346,10.539,243.2,10.539,226.003z"/>
|
||||
<g>
|
||||
<polygon fill="#ABDBD0" points="121.189,130.962 56.135,136.089 56.662,129.208 122.02,123.859 "/>
|
||||
<polygon fill="#ABDBD0" points="120.531,141.218 55.478,146.347 56.004,139.465 121.364,134.116 "/>
|
||||
<path fill="#ABDBD0" d="M120.311,143.455l-65.36,5.348l-0.526,6.882l50.139-3.953c4.875-1.368,9.922-2.336,15.109-2.83
|
||||
L120.311,143.455z"/>
|
||||
<path fill="#ABDBD0" d="M54.293,159.059l-0.527,6.883l24.851-1.96c4.491-3.131,9.296-5.842,14.364-8.088L54.293,159.059z"/>
|
||||
<path fill="#ABDBD0" d="M72.954,168.275l-19.187,1.571l-0.526,6.882l11.721-0.926C67.461,173.128,70.129,170.612,72.954,168.275z"
|
||||
/>
|
||||
<path fill="#ABDBD0" d="M52.847,179.313l-0.526,6.882l4.571-0.362c1.745-2.542,3.636-4.978,5.641-7.313L52.847,179.313z"/>
|
||||
</g>
|
||||
<circle fill="#ABDBD0" cx="140.958" cy="239.852" r="19.726"/>
|
||||
<ellipse fill="#ABDBD0" cx="328.491" cy="218.807" rx="4.487" ry="12.775"/>
|
||||
<g>
|
||||
<circle fill="#ABDBD0" cx="162.134" cy="223.81" r="2.781"/>
|
||||
<circle fill="#ABDBD0" cx="133.371" cy="215.827" r="2.781"/>
|
||||
<circle fill="#ABDBD0" cx="115.492" cy="239.462" r="2.781"/>
|
||||
<circle fill="#ABDBD0" cx="131.915" cy="265.616" r="2.781"/>
|
||||
<circle fill="#ABDBD0" cx="161.682" cy="255.915" r="2.783"/>
|
||||
</g>
|
||||
<path fill="#ABDBD0" d="M126.341,6.21c-9.103,0-16.483,7.379-16.483,16.482c0,2.76,0.686,5.357,1.886,7.641
|
||||
c-2.135-2.062-3.7-4.699-4.48-7.655l0,0c-0.538,0.587-1.051,1.203-1.509,1.884c-5.088,7.548-3.096,17.791,4.454,22.881
|
||||
c2.287,1.542,4.825,2.424,7.39,2.708c-4.22,0.898-8.783,0.158-12.644-2.444c-7.548-5.088-9.542-15.333-4.452-22.881
|
||||
c1.634-2.423,3.81-4.247,6.245-5.472c-0.014-0.289-0.046-0.574-0.046-0.869c0-3.665,1.211-7.038,3.233-9.775l-0.001,0.001
|
||||
c-0.855-0.185-1.731-0.312-2.642-0.312c-7.101,0-12.857,5.756-12.857,12.858c0,2.152,0.535,4.177,1.472,5.959
|
||||
c-2.421-2.337-3.933-5.611-3.933-9.241c0-7.101,5.756-12.857,12.856-12.857c2.414,0,4.663,0.675,6.591,1.833
|
||||
c-0.004,0.002-0.004,0.004-0.006,0.005C114.405,3.9,118.571,2,123.185,2c6.343,0,11.841,3.588,14.598,8.842
|
||||
C134.817,7.98,130.789,6.21,126.341,6.21z"/>
|
||||
<path fill="#ABDBD0" d="M188.32,300.982c-0.004,0-0.006,0.002-0.008,0.004c19.094-15.154,31.275-38.079,31.275-63.757
|
||||
c0-40.085-29.659-73.5-69.016-81.055c-1.782-0.134-3.574-0.227-5.385-0.227c-42.013,0-76.072,36.7-76.072,81.97
|
||||
c0,43.31,31.169,78.747,70.65,81.743c7.991-0.539,15.673-2.145,22.914-4.642L188.32,300.982z M144.663,286.068
|
||||
c-23.696,0-42.907-20.166-42.907-45.041c0-24.878,19.211-45.042,42.907-45.042c23.697,0,42.908,20.166,42.908,45.042
|
||||
C187.571,265.902,168.359,286.068,144.663,286.068z"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.3 KiB |
|
Before Width: | Height: | Size: 540 B |
|
Before Width: | Height: | Size: 534 B |
@@ -1,2 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="28px" height="33px" enable-background="new 0 0 28 33" version="1.1" viewBox="0 0 28 33" xmlns="http://www.w3.org/2000/svg"><path d="M14,25c-6.059,0-10.988,1.679-10.988,3.333c0,2.485,10.307,4.542,10.746,4.643 C13.828,32.992,13.914,33,14,33c0.084,0,0.17-0.008,0.239-0.023c0.439-0.099,10.749-2.114,10.749-4.643 C24.988,26.679,20.059,25,14,25z" fill="#282828" opacity=".25"/><path d="M14,0C6.28,0,0,6.717,0,13.332c0,9.941,13.132,18.169,13.691,18.572C13.78,31.968,13.891,32,14,32 c0.107,0,0.217-0.031,0.305-0.094C14.864,31.511,28,23.45,28,13.332C28,6.717,21.72,0,14,0z" fill="#fff"/><g><g fill="#0b8c61"><path d="m14 0c-7.72 0-14 6.717-14 13.333 0 9.941 13.132 18.169 13.691 18.571 0.089 0.064 0.2 0.096 0.309 0.096 0.107 0 0.217-0.031 0.305-0.094 0.559-0.395 13.695-8.456 13.695-18.573 0-6.616-6.28-13.333-14-13.333zm9.5 12.057c0 0.863-0.567 1.661-1.325 1.942l-1.025 5.889c-0.015 0.976-0.889 1.831-1.94 1.831h-10.466c-1.052 0-1.925-0.855-1.947-1.906l-1.024-5.828c-0.737-0.294-1.273-1.075-1.273-1.928v-0.827c0-1.074 0.874-1.948 1.948-1.948h2.302l1.396-2.247c0.4-0.698 1.417-0.978 2.145-0.555 0.755 0.435 1.015 1.403 0.58 2.159l-0.41 0.642h2.662l-0.39-0.61c-0.227-0.391-0.284-0.823-0.174-1.235 0.109-0.406 0.37-0.745 0.734-0.955 0.716-0.417 1.739-0.148 2.159 0.579l1.381 2.223h2.718c1.074 0 1.948 0.874 1.948 1.948v0.826z"/><rect x="3.6006" y="6.9915" width="20.415" height="15.521"/><rect x="8.9841" y="5.6631" width="10.487" height="3.6356"/></g><text x="5.0698848" y="20.243376" fill="#000000" font-family="sans-serif" font-size="16px" style="line-height:1.25" xml:space="preserve"><tspan x="5.0698848" y="20.243376" fill="#ffffff" font-family="Arial" font-size="16px" font-weight="bold">1+</tspan></text></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 759 B |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 7.7 KiB After Width: | Height: | Size: 7.7 KiB |
|
Before Width: | Height: | Size: 957 B After Width: | Height: | Size: 957 B |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 4.4 KiB After Width: | Height: | Size: 4.4 KiB |
@@ -30,6 +30,7 @@
|
||||
//= require spree
|
||||
//= require admin/spree/spree-select2
|
||||
//= require modernizr
|
||||
//= require spin
|
||||
//= require equalize
|
||||
//= require css_browser_selector_dev
|
||||
//= require responsive-tables
|
||||
@@ -80,11 +81,7 @@
|
||||
//= require moment/nb.js
|
||||
//= require moment/pt-br.js
|
||||
//= require moment/pt.js
|
||||
//= require moment/ru.js
|
||||
//= require moment/sv.js
|
||||
//= require moment/ca.js
|
||||
//= require moment/ar.js
|
||||
//= require moment/tr.js
|
||||
|
||||
// foundation
|
||||
//= require ../shared/mm-foundation-tpls-0.9.0-20180826174721.min.js
|
||||
|
||||
@@ -105,7 +105,6 @@ angular.module("ofn.admin").controller "AdminProductEditCtrl", ($scope, $timeout
|
||||
$scope.producerFilter = "0"
|
||||
$scope.categoryFilter = "0"
|
||||
$scope.importDateFilter = "0"
|
||||
$scope.fetchProducts()
|
||||
|
||||
$scope.$watch 'sortOptions', (sort) ->
|
||||
return unless sort && sort.predicate != ""
|
||||
|
||||
@@ -29,7 +29,7 @@ angular.module("admin.enterprises")
|
||||
# from a directive "nav-check" in the page - if we pass it here it will be called in the test suite,
|
||||
# and on all new uses of this contoller, and we might not want that.
|
||||
enterpriseNavCallback = ->
|
||||
if $scope.enterprise_form?.$dirty
|
||||
if $scope.enterprise_form != undefined && $scope.enterprise_form.$dirty
|
||||
t('admin.unsaved_confirm_leave')
|
||||
|
||||
# Register the NavigationCheck callback
|
||||
|
||||
@@ -2,24 +2,19 @@ angular.module("admin.indexUtils").factory "PagedFetcher", (dataFetcher) ->
|
||||
new class PagedFetcher
|
||||
# Given a URL like http://example.com/foo?page=::page::&per_page=20
|
||||
# And the response includes an attribute pages with the number of pages to fetch
|
||||
# Fetch each page async, and call the pageCallback callback with the resulting data
|
||||
# Developer note: this class should not be re-used!
|
||||
page: 1
|
||||
last_page: 1
|
||||
# Fetch each page async, and call the processData callback with the resulting data
|
||||
fetch: (url, processData, onLastPageComplete) ->
|
||||
dataFetcher(@urlForPage(url, 1)).then (data) =>
|
||||
processData data
|
||||
|
||||
fetch: (url, pageCallback) ->
|
||||
@fetchPages(url, @page, pageCallback)
|
||||
if data.pages > 1
|
||||
for page in [2..data.pages]
|
||||
lastPromise = dataFetcher(@urlForPage(url, page)).then (data) ->
|
||||
processData data
|
||||
onLastPageComplete && lastPromise.then onLastPageComplete
|
||||
return
|
||||
else
|
||||
onLastPageComplete && onLastPageComplete()
|
||||
|
||||
urlForPage: (url, page) ->
|
||||
url.replace("::page::", page)
|
||||
|
||||
fetchPages: (url, page, pageCallback) ->
|
||||
dataFetcher(@urlForPage(url, page)).then (data) =>
|
||||
@page++
|
||||
@last_page = data.pages
|
||||
|
||||
pageCallback(data) if pageCallback
|
||||
|
||||
if @page <= @last_page
|
||||
@fetchPages(url, @page, pageCallback)
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout, $http, $q, StatusMessage, Columns, SortOptions, Dereferencer, Orders, LineItems, Enterprises, OrderCycles, VariantUnitManager, RequestMonitor) ->
|
||||
$scope.initialized = false
|
||||
$scope.RequestMonitor = RequestMonitor
|
||||
$scope.line_items = LineItems.all
|
||||
$scope.filteredLineItems = []
|
||||
$scope.confirmDelete = true
|
||||
$scope.startDate = moment().startOf('day').subtract(7, 'days').format('YYYY-MM-DD')
|
||||
$scope.endDate = moment().startOf('day').format('YYYY-MM-DD')
|
||||
@@ -15,77 +15,50 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
|
||||
$scope.confirmRefresh = ->
|
||||
LineItems.allSaved() || confirm(t("unsaved_changes_warning"))
|
||||
|
||||
$scope.resetFilters = ->
|
||||
$scope.distributorFilter = ''
|
||||
$scope.supplierFilter = ''
|
||||
$scope.orderCycleFilter = ''
|
||||
$scope.quickSearch = ''
|
||||
|
||||
$scope.resetSelectFilters = ->
|
||||
$scope.resetFilters()
|
||||
$scope.refreshData()
|
||||
$scope.distributorFilter = 0
|
||||
$scope.supplierFilter = 0
|
||||
$scope.orderCycleFilter = 0
|
||||
$scope.quickSearch = ""
|
||||
|
||||
$scope.refreshData = ->
|
||||
unless !$scope.orderCycleFilter? || $scope.orderCycleFilter == ''
|
||||
$scope.setOrderCycleDateRange()
|
||||
unless !$scope.orderCycleFilter? || $scope.orderCycleFilter == 0
|
||||
$scope.startDate = moment(OrderCycles.byID[$scope.orderCycleFilter].orders_open_at).format('YYYY-MM-DD')
|
||||
$scope.endDate = moment(OrderCycles.byID[$scope.orderCycleFilter].orders_close_at).startOf('day').format('YYYY-MM-DD')
|
||||
|
||||
$scope.formattedStartDate = moment($scope.startDate).format()
|
||||
$scope.formattedEndDate = moment($scope.endDate).add(1,'day').format()
|
||||
formatted_start_date = moment($scope.startDate).format()
|
||||
formatted_end_date = moment($scope.endDate).add(1,'day').format()
|
||||
|
||||
return unless moment($scope.formattedStartDate).isValid() and moment($scope.formattedEndDate).isValid()
|
||||
|
||||
$scope.loadOrders()
|
||||
$scope.loadLineItems()
|
||||
|
||||
unless $scope.initialized
|
||||
$scope.loadAssociatedData()
|
||||
|
||||
$scope.dereferenceLoadedData()
|
||||
|
||||
$scope.setOrderCycleDateRange = ->
|
||||
start_date = OrderCycles.byID[$scope.orderCycleFilter].orders_open_at
|
||||
end_date = OrderCycles.byID[$scope.orderCycleFilter].orders_close_at
|
||||
format = "YYYY-MM-DD HH:mm:ss Z"
|
||||
$scope.startDate = moment(start_date, format).format('YYYY-MM-DD')
|
||||
$scope.endDate = moment(end_date, format).startOf('day').format('YYYY-MM-DD')
|
||||
|
||||
$scope.loadOrders = ->
|
||||
RequestMonitor.load $scope.orders = Orders.index(
|
||||
"q[state_not_eq]": "canceled",
|
||||
"q[completed_at_not_null]": "true",
|
||||
"q[distributor_id_eq]": $scope.distributorFilter,
|
||||
"q[order_cycle_id_eq]": $scope.orderCycleFilter,
|
||||
"q[completed_at_gteq]": $scope.formattedStartDate,
|
||||
"q[completed_at_lt]": $scope.formattedEndDate
|
||||
"q[completed_at_gteq]": formatted_start_date,
|
||||
"q[completed_at_lt]": formatted_end_date
|
||||
)
|
||||
|
||||
$scope.loadLineItems = ->
|
||||
RequestMonitor.load LineItems.index(
|
||||
"q[order_state_not_eq]": "canceled",
|
||||
"q[order_completed_at_not_null]": "true",
|
||||
"q[order_distributor_id_eq]": $scope.distributorFilter,
|
||||
"q[variant_product_supplier_id_eq]": $scope.supplierFilter,
|
||||
"q[order_order_cycle_id_eq]": $scope.orderCycleFilter,
|
||||
"q[order_completed_at_gteq]": $scope.formattedStartDate,
|
||||
"q[order_completed_at_lt]": $scope.formattedEndDate
|
||||
RequestMonitor.load $scope.lineItems = LineItems.index(
|
||||
"q[order][state_not_eq]": "canceled",
|
||||
"q[order][completed_at_not_null]": "true",
|
||||
"q[order][completed_at_gteq]": formatted_start_date,
|
||||
"q[order][completed_at_lt]": formatted_end_date
|
||||
)
|
||||
|
||||
$scope.loadAssociatedData = ->
|
||||
RequestMonitor.load $scope.distributors = Enterprises.index(action: "visible", ams_prefix: "basic", "q[sells_in][]": ["own", "any"])
|
||||
RequestMonitor.load $scope.orderCycles = OrderCycles.index(ams_prefix: "basic", as: "distributor", "q[orders_close_at_gt]": "#{moment().subtract(90,'days').format()}")
|
||||
RequestMonitor.load $scope.suppliers = Enterprises.index(action: "visible", ams_prefix: "basic", "q[is_primary_producer_eq]": "true")
|
||||
unless $scope.initialized
|
||||
RequestMonitor.load $scope.distributors = Enterprises.index(action: "visible", ams_prefix: "basic", "q[sells_in][]": ["own", "any"])
|
||||
RequestMonitor.load $scope.orderCycles = OrderCycles.index(ams_prefix: "basic", as: "distributor", "q[orders_close_at_gt]": "#{moment().subtract(90,'days').format()}")
|
||||
RequestMonitor.load $scope.suppliers = Enterprises.index(action: "visible", ams_prefix: "basic", "q[is_primary_producer_eq]": "true")
|
||||
|
||||
$scope.dereferenceLoadedData = ->
|
||||
RequestMonitor.load $q.all([$scope.orders.$promise, $scope.distributors.$promise, $scope.orderCycles.$promise, $scope.suppliers.$promise, $scope.line_items.$promise]).then ->
|
||||
RequestMonitor.load $q.all([$scope.orders.$promise, $scope.distributors.$promise, $scope.orderCycles.$promise, $scope.suppliers.$promise, $scope.lineItems.$promise]).then ->
|
||||
Dereferencer.dereferenceAttr $scope.orders, "distributor", Enterprises.byID
|
||||
Dereferencer.dereferenceAttr $scope.orders, "order_cycle", OrderCycles.byID
|
||||
Dereferencer.dereferenceAttr $scope.line_items, "supplier", Enterprises.byID
|
||||
Dereferencer.dereferenceAttr $scope.line_items, "order", Orders.byID
|
||||
Dereferencer.dereferenceAttr $scope.lineItems, "supplier", Enterprises.byID
|
||||
Dereferencer.dereferenceAttr $scope.lineItems, "order", Orders.byID
|
||||
$scope.bulk_order_form.$setPristine()
|
||||
StatusMessage.clear()
|
||||
|
||||
unless $scope.initialized
|
||||
$scope.initialized = true
|
||||
$timeout ->
|
||||
$scope.resetSelectFilters()
|
||||
|
||||
$scope.$watch 'bulk_order_form.$dirty', (newVal, oldVal) ->
|
||||
if newVal == true
|
||||
@@ -104,12 +77,13 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
|
||||
|
||||
$scope.deleteLineItem = (lineItem) ->
|
||||
if ($scope.confirmDelete && confirm(t "are_you_sure")) || !$scope.confirmDelete
|
||||
LineItems.delete lineItem
|
||||
LineItems.delete lineItem, =>
|
||||
$scope.lineItems.splice $scope.lineItems.indexOf(lineItem), 1
|
||||
|
||||
$scope.deleteLineItems = (lineItemsToDelete) ->
|
||||
$scope.deleteLineItems = (lineItems) ->
|
||||
existingState = $scope.confirmDelete
|
||||
$scope.confirmDelete = false
|
||||
$scope.deleteLineItem lineItem for lineItem in lineItemsToDelete when lineItem.checked
|
||||
$scope.deleteLineItem lineItem for lineItem in lineItems when lineItem.checked
|
||||
$scope.confirmDelete = existingState
|
||||
|
||||
$scope.allBoxesChecked = ->
|
||||
@@ -180,5 +154,4 @@ angular.module("admin.lineItems").controller 'LineItemsCtrl', ($scope, $timeout,
|
||||
lineItem.final_weight_volume = LineItems.pristineByID[lineItem.id].final_weight_volume * lineItem.quantity / LineItems.pristineByID[lineItem.id].quantity
|
||||
$scope.weightAdjustedPrice(lineItem)
|
||||
|
||||
$scope.resetFilters()
|
||||
$scope.refreshData()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
angular.module('admin.orderCycles')
|
||||
.controller 'AdminEditOrderCycleCtrl', ($scope, $controller, $filter, $location, $window, OrderCycle, Enterprise, EnterpriseFee, StatusMessage, Schedules, RequestMonitor, NavigationCheck, ocInstance) ->
|
||||
.controller 'AdminEditOrderCycleCtrl', ($scope, $controller, $filter, $location, $window, OrderCycle, Enterprise, EnterpriseFee, StatusMessage, Schedules, RequestMonitor, ocInstance) ->
|
||||
$controller('AdminOrderCycleBasicCtrl', {$scope: $scope, ocInstance: ocInstance})
|
||||
|
||||
order_cycle_id = $location.absUrl().match(/\/admin\/order_cycles\/(\d+)/)[1]
|
||||
@@ -18,12 +18,5 @@ angular.module('admin.orderCycles')
|
||||
|
||||
$scope.submit = ($event, destination) ->
|
||||
$event.preventDefault()
|
||||
NavigationCheck.clear()
|
||||
StatusMessage.display 'progress', t('js.saving')
|
||||
OrderCycle.update(destination, $scope.order_cycle_form)
|
||||
|
||||
warnAboutUnsavedChanges = ->
|
||||
if $scope.order_cycle_form?.$dirty
|
||||
t('admin.unsaved_confirm_leave')
|
||||
|
||||
NavigationCheck.register(warnAboutUnsavedChanges)
|
||||
@@ -23,13 +23,10 @@ angular.module("admin.orders").controller "ordersCtrl", ($scope, $timeout, Reque
|
||||
$scope.fetchResults()
|
||||
|
||||
$scope.fetchResults = (page=1) ->
|
||||
startDateWithTime = $scope.appendStringIfNotEmpty($scope['q']['completed_at_gteq'], ' 00:00:00')
|
||||
endDateWithTime = $scope.appendStringIfNotEmpty($scope['q']['completed_at_lteq'], ' 23:59:59')
|
||||
|
||||
$scope.resetSelected()
|
||||
params = {
|
||||
'q[completed_at_gteq]': startDateWithTime,
|
||||
'q[completed_at_lteq]': endDateWithTime,
|
||||
'q[completed_at_lt]': $scope['q']['completed_at_lt'],
|
||||
'q[completed_at_gt]': $scope['q']['completed_at_gt'],
|
||||
'q[state_eq]': $scope['q']['state_eq'],
|
||||
'q[number_cont]': $scope['q']['number_cont'],
|
||||
'q[email_cont]': $scope['q']['email_cont'],
|
||||
@@ -37,20 +34,15 @@ angular.module("admin.orders").controller "ordersCtrl", ($scope, $timeout, Reque
|
||||
'q[bill_address_lastname_start]': $scope['q']['bill_address_lastname_start'],
|
||||
# Set default checkbox values to null. See: https://github.com/openfoodfoundation/openfoodnetwork/pull/3076#issuecomment-440010498
|
||||
'q[completed_at_not_null]': $scope['q']['completed_at_not_null'] || null,
|
||||
'q[distributor_id_in][]': $scope['q']['distributor_id_in'],
|
||||
'q[order_cycle_id_in][]': $scope['q']['order_cycle_id_in'],
|
||||
'q[distributor_id_in]': $scope['q']['distributor_id_in'],
|
||||
'q[order_cycle_id_in]': $scope['q']['order_cycle_id_in'],
|
||||
'q[order_cycle_id_in]': $scope['q']['order_cycle_id_in'],
|
||||
'q[s]': $scope.sorting || 'completed_at desc',
|
||||
shipping_method_id: $scope.shipping_method_id,
|
||||
per_page: $scope.per_page,
|
||||
page: page
|
||||
}
|
||||
RequestMonitor.load(Orders.index(params).$promise)
|
||||
|
||||
$scope.appendStringIfNotEmpty = (baseString, stringToAppend) ->
|
||||
return baseString unless baseString
|
||||
|
||||
baseString + stringToAppend
|
||||
|
||||
$scope.resetSelected = ->
|
||||
$scope.selected_orders.length = 0
|
||||
$scope.selected = false
|
||||
@@ -75,7 +67,7 @@ angular.module("admin.orders").controller "ordersCtrl", ($scope, $timeout, Reque
|
||||
return unless sort && sort.predicate != ""
|
||||
|
||||
$scope.sorting = sort.getSortingExpr()
|
||||
$scope.fetchResults()
|
||||
$scope.fetchProducts()
|
||||
, true
|
||||
|
||||
$scope.capturePayment = (order) ->
|
||||
|
||||
@@ -14,10 +14,9 @@ angular.module("admin.payments").factory 'AdminStripeElements', ($rootScope, Sta
|
||||
@stripe.createToken(@card, cardData).then (response) =>
|
||||
if(response.error)
|
||||
StatusMessage.display 'error', response.error.message
|
||||
console.error(JSON.stringify(response.error))
|
||||
else
|
||||
secrets.token = response.token.id
|
||||
secrets.cc_type = @mapTokenApiCardBrand(response.token.card.brand)
|
||||
secrets.cc_type = @mapCC(response.token.card.brand)
|
||||
secrets.card = response.token.card
|
||||
submit()
|
||||
|
||||
@@ -30,16 +29,15 @@ angular.module("admin.payments").factory 'AdminStripeElements', ($rootScope, Sta
|
||||
@stripe.createPaymentMethod({ type: 'card', card: @card }, @card, cardData).then (response) =>
|
||||
if(response.error)
|
||||
StatusMessage.display 'error', response.error.message
|
||||
console.error(JSON.stringify(response.error))
|
||||
else
|
||||
secrets.token = response.paymentMethod.id
|
||||
secrets.cc_type = @mapPaymentMethodsApiCardBrand(response.paymentMethod.card.brand)
|
||||
secrets.cc_type = response.paymentMethod.card.brand
|
||||
secrets.card = response.paymentMethod.card
|
||||
submit()
|
||||
|
||||
# Maps the brand returned by Stripe's tokenAPI to that required by activemerchant
|
||||
mapTokenApiCardBrand: (cardBrand) ->
|
||||
switch cardBrand
|
||||
# Maps the brand returned by Stripe to that required by activemerchant
|
||||
mapCC: (ccType) ->
|
||||
switch ccType
|
||||
when 'MasterCard' then return 'master'
|
||||
when 'Visa' then return 'visa'
|
||||
when 'American Express' then return 'american_express'
|
||||
@@ -47,14 +45,6 @@ angular.module("admin.payments").factory 'AdminStripeElements', ($rootScope, Sta
|
||||
when 'JCB' then return 'jcb'
|
||||
when 'Diners Club' then return 'diners_club'
|
||||
|
||||
# Maps the brand returned by Stripe's paymentMethodsAPI to that required by activemerchant
|
||||
mapPaymentMethodsApiCardBrand: (cardBrand) ->
|
||||
switch cardBrand
|
||||
when 'mastercard' then return 'master'
|
||||
when 'amex' then return 'american_express'
|
||||
when 'diners' then return 'diners_club'
|
||||
else return cardBrand # a few brands are equal, for example, visa
|
||||
|
||||
# It doesn't matter if any of these are nil, all are optional.
|
||||
makeCardData: (secrets) ->
|
||||
{'name': secrets.name,
|
||||
|
||||
@@ -2,6 +2,7 @@ angular.module("admin.resources").factory 'LineItemResource', ($resource) ->
|
||||
$resource('/admin/bulk_line_items/:id.json', {}, {
|
||||
'index':
|
||||
method: 'GET'
|
||||
isArray: true
|
||||
'update':
|
||||
method: 'PUT'
|
||||
transformRequest: (data, headersGetter) =>
|
||||
|
||||
@@ -1,27 +1,20 @@
|
||||
angular.module("admin.resources").factory 'LineItems', ($q, LineItemResource) ->
|
||||
new class LineItems
|
||||
all: []
|
||||
byID: {}
|
||||
pristineByID: {}
|
||||
pagination: {}
|
||||
|
||||
index: (params={}, callback=null) ->
|
||||
request = LineItemResource.index params, (data) =>
|
||||
LineItemResource.index params, (data) =>
|
||||
@load(data)
|
||||
(callback || angular.noop)(data)
|
||||
@all.$promise = request.$promise
|
||||
@all
|
||||
|
||||
resetData: ->
|
||||
@all.length = 0
|
||||
@byID = {}
|
||||
@pristineByID = {}
|
||||
|
||||
load: (data) ->
|
||||
angular.extend(@pagination, data.pagination)
|
||||
load: (lineItems) ->
|
||||
@resetData()
|
||||
for lineItem in data.line_items
|
||||
@all.push lineItem
|
||||
for lineItem in lineItems
|
||||
@byID[lineItem.id] = lineItem
|
||||
@pristineByID[lineItem.id] = angular.copy(lineItem)
|
||||
|
||||
@@ -32,9 +25,8 @@ angular.module("admin.resources").factory 'LineItems', ($q, LineItemResource) ->
|
||||
|
||||
save: (lineItem) ->
|
||||
deferred = $q.defer()
|
||||
lineItemResource = new LineItemResource(lineItem)
|
||||
lineItem.errors = {}
|
||||
lineItemResource.$update({id: lineItem.id})
|
||||
lineItem.$update({id: lineItem.id})
|
||||
.then( (data) =>
|
||||
@pristineByID[lineItem.id] = angular.copy(lineItem)
|
||||
deferred.resolve(data)
|
||||
@@ -62,10 +54,8 @@ angular.module("admin.resources").factory 'LineItems', ($q, LineItemResource) ->
|
||||
|
||||
delete: (lineItem, callback=null) ->
|
||||
deferred = $q.defer()
|
||||
lineItemResource = new LineItemResource(lineItem)
|
||||
lineItemResource.$delete({id: lineItem.id})
|
||||
lineItem.$delete({id: lineItem.id})
|
||||
.then( (data) =>
|
||||
@all.splice(@all.indexOf(lineItem),1)
|
||||
delete @byID[lineItem.id]
|
||||
delete @pristineByID[lineItem.id]
|
||||
(callback || angular.noop)(data)
|
||||
|
||||
@@ -4,6 +4,7 @@ angular.module("admin.side_menu")
|
||||
items: []
|
||||
selected: null
|
||||
|
||||
|
||||
# Checks for path and uses it to set the view
|
||||
# If no path, loads first view
|
||||
init: =>
|
||||
@@ -30,3 +31,11 @@ angular.module("admin.side_menu")
|
||||
for item in @items when item.name is name
|
||||
return item
|
||||
null
|
||||
|
||||
hide_item_by_name: (name) =>
|
||||
item = @find_by_name(name)
|
||||
item.visible = false if item
|
||||
|
||||
show_item_by_name: (name) =>
|
||||
item = @find_by_name(name)
|
||||
item.visible = true if item
|
||||
|
||||
@@ -1,7 +1,27 @@
|
||||
$(document).ready ->
|
||||
opts =
|
||||
lines: 11
|
||||
length: 2
|
||||
width: 3
|
||||
radius: 9
|
||||
corners: 1
|
||||
rotate: 0
|
||||
color: '#fff'
|
||||
speed: 0.8
|
||||
trail: 48
|
||||
shadow: false
|
||||
hwaccel: true
|
||||
className: 'spinner'
|
||||
zIndex: 2e9
|
||||
top: 'auto'
|
||||
left: 'auto'
|
||||
|
||||
target = document.getElementById("spinner")
|
||||
|
||||
$(document).ajaxStart ->
|
||||
$("#progress").fadeIn()
|
||||
spinner = new Spinner(opts).spin(target)
|
||||
|
||||
$(document).ajaxStop ->
|
||||
$("#progress").fadeOut()
|
||||
$("#progress").fadeOut()
|
||||
|
||||
|
||||
@@ -43,11 +43,12 @@ angular.module("admin.variantOverrides").controller "AdminVariantOverridesCtrl",
|
||||
|
||||
$scope.fetchProducts = ->
|
||||
url = "/api/products/overridable?page=::page::;per_page=100"
|
||||
PagedFetcher.fetch url, $scope.addProducts
|
||||
PagedFetcher.fetch url, (data) => $scope.addProducts data.products
|
||||
|
||||
$scope.addProducts = (data) ->
|
||||
$scope.products = $scope.products.concat data.products
|
||||
VariantOverrides.ensureDataFor hubs, data.products
|
||||
|
||||
$scope.addProducts = (products) ->
|
||||
$scope.products = $scope.products.concat products
|
||||
VariantOverrides.ensureDataFor hubs, products
|
||||
|
||||
$scope.displayDirty = ->
|
||||
if DirtyVariantOverrides.count() > 0
|
||||
|
||||
@@ -1,18 +1,14 @@
|
||||
#= require jquery
|
||||
#= require jquery_ujs
|
||||
#= require jquery.ui.all
|
||||
#= require spin
|
||||
#
|
||||
#= require angular
|
||||
#= require angular-cookies
|
||||
#= require angular-sanitize
|
||||
#= require angular-animate
|
||||
#= require angular-resource
|
||||
#= require autocomplete.min.js
|
||||
#= require leaflet-1.6.0.js
|
||||
#= require leaflet-providers.js
|
||||
#= require lodash.underscore.js
|
||||
# bluebird.js is a dependency of angular-google-maps.js 2.0.0
|
||||
#= require bluebird.js
|
||||
#= require angular-scroll.min.js
|
||||
#= require angular-google-maps.min.js
|
||||
#= require ../shared/mm-foundation-tpls-0.9.0-20180826174721.min.js
|
||||
@@ -37,11 +33,7 @@
|
||||
#= require moment/nb.js
|
||||
#= require moment/pt-br.js
|
||||
#= require moment/pt.js
|
||||
#= require moment/ru.js
|
||||
#= require moment/sv.js
|
||||
#= require moment/ca.js
|
||||
#= require moment/ar.js
|
||||
#= require moment/tr.js
|
||||
#
|
||||
#= require modernizr
|
||||
#
|
||||
|
||||
@@ -1,4 +1,2 @@
|
||||
Darkswarm.controller "CartCtrl", ($scope, Cart, CurrentHub) ->
|
||||
Darkswarm.controller "CartCtrl", ($scope, Cart, $timeout) ->
|
||||
$scope.Cart = Cart
|
||||
$scope.CurrentHub = CurrentHub
|
||||
$scope.max_characters = 20
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
Darkswarm.controller "CartDropdownCtrl", ($scope, Cart, BodyScroll) ->
|
||||
$scope.Cart = Cart
|
||||
$scope.showCartSidebar = false
|
||||
|
||||
$scope.toggleCartSidebar = ->
|
||||
$scope.showCartSidebar = !$scope.showCartSidebar
|
||||
BodyScroll.toggle()
|
||||
@@ -1,2 +0,0 @@
|
||||
Darkswarm.controller "CartFormCtrl", ($scope) ->
|
||||
|
||||
@@ -9,13 +9,8 @@ Darkswarm.controller "EnterprisesCtrl", ($scope, $rootScope, $timeout, $location
|
||||
$scope.show_closed = false
|
||||
$scope.filtersActive = false
|
||||
$scope.distanceMatchesShown = false
|
||||
$scope.closed_shops_loading = false
|
||||
$scope.closed_shops_loaded = false
|
||||
|
||||
$scope.$watch "query", (query)->
|
||||
$scope.resetSearch(query)
|
||||
|
||||
$scope.resetSearch = (query) ->
|
||||
Enterprises.flagMatching query
|
||||
Search.search query
|
||||
$rootScope.$broadcast 'enterprisesChanged'
|
||||
@@ -24,7 +19,6 @@ Darkswarm.controller "EnterprisesCtrl", ($scope, $rootScope, $timeout, $location
|
||||
$timeout ->
|
||||
Enterprises.calculateDistance query, $scope.firstNameMatch()
|
||||
$rootScope.$broadcast 'enterprisesChanged'
|
||||
$scope.closed_shops_loading = false
|
||||
|
||||
$timeout ->
|
||||
if $location.search()['show_closed']?
|
||||
@@ -79,12 +73,6 @@ Darkswarm.controller "EnterprisesCtrl", ($scope, $rootScope, $timeout, $location
|
||||
undefined
|
||||
|
||||
$scope.showClosedShops = ->
|
||||
unless $scope.closed_shops_loaded
|
||||
$scope.closed_shops_loading = true
|
||||
$scope.closed_shops_loaded = true
|
||||
Enterprises.loadClosedEnterprises().then ->
|
||||
$scope.resetSearch($scope.query)
|
||||
|
||||
$scope.show_closed = true
|
||||
$location.search('show_closed', '1')
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
Darkswarm.controller "GroupPageCtrl", ($scope, enterprises, Enterprises) ->
|
||||
Darkswarm.controller "GroupPageCtrl", ($scope, enterprises, Enterprises, MapConfiguration, OfnMap) ->
|
||||
$scope.Enterprises = Enterprises
|
||||
|
||||
$scope.map = angular.copy MapConfiguration.options
|
||||
$scope.mapMarkers = OfnMap.enterprise_markers enterprises
|
||||
$scope.embedded_layout = window.location.search.indexOf("embedded_shopfront=true") != -1
|
||||
|
||||
@@ -24,7 +24,7 @@ Darkswarm.controller "HubNodeCtrl", ($scope, HashNavigation, CurrentHub, $http,
|
||||
$scope.shopfront_loading = true
|
||||
$scope.toggle_tab(event)
|
||||
|
||||
$http.get("/api/shops/" + $scope.hub.id)
|
||||
$http.get("/api/enterprises/" + $scope.hub.id + "/shopfront")
|
||||
.success (data) ->
|
||||
$scope.shopfront_loading = false
|
||||
$scope.hub = data
|
||||
|
||||
@@ -24,7 +24,7 @@ Darkswarm.controller "ProducerNodeCtrl", ($scope, HashNavigation, $anchorScroll,
|
||||
$scope.shopfront_loading = true
|
||||
$scope.toggle_tab(event)
|
||||
|
||||
$http.get("/api/shops/" + $scope.producer.id)
|
||||
$http.get("/api/enterprises/" + $scope.producer.id + "/shopfront")
|
||||
.success (data) ->
|
||||
$scope.shopfront_loading = false
|
||||
$scope.producer = data
|
||||
|
||||
@@ -2,5 +2,6 @@ Darkswarm.controller "ProductNodeCtrl", ($scope, $modal, FilterSelectorsService)
|
||||
$scope.enterprise = $scope.product.supplier # For the modal, so it's consistent
|
||||
|
||||
$scope.triggerProductModal = ->
|
||||
$scope.productTaxonSelectors = FilterSelectorsService.createSelectors()
|
||||
$scope.productPropertySelectors = FilterSelectorsService.createSelectors()
|
||||
$modal.open(templateUrl: "product_modal.html", scope: $scope)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.controller "ProductsCtrl", ($scope, $sce, $filter, $rootScope, Products, OrderCycle, OrderCycleResource, FilterSelectorsService, Cart, Dereferencer, Taxons, Properties, currentHub, $timeout) ->
|
||||
Darkswarm.controller "ProductsCtrl", ($scope, $filter, $rootScope, Products, OrderCycle, OrderCycleResource, FilterSelectorsService, Cart, Dereferencer, Taxons, Properties, currentHub, $timeout) ->
|
||||
$scope.Products = Products
|
||||
$scope.Cart = Cart
|
||||
$scope.query = ""
|
||||
@@ -10,7 +10,6 @@ Darkswarm.controller "ProductsCtrl", ($scope, $sce, $filter, $rootScope, Product
|
||||
$scope.order_cycle = OrderCycle.order_cycle
|
||||
$scope.supplied_taxons = null
|
||||
$scope.supplied_properties = null
|
||||
$scope.showFilterSidebar = false
|
||||
|
||||
$rootScope.$on "orderCycleSelected", ->
|
||||
$scope.update_filters()
|
||||
@@ -76,24 +75,15 @@ Darkswarm.controller "ProductsCtrl", ($scope, $sce, $filter, $rootScope, Product
|
||||
$scope.appliedTaxonsList = ->
|
||||
$scope.activeTaxons.map( (taxon_id) ->
|
||||
Taxons.taxons_by_id[taxon_id].name
|
||||
).join($scope.filtersJoinWord()) if $scope.activeTaxons?
|
||||
).join(" #{t('products_or')} ") if $scope.activeTaxons?
|
||||
|
||||
$scope.appliedPropertiesList = ->
|
||||
$scope.activeProperties.map( (property_id) ->
|
||||
Properties.properties_by_id[property_id].name
|
||||
).join($scope.filtersJoinWord()) if $scope.activeProperties?
|
||||
|
||||
$scope.filtersJoinWord = ->
|
||||
$sce.trustAsHtml(" <span class='join-word'>#{t('products_or')}</span> ")
|
||||
).join(" #{t('products_or')} ") if $scope.activeProperties?
|
||||
|
||||
$scope.clearAll = ->
|
||||
$scope.clearQuery()
|
||||
$scope.clearFilters()
|
||||
|
||||
$scope.clearQuery = ->
|
||||
$scope.query = ""
|
||||
|
||||
$scope.clearFilters = ->
|
||||
$scope.taxonSelectors.clearAll()
|
||||
$scope.propertySelectors.clearAll()
|
||||
|
||||
@@ -104,9 +94,3 @@ Darkswarm.controller "ProductsCtrl", ($scope, $sce, $filter, $rootScope, Product
|
||||
$scope.Products.products = []
|
||||
$scope.update_filters()
|
||||
$scope.loadProducts()
|
||||
|
||||
$scope.filtersCount = () ->
|
||||
$scope.taxonSelectors.totalActive() + $scope.propertySelectors.totalActive()
|
||||
|
||||
$scope.toggleFilterSidebar = ->
|
||||
$scope.showFilterSidebar = !$scope.showFilterSidebar
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
Darkswarm.controller "ProducersTabCtrl", ($scope, Shopfront) ->
|
||||
Darkswarm.controller "ProducersTabCtrl", ($scope, Shopfront, EnterpriseModal) ->
|
||||
$scope.shopfront = Shopfront.shopfront
|
||||
|
||||
@@ -7,7 +7,7 @@ window.Darkswarm = angular.module("Darkswarm", [
|
||||
'templates',
|
||||
'ngSanitize',
|
||||
'ngAnimate',
|
||||
'uiGmapgoogle-maps',
|
||||
'google-maps',
|
||||
'duScroll',
|
||||
'angularFileUpload',
|
||||
'angularSlideables'
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
Darkswarm.directive "bodyScroll", ($rootScope, BodyScroll) ->
|
||||
restrict: 'A'
|
||||
scope: true
|
||||
link: (scope, elem, attrs) ->
|
||||
$rootScope.$on "toggleBodyScroll", ->
|
||||
if BodyScroll.disabled
|
||||
elem.addClass "disable-scroll"
|
||||
else
|
||||
elem.removeClass "disable-scroll"
|
||||
@@ -0,0 +1,19 @@
|
||||
Darkswarm.directive "cartToggle", ($document) ->
|
||||
# Toggles visibility of the "cart" popover
|
||||
restrict: 'A'
|
||||
link: (scope, elem, attr)->
|
||||
scope.open = false
|
||||
|
||||
$document.bind 'click', (event) ->
|
||||
cart_button = elem[0]
|
||||
element_and_parents = [event.target, event.target.parentElement, event.target.parentElement.parentElement]
|
||||
cart_button_clicked = (element_and_parents.indexOf(cart_button) != -1)
|
||||
|
||||
if cart_button_clicked
|
||||
scope.$apply ->
|
||||
scope.open = !scope.open
|
||||
else
|
||||
scope.$apply ->
|
||||
scope.open = false
|
||||
|
||||
return
|
||||
@@ -1,11 +0,0 @@
|
||||
Darkswarm.directive "darkerBackground", ->
|
||||
restrict: "A"
|
||||
link: (scope, elm, attr)->
|
||||
toggleClass = (value) ->
|
||||
elm.closest('.page-view').toggleClass("with-darker-background", value)
|
||||
|
||||
toggleClass(true)
|
||||
|
||||
# if an OrderCycle is selected, disable darker background
|
||||
scope.$watch 'order_cycle.order_cycle_id', (newvalue, oldvalue) ->
|
||||
toggleClass(false) if newvalue
|
||||
@@ -1,12 +0,0 @@
|
||||
# Allows disabling of link buttons via disabled attribute.
|
||||
# This is normally ignored, ie the link appears disabled but is still clickable.
|
||||
|
||||
Darkswarm.directive "disableDynamically", ->
|
||||
restrict: 'A'
|
||||
|
||||
link: (scope, element, attrs) ->
|
||||
element.on 'click', (e) ->
|
||||
if attrs.disabled
|
||||
e.preventDefault()
|
||||
return
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
Darkswarm.directive "disableEnterWithBlur", ()->
|
||||
# Stops enter from doing normal enter things, and blurs the input
|
||||
restrict: 'A'
|
||||
link: (scope, element, attrs)->
|
||||
element.bind "keydown keypress", (e)->
|
||||
code = e.keyCode || e.which
|
||||
if code == 13
|
||||
element.blur()
|
||||
e.preventDefault()
|
||||
@@ -7,4 +7,4 @@ Darkswarm.directive "enterpriseModal", (EnterpriseModal) ->
|
||||
elem.on "click", (event) =>
|
||||
event.stopPropagation()
|
||||
|
||||
scope.modalInstance = EnterpriseModal.open scope.enterprise
|
||||
scope.modalInstance = EnterpriseModal.open scope.enterprise
|
||||
@@ -1,6 +0,0 @@
|
||||
Darkswarm.directive "focusSearch", ->
|
||||
restrict: 'A'
|
||||
link: (scope, element, attr)->
|
||||
element.bind 'click', (event) ->
|
||||
# Focus seach field, ready for typing
|
||||
$(element).siblings('#search').focus()
|
||||
@@ -1,6 +1,6 @@
|
||||
Darkswarm.directive 'mapOsmTiles', ($timeout) ->
|
||||
restrict: 'E'
|
||||
require: '^uiGmapGoogleMap'
|
||||
require: '^googleMap'
|
||||
scope: {}
|
||||
link: (scope, elem, attrs, ctrl) ->
|
||||
$timeout =>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Darkswarm.directive 'mapSearch', ($timeout, Search) ->
|
||||
# Install a basic search field in a map
|
||||
restrict: 'E'
|
||||
require: ['^uiGmapGoogleMap', 'ngModel']
|
||||
require: ['^googleMap', 'ngModel']
|
||||
replace: true
|
||||
template: '<input id="pac-input" ng-model="query" placeholder="' + t('location_placeholder') + '"></input>'
|
||||
scope: {}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
Darkswarm.directive "ofnOnHand", (StockQuantity) ->
|
||||
Darkswarm.directive "ofnOnHand", ->
|
||||
restrict: 'A'
|
||||
require: "ngModel"
|
||||
scope: true
|
||||
|
||||
link: (scope, elem, attr, ngModel) ->
|
||||
# In cases where this field gets its value from the HTML element rather than the model,
|
||||
@@ -24,4 +23,6 @@ Darkswarm.directive "ofnOnHand", (StockQuantity) ->
|
||||
viewValue
|
||||
|
||||
scope.available_quantity = ->
|
||||
StockQuantity.available_quantity(attr.ofnOnHand, attr.finalizedquantity)
|
||||
on_hand = parseInt(attr.ofnOnHand)
|
||||
finalized_quantity = parseInt(attr.finalizedquantity) || 0 # finalizedquantity is optional
|
||||
on_hand + finalized_quantity
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
Darkswarm.directive 'ofnOpenStreetMap', ($window, Enterprises, EnterpriseModal, availableCountries, openStreetMapConfig) ->
|
||||
restrict: 'E'
|
||||
replace: true
|
||||
scope: true
|
||||
template: "<div></div>"
|
||||
|
||||
link: (scope, element, attrs, ctrl, transclude)->
|
||||
map = null
|
||||
markers = []
|
||||
enterpriseNames = []
|
||||
openStreetMapProviderName = openStreetMapConfig.open_street_map_provider_name
|
||||
openStreetMapProviderOptions = JSON.parse(openStreetMapConfig.open_street_map_provider_options)
|
||||
|
||||
average = (values) ->
|
||||
total = values.reduce (sum, value) ->
|
||||
sum = sum + value
|
||||
, 0
|
||||
total / values.length
|
||||
|
||||
averageAngle = (angleName) ->
|
||||
positiveAngles = []
|
||||
negativeAngles = []
|
||||
for enterprise in Enterprises.enterprises
|
||||
if enterprise.latitude? && enterprise.longitude?
|
||||
if enterprise[angleName] > 0
|
||||
positiveAngles.push(enterprise[angleName])
|
||||
else
|
||||
negativeAngles.push(enterprise[angleName])
|
||||
|
||||
averageNegativeAngle = average(negativeAngles)
|
||||
averagePositiveAngle = average(positiveAngles)
|
||||
|
||||
if negativeAngles.length == 0
|
||||
averagePositiveAngle
|
||||
else if positiveAngles.length == 0
|
||||
averageNegativeAngle
|
||||
else if averagePositiveAngle > averageNegativeAngle
|
||||
averagePositiveAngle - averageNegativeAngle
|
||||
else
|
||||
averageNegativeAngle - averagePositiveAngle
|
||||
|
||||
buildMarker = (enterprise, latlng, title) ->
|
||||
icon = L.icon
|
||||
iconUrl: enterprise.icon
|
||||
marker = L.marker latlng,
|
||||
draggable: true,
|
||||
icon: icon,
|
||||
riseOnHover: true,
|
||||
title: title
|
||||
marker.on "click", ->
|
||||
EnterpriseModal.open enterprise
|
||||
marker
|
||||
|
||||
enterpriseName = (enterprise) ->
|
||||
return enterprise.name + " (" + enterprise.address.address1 + ", " + enterprise.address.city + ", " + enterprise.address.state_name + ")";
|
||||
|
||||
goToEnterprise = (selectedEnterpriseName) ->
|
||||
enterprise = Enterprises.enterprises.find (enterprise) ->
|
||||
enterpriseName(enterprise) == selectedEnterpriseName
|
||||
map.setView([enterprise.latitude, enterprise.longitude], 12)
|
||||
|
||||
displayMap = ->
|
||||
setMapDimensions()
|
||||
averageLatitude = averageAngle("latitude")
|
||||
averageLongitude = averageAngle("longitude")
|
||||
zoomLevel = 6
|
||||
map = L.map('open-street-map')
|
||||
L.tileLayer.provider(openStreetMapProviderName, openStreetMapProviderOptions).addTo(map)
|
||||
map.setView([averageLatitude, averageLongitude], zoomLevel)
|
||||
|
||||
displayEnterprises = ->
|
||||
for enterprise in Enterprises.enterprises
|
||||
if enterprise.latitude? && enterprise.longitude?
|
||||
marker = buildMarker(enterprise, { lat: enterprise.latitude, lng: enterprise.longitude }, enterprise.name).addTo(map)
|
||||
enterpriseNames.push(enterpriseName(enterprise))
|
||||
markers.push(marker)
|
||||
|
||||
displaySearchField = () ->
|
||||
new Autocomplete('#open-street-map--search',
|
||||
onSubmit: goToEnterprise
|
||||
search: searchEnterprises
|
||||
)
|
||||
overwriteInlinePositionRelativeToPositionSearchField = ->
|
||||
$('#open-street-map--search').css("position", "absolute")
|
||||
overwriteInlinePositionRelativeToPositionSearchField()
|
||||
|
||||
searchEnterprises = (input) ->
|
||||
if input.length < 1
|
||||
return []
|
||||
enterpriseNames.filter (country) ->
|
||||
country.toLowerCase().includes input.toLowerCase()
|
||||
|
||||
setMapDimensions = ->
|
||||
height = $window.innerHeight - element.offset().top
|
||||
element.css "width", "100%"
|
||||
element.css "height", (height + "px")
|
||||
|
||||
displayMap()
|
||||
displayEnterprises()
|
||||
displaySearchField()
|
||||
@@ -14,8 +14,8 @@ Darkswarm.directive "ofnPageAlert", ($timeout) ->
|
||||
# Wait a moment after page load before showing the alert. Otherwise we often miss the
|
||||
# start of the animation.
|
||||
$timeout ->
|
||||
container_elems.addClass("move-up")
|
||||
container_elems.addClass("move-down")
|
||||
, 1000
|
||||
|
||||
scope.close = ->
|
||||
container_elems.removeClass("move-up")
|
||||
container_elems.removeClass("move-down")
|
||||
|
||||
@@ -5,9 +5,5 @@ Darkswarm.directive "shopVariant", ->
|
||||
scope:
|
||||
variant: '='
|
||||
controller: ($scope, Cart) ->
|
||||
$scope.$watchGroup [
|
||||
'variant.line_item.quantity',
|
||||
'variant.line_item.max_quantity'
|
||||
], (new_value, old_value) ->
|
||||
return if old_value[0] == null && new_value[0] == null
|
||||
$scope.$watchGroup ['variant.line_item.quantity', 'variant.line_item.max_quantity'], ->
|
||||
Cart.adjust($scope.variant.line_item)
|
||||
|
||||
@@ -10,5 +10,6 @@ Darkswarm.directive "ofnSmoothScrollTo", ($location, $document)->
|
||||
# Scrolling is confused by our position:fixed top bar and page alert bar
|
||||
# - add an offset to scroll to the correct location, plus 5px buffer
|
||||
offset = $("nav.top-bar").height()
|
||||
offset += $(".page-alert.move-down").height()
|
||||
offset += 5
|
||||
$document.scrollTo target, offset, 1000
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
Darkswarm.directive "validateStockQuantity", (StockQuantity) ->
|
||||
restrict: 'A'
|
||||
require: "ngModel"
|
||||
scope: true
|
||||
|
||||
link: (scope, element, attr, ngModel) ->
|
||||
ngModel.$parsers.push (selectedQuantity) ->
|
||||
valid_number = parseInt(selectedQuantity) != NaN
|
||||
valid_quantity = parseInt(selectedQuantity) <= scope.available_quantity()
|
||||
|
||||
ngModel.$setValidity('stock', (valid_number && valid_quantity) );
|
||||
|
||||
selectedQuantity
|
||||
|
||||
scope.available_quantity = ->
|
||||
StockQuantity.available_quantity(attr.ofnOnHand, attr.finalizedquantity)
|
||||
@@ -12,4 +12,4 @@ Darkswarm.filter "sensible_timeframe", (date_in_wordsFilter)->
|
||||
if moment().add(2, 'days') < moment(date, dateFormat)
|
||||
t 'orders_open'
|
||||
else
|
||||
t('closing') + ' ' + date_in_wordsFilter(date)
|
||||
t('closing') + date_in_wordsFilter(date)
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
angular.module("Darkswarm").factory "BodyScroll", ($rootScope) ->
|
||||
new class BodyScroll
|
||||
disabled: false
|
||||
|
||||
toggle: ->
|
||||
@disabled = !@disabled
|
||||
$rootScope.$broadcast "toggleBodyScroll"
|
||||
@@ -1,4 +1,4 @@
|
||||
Darkswarm.factory 'Cart', (CurrentOrder, Variants, $timeout, $http, $modal, $rootScope, $resource, localStorageService, RailsFlashLoader) ->
|
||||
Darkswarm.factory 'Cart', (CurrentOrder, Variants, $timeout, $http, $modal, $rootScope, $resource, localStorageService) ->
|
||||
# Handles syncing of current cart/order state to server
|
||||
new class Cart
|
||||
dirty: false
|
||||
@@ -50,7 +50,7 @@ Darkswarm.factory 'Cart', (CurrentOrder, Variants, $timeout, $http, $modal, $roo
|
||||
@popQueue() if @update_enqueued
|
||||
|
||||
.error (response, status)=>
|
||||
RailsFlashLoader.loadFlash({error: t('js.cart.add_to_cart_failed')})
|
||||
@scheduleRetry(status)
|
||||
@update_running = false
|
||||
|
||||
compareAndNotifyStockLevels: (stockLevels) =>
|
||||
@@ -87,6 +87,13 @@ Darkswarm.factory 'Cart', (CurrentOrder, Variants, $timeout, $http, $modal, $roo
|
||||
max_quantity: li.max_quantity
|
||||
{variants: variants}
|
||||
|
||||
scheduleRetry: (status) =>
|
||||
console.log "Error updating cart: #{status}. Retrying in 3 seconds..."
|
||||
$timeout =>
|
||||
console.log "Retrying cart update"
|
||||
@orderChanged()
|
||||
, 3000
|
||||
|
||||
saved: =>
|
||||
@dirty = false
|
||||
$(window).unbind "beforeunload"
|
||||
|
||||
@@ -14,32 +14,15 @@ Darkswarm.factory 'Checkout', ($injector, CurrentOrder, ShippingMethods, StripeE
|
||||
|
||||
submit: =>
|
||||
Loading.message = t 'submitting_order'
|
||||
$http.put('/checkout.json', {order: @preprocess()})
|
||||
.then (response) =>
|
||||
Navigation.go response.data.path
|
||||
.catch (response) =>
|
||||
try
|
||||
@handle_checkout_error_response(response)
|
||||
catch error
|
||||
try
|
||||
@loadFlash(error: t("checkout.failed")) # inform the user about the unexpected error
|
||||
finally
|
||||
throw error # generate a BugsnagJS alert
|
||||
|
||||
handle_checkout_error_response: (response) =>
|
||||
throw response unless response.data?
|
||||
|
||||
if response.data.path?
|
||||
Navigation.go response.data.path
|
||||
else
|
||||
throw response unless response.data.flash?
|
||||
|
||||
@errors = response.data.errors
|
||||
@loadFlash(response.data.flash)
|
||||
|
||||
loadFlash: (flash) =>
|
||||
Loading.clear()
|
||||
RailsFlashLoader.loadFlash(flash)
|
||||
$http.put('/checkout.json', {order: @preprocess()}).success (data, status)=>
|
||||
Navigation.go data.path
|
||||
.error (response, status)=>
|
||||
if response.path
|
||||
Navigation.go response.path
|
||||
else
|
||||
Loading.clear()
|
||||
@errors = response.errors
|
||||
RailsFlashLoader.loadFlash(response.flash)
|
||||
|
||||
# Rails wants our Spree::Address data to be provided with _attributes
|
||||
preprocess: ->
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
Darkswarm.factory "EnterpriseListModal", ($modal, $rootScope, $http, EnterpriseModal)->
|
||||
new class EnterpriseListModal
|
||||
open: (enterprises)->
|
||||
scope = $rootScope.$new(true)
|
||||
scope.enterprises = enterprises
|
||||
scope.openModal = EnterpriseModal.open
|
||||
if Object.keys(enterprises).length > 1
|
||||
$modal.open(templateUrl: "enterprise_list_modal.html", scope: scope)
|
||||
else
|
||||
EnterpriseModal.open enterprises[Object.keys(enterprises)[0]]
|
||||
@@ -5,7 +5,7 @@ Darkswarm.factory "EnterpriseModal", ($modal, $rootScope, $http)->
|
||||
scope = $rootScope.$new(true) # Spawn an isolate to contain the enterprise
|
||||
scope.embedded_layout = window.location.search.indexOf("embedded_shopfront=true") != -1
|
||||
|
||||
$http.get("/api/shops/" + enterprise.id).success (data) ->
|
||||
$http.get("/api/enterprises/" + enterprise.id + "/shopfront").success (data) ->
|
||||
scope.enterprise = data
|
||||
$modal.open(templateUrl: "enterprise_modal.html", scope: scope)
|
||||
.error (data) ->
|
||||
|
||||
@@ -1,30 +1,27 @@
|
||||
Darkswarm.factory 'Enterprises', (enterprises, ShopsResource, CurrentHub, Taxons, Dereferencer, Matcher, GmapsGeo, $rootScope) ->
|
||||
Darkswarm.factory 'Enterprises', (enterprises, CurrentHub, Taxons, Dereferencer, Matcher, Geo, $rootScope) ->
|
||||
new class Enterprises
|
||||
enterprises: []
|
||||
enterprises_by_id: {}
|
||||
|
||||
constructor: ->
|
||||
# Populate Enterprises.enterprises from json in page.
|
||||
@initEnterprises(enterprises)
|
||||
@enterprises = enterprises
|
||||
|
||||
initEnterprises: (enterprises) ->
|
||||
# Map enterprises to id/object pairs for lookup.
|
||||
for enterprise in enterprises
|
||||
@enterprises.push enterprise
|
||||
@enterprises_by_id[enterprise.id] = enterprise
|
||||
|
||||
# Replace enterprise and taxons ids with actual objects.
|
||||
@dereferenceEnterprises(enterprises)
|
||||
@dereferenceEnterprises()
|
||||
|
||||
@producers = @enterprises.filter (enterprise)->
|
||||
enterprise.category in ["producer_hub", "producer_shop", "producer"]
|
||||
@hubs = @enterprises.filter (enterprise)->
|
||||
enterprise.category in ["hub", "hub_profile", "producer_hub", "producer_shop"]
|
||||
|
||||
dereferenceEnterprises: (enteprises) ->
|
||||
dereferenceEnterprises: ->
|
||||
if CurrentHub.hub?.id
|
||||
CurrentHub.hub = @enterprises_by_id[CurrentHub.hub.id]
|
||||
for enterprise in enterprises
|
||||
for enterprise in @enterprises
|
||||
@dereferenceEnterprise enterprise
|
||||
|
||||
dereferenceEnterprise: (enterprise) ->
|
||||
@@ -45,12 +42,6 @@ Darkswarm.factory 'Enterprises', (enterprises, ShopsResource, CurrentHub, Taxons
|
||||
for enterprise in new_enterprises
|
||||
@enterprises_by_id[enterprise.id] = enterprise
|
||||
|
||||
loadClosedEnterprises: ->
|
||||
request = ShopsResource.closed_shops {}, (data) =>
|
||||
@initEnterprises(data)
|
||||
|
||||
request.$promise
|
||||
|
||||
flagMatching: (query) ->
|
||||
for enterprise in @enterprises
|
||||
enterprise.matches_name_query = if query? && query.length > 0
|
||||
@@ -59,7 +50,7 @@ Darkswarm.factory 'Enterprises', (enterprises, ShopsResource, CurrentHub, Taxons
|
||||
false
|
||||
|
||||
calculateDistance: (query, firstMatching) ->
|
||||
if query?.length > 0 and GmapsGeo.OK
|
||||
if query?.length > 0
|
||||
if firstMatching?
|
||||
@setDistanceFrom firstMatching
|
||||
else
|
||||
@@ -68,9 +59,9 @@ Darkswarm.factory 'Enterprises', (enterprises, ShopsResource, CurrentHub, Taxons
|
||||
@resetDistance()
|
||||
|
||||
calculateDistanceGeo: (query) ->
|
||||
GmapsGeo.geocode query, (results, status) =>
|
||||
Geo.geocode query, (results, status) =>
|
||||
$rootScope.$apply =>
|
||||
if status == GmapsGeo.OK
|
||||
if status == Geo.OK
|
||||
#console.log "Geocoded #{query} -> #{results[0].geometry.location}."
|
||||
@setDistanceFrom results[0].geometry.location
|
||||
else
|
||||
@@ -79,7 +70,7 @@ Darkswarm.factory 'Enterprises', (enterprises, ShopsResource, CurrentHub, Taxons
|
||||
|
||||
setDistanceFrom: (locatable) ->
|
||||
for enterprise in @enterprises
|
||||
enterprise.distance = GmapsGeo.distanceBetween enterprise, locatable
|
||||
enterprise.distance = Geo.distanceBetween enterprise, locatable
|
||||
$rootScope.$broadcast 'enterprisesChanged'
|
||||
|
||||
resetDistance: ->
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Darkswarm.service "GmapsGeo", ->
|
||||
new class GmapsGeo
|
||||
OK: google?.maps?.GeocoderStatus?.OK
|
||||
Darkswarm.service "Geo", ->
|
||||
new class Geo
|
||||
OK: google.maps.GeocoderStatus.OK
|
||||
|
||||
# Usage:
|
||||
# Geo.geocode address, (results, status) ->
|
||||
@@ -10,7 +10,7 @@ Darkswarm.service "GmapsGeo", ->
|
||||
# console.log "Error: #{status}"
|
||||
geocode: (address, callback) ->
|
||||
geocoder = new google.maps.Geocoder()
|
||||
geocoder.geocode {'address': address, 'region': "<%= Spree::Country.find_by(id: Spree::Config[:default_country_id]).iso %>"}, callback
|
||||
geocoder.geocode {'address': address, 'region': "<%= Spree::Country.find_by_id(Spree::Config[:default_country_id]).iso %>"}, callback
|
||||
|
||||
distanceBetween: (src, dst) ->
|
||||
google.maps.geometry.spherical.computeDistanceBetween @toLatLng(src), @toLatLng(dst)
|
||||
@@ -1,39 +1,21 @@
|
||||
Darkswarm.factory "OfnMap", (Enterprises, EnterpriseListModal, MapConfiguration) ->
|
||||
Darkswarm.factory "OfnMap", (Enterprises, EnterpriseModal) ->
|
||||
new class OfnMap
|
||||
constructor: ->
|
||||
@coordinates = {}
|
||||
@enterprises = Enterprises.enterprises.filter (enterprise) ->
|
||||
# Remove enterprises w/o lat or long
|
||||
enterprise.latitude != null || enterprise.longitude != null
|
||||
@enterprises = @enterprise_markers(@enterprises)
|
||||
@enterprises = @enterprise_markers(Enterprises.enterprises)
|
||||
@enterprises = @enterprises.filter (enterprise) ->
|
||||
enterprise.latitude != null || enterprise.longitude != null # Remove enterprises w/o lat or long
|
||||
|
||||
enterprise_markers: (enterprises) ->
|
||||
@extend(enterprise) for enterprise in enterprises
|
||||
|
||||
enterprise_hash: (hash, enterprise) ->
|
||||
hash[enterprise.id] = { id: enterprise.id, name: enterprise.name, icon: enterprise.icon_font }
|
||||
hash
|
||||
|
||||
extend_marker: (marker, enterprise) ->
|
||||
marker.latitude = enterprise.latitude
|
||||
marker.longitude = enterprise.longitude
|
||||
marker.icon = enterprise.icon
|
||||
marker.id = [enterprise.id]
|
||||
marker.enterprises = @enterprise_hash({}, enterprise)
|
||||
|
||||
# Adding methods to each enterprise
|
||||
extend: (enterprise) ->
|
||||
marker = @coordinates[[enterprise.latitude, enterprise.longitude]]
|
||||
if marker
|
||||
marker.icon = MapConfiguration.options.cluster_icon
|
||||
@enterprise_hash(marker.enterprises, enterprise)
|
||||
marker.id.push(enterprise.id)
|
||||
else
|
||||
marker = new class MapMarker
|
||||
# We cherry-pick attributes because GMaps tries to crawl
|
||||
# our data, and our data is cyclic, so it breaks
|
||||
reveal: =>
|
||||
EnterpriseListModal.open this.enterprises
|
||||
@extend_marker(marker, enterprise)
|
||||
@coordinates[[enterprise.latitude, enterprise.longitude]] = marker
|
||||
marker
|
||||
new class MapMarker
|
||||
# We cherry-pick attributes because GMaps tries to crawl
|
||||
# our data, and our data is cyclic, so it breaks
|
||||
latitude: enterprise.latitude
|
||||
longitude: enterprise.longitude
|
||||
icon: enterprise.icon
|
||||
id: enterprise.id
|
||||
reveal: =>
|
||||
EnterpriseModal.open enterprise
|
||||
|
||||
@@ -4,7 +4,6 @@ Darkswarm.factory "MapConfiguration", ->
|
||||
center:
|
||||
latitude: -37.4713077
|
||||
longitude: 144.7851531
|
||||
cluster_icon: "<%= image_path('map_009-cluster.svg') %>"
|
||||
zoom: 12
|
||||
additional_options:
|
||||
# mapTypeId: 'satellite'
|
||||
@@ -1,6 +1,6 @@
|
||||
Darkswarm.factory 'OrderCycle', ($resource, orderCycleData) ->
|
||||
class OrderCycle
|
||||
@order_cycle = orderCycleData # Object or {}
|
||||
@order_cycle = orderCycleData # Object or {} due to RABL
|
||||
@push_order_cycle: (callback) ->
|
||||
new $resource("/shop/order_cycle").save {order_cycle_id: @order_cycle.order_cycle_id}, (order_data)->
|
||||
OrderCycle.order_cycle.orders_close_at = order_data.orders_close_at
|
||||
|
||||
@@ -34,7 +34,7 @@ Darkswarm.factory 'Products', (OrderCycleResource, OrderCycle, Shopfront, curren
|
||||
product.price = Math.min.apply(null, prices)
|
||||
product.hasVariants = product.variants?.length > 0
|
||||
product.primaryImage = product.images[0]?.small_url if product.images
|
||||
product.primaryImageOrMissing = product.primaryImage || "/noimage/small.png"
|
||||
product.primaryImageOrMissing = product.primaryImage || "/assets/noimage/small.png"
|
||||
product.largeImage = product.images[0]?.large_url if product.images
|
||||
|
||||
dereference: ->
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
Darkswarm.factory 'ShopsResource', ($resource) ->
|
||||
$resource('/api/shops/:id.json', {}, {
|
||||
'closed_shops':
|
||||
method: 'GET'
|
||||
isArray: true
|
||||
url: '/api/shops/closed_shops.json'
|
||||
})
|
||||
@@ -1,7 +0,0 @@
|
||||
Darkswarm.factory "StockQuantity", ->
|
||||
new class StockQuantity
|
||||
available_quantity: (on_hand, finalized_quantity) ->
|
||||
on_hand = parseInt(on_hand)
|
||||
finalized_quantity = parseInt(finalized_quantity) || 0 # finalized_quantity is optional
|
||||
|
||||
on_hand + finalized_quantity
|
||||
@@ -15,11 +15,9 @@ Darkswarm.factory 'StripeElements', ($rootScope, Loading, RailsFlashLoader) ->
|
||||
if(response.error)
|
||||
Loading.clear()
|
||||
RailsFlashLoader.loadFlash({error: t("error") + ": #{response.error.message}"})
|
||||
@triggerAngularDigest()
|
||||
console.error(JSON.stringify(response.error))
|
||||
else
|
||||
secrets.token = response.token.id
|
||||
secrets.cc_type = @mapTokenApiCardBrand(response.token.card.brand)
|
||||
secrets.cc_type = @mapCC(response.token.card.brand)
|
||||
secrets.card = response.token.card
|
||||
submit()
|
||||
|
||||
@@ -34,21 +32,15 @@ Darkswarm.factory 'StripeElements', ($rootScope, Loading, RailsFlashLoader) ->
|
||||
if(response.error)
|
||||
Loading.clear()
|
||||
RailsFlashLoader.loadFlash({error: t("error") + ": #{response.error.message}"})
|
||||
@triggerAngularDigest()
|
||||
console.error(JSON.stringify(response.error))
|
||||
else
|
||||
secrets.token = response.paymentMethod.id
|
||||
secrets.cc_type = @mapPaymentMethodsApiCardBrand(response.paymentMethod.card.brand)
|
||||
secrets.cc_type = response.paymentMethod.card.brand
|
||||
secrets.card = response.paymentMethod.card
|
||||
submit()
|
||||
|
||||
triggerAngularDigest: ->
|
||||
# $evalAsync is improved way of triggering a digest without calling $apply
|
||||
$rootScope.$evalAsync()
|
||||
|
||||
# Maps the brand returned by Stripe's tokenAPI to that required by activemerchant
|
||||
mapTokenApiCardBrand: (cardBrand) ->
|
||||
switch cardBrand
|
||||
# Maps the brand returned by Stripe to that required by activemerchant
|
||||
mapCC: (ccType) ->
|
||||
switch ccType
|
||||
when 'MasterCard' then return 'master'
|
||||
when 'Visa' then return 'visa'
|
||||
when 'American Express' then return 'american_express'
|
||||
@@ -56,14 +48,6 @@ Darkswarm.factory 'StripeElements', ($rootScope, Loading, RailsFlashLoader) ->
|
||||
when 'JCB' then return 'jcb'
|
||||
when 'Diners Club' then return 'diners_club'
|
||||
|
||||
# Maps the brand returned by Stripe's paymentMethodsAPI to that required by activemerchant
|
||||
mapPaymentMethodsApiCardBrand: (cardBrand) ->
|
||||
switch cardBrand
|
||||
when 'mastercard' then return 'master'
|
||||
when 'amex' then return 'american_express'
|
||||
when 'diners' then return 'diners_club'
|
||||
else return cardBrand # a few brands are equal, for example, visa
|
||||
|
||||
# It doesn't matter if any of these are nil, all are optional.
|
||||
makeCardData: (secrets) ->
|
||||
{'name': secrets.name,
|
||||
|
||||
@@ -20,6 +20,7 @@ Darkswarm.factory 'Variants', ->
|
||||
name = variant.product_name
|
||||
else
|
||||
name = "#{variant.product_name} - #{variant.name_to_display}"
|
||||
name += " (#{variant.options_text})" if variant.options_text
|
||||
name
|
||||
|
||||
lineItemFor: (variant) ->
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
%div.menu{ 'ng-show' => "expanded" }
|
||||
%div.menu_item{ ng: { repeat: "column in columns", click: "toggle(column)", class: "{selected: column.visible}" } }
|
||||
%span.check
|
||||
%span.name {{ column.name }}
|
||||
%span.name {{column.name }}
|
||||
%hr
|
||||
%div.menu_item.text-center
|
||||
%input.fullwidth.orange{ type: "button", ng: { value: "saved() ? 'Saved': 'Saving'", show: "saved() || saving", disabled: "saved()" } }
|
||||
%input.fullwidth.red{ type: "button", :value => t('admin.column_save_as_default').html_safe, ng: { show: "!saved() && !saving", click: "saveColumnPreferences(action)"} }
|
||||
%input.fullwidth.red{ type: "button", value: 'Save As Default', ng: { show: "!saved() && !saving", click: "saveColumnPreferences(action)"} }
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
%ng-include{src: "'partials/enterprise_listing.html'"}
|
||||
%ng-include{src: "'partials/close.html'"}
|
||||
@@ -1,3 +1,4 @@
|
||||
%ul
|
||||
%active-selector{ ng: { repeat: "selector in allSelectors", show: "ifDefined(selector.fits, true)" } }
|
||||
%render-svg{path: "{{selector.object.icon}}", ng: { if: "selector.object.icon"} }
|
||||
%span{"ng-bind" => "::selector.object.name"}
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
type: "email",
|
||||
id: "email",
|
||||
tabindex: 1,
|
||||
inputmode: "email",
|
||||
"ng-model" => "spree_user.email"}
|
||||
.row
|
||||
.large-12.columns
|
||||
@@ -28,4 +27,3 @@
|
||||
tabindex: "3",
|
||||
type: "submit",
|
||||
value: "{{'reset_password' | t}}"}
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
type: "email",
|
||||
id: "email",
|
||||
tabindex: 1,
|
||||
inputmode: "email",
|
||||
"ng-model" => "spree_user.email"}
|
||||
.row
|
||||
.large-12.columns
|
||||
@@ -25,7 +24,6 @@
|
||||
id: "password",
|
||||
autocomplete: "off",
|
||||
tabindex: 2,
|
||||
inputmode: "password",
|
||||
"ng-model" => "spree_user.password"}
|
||||
.row
|
||||
.large-12.columns
|
||||
@@ -41,4 +39,3 @@
|
||||
tabindex: "3",
|
||||
type: "submit",
|
||||
value: "{{'label_login' | t}}"}
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
.modal-list
|
||||
.row{"ng-repeat" => "(id, enterprise) in ::enterprises"}
|
||||
.highlight
|
||||
.highlight-top.row.enterprise
|
||||
.small-12.medium-12.large-12.columns
|
||||
%h4
|
||||
%a.heading{"ng-click" => "::openModal(enterprise)"}
|
||||
%i{"ng-class" => "enterprise.icon"}
|
||||
%span{"ng-bind" => "enterprise.name"}
|
||||
%img.hero-img{"ng-src" => "{{::enterprise.promo_image}}"}
|
||||
@@ -6,8 +6,6 @@
|
||||
min: 0,
|
||||
placeholder: "0",
|
||||
"ofn-disable-scroll" => true,
|
||||
"ng-debounce" => "500",
|
||||
onwheel: "this.blur()",
|
||||
"ng-model" => "variant.line_item.quantity",
|
||||
"ofn-on-hand" => "{{variant.on_demand && 9999 || variant.on_hand }}",
|
||||
"ng-disabled" => "!variant.on_demand && variant.on_hand == 0",
|
||||
|
||||
@@ -9,8 +9,6 @@
|
||||
"ng-model" => "variant.line_item.quantity",
|
||||
placeholder: "{{::'shop_variant_quantity_min' | t}}",
|
||||
"ofn-disable-scroll" => true,
|
||||
"ng-debounce" => "500",
|
||||
onwheel: "this.blur()",
|
||||
"ofn-on-hand" => "{{variant.on_demand && 9999 || variant.on_hand }}",
|
||||
name: "variants[{{::variant.id}}]", id: "variants_{{::variant.id}}"}
|
||||
%span.bulk-input
|
||||
@@ -21,8 +19,6 @@
|
||||
"ng-model" => "variant.line_item.max_quantity",
|
||||
placeholder: "{{::'shop_variant_quantity_max' | t}}",
|
||||
"ofn-disable-scroll" => true,
|
||||
"ng-debounce" => "500",
|
||||
onwheel: "this.blur()",
|
||||
min: "{{variant.line_item.quantity}}",
|
||||
name: "variant_attributes[{{::variant.id}}][max_quantity]",
|
||||
id: "variants_{{::variant.id}}_max"}
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
%button.graph-button{"ng-class" => "{open: tt_isOpen}", type: 'button'}
|
||||
%button.graph-button{"ng-class" => "{open: tt_isOpen}"}
|
||||
/ %i.ofn-i_058-graph
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
.row
|
||||
.columns.small-12.medium-6.large-6.product-header
|
||||
|
||||
.columns.small-12.large-6.product-header
|
||||
%h3{"ng-bind" => "::product.name"}
|
||||
%span
|
||||
%em {{'products_from' | t}}
|
||||
@@ -7,14 +8,19 @@
|
||||
|
||||
%br
|
||||
|
||||
.filter-shopfront.taxon-selectors.inline-block
|
||||
%filter-selector{ 'selector-set' => "productTaxonSelectors", objects: "[product] | taxonsOf" }
|
||||
|
||||
.filter-shopfront.property-selectors.inline-block
|
||||
%filter-selector{ 'selector-set' => "productPropertySelectors", objects: "[product] | propertiesWithValuesOf" }
|
||||
|
||||
.product-description{"ng-if" => "product.description_html"}
|
||||
%div{"ng-if" => "product.description_html"}
|
||||
%hr
|
||||
%p.text-small{"ng-bind-html" => "::product.description_html"}
|
||||
%hr
|
||||
|
||||
.columns.small-12.medium-6.large-6.product-img
|
||||
%img{"ng-src" => "{{::product.largeImage}}", "ng-if" => "::product.largeImage"}
|
||||
%img.placeholder{ src: "/noimage/large.png", "ng-if" => "::!product.largeImage"}
|
||||
.columns.small-12.large-6
|
||||
%img.product-img{"ng-src" => "{{::product.largeImage}}", "ng-if" => "::product.largeImage"}
|
||||
%img.product-img.placeholder{ src: "/assets/noimage/large.png", "ng-if" => "::!product.largeImage"}
|
||||
|
||||
%ng-include{src: "'partials/close.html'"}
|
||||
|
||||