Compare commits

..

2 Commits

Author SHA1 Message Date
Maikel Linke
f0ee4aab01 Restore old pagination API for products
It's still used by the inventory page. This is an easy fix that I can
deploy without risk. A rewrite of the inventory pagination should
follow.
2019-09-09 14:51:44 +10:00
Maikel Linke
452593b6f1 Ignore block length cop for feature and scenario
They are typically long and that's okay, same with `describe` and `it`.
2019-09-09 14:51:44 +10:00
130 changed files with 1449 additions and 8180 deletions

View File

@@ -1 +1 @@
2.1.9
2.1.5

12
Gemfile
View File

@@ -1,5 +1,5 @@
source 'https://rubygems.org'
ruby "2.1.9"
ruby "2.1.5"
git_source(:github) { |repo_name| "https://github.com/#{repo_name}.git" }
gem 'i18n', '~> 0.6.11'
@@ -85,6 +85,7 @@ gem 'paperclip', '~> 3.4.1'
gem 'rack-rewrite'
gem 'rack-ssl', require: 'rack/ssl'
gem 'roadie-rails', '~> 1.1.1'
gem 'skylight', '< 2.0'
gem 'spinjs-rails'
gem 'combine_pdf'
@@ -104,10 +105,7 @@ group :assets do
gem 'coffee-rails', '~> 3.2.1'
gem 'compass-rails'
gem 'mini_racer', '0.1.15'
# Previously we found that libv8 6.7.288.46.1 breakis the compilation of mini_racer.
# Now we see that we need to set the version explicitly. Nothing else depends on libv8.
gem 'libv8', '6.3.292.48.1'
gem 'therubyracer', '=0.12.0'
gem 'uglifier', '>= 1.0.3'
@@ -159,6 +157,10 @@ end
group :development do
gem 'byebug', '~> 9.0.0' # 9.1 requires ruby 2.2
gem 'debugger-linecache'
gem 'guard'
gem 'guard-livereload'
gem 'guard-rails'
gem 'guard-rspec', '~> 4.7.3'
gem 'listen', '3.0.8' # 3.1.0 requires ruby 2.2
gem "newrelic_rpm", "~> 3.0"
gem 'pry-byebug', '>= 3.4.3'

View File

@@ -164,7 +164,7 @@ GEM
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
blockenspiel (0.5.0)
bugsnag (6.12.1)
bugsnag (6.12.0)
concurrent-ruby (~> 1.0)
builder (3.0.4)
byebug (9.0.6)
@@ -223,7 +223,7 @@ GEM
activerecord (>= 3.2.0, < 5.0)
fog (~> 1.0)
rails (>= 3.2.0, < 5.0)
ddtrace (0.27.0)
ddtrace (0.26.0)
msgpack
debugger-linecache (1.2.0)
deface (1.0.2)
@@ -252,6 +252,9 @@ GEM
diffy (3.3.0)
docile (1.3.2)
dry-inflector (0.1.2)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
erubis (2.7.0)
eventmachine (1.2.7)
excon (0.62.0)
@@ -429,11 +432,34 @@ GEM
ruby-progressbar (~> 1.4)
geocoder (1.1.8)
gmaps4rails (1.5.6)
guard (2.15.0)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-livereload (2.5.2)
em-websocket (~> 0.5)
guard (~> 2.8)
guard-compat (~> 1.0)
multi_json (~> 1.8)
guard-rails (0.7.2)
guard (~> 2.11)
guard-compat (~> 1.0)
guard-rspec (4.7.3)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
haml (4.0.7)
tilt
hashdiff (1.0.0)
highline (1.6.18)
hike (1.2.3)
http_parser.rb (0.6.0)
httparty (0.16.2)
multi_xml (>= 0.5.2)
i18n (0.6.11)
@@ -465,10 +491,11 @@ GEM
addressable (~> 2.3)
letter_opener (1.7.0)
launchy (~> 2.2)
libv8 (6.3.292.48.1)
libv8 (3.16.14.19)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
lumberjack (1.0.13)
mail (2.5.5)
mime-types (~> 1.16)
treetop (~> 1.4.8)
@@ -476,8 +503,6 @@ GEM
mime-types (1.25.1)
mini_mime (1.0.1)
mini_portile2 (2.1.0)
mini_racer (0.1.15)
libv8 (~> 6.3)
momentjs-rails (2.20.1)
railties (>= 3.1)
money (5.1.1)
@@ -486,11 +511,15 @@ GEM
multi_json (1.13.1)
multi_xml (0.6.0)
multipart-post (2.1.1)
nenv (0.3.0)
net-http-persistent (3.1.0)
connection_pool (~> 2.2)
newrelic_rpm (3.18.1.330)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
notiffany (0.1.1)
nenv (~> 0.1)
shellany (~> 0.0)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
jwt (>= 1.0, < 3.0)
@@ -581,6 +610,7 @@ GEM
rdoc (3.12.2)
json (~> 1.4)
redcarpet (3.5.0)
ref (2.0.0)
request_store (1.4.1)
rack (>= 1.4)
roadie (3.4.0)
@@ -643,9 +673,10 @@ GEM
selenium-webdriver (3.141.0)
childprocess (~> 0.5)
rubyzip (~> 1.2, >= 1.2.2)
shellany (0.0.1)
shoulda-matchers (2.8.0)
activesupport (>= 3.0.0)
simplecov (0.17.1)
simplecov (0.17.0)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
@@ -654,6 +685,8 @@ GEM
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (>= 1.3, < 3)
skylight (1.7.2)
activesupport (>= 3.0.0)
spinjs-rails (1.4)
rails (>= 3.1)
spreadsheet (1.1.7)
@@ -671,6 +704,9 @@ GEM
stripe (4.24.0)
faraday (~> 0.13)
net-http-persistent (~> 3.0)
therubyracer (0.12.0)
libv8 (~> 3.16.14.0)
ref
thor (0.20.3)
tilt (1.4.1)
timecop (0.9.1)
@@ -703,7 +739,7 @@ GEM
nokogiri (~> 1.6)
rubyzip (~> 1.0)
selenium-webdriver (~> 3.0)
webmock (3.7.5)
webmock (3.7.1)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
@@ -760,6 +796,10 @@ DEPENDENCIES
fuubar (~> 2.4.1)
geocoder
gmaps4rails
guard
guard-livereload
guard-rails
guard-rspec (~> 4.7.3)
haml
i18n (~> 0.6.11)
i18n-js (~> 3.3.0)
@@ -771,9 +811,7 @@ DEPENDENCIES
kaminari (~> 0.14.1)
knapsack
letter_opener (>= 1.4.1)
libv8 (= 6.3.292.48.1)
listen (= 3.0.8)
mini_racer (= 0.1.15)
momentjs-rails
newrelic_rpm (~> 3.0)
nokogiri (>= 1.6.7.1)
@@ -805,6 +843,7 @@ DEPENDENCIES
shoulda-matchers
simple_form!
simplecov
skylight (< 2.0)
spinjs-rails
spree_api!
spree_backend!
@@ -814,6 +853,7 @@ DEPENDENCIES
spring (= 1.7.2)
spring-commands-rspec
stripe
therubyracer (= 0.12.0)
timecop
truncate_html
turbo-sprockets-rails3
@@ -828,7 +868,7 @@ DEPENDENCIES
wkhtmltopdf-binary
RUBY VERSION
ruby 2.1.9p490
ruby 2.1.5p273
BUNDLED WITH
1.17.2

11
Guardfile Normal file
View File

@@ -0,0 +1,11 @@
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
guard 'livereload' do
watch(%r{app/views/.+\.(erb|haml|slim)$})
watch(%r{app/helpers/.+\.rb})
watch(%r{public/.+\.(css|js|html)})
# Rails Assets Pipeline
watch(%r{(app|vendor)(/assets/\w+/(.+\.(css|js|html|png|jpg))).*}) { |m| "/assets/#{m[3]}" }
end

View File

@@ -1,5 +1,6 @@
[![Build Status](https://semaphoreci.com/api/v1/openfoodfoundation/openfoodnetwork-2/branches/master/badge.svg)](https://semaphoreci.com/openfoodfoundation/openfoodnetwork-2)
[![Code Climate](https://codeclimate.com/github/openfoodfoundation/openfoodnetwork.png)](https://codeclimate.com/github/openfoodfoundation/openfoodnetwork)
[![View performance data on Skylight](https://badges.skylight.io/status/EiXQ6sSKij8y.svg)](https://oss.skylight.io/app/applications/EiXQ6sSKij8y)
# Open Food Network
@@ -35,7 +36,7 @@ We use [BrowserStack](https://www.browserstack.com/) as a manual testing tool. B
Copyright (c) 2012 - 2019 Open Food Foundation, released under the AGPL licence.
[survey]: https://docs.google.com/a/eaterprises.com.au/forms/d/1zxR5vSiU9CigJ9cEaC8-eJLgYid8CR8er7PPH9Mc-30/edit#
[slack-invite]: https://join.slack.com/t/openfoodnetwork/shared_invite/enQtMzU2Mjk5MDc2MjA5LTM4ZTAzZjIwNzIxMmU5ODFiNWY1MTU2ZWUyNzQwNjdjNTY0N2VhY2UwOGU4ZmVjNzYyZDU2NjY3NzZkZmQwYjk
[slack-invite]: https://openfoodnetwork.org/slack-invite
[contributor-guide]: https://ofn-user-guide.gitbook.io/ofn-contributor-guide/who-are-we
[ofn-install]: https://github.com/openfoodfoundation/ofn-install
[super-admin-guide]: https://ofn-user-guide.gitbook.io/ofn-super-admin-guide

View File

@@ -1,105 +0,0 @@
require 'open_food_network/scope_variant_to_hub'
module Api
class ShipmentsController < Api::BaseController
respond_to :json
before_filter :find_order
before_filter :find_and_update_shipment, only: [:ship, :ready, :add, :remove]
def create
variant = scoped_variant(params[:variant_id])
quantity = params[:quantity].to_i
@shipment = get_or_create_shipment(params[:stock_location_id])
@order.contents.add(variant, quantity, nil, @shipment)
@shipment.refresh_rates
@shipment.save!
render json: @shipment.reload, serializer: Api::ShipmentSerializer, status: :ok
end
def update
authorize! :read, Spree::Shipment
@shipment = @order.shipments.find_by_number!(params[:id])
params[:shipment] ||= []
unlock = params[:shipment].delete(:unlock)
if unlock == 'yes'
@shipment.adjustment.open
end
@shipment.update_attributes(params[:shipment])
if unlock == 'yes'
@shipment.adjustment.close
end
render json: @shipment.reload, serializer: Api::ShipmentSerializer, status: :ok
end
def ready
authorize! :read, Spree::Shipment
unless @shipment.ready?
if @shipment.can_ready?
@shipment.ready!
else
render(json: { error: I18n.t(:cannot_ready, scope: "spree.api.shipment") },
status: :unprocessable_entity) && return
end
end
render json: @shipment, serializer: Api::ShipmentSerializer, status: :ok
end
def ship
authorize! :read, Spree::Shipment
unless @shipment.shipped?
@shipment.ship!
end
render json: @shipment, serializer: Api::ShipmentSerializer, status: :ok
end
def add
variant = scoped_variant(params[:variant_id])
quantity = params[:quantity].to_i
@order.contents.add(variant, quantity, nil, @shipment)
render json: @shipment, serializer: Api::ShipmentSerializer, status: :ok
end
def remove
variant = scoped_variant(params[:variant_id])
quantity = params[:quantity].to_i
@order.contents.remove(variant, quantity, @shipment)
@shipment.reload if @shipment.persisted?
render json: @shipment, serializer: Api::ShipmentSerializer, status: :ok
end
private
def find_order
@order = Spree::Order.find_by_number!(params[:order_id])
authorize! :read, @order
end
def find_and_update_shipment
@shipment = @order.shipments.find_by_number!(params[:id])
@shipment.update_attributes(params[:shipment])
@shipment.reload
end
def scoped_variant(variant_id)
variant = Spree::Variant.find(variant_id)
OpenFoodNetwork::ScopeVariantToHub.new(@order.distributor).scope(variant)
variant
end
def get_or_create_shipment(stock_location_id)
@order.shipment || @order.shipments.create(stock_location_id: stock_location_id)
end
end
end

View File

@@ -1,12 +0,0 @@
module Api
class TaxonomiesController < Api::BaseController
respond_to :json
skip_authorization_check only: :jstree
def jstree
@taxonomy = Spree::Taxonomy.find(params[:id])
render json: @taxonomy.root, serializer: Api::TaxonJstreeSerializer
end
end
end

View File

@@ -1,71 +0,0 @@
module Api
class TaxonsController < Api::BaseController
respond_to :json
skip_authorization_check only: [:index, :show, :jstree]
def index
if taxonomy
@taxons = taxonomy.root.children
else
if params[:ids]
@taxons = Spree::Taxon.where(id: params[:ids].split(","))
else
@taxons = Spree::Taxon.ransack(params[:q]).result
end
end
render json: @taxons, each_serializer: Api::TaxonSerializer
end
def jstree
@taxon = taxon
render json: @taxon.children, each_serializer: Api::TaxonJstreeSerializer
end
def create
authorize! :create, Spree::Taxon
@taxon = Spree::Taxon.new(params[:taxon])
@taxon.taxonomy_id = params[:taxonomy_id]
taxonomy = Spree::Taxonomy.find_by_id(params[:taxonomy_id])
if taxonomy.nil?
@taxon.errors[:taxonomy_id] = I18n.t(:invalid_taxonomy_id, scope: 'spree.api')
invalid_resource!(@taxon) && return
end
@taxon.parent_id = taxonomy.root.id unless params[:taxon][:parent_id]
if @taxon.save
render json: @taxon, serializer: Api::TaxonSerializer, status: :created
else
invalid_resource!(@taxon)
end
end
def update
authorize! :update, Spree::Taxon
if taxon.update_attributes(params[:taxon])
render json: taxon, serializer: Api::TaxonSerializer, status: :ok
else
invalid_resource!(taxon)
end
end
def destroy
authorize! :delete, Spree::Taxon
taxon.destroy
render json: taxon, serializer: Api::TaxonSerializer, status: :no_content
end
private
def taxonomy
return if params[:taxonomy_id].blank?
@taxonomy ||= Spree::Taxonomy.find(params[:taxonomy_id])
end
def taxon
@taxon ||= taxonomy.taxons.find(params[:id])
end
end
end

View File

@@ -152,7 +152,7 @@ class CheckoutController < Spree::CheckoutController
end
def update_failed
current_order.updater.shipping_address_from_distributor
clear_ship_address
RestartCheckout.new(@order).call
respond_to do |format|
@@ -165,6 +165,15 @@ class CheckoutController < Spree::CheckoutController
end
end
# When we have a pickup Shipping Method,
# we clone the distributor address into ship_address before_save
# We don't want this data in the form, so we clear it out
def clear_ship_address
unless current_order.shipping_method.andand.require_ship_address
current_order.ship_address = Spree::Address.default
end
end
def load_order
@order = current_order
redirect_to(main_app.shop_path) && return unless @order && @order.checkout_allowed?

View File

@@ -3,6 +3,7 @@ require 'open_food_network/spree_api_key_loader'
Spree::Admin::OrdersController.class_eval do
include OpenFoodNetwork::SpreeApiKeyLoader
helper CheckoutHelper
before_filter :load_spree_api_key, only: :bulk_management
before_filter :load_order, only: %i[show edit update fire resend invoice print print_ticket]
before_filter :load_distribution_choices, only: [:new, :edit, :update]
@@ -26,10 +27,6 @@ Spree::Admin::OrdersController.class_eval do
# within the page then fetches the data it needs from Api::OrdersController
end
def bulk_management
load_spree_api_key
end
def edit
@order.shipments.map &:refresh_rates

View File

@@ -46,12 +46,7 @@ module Spree
@user.spree_roles = roles.reject(&:blank?).collect{ |r| Spree::Role.find(r) }
end
message = if new_email_unconfirmed?
Spree.t(:email_updated)
else
Spree.t(:account_updated)
end
flash.now[:success] = message
flash.now[:success] = Spree.t(:account_updated)
end
render :edit
end
@@ -131,10 +126,6 @@ module Spree
def load_roles
@roles = Spree::Role.scoped
end
def new_email_unconfirmed?
params[:user][:email] != @user.email
end
end
end
end

View File

@@ -0,0 +1,108 @@
require 'open_food_network/scope_variant_to_hub'
module Spree
module Api
class ShipmentsController < Spree::Api::BaseController
respond_to :json
before_filter :find_order
before_filter :find_and_update_shipment, only: [:ship, :ready, :add, :remove]
def create
variant = scoped_variant(params[:variant_id])
quantity = params[:quantity].to_i
@shipment = get_or_create_shipment(params[:stock_location_id])
@order.contents.add(variant, quantity, nil, @shipment)
@shipment.refresh_rates
@shipment.save!
respond_with(@shipment.reload, default_template: :show)
end
def update
authorize! :read, Shipment
@shipment = @order.shipments.find_by_number!(params[:id])
params[:shipment] ||= []
unlock = params[:shipment].delete(:unlock)
if unlock == 'yes'
@shipment.adjustment.open
end
@shipment.update_attributes(params[:shipment])
if unlock == 'yes'
@shipment.adjustment.close
end
@shipment.reload
respond_with(@shipment, default_template: :show)
end
def ready
authorize! :read, Shipment
unless @shipment.ready?
if @shipment.can_ready?
@shipment.ready!
else
render "spree/api/shipments/cannot_ready_shipment", status: :unprocessable_entity
return
end
end
respond_with(@shipment, default_template: :show)
end
def ship
authorize! :read, Shipment
unless @shipment.shipped?
@shipment.ship!
end
respond_with(@shipment, default_template: :show)
end
def add
variant = scoped_variant(params[:variant_id])
quantity = params[:quantity].to_i
@order.contents.add(variant, quantity, nil, @shipment)
respond_with(@shipment, default_template: :show)
end
def remove
variant = scoped_variant(params[:variant_id])
quantity = params[:quantity].to_i
@order.contents.remove(variant, quantity, @shipment)
@shipment.reload if @shipment.persisted?
respond_with(@shipment, default_template: :show)
end
private
def find_order
@order = Spree::Order.find_by_number!(params[:order_id])
authorize! :read, @order
end
def find_and_update_shipment
@shipment = @order.shipments.find_by_number!(params[:id])
@shipment.update_attributes(params[:shipment])
@shipment.reload
end
def scoped_variant(variant_id)
variant = Spree::Variant.find(variant_id)
OpenFoodNetwork::ScopeVariantToHub.new(@order.distributor).scope(variant)
variant
end
def get_or_create_shipment(stock_location_id)
@order.shipment || @order.shipments.create(stock_location_id: stock_location_id)
end
end
end
end

View File

@@ -0,0 +1,75 @@
module Spree
module Api
class TaxonsController < Spree::Api::BaseController
respond_to :json
def index
if taxonomy
@taxons = taxonomy.root.children
else
if params[:ids]
@taxons = Taxon.where(id: params[:ids].split(","))
else
@taxons = Taxon.ransack(params[:q]).result
end
end
respond_with(@taxons)
end
def show
@taxon = taxon
respond_with(@taxon)
end
def jstree
show
end
def create
authorize! :create, Taxon
@taxon = Taxon.new(params[:taxon])
@taxon.taxonomy_id = params[:taxonomy_id]
taxonomy = Taxonomy.find_by_id(params[:taxonomy_id])
if taxonomy.nil?
@taxon.errors[:taxonomy_id] = I18n.t(:invalid_taxonomy_id, scope: 'spree.api')
invalid_resource!(@taxon) && return
end
@taxon.parent_id = taxonomy.root.id unless params[:taxon][:parent_id]
if @taxon.save
respond_with(@taxon, status: 201, default_template: :show)
else
invalid_resource!(@taxon)
end
end
def update
authorize! :update, Taxon
if taxon.update_attributes(params[:taxon])
respond_with(taxon, status: 200, default_template: :show)
else
invalid_resource!(taxon)
end
end
def destroy
authorize! :delete, Taxon
taxon.destroy
respond_with(taxon, status: 204)
end
private
def taxonomy
return if params[:taxonomy_id].blank?
@taxonomy ||= Taxonomy.find(params[:taxonomy_id])
end
def taxon
@taxon ||= taxonomy.taxons.find(params[:id])
end
end
end
end

View File

@@ -38,6 +38,10 @@ module Spree
end
end
def nav_bar
render partial: 'spree/shared/nav_bar'
end
private
def accurate_title

View File

@@ -13,43 +13,8 @@ module Calculator
def compute(object)
line_items = line_items_for object
(total_weight(line_items) * preferred_per_kg).round(2)
end
private
def total_weight(line_items)
line_items.sum do |line_item|
line_item_weight(line_item)
end
end
def line_item_weight(line_item)
if line_item.final_weight_volume.present?
weight_per_final_weight_volume(line_item)
else
weight_per_variant(line_item) * line_item.quantity
end
end
def weight_per_variant(line_item)
line_item.variant.andand.weight || 0
end
def weight_per_final_weight_volume(line_item)
if line_item.variant.product.andand.variant_unit == 'weight'
# Divided by 1000 because grams is the base weight unit and the calculator price is per_kg
line_item.final_weight_volume / 1000.0
else
weight_per_variant(line_item) * quantity_implied_in_final_weight_volume(line_item)
end
end
# Example: 2 (line_item.quantity) wine glasses of 125mL (line_item.variant.unit_value)
# Customer ends up getting 350mL (line_item.final_weight_volume) of wine
# that represent 2.8 (quantity_implied_in_final_weight_volume) glasses of wine
def quantity_implied_in_final_weight_volume(line_item)
(1.0 * line_item.final_weight_volume / line_item.variant.unit_value).round(3)
total_weight = line_items.sum { |li| ((li.variant.andand.weight || 0) * li.quantity) }
total_weight * preferred_per_kg
end
end
end

View File

@@ -100,13 +100,13 @@ module VariantStock
# Here we depend only on variant.total_on_hand and variant.on_demand.
# This way, variant_overrides only need to override variant.total_on_hand and variant.on_demand.
def fill_status(quantity)
on_hand = if total_on_hand >= quantity || on_demand
quantity
else
[0, total_on_hand].max
end
backordered = 0
if on_hand >= quantity
on_hand = quantity
backordered = 0
else
on_hand = [0, total_on_hand].max
backordered = on_demand ? (quantity - on_hand) : 0
end
[on_hand, backordered]
end
@@ -117,9 +117,6 @@ module VariantStock
def move(quantity, originator = nil)
raise_error_if_no_stock_item_available
# Don't change variant stock if variant is on_demand
return if on_demand
# Creates a stock movement: it updates stock_item.count_on_hand and fills backorders
#
# This is the original Spree::StockLocation#move,

View File

@@ -1,14 +1,7 @@
module Spree
Price.class_eval do
acts_as_paranoid without_default_scope: true
after_save :refresh_products_cache
# Allow prices to access associated soft-deleted variants.
def variant
Spree::Variant.unscoped { super }
end
private
def check_price

View File

@@ -91,11 +91,6 @@ Spree::Variant.class_eval do
can_supply?(quantity)
end
# Allow variant to access associated soft-deleted prices.
def default_price
Spree::Price.unscoped { super }
end
def price_with_fees(distributor, order_cycle)
price + fees_for(distributor, order_cycle)
end

View File

@@ -10,11 +10,6 @@ class SubscriptionLineItem < ActiveRecord::Base
(price_estimate || 0) * (quantity || 0)
end
# Ensure SubscriptionLineItem always has access to soft-deleted Variant attribute
def variant
Spree::Variant.unscoped { super }
end
# Used to calculators to estimate fees
alias_method :amount, :total_estimate

View File

@@ -0,0 +1,6 @@
Deface::Override.new(virtual_path: "spree/layouts/admin",
name: "user_admin_tabs",
insert_bottom: "[data-hook='admin_tabs'], #admin_tabs[data-hook]",
partial: "spree/admin/users_tab",
disabled: false,
original: '031652cf5a054796022506622082ab6d2693699f')

View File

@@ -0,0 +1,5 @@
Deface::Override.new(virtual_path: "spree/layouts/admin",
name: "auth_admin_login_navigation_bar",
insert_top: "[data-hook='admin_login_navigation_bar'], #admin_login_navigation_bar[data-hook]",
partial: "spree/layouts/admin/login_nav",
original: '841227d0aedf7909d62237d8778df99100087715')

View File

@@ -0,0 +1,6 @@
Deface::Override.new(virtual_path: "spree/shared/_nav_bar",
name: "auth_shared_login_bar",
insert_before: "li#search-bar",
partial: "spree/shared/login_bar",
disabled: false,
original: 'eb3fa668cd98b6a1c75c36420ef1b238a1fc55ac')

View File

@@ -0,0 +1,3 @@
Deface::Override.new(virtual_path: "spree/shared/_nav_bar",
remove: "#search-bar",
name: "search_removal")

View File

@@ -0,0 +1,3 @@
Deface::Override.new(virtual_path: "spree/shared/_sidebar",
remove: "#sidebar",
name: "sidebar_removal")

View File

@@ -0,0 +1,5 @@
Deface::Override.new(virtual_path: "spree/layouts/admin",
insert_bottom: "[data-hook='admin_inside_head']",
partial: "layouts/auth_token_script",
name: "set_auth_token_in_backend",
original: '6bc2c5de1c8f7542d033548557437c9fe4b3ba02')

View File

@@ -0,0 +1,5 @@
Deface::Override.new(virtual_path: "spree/layouts/spree_application",
insert_bottom: "[data-hook='inside_head']",
partial: "layouts/auth_token_script",
name: "set_auth_token_in_frontend",
original: '5659ac7dbf6ac6469907b005b85285b894677815')

View File

@@ -0,0 +1,5 @@
<!-- surround_contents 'body' -->
<div <%= yield(:app_wrapper_attrs).strip.html_safe %>>
<%= render_original %>
</div>

View File

@@ -0,0 +1,19 @@
/ replace "footer"
-#= render partial: "shared/footer"
%footer
%hr/
-#.row
-#.seven.columns.offset-by-three
-#%center
-#%h1 What is open food network?
-#%p
-#%i
-#Open food network is an online space in which people can connect with, trade and sell food directly with
-#Australian farmers. We aim to reconnect people with their food.
-#%hr/
-#.row
-#.five.columns.secondary.offset-by-seven.secondary
-#All rights reserved. &copy; 2013 Open Food Foundation

View File

@@ -0,0 +1,8 @@
/ replace "#logo"
%figure#logo.columns.eight
- if current_distributor
%h1= link_to current_distributor.name, main_app.enterprise_shop_path(current_distributor)
.change-location= link_to 'Change Location', root_path
- else
%h1= link_to "OPEN FOOD NETWORK", root_path

View File

@@ -0,0 +1,2 @@
/ set_attributes '#top-nav-bar'
/ attributes({:class => "columns eight"})

View File

@@ -0,0 +1,5 @@
/ insert_before "#password-credentials"
- if @unconfirmed_email
%p.alert-box
= t('spree.users.show.unconfirmed_email', unconfirmed_email: @unconfirmed_email)

View File

@@ -1,13 +0,0 @@
module Api
class ShipmentSerializer < ActiveModel::Serializer
attributes :id, :tracking, :number, :order_id, :cost, :shipped_at, :stock_location_name, :state
def order_id
object.order.number
end
def stock_location_name
object.stock_location.name
end
end
end

View File

@@ -1,5 +0,0 @@
module Api
class TaxonJstreeAttributeSerializer < ActiveModel::Serializer
attributes :id, :name
end
end

View File

@@ -1,18 +0,0 @@
module Api
class TaxonJstreeSerializer < ActiveModel::Serializer
attributes :data, :state
has_one :attr, serializer: TaxonJstreeAttributeSerializer
def data
object.name
end
def attr
object
end
def state
"closed"
end
end
end

View File

@@ -2,7 +2,7 @@ class Api::TaxonSerializer < ActiveModel::Serializer
cached
delegate :cache_key, to: :object
attributes :id, :name, :permalink, :icon, :pretty_name, :position, :parent_id, :taxonomy_id
attributes :id, :name, :permalink, :icon
def icon
object.icon(:original)

View File

@@ -73,9 +73,7 @@ class EmbeddedPageService
def current_referer
return if @request.referer.blank?
uri = URI(@request.referer)
return if uri.host.blank?
uri.host.downcase
URI(@request.referer).host.downcase
end
def current_referer_without_www

View File

@@ -9,8 +9,8 @@ class SubscriptionValidator
attr_reader :subscription
validates :shop, :customer, :schedule, :shipping_method, :payment_method, presence: true
validates :bill_address, :ship_address, :begins_at, presence: true
validates_presence_of :shop, :customer, :schedule, :shipping_method, :payment_method
validates_presence_of :bill_address, :ship_address, :begins_at
validate :shipping_method_allowed?
validate :payment_method_allowed?
validate :payment_method_type_allowed?

View File

@@ -2,8 +2,8 @@
%h1.page-title
=t :customers
- content_for :main_ng_app_name do
= "admin.customers"
- content_for :app_wrapper_attrs do
= "ng-app='admin.customers'"
- content_for :page_actions do
%li

View File

@@ -4,8 +4,8 @@
= t('.editing')
= @enterprise.name
- content_for :main_ng_app_name do
= "admin.enterprises"
- content_for :app_wrapper_attrs do
= "ng-app='admin.enterprises'"
- content_for :page_actions do
%li= select :enterprise, :id, options_for_select(editable_enterprises.collect {|e| [e.name, e.id, {:'data-url' => "#{main_app.edit_admin_enterprise_path(e.permalink)}", :'ng-selected' => "selected==#{e.id}"}]}, @enterprise.id ), {}, {:'enterprise-switcher' => '', 'data-initial' => "#{@enterprise.id}", :'ng-init' => "selected='#{@enterprise.id}'", :'ng-model' => 'selected', :id => 'enterprise_switcher', :class => 'select2'}

View File

@@ -1,8 +1,8 @@
- content_for :page_title do
= t('.title')
- content_for :main_ng_app_name do
= "admin.enterprises"
- content_for :app_wrapper_attrs do
= "ng-app='admin.enterprises'"
- content_for :page_actions do
= render 'admin/shared/user_guide_link'

View File

@@ -6,8 +6,8 @@
- content_for :page_actions do
%li= button_link_to t('.back_link'), main_app.admin_enterprises_path, icon: 'icon-arrow-left'
- content_for :main_ng_app_name do
= "admin.enterprises"
- content_for :app_wrapper_attrs do
= "ng-app='admin.enterprises'"
= admin_inject_available_countries(module: 'admin.enterprises')
= admin_inject_json "admin.enterprises", "defaultCountryID", Spree::Config[:default_country_id]

View File

@@ -1,8 +1,8 @@
= content_for :page_title do
= t :admin_order_cycles
- content_for :main_ng_app_name do
= "admin.orderCycles"
- content_for :app_wrapper_attrs do
= "ng-app='admin.orderCycles'"
= content_for :page_actions do
- if subscriptions_enabled?

View File

@@ -1,8 +1,8 @@
- content_for :page_title do
= t('admin.subscriptions.subscriptions')
- content_for :main_ng_app_name do
= "admin.subscriptions"
- content_for :app_wrapper_attrs do
= "ng-app='admin.subscriptions'"
- content_for :page_actions do
%li

View File

@@ -146,3 +146,13 @@
= t '.footer_data_text_without_privacy_policy_html', {cookies_policy: cookies_policy_link.html_safe }
.medium-2.columns.text-center
/ Placeholder
-if ENV['SKYLIGHT_PUBLIC_DASHBOARD_URL'].present?
.row
.small-12.medium-8.medium-offset-2.columns.text-center
%hr.hr-light
%br
.row
.small-12.medium-8.medium-offset-2.columns.text-center
.text.small
= t '.footer_skylight_dashboard_html', {dashboard: link_to('Skylight', ENV['SKYLIGHT_PUBLIC_DASHBOARD_URL'], target: "_blank")}

View File

@@ -0,0 +1,2 @@
- if can? :admin, Spree::User
= tab(:users, url: spree.admin_users_path, icon: 'icon-user')

View File

@@ -2,12 +2,12 @@
- content_for :page_title do
%i.icon-arrow-right
= t(:adjustments)
= Spree.t(:adjustments)
- content_for :page_actions do
%li= button_link_to t(:new_adjustment), new_admin_order_adjustment_url(@order), :icon => 'icon-plus'
%li= button_link_to t(:back_to_orders_list), admin_orders_path, :icon => 'icon-arrow-left'
%li= button_link_to Spree.t(:new_adjustment), new_admin_order_adjustment_url(@order), :icon => 'icon-plus'
%li= button_link_to Spree.t(:back_to_orders_list), admin_orders_path, :icon => 'icon-arrow-left'
= render :partial => 'adjustments_table'
= button_link_to t(:continue), @order.cart? ? new_admin_order_payment_url(@order) : admin_orders_url, :icon => 'icon-arrow-right'
= button_link_to Spree.t(:continue), @order.cart? ? new_admin_order_payment_url(@order) : admin_orders_url, :icon => 'icon-arrow-right'

View File

@@ -8,7 +8,7 @@
= Spree.t("shipment_states.#{shipment.state}")
- if shipment.ready? and can? :update, shipment
= "-"
= link_to t(:ship), '#', :class => 'ship button icon-arrow-right', :data => { 'shipment-number' => shipment.number }
= link_to 'ship', '#', :class => 'ship button icon-arrow-right', :data => { 'shipment-number' => shipment.number }
%table.stock-contents.index{ "data-hook" => "stock-contents" }
%colgroup

View File

@@ -10,7 +10,7 @@
= line_item.single_money.to_html
%td.item-qty-show.align-center
- item.states.each do |state,count|
= "#{count} x #{t(state.humanize.downcase)}"
= "#{count} x #{state.humanize.downcase}"
- unless shipment.shipped?
%td.item-qty-edit.hidden
= number_field_tag :quantity, item.quantity, :min => 0, :class => "line_item_quantity", :size => 5

View File

@@ -1,5 +1,5 @@
- content_for :main_ng_app_name do
= "admin.lineItems"
- content_for :app_wrapper_attrs do
= "ng-app='admin.lineItems'"
- content_for :page_title do
%h1.page-title

View File

@@ -13,8 +13,8 @@
#select-customer{"data-hook" => ""}
%fieldset.no-border-bottom
%legend{:align => "center"}= Spree.t(:customer_search)
- content_for :main_ng_app_name do
= "admin.orders"
- content_for :app_wrapper_attrs do
= 'ng-app=admin.orders'
= hidden_field_tag :customer_search_override, nil, distributor_id: @order.distributor_id, :class => 'fullwidth title customer-search-override'
= render :partial => "spree/admin/orders/customer_details/autocomplete", :formats => :js

View File

@@ -6,7 +6,7 @@
%li= button_link_to Spree.t(:resend), resend_admin_order_url(@order), :method => :post, :icon => 'icon-email'
%li.links-dropdown#links-dropdown{ links: order_links(@order).to_json }
- if can?(:admin, Spree::Order)
%li= button_link_to t(:back_to_orders_list), admin_orders_path, :icon => 'icon-arrow-left'
%li= button_link_to Spree.t(:back_to_orders_list), admin_orders_path, :icon => 'icon-arrow-left'
= render :partial => 'spree/admin/shared/order_tabs', :locals => { :current => 'Order Details' }

View File

@@ -7,11 +7,8 @@
= render partial: 'spree/admin/shared/order_sub_menu'
- content_for :main_ng_app_name do
= "admin.orders"
- content_for :main_ng_ctrl_name do
= "ordersCtrl"
- content_for :app_wrapper_attrs do
= "ng-app='admin.orders' ng-controller='ordersCtrl'"
- content_for :table_filter_title do
= t(:search)

View File

@@ -2,9 +2,9 @@
%thead
%tr
%th= "#{Spree.t('date')}/#{Spree.t('time')}"
%th= t(:amount)
%th= t(:payment_method)
%th= t(:payment_state)
%th= Spree.t(:amount)
%th= Spree.t(:payment_method)
%th= Spree.t(:payment_state)
%th.actions
%tbody
- payments.each do |payment|
@@ -13,7 +13,7 @@
%td.align-center= payment.display_amount.to_html
%td.align-center= link_to payment_method_name(payment), spree.admin_order_payment_path(@order, payment)
%td.align-center
%span{class: "state #{payment.state}"}= t(payment.state, scope: :payment_states, default: payment.state.capitalize)
%span{class: "state #{payment.state}"}= Spree.t(payment.state, scope: :payment_states, default: payment.state.capitalize)
%td.actions
- payment.actions.each do |action|
= link_to_with_icon "icon-#{action}", Spree.t(action), fire_admin_order_payment_path(@order, payment, e: action), method: :put, no_text: true, data: {action: action}

View File

@@ -3,20 +3,20 @@
- content_for :page_actions do
- if @order.outstanding_balance?
%li#new_payment_section
= button_link_to t(:new_payment), new_admin_order_payment_url(@order), icon: 'icon-plus'
%li= button_link_to t(:back_to_orders_list), admin_orders_path, icon: 'icon-arrow-left'
= button_link_to Spree.t(:new_payment), new_admin_order_payment_url(@order), icon: 'icon-plus'
%li= button_link_to Spree.t(:back_to_orders_list), admin_orders_path, icon: 'icon-arrow-left'
- content_for :page_title do
%i.icon-arrow-right
= t(:payments)
= Spree.t(:payments)
- if @order.outstanding_balance?
%h5.outstanding-balance
= @order.outstanding_balance < 0 ? t(:credit_owed) : t(:balance_due)
= @order.outstanding_balance < 0 ? Spree.t(:credit_owed) : Spree.t(:balance_due)
\:
%strong= @order.display_outstanding_balance
- if @payments.any?
= render partial: 'list', locals: { payments: @payments }
- else
.alpha.twelve.columns.no-objects-found= t(:order_has_no_payments)
.alpha.twelve.columns.no-objects-found= Spree.t(:order_has_no_payments)

View File

@@ -24,6 +24,4 @@
= render "layouts/bugherd_script"
%link{'data-require' => "font-awesome@*", 'data-semver'=>"4.2.0", 'rel' => "stylesheet", 'href' => "//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.2.0/css/font-awesome.css"}
= render "layouts/auth_token_script"
= yield :head

View File

@@ -1,7 +1,7 @@
<script>
Spree.routes = <%== {
:variants_search => spree.admin_search_variants_path(:format => 'json'),
:taxons_search => main_app.api_taxons_path(:format => 'json'),
:taxons_search => spree.api_taxons_path(:format => 'json'),
:user_search => spree.admin_search_users_path(:format => 'json'),
:orders_api => spree.api_orders_path(:format => 'json')
}.to_json %>;

View File

@@ -7,5 +7,3 @@
= tab :enterprises, :url => main_app.admin_enterprises_path
= tab :customers, :url => main_app.admin_customers_path
= tab :enterprise_groups, :url => main_app.admin_enterprise_groups_path, label: 'groups'
- if can? :admin, Spree::User
= tab(:users, url: spree.admin_users_path, icon: 'icon-user')

View File

@@ -1,78 +0,0 @@
= admin_inject_currency_config
= render "layouts/i18n_script"
#wrapper{"data-hook" => ""}
- if flash[:error]
.flash.error= flash[:error]
- if notice
.flash.notice= notice
- if flash[:success]
.flash.success= flash[:success]
#progress
.wrapper
#spinner
.progress-message
= Spree.t(:loading)
\...
= render :partial => 'spree/admin/shared/alert', :collection => session[:alerts]
%header#header{"data-hook" => ""}
.container
%figure.columns.five{"data-hook" => "logo-wrapper"}
= link_to image_tag(Spree::Config[:admin_interface_logo], :id => 'logo'), spree.admin_path
%nav.columns.eleven{"data-hook" => "admin_login_navigation_bar"}
= render :partial => 'spree/layouts/admin/login_nav'
%nav#admin-menu{"data-hook" => ""}
.container
.sixteen.columns.main-menu-wrapper
%ul.inline-menu.fullwidth-menu{"data-hook" => "admin_tabs"}
= render :partial => 'spree/admin/shared/tabs'
- if content_for?(:sub_menu)
%nav#sub-menu{"data-hook" => ""}
.container
.sixteen.columns
= yield :sub_menu
- if content_for?(:page_title) || content_for?(:page_actions)
#content-header{"data-hook" => ""}
.container
.sixteen.columns
.block-table
- if content_for?(:page_title)
.table-cell
%h1{:class => "page-title"}= yield :page_title
- if content_for?(:page_actions)
.page-actions.table-cell.toolbar{"data-hook" => "toolbar"}
%ul.inline-menu
= yield :page_actions
.container
.row
- content_class = content_for?(:sidebar) ? "with-sidebar" : ""
#content{:class => content_class, "data-hook" => ""}
- if content_for?(:table_filter)
- table_filter_class = content_for?(:sidebar) ? 'twelve columns' : 'sixteen columns'
#table-filter{:class => table_filter_class, "data-hook" => ""}
%fieldset
%legend{:align => "center"}= yield :table_filter_title
= yield :table_filter
- div_class = content_for?(:sidebar) ? 'twelve columns' : 'sixteen columns'
%div{:class => div_class}
= yield
- if content_for?(:sidebar)
%aside#sidebar.four.columns{"data-hook" => ""}
- if content_for?(:sidebar_title)
%h5.sidebar-title
%span= yield :sidebar_title
= yield :sidebar
%div{"data-hook" => "admin_footer_scripts"}
= render 'spree/shared/google_analytics'
%script
= raw "Spree.api_key = \"#{try_spree_current_user.try(:spree_api_key).to_s}\";"

View File

@@ -4,12 +4,80 @@
= render :partial => 'spree/admin/shared/head'
%body.admin
- if content_for?(:main_ng_app_name)
- if content_for?(:main_ng_ctrl_name)
%div{ "ng-app" => yield(:main_ng_app_name).strip.html_safe, "ng-controller" => yield(:main_ng_ctrl_name).strip.html_safe }
= render :partial => 'spree/layouts/admin_body'
- else
%div{ "ng-app" => yield(:main_ng_app_name).strip.html_safe }
= render :partial => 'spree/layouts/admin_body'
- else
= render :partial => 'spree/layouts/admin_body'
= admin_inject_currency_config
= render "layouts/i18n_script"
#wrapper{"data-hook" => ""}
- if flash[:error]
.flash.error= flash[:error]
- if notice
.flash.notice= notice
- if flash[:success]
.flash.success= flash[:success]
#progress
.wrapper
#spinner
.progress-message
= Spree.t(:loading)
\...
= render :partial => 'spree/admin/shared/alert', :collection => session[:alerts]
%header#header{"data-hook" => ""}
.container
%figure.columns.five{"data-hook" => "logo-wrapper"}
= link_to image_tag(Spree::Config[:admin_interface_logo], :id => 'logo'), spree.admin_path
%nav.columns.eleven{"data-hook" => "admin_login_navigation_bar"}
%nav#admin-menu{"data-hook" => ""}
.container
.sixteen.columns.main-menu-wrapper
%ul.inline-menu.fullwidth-menu{"data-hook" => "admin_tabs"}
= render :partial => 'spree/admin/shared/tabs'
- if content_for?(:sub_menu)
%nav#sub-menu{"data-hook" => ""}
.container
.sixteen.columns
= yield :sub_menu
- if content_for?(:page_title) || content_for?(:page_actions)
#content-header{"data-hook" => ""}
.container
.sixteen.columns
.block-table
- if content_for?(:page_title)
.table-cell
%h1{:class => "page-title"}= yield :page_title
- if content_for?(:page_actions)
.page-actions.table-cell.toolbar{"data-hook" => "toolbar"}
%ul.inline-menu
= yield :page_actions
.container
.row
- content_class = content_for?(:sidebar) ? "with-sidebar" : ""
#content{:class => content_class, "data-hook" => ""}
- if content_for?(:table_filter)
- table_filter_class = content_for?(:sidebar) ? 'twelve columns' : 'sixteen columns'
#table-filter{:class => table_filter_class, "data-hook" => ""}
%fieldset
%legend{:align => "center"}= yield :table_filter_title
= yield :table_filter
- div_class = content_for?(:sidebar) ? 'twelve columns' : 'sixteen columns'
%div{:class => div_class}
= yield
- if content_for?(:sidebar)
%aside#sidebar.four.columns{"data-hook" => ""}
- if content_for?(:sidebar_title)
%h5.sidebar-title
%span= yield :sidebar_title
= yield :sidebar
%div{"data-hook" => "admin_footer_scripts"}
= render 'spree/shared/google_analytics'
%script
= raw "Spree.api_key = \"#{try_spree_current_user.try(:spree_api_key).to_s}\";"

View File

@@ -3,10 +3,6 @@
%br
= f.email_field :email, class: 'title'
- if @unconfirmed_email
%p.alert-box
= t('spree.users.show.unconfirmed_email', unconfirmed_email: @unconfirmed_email)
%div{"id" => "password-credentials"}
%p
= f.label :password, Spree.t(:password)

View File

@@ -16,7 +16,7 @@
.small-12.medium-6.columns
.new_card{ ng: { show: 'CreditCard.visible', class: '{visible: CreditCard.visible}' } }
%h3= t(:add_new_credit_card)
%h3= t(:add_a_new_card)
= render 'new_card_form'
.authorised_shops{ ng: { controller: 'AuthorisedShopsCtrl', hide: 'CreditCard.visible' } }
%h3

View File

@@ -25,6 +25,13 @@ module Openfoodnetwork
end
end
# Activate the Skylight agent in staging. You need to provision the
# SKYLIGHT_AUTHENTICATION env var in your OFN instance for this to work.
#
# Check https://github.com/openfoodfoundation/openfoodnetwork/pull/2070 for
# details
config.skylight.environments += ["staging"]
# Settings dependent on locale
#
# We need to set this config before the promo environment gets loaded and

View File

@@ -48,6 +48,12 @@ SMTP_PASSWORD: 'f00d'
# see: https://developers.google.com/maps/documentation/javascript/get-api-key
# GOOGLE_MAPS_API_KEY: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# optional, see: https://www.skylight.io/oss
# SKYLIGHT_AUTHENTICATION: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Should be set if using Skylight, adds a link to Skylight dashboard to our footer
# SKYLIGHT_PUBLIC_DASHBOARD_URL: "https://oss.skylight.io/app/applications/xxxxxxxxxx"
# Stripe Connect details for instance account
# Find these under 'API keys' and 'Connect' in your Stripe account dashboard -> Account Settings
# Under 'Connect', the Redirect URI should be set to https://YOUR_SERVER_URL/stripe/callbacks (e.g. https://openfoodnetwork.org.uk/stripe/callbacks)

View File

@@ -2,6 +2,5 @@ if ENV['DATADOG_RAILS_APM']
Datadog.configure do |c|
c.use :rails, service_name: 'rails'
c.use :delayed_job, service_name: 'delayed_job'
c.analytics_enabled = true
end
end

View File

@@ -245,8 +245,6 @@ ca:
expired: ha caducat, si us plau, sol·liciteu-ne un de nou
back_to_payments_list: "Torna a la llista de pagaments"
maestro_or_solo_cards: "Targetes Maestro/Solo"
backordered: "Reabastit"
ship: "Enviament"
actions:
create_and_add_another: "Crea i afegeix-ne una altra"
create: "Crear"
@@ -637,7 +635,7 @@ ca:
name: Nom
applies: Aplicar?
manage: Gestiona els mètodes de pagament
no_method_yet: Encara no tens cap mètode de pagament.
not_method_yet: Encara no tens cap mètode de pagament.
create_button: Crea un nou mètode de pagament
create_one_button: Crea'n un ara
primary_details:
@@ -1120,6 +1118,7 @@ ca:
footer_data_text_without_privacy_policy_html: "Tenim cura de les vostres dades. Vegeu la nostra %{cookies_policy}"
footer_data_privacy_policy: "política de privacitat"
footer_data_cookies_policy: "política de cookies"
footer_skylight_dashboard_html: Les dades de rendiment estan disponibles a %{dashboard}.
shop:
messages:
login: "Inicia sessió"
@@ -2634,8 +2633,6 @@ ca:
name_or_sku: "Nom o codi (introduïu com a mínim els primers 4 caràcters del nom del producte)"
resend: Reenviar
back_to_orders_list: Tornar a la llista de comandes
return_authorizations: Autoritzacions de devolució
cannot_create_returns: No es poden crear devolucions ja que aquesta comanda no té cap unitat enviada.
select_stock: "Seleccioneu existències"
location: "Ubicació"
count_on_hand: "Compte disponible"

View File

@@ -243,7 +243,6 @@ de_DE:
reset_password_token: Passwort-Token zurücksetzen
expired: abgelaufen ist, fordern Sie bitte ein neues an
back_to_payments_list: "Zurück zur Zahlungsliste"
ship: "Liefern"
actions:
create_and_add_another: "Erstellen und weitere hinzufügen"
create: "Neu"
@@ -631,7 +630,7 @@ de_DE:
name: Name
applies: Gilt?
manage: Zahlungsarten verwalten
no_method_yet: Sie haben noch keine Zahlungsarten
not_method_yet: Sie haben noch keine Zahlungsarten
create_button: Neue Zahlungsart
create_one_button: Erstelle jetzt eine
primary_details:
@@ -1109,6 +1108,7 @@ de_DE:
footer_data_text_without_privacy_policy_html: "Wir passen auf Ihre Daten auf. Siehe unsere %{cookies_policy}"
footer_data_privacy_policy: "Datenschutz-Bestimmungen"
footer_data_cookies_policy: "Cookie-Richtlinien"
footer_skylight_dashboard_html: Leistungsdaten sind in der %{dashboard} verfügbar.
shop:
messages:
login: "Anmeldung"

View File

@@ -276,9 +276,6 @@ en:
expired: has expired, please request a new one
back_to_payments_list: "Back to Payments List"
maestro_or_solo_cards: "Maestro/Solo cards"
backordered: "Backordered"
on_hand: "On Hand"
ship: "Ship"
actions:
create_and_add_another: "Create and Add Another"
@@ -693,7 +690,7 @@ en:
name: Name
applies: Applies?
manage: Manage Payment Methods
no_method_yet: You don't have any payment methods yet.
not_method_yet: You don't have any payment methods yet.
create_button: Create New Payment Method
create_one_button: Create One Now
primary_details:
@@ -1190,6 +1187,7 @@ en:
footer_data_text_without_privacy_policy_html: "We take good care of your data. See our %{cookies_policy}"
footer_data_privacy_policy: "privacy policy"
footer_data_cookies_policy: "cookies policy"
footer_skylight_dashboard_html: Performance data is available on %{dashboard}.
shop:
messages:
login: "login"
@@ -2773,8 +2771,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using
name_or_sku: "Name or SKU (enter at least first 4 characters of product name)"
resend: Resend
back_to_orders_list: Back To Orders List
return_authorizations: Return Authorizations
cannot_create_returns: Cannot create returns as this order has no shipped units.
select_stock: "Select stock"
location: "Location"
count_on_hand: "Count On Hand"
@@ -2943,7 +2939,6 @@ See the %{link} to find out more about %{sitename}'s features and to start using
email: Email
# TODO: remove 'account_updated' key once we get to Spree 2.0
account_updated: "Account updated!"
email_updated: "The account will be updated once the new email is confirmed."
my_account: "My account"
date: "Date"
time: "Time"

View File

@@ -245,7 +245,6 @@ en_AU:
expired: has expired, please request a new one
back_to_payments_list: "Back to Payments List"
maestro_or_solo_cards: "Maestro/Solo cards"
ship: "Ship"
actions:
create_and_add_another: "Create and Add Another"
create: "Create"
@@ -635,7 +634,7 @@ en_AU:
name: Name
applies: Applies?
manage: Manage Payment Methods
no_method_yet: You don't have any payment methods yet.
not_method_yet: You don't have any payment methods yet.
create_button: Create New Payment Method
create_one_button: Create One Now
primary_details:
@@ -1117,6 +1116,7 @@ en_AU:
footer_data_text_without_privacy_policy_html: "We take good care of your data. See our %{cookies_policy}"
footer_data_privacy_policy: "privacy policy"
footer_data_cookies_policy: "cookies policy"
footer_skylight_dashboard_html: Performance data is available on %{dashboard}.
shop:
messages:
login: "login"

View File

@@ -243,7 +243,6 @@ en_BE:
reset_password_token: Reset password token
expired: has expired, please request a new one
back_to_payments_list: "Back to Payments List"
ship: "Ship"
actions:
create_and_add_another: "Create and Add Another"
create: "Create"
@@ -631,7 +630,7 @@ en_BE:
name: Name
applies: Applies?
manage: Manage Payment Methods
no_method_yet: You don't have any payment methods yet.
not_method_yet: You don't have any payment methods yet.
create_button: Create New Payment Method
create_one_button: Create One Now
primary_details:
@@ -1111,6 +1110,7 @@ en_BE:
footer_data_text_without_privacy_policy_html: "We take good care of your data. See our %{cookies_policy}"
footer_data_privacy_policy: "privacy policy"
footer_data_cookies_policy: "cookies policy"
footer_skylight_dashboard_html: Performance data is available on %{dashboard}.
shop:
messages:
login: "login"

View File

@@ -245,8 +245,6 @@ en_CA:
expired: has expired, please request a new one
back_to_payments_list: "Back to Payments List"
maestro_or_solo_cards: "Maestro/Solo cards"
backordered: "Backordered"
ship: "Ship"
actions:
create_and_add_another: "Create and Add Another"
create: "Create"
@@ -636,7 +634,7 @@ en_CA:
name: Name
applies: Applies?
manage: Manage Payment Methods
no_method_yet: You don't have any payment methods yet.
not_method_yet: You don't have any payment methods yet.
create_button: Create New Payment Method
create_one_button: Create One Now
primary_details:
@@ -1118,6 +1116,7 @@ en_CA:
footer_data_text_without_privacy_policy_html: "We take good care of your data. See our %{cookies_policy}"
footer_data_privacy_policy: "privacy policy"
footer_data_cookies_policy: "cookies policy"
footer_skylight_dashboard_html: Performance data is available on %{dashboard}.
shop:
messages:
login: "login"
@@ -2629,8 +2628,6 @@ en_CA:
name_or_sku: "Name or SKU (enter at least first 4 characters of product name)"
resend: Resend
back_to_orders_list: Back to Orders List
return_authorizations: Return Authoriations
cannot_create_returns: Cannot create returns as this order has no shipped units
select_stock: "Select stock"
location: "Location"
count_on_hand: "Count On Hand"

View File

@@ -245,8 +245,6 @@ en_GB:
expired: has expired, please request a new one
back_to_payments_list: "Back to Payments List"
maestro_or_solo_cards: "Maestro/Solo cards"
backordered: "Backordered"
ship: "Ship"
actions:
create_and_add_another: "Create and Add Another"
create: "Create"
@@ -636,7 +634,7 @@ en_GB:
name: Name
applies: Applies?
manage: Manage Payment Methods
no_method_yet: You don't have any payment methods yet.
not_method_yet: You don't have any payment methods yet.
create_button: Create New Payment Method
create_one_button: Create One Now
primary_details:
@@ -1118,6 +1116,7 @@ en_GB:
footer_data_text_without_privacy_policy_html: "We take good care of your data. See our %{cookies_policy}"
footer_data_privacy_policy: "privacy policy"
footer_data_cookies_policy: "cookies policy"
footer_skylight_dashboard_html: Performance data is available on %{dashboard}.
shop:
messages:
login: "login"
@@ -2635,8 +2634,6 @@ en_GB:
name_or_sku: "Name or SKU (enter at least first 4 characters of product name)"
resend: Resend
back_to_orders_list: Back To Orders List
return_authorizations: Return Authorisations
cannot_create_returns: Cannot create returns as this order has no shipped units.
select_stock: "Select stock"
location: "Location"
count_on_hand: "Count On Hand"

File diff suppressed because it is too large Load Diff

View File

@@ -245,7 +245,6 @@ en_US:
expired: has expired, please request a new one
back_to_payments_list: "Back to Payments List"
maestro_or_solo_cards: "Debit cards"
ship: "Ship"
actions:
create_and_add_another: "Create and Add Another"
create: "Create"
@@ -635,7 +634,7 @@ en_US:
name: Name
applies: Applies?
manage: Manage Payment Methods
no_method_yet: You don't have any payment methods yet.
not_method_yet: You don't have any payment methods yet.
create_button: Create New Payment Method
create_one_button: Create One Now
primary_details:
@@ -1117,6 +1116,7 @@ en_US:
footer_data_text_without_privacy_policy_html: "We take good care of your data. See our %{cookies_policy}"
footer_data_privacy_policy: "privacy policy"
footer_data_cookies_policy: "cookies policy"
footer_skylight_dashboard_html: Performance data is available on %{dashboard}.
shop:
messages:
login: "login"

View File

@@ -245,7 +245,6 @@ en_ZA:
expired: has expired, please request a new one
back_to_payments_list: "Back to Payments List"
maestro_or_solo_cards: "Maestro/Solo cards"
ship: "Ship"
actions:
create_and_add_another: "Create and Add Another"
create: "Create"
@@ -635,7 +634,7 @@ en_ZA:
name: Name
applies: Applies?
manage: Manage Payment Methods
no_method_yet: You don't have any payment methods yet.
not_method_yet: You don't have any payment methods yet.
create_button: Create New Payment Method
create_one_button: Create One Now
primary_details:
@@ -1117,6 +1116,7 @@ en_ZA:
footer_data_text_without_privacy_policy_html: "We take good care of your data. See our %{cookies_policy}"
footer_data_privacy_policy: "privacy policy"
footer_data_cookies_policy: "cookies policy"
footer_skylight_dashboard_html: Performance data is available on %{dashboard}.
shop:
messages:
login: "login"

View File

@@ -245,8 +245,6 @@ es:
expired: ha expirado, por favor solicite una nueva
back_to_payments_list: "Volver a la lista de pagos"
maestro_or_solo_cards: "Tarjetas Maestro/Solo"
backordered: "Reabastecido"
ship: "Envío"
actions:
create_and_add_another: "Crear y agregar otro"
create: "Crear"
@@ -637,7 +635,7 @@ es:
name: Nombre
applies: ¿Aplicar?
manage: Gestionar los métodos de pago
no_method_yet: Todavía no tienes ningún método de pago.
not_method_yet: Todavía no tienes ningún método de pago.
create_button: Crear un nuevo método de pago
create_one_button: Crear una ahora
primary_details:
@@ -1120,6 +1118,7 @@ es:
footer_data_text_without_privacy_policy_html: "Cuidamos bien tus datos. Consulta nuestra %{cookies_policy}"
footer_data_privacy_policy: "política de privacidad"
footer_data_cookies_policy: "política de cookies"
footer_skylight_dashboard_html: Los datos de rendimiento están disponibles en %{dashboard}.
shop:
messages:
login: "login"
@@ -2635,8 +2634,6 @@ es:
name_or_sku: "Nombre o código SKU (ingrese al menos los primeros 4 caracteres del nombre del producto)"
resend: Reenviar
back_to_orders_list: Volver a la lista de pedidos
return_authorizations: Autorizaciones de devolución
cannot_create_returns: No se pueden crear devoluciones ya que este pedido no tiene unidades enviadas.
select_stock: "Seleccionar stock"
location: "Ubicación"
count_on_hand: "Cuenta de disponibilidad"

View File

@@ -110,7 +110,7 @@ fr:
confirmation_instructions:
subject: "Confirmez l'adresse email pour %{enterprise}"
welcome:
subject: "Dernière étape pour créer%{enterprise} sur %{sitename}"
subject: "%{enterprise} est maintenant sur %{sitename}"
invite_manager:
subject: "%{enterprise} vous a invité comme gestionnaire"
producer_mailer:
@@ -245,8 +245,6 @@ fr:
expired: a expiré, veuillez faire une nouvelle demande.
back_to_payments_list: "Retour à la liste des paiements"
maestro_or_solo_cards: "Cartes Maestro/Solo"
backordered: "(à volonté)"
ship: "Expédier"
actions:
create_and_add_another: "Créer et ajouter nouveau"
create: "Créer"
@@ -584,7 +582,7 @@ fr:
title: Entreprises
new_enterprise: Nouvelle entreprise
producer?: "Producteur?"
package: Type de profil
package: Pack
status: Statut
manage: Gérer
form:
@@ -637,7 +635,7 @@ fr:
name: Nom
applies: Active?
manage: Gérer les méthodes de paiement
no_method_yet: Vous n'avez pas encore de méthode de paiement.
not_method_yet: Vous n'avez pas encore de méthode de paiement.
create_button: Créer une nouvelle méthode de paiement
create_one_button: En créer une maintenant
primary_details:
@@ -672,14 +670,14 @@ fr:
create_one_button: En créer une maintenant
no_method_yet: Vous n'avez pas encore paramétré de méthode de livraison.
shop_preferences:
shopfront_requires_login: "Boutique privée (accès contrôlé) ?"
shopfront_requires_login: "Boutique visible par tous?"
shopfront_requires_login_tip: "Choisissez si les acheteurs doivent être connectés pour voir la boutique ou si la boutique est visible par tout le monde."
shopfront_requires_login_false: "Boutique publique (visible par tous)"
shopfront_requires_login_true: "Visible uniquement pour les acheteurs connectés ET figurant sur la liste \"acheteurs\" de la boutique (boutique privée)"
shopfront_requires_login_false: "Visible par tous"
shopfront_requires_login_true: "Visible uniquement pour les acheteurs logués"
recommend_require_login: "Nous recommandons de demander aux utilisateurs de se connecter si vous souhaitez leur permettre de modifier leur commande."
allow_guest_orders: "Commandes des invités"
allow_guest_orders_tip: "Autoriser la commande en tant qu'invité ou demander que l'acheteur soit logué."
allow_guest_orders_false: "Demander que l'acheteur se connecte pour pouvoir finaliser sa commande"
allow_guest_orders_false: "Demander que l'acheteur se logue pour pouvoir commander"
allow_guest_orders_true: "Autoriser les commandes en mode invité"
allow_order_changes: "Modifier la commande"
allow_order_changes_tip: "Permettre aux acheteurs de modifier leur commande tant que le cycle de vente est ouvert."
@@ -766,23 +764,23 @@ fr:
owner: Gestionnaire principal
producer: Producteur
change_type_form:
producer_profile: Profil simple
connect_ofn: Pour apparaître sur la carte et la liste des producteurs
always_free: ' '
producer_description_text: Nous vous invitons à renseigner votre profil de la façon la plus complète possible. Un profil complet et avec des images attire plus ! Vous pourrez mettre des liens pour rediriger les visiteurs vers votre site internet ou espace de vente en ligne le cas échéant. Vous pourrez renseigner votre catalogue produits et le partager avec les circuits courts qui souhaitent vendre vos produits dans leur boutique sur Open Food France.
producer_profile: Profil producteur
connect_ofn: Gagnez en visibilité via OFFrance
always_free: GRATUIT
producer_description_text: Saisissez votre catalogue produits sur Open Food France, ce qui permettra aux hubs-distributeurs utilisant la plateforme de les proposer dans leurs boutiques (sur votre autorisation).
producer_shop: Boutique Producteur
sell_your_produce: Pour vendre vos produits
producer_shop_description_text: Vous pourrez paramétrer votre boutique en ligne selon votre fonctionnement, et partager votre catalogue produits avec dautres circuits courts souhaitant les distribuer dans leur boutique.
producer_shop_description_text2: 'ATTENTION : Si vous vendez via un autre outil en ligne, et nenvisagez pas dutiliser Open Food France pour cet usage, choisissiez “profil simple”. De même, si vous fournissez un circuit court utilisant Open Food France pour vendre, mais ne vendez pas vous-même en direct sur Open Food France, choisissez “profil simple”.'
producer_hub: Boutique multi-producteurs
producer_hub_text: Pour vendre vos produits ainsi que ceux dautres producteurs
producer_hub_description_text: 'Vous pourrez paramétrer votre boutique en ligne selon votre fonctionnement, vendre les produits d''autres producteurs, et partager votre catalogue produits avec dautres circuits courts souhaitant les distribuer dans leur boutique. ATTENTION : Si vous vendez via un autre outil en ligne, et nenvisagez pas dutiliser Open Food France pour cet usage, choisissiez “profil simple”. De même, si vous fournissez un circuit court utilisant Open Food France pour vendre, mais ne vendez pas vous-même en direct sur Open Food France, choisissez “profil simple”.'
profile: Profil simple
get_listing: Pour apparaître sur la carte
profile_description_text: Nous vous invitons à renseigner votre profil de la façon la plus complète possible. Un profil complet et avec des images attire plus ! Vous pourrez mettre des liens pour rediriger les visiteurs vers votre site internet ou espace de vente en ligne le cas échéant.
hub_shop: Boutique multi-producteurs
hub_shop_text: Pour vendre des produits de différents fournisseurs
hub_shop_description_text: 'Vous pourrez paramétrer votre boutique en ligne selon votre fonctionnement, et y proposer les produits de multiples producteurs. ATTENTION : Si vous vendez via un autre outil en ligne, et nenvisagez pas dutiliser Open Food France pour cet usage, choisissiez “profil simple”.'
sell_your_produce: Vendez vos propres produits
producer_shop_description_text: Vendez vos produits en direct aux mangeurs/restaurateurs/etc. via votre propre Boutique Producteur sur Open Food France.
producer_shop_description_text2: Une Boutique Producteur vous permet de vendre uniquement vos propres produits. Si vous voulez vendre d'autres produits, sélectionnez "Hub Producteur"
producer_hub: Hub Producteur
producer_hub_text: Vendez vos produits et ceux d'autres fournisseurs
producer_hub_description_text: Vous vendez non seulement vos produits, mais aussi des produits d'autres producteurs de votre région, artisans, ou distributeurs afin de proposer une offre complète dans votre boutique. Vous soutenez ainsi le développement de votre système alimentaire territorial !
profile: Profil uniquement
get_listing: Référencez votre hub/point de vente
profile_description_text: Les visiteurs peuvent vous trouver sur Open Food France et vous contacter. Votre entreprise sera visible sur la carte.
hub_shop: Boutique Hub
hub_shop_text: Vendez des produits de multiples fournisseurs différents
hub_shop_description_text: Vous proposez des produits de différents producteurs de votre région, artisans, ou distributeurs afin de proposer une offre complète dans votre boutique. Vous soutenez ainsi le développement de votre système alimentaire territorial !
choose_option: Veuilliez choisir l'une des options ci-dessus.
change_now: Changer
enterprise_user_index:
@@ -792,7 +790,7 @@ fr:
manage: Gérer
manage_link: Paramètres
producer?: "Producteur ?"
package: "Type de profil"
package: "Pack"
status: "Statut"
new_form:
owner: Gestionnaire principal
@@ -817,9 +815,9 @@ fr:
welcome_title: Bienvenue sur Open Food France !
welcome_text: 'Vous avez créé avec succès '
next_step: Etape suivante
choose_starting_point: 'Choisir votre type de profil :'
choose_starting_point: 'Choisir votre type d''entreprise:'
profile: 'Profil'
producer_profile: 'Profil simple'
producer_profile: 'Profil producteur'
invite_manager:
user_already_exists: "Le compte existe déjà"
error: "Un problème est survenu"
@@ -1119,6 +1117,7 @@ fr:
footer_data_text_without_privacy_policy_html: "Nous prenons soin de vos données. Voir notre %{cookies_policy}."
footer_data_privacy_policy: "politique de confidentialité"
footer_data_cookies_policy: "politique de cookies"
footer_skylight_dashboard_html: Les informations de performance sont disponibles sur %{dashboard}.
shop:
messages:
login: "Se connecter"
@@ -1377,20 +1376,20 @@ fr:
products_in: "dans %{oc}"
products_at: "à %{distributor}"
products_elsewhere: "Produits trouvés ailleurs"
email_welcome: "Vous y êtes presque..."
email_welcome: "Bienvenue"
email_confirmed: "Veuillez confirmer votre adresse email."
email_registered: "va, dès que vous aurez choisi un type de profil, être créé sur"
email_userguide_html: "Le Guide Utilisateur est là pour vous accompagner dans la prise en main de la plateforme. Vous y trouverez les informations détaillées de paramétrage de votre profil entreprise, de vos produits si vous êtes producteurs, et de votre boutique si vous avez choisi un type de profil comprenant une boutique. Pour accéder au guide en français, cliquez ici : %{link}"
email_admin_html: "Pour choisir le type de profil, rendez-vous sur l%{link}. Vous pouvez aussi y accéder depuis la page daccueil du site, en haut à droite, Profil > Administration. Il vous est alors proposé de choisir le type de profil désiré. Le type de profil peut aussi être choisi via le menu “Entreprises” depuis linterface dadministration, colonne “Type de profil”. Linterface dadministration est lendroit où vous gérez vos entreprises, produits, commandes, etc."
email_community_html: "Nous avons aussi un forum de discussion en ligne pour échanger avec la communauté sur des questions liées à la plateforme ou aux défis de la gestion d'un circuit court. Nous vous invitons à y participer ! %{link}"
join_community: "Accéder au forum"
email_registered: "fait maintenant partie de"
email_userguide_html: "Le Guide Utilisateur expliquant comment mettre en place son profil producteur ou son hub est accessible ici: %{link}"
email_admin_html: "Vous pouvez gérer votre compte en vous connectant ici %{link} ou en cliquant sur la roue en haut à droite de la page d'accueil et en sélectionnant Administration."
email_community_html: "Nous avons aussi un forum de discussion en ligne (en anglais) pour échanger avec la communauté sur des questions liées au logiciel OFN et aux défis de la gestion d'un food hub. Nous vous invitons à y participer. Nous sommes en constante évolution et vos contributions à ce forum vont façonner les prochaines étapes. %{link}"
join_community: "Rejoindre la communauté"
email_confirmation_activate_account: "Avant de pouvoir activer votre compte, nous devons nous assurer de la validité de votre adresse email."
email_confirmation_greeting: "Bonjour %{contact}!"
email_confirmation_profile_created: "Le profil pour %{name} a été créé avec succès! Pour activer votre Profil nous devons vérifier cette adresse email."
email_confirmation_click_link: "Veuillez cliquer sur le lien ci-dessous pour confirmer votre email et continuer la configuration de votre compte."
email_confirmation_link_label: "Confirmer cette adresse email »"
email_confirmation_help_html: "Après confirmation de votre email, vous pourrez accéder au compte d'administration de cette entreprise. Voir %{link} pour en savoir plus à propos de %{sitename} et commencer à utiliser votre profil et/ou boutique en ligne."
email_confirmation_notice_unexpected: "Vous recevez ce message car vous vous êtes inscrit sur %{sitename}, ou avez été invité à vous inscrire par l'un de vos contacts. Si vous ne comprenez pas pourquoi vous recevez ce message, écrivez à info@openfoodfrance.org."
email_confirmation_notice_unexpected: "Vous recevez ce message car vous vous êtes inscrit sur %{sitename}, ou avez été invité à vous inscrire par l'un de vos contacts. Si vous ne comprenez pas pourquoi vous recevez ce message, écrivez à %{contact}."
email_social: "Nous suivre:"
email_contact: "Nous écrire:"
email_signoff: "Cordialement,"
@@ -1439,18 +1438,18 @@ fr:
email_shipping_collection_time: "Prêt pour retrait:"
email_shipping_collection_instructions: "Instructions de retrait:"
email_special_instructions: "Vos commentaires:"
email_signup_greeting: Bonjour !
email_signup_welcome: "Bienvenue sur %{sitename} !"
email_signup_greeting: Bonjour!
email_signup_welcome: "Bienvenue sur %{sitename}!"
email_signup_confirmed_email: "Merci d'avoir confirmé votre email."
email_signup_shop_html: "Vous pouvez maintenant vous connecter sur %{link}."
email_signup_text: "Si vous organisez / fournissez un circuit court, nhésitez pas à nous contacter à info@openfoodfrance.org, nous sommes là pour vous accompagner dans la création de votre espace de vente / commande en ligne. Si vous achetez via un circuit court utilisant Open Food France, connectez-vous avant de passer commande pour que vos informations personnelles soient gardées en mémoire, cela vous évitera de les ressaisir à chaque commande ! "
email_signup_help_html: "Des retours à nous faire quant à votre utilisation de la plateforme ? Écrivez-nous à info@openfoodfrance.org."
email_signup_text: "Merci d'avoir rejoint le réseau. Si vous êtes un client, nous sommes impatients de vous faire découvrir de nombreux agriculteurs fantastiques, de merveilleux hubs de distribution et des plats délicieux! Si vous êtes un producteur ou autre entreprise alimentaire, nous sommes ravis de vous compter parmi les membres du réseau."
email_signup_help_html: "Vos questions et feedbacks sont les bienvenus! Cliquez sur le bouton <em>Envoyer un commentaire</em> sur le site ou envoyez-nous un email à %{email}"
invite_email:
greeting: "Bonjour !"
greeting: "Bonjour!"
invited_to_manage: "Vous avez été invité(e) à gérer %{enterprise} sur %{instance}."
confirm_your_email: "Vous avez reçu ou allez recevoir prochainement un email avec un lien de validation. Vous n'aurez pas accès au profil de l'entreprise %{enterprise} avant d'avoir cliqué sur ce lien."
set_a_password: "Vous serez ensuite invité(e) à choisir un mot de passe avant de pouvoir accéder et gérer le profil de l'entreprise."
mistakenly_sent: "Vous ne savez pas pourquoi vous recevez cet email ? Veuillez contacter %{owner_email} pour plus d'informations."
mistakenly_sent: "Vous ne savez pas pourquoi vous recevez cet email? Veuillez contacter %{owner_email} pour plus d'informations."
producer_mail_greeting: "Cher(ère)"
producer_mail_text_before: "Nous avons reçu toutes les commandes pour la prochaine livraison."
producer_mail_order_text: "Voilà la liste et les quantités des produits commandés vous concernant:"
@@ -1714,7 +1713,7 @@ fr:
registration:
steps:
introduction:
registration_greeting: "Bonjour !"
registration_greeting: "Bonjour!"
registration_intro: "Vous pouvez maintenant créer votre profil \"Producteur\" ou \"Hub\""
registration_checklist: "De quoi ai-je besoin ?"
registration_time: "5-10 minutes"
@@ -1727,7 +1726,7 @@ fr:
registration_outcome1_html: "Votre profil permet aux gens de vous <strong>trouver</strong> et de vous <strong>contacter</strong> via Open Food France."
registration_outcome2: "Utilisez cet espace pour raconter l'histoire de votre entreprise, et stimuler les visites vers vos points de présence en ligne."
registration_outcome3: "C'est aussi le premier pas vers la vente via Open Food France, ou l'ouverture de votre boutique en ligne."
registration_action: "Démarrons !"
registration_action: "Démarrons!"
details:
title: "Informations"
headline: "Commençons !"
@@ -1753,7 +1752,7 @@ fr:
country_field_error: "Veuillez saisir une Pays"
contact:
title: "Contact"
who_is_managing_enterprise: "Qui gère %{enterprise} ?"
who_is_managing_enterprise: "Qui gère %{enterprise}?"
contact_field: "Personne référente"
contact_field_placeholder: "Nom du contact principal"
contact_field_required: "Vous devez saisir une personne référente"
@@ -1761,7 +1760,7 @@ fr:
phone_field_placeholder: "ex : 06 24 53 26 53"
type:
title: "Catégorie"
headline: "Dites-nous en un peu plus sur %{enterprise}"
headline: "Dernière étape pour ajouter %{enterprise} !"
question: "Etes-vous un producteur ?"
yes_producer: "Oui, je suis un producteur"
no_producer: "Non, je ne suis pas un producteur"
@@ -1771,10 +1770,10 @@ fr:
create_profile: "Créer votre profil"
about:
title: "A propos"
headline: "Vous y êtes presque !"
message: "Le profil entreprise est en passe dêtre créé mais il est pour linstant vide :-( Pour apparaître proprement sur la carte, ajoutez les éléments demandés dans les écrans suivants concernant"
success: "ATTENTION ! Le profil de %{enterprise} ne sera visible sur la plateforme que lorsque vous aurez choisi votre type de profil. Vous avez reçu un email avec un lien vers linterface dadministration. Veuillez cliquez sur ce lien et choisir un des types de profils proposés."
registration_exit_message: "Si vous quittez ce module, vous pourrez continuer la création de votre profil à tout moment via linterface dadministration, en vous connectant puis en cliquant sur Profil > Administration."
headline: "Bien joué!"
message: "A présent, allons un peu plus dans les détails concernant"
success: "Opération réussie ! %{enterprise} a été ajoutée à Open Food France"
registration_exit_message: "Si vous quittez ce module, vous pourrez continuer la création de votre profil via l'interface d'administration."
enterprise_description: "Description (en bref)"
enterprise_description_placeholder: "Une phrase pour décrire votre organisation"
enterprise_long_desc: "Description longue"
@@ -1972,7 +1971,7 @@ fr:
spree_admin_product_category: Catégorie Produit
spree_admin_variant_unit_name: Nom de la pièce (si vendu à la pièce)
unit_name: "Unité"
change_package: "Changer de type de profil"
change_package: "Changer de type de compte"
spree_admin_single_enterprise_hint: "Astuce: Pour permettre aux gens de vous trouver, activez votre visibilité "
spree_admin_eg_pickup_from_school: "ex : \"Retrait des produits à l'Ecole Marimati / Au Café du coin / chez Babette / ...\""
spree_admin_eg_collect_your_order: "ex : \"Veuillez récupérer votre commande au 34 rue Victor Hugo, 75018 Paris\""
@@ -2313,91 +2312,74 @@ fr:
saving: En cours d'enregistrement
enterprise_package:
hub_profile: Profil Hub
hub_profile_cost: " "
hub_profile_cost: "COÛT: CONTRIBUTION LIBRE"
hub_profile_text1: >
Votre profil sera visible sur la carte.
Les visiteurs voient votre profil sur la carte, et peuvent vous contacter.
Vous augmentez ainsi votre visibilité.
hub_profile_text2: >
Nous vous invitons à renseigner votre profil de la façon la plus complète
possible. Un profil complet et avec des images attire plus ! Vous pourrez
mettre des liens pour rediriger les visiteurs vers votre site internet
ou espace de vente en ligne le cas échéant.
hub_shop: Boutique multi-producteurs
Créez votre profil et utilisez Open Food France pour vous connecter
à votre système alimentaire territorial.
hub_shop: Boutique Hub
hub_shop_text1: >
Vous pourrez paramétrer votre boutique en ligne pour ladapter à vos
besoins : méthodes de paiement et livraison proposées à vos acheteurs,
produits à mettre en vente parmi les catalogues de vos fournisseurs,
rythmes de commande et livraison, etc.
Vous proposez des produits de différents producteurs de votre région,
artisans, ou distributeurs afin de proposer une offre complète dans
votre boutique. Vous soutenez ainsi le développement de votre système
alimentaire territorial !
hub_shop_text2: >
Un hub n'a pas de modèle figé, il peut s'agir d'un groupement d'achat,
d'une AMAP, d'une épicerie coopérative, d'une épicerie locale de quartier
ou épicerie en circuit court en ligne, etc.
hub_shop_text3: >2+
choose_package: Choisir le type de profil souhaité
hub_shop_text3: >
Si vous produisez et voulez également vendre vos propres produits, vous
devez modifier le statut de votre entreprise, elle doit apparaitre en
tant que "producteur".
choose_package: Choisir le type de compte souhaité
choose_package_text1: >
Votre entreprise ne sera activée et visible que lorsque vous aurez choisi
le type de profil souhaité parmi les options à gauche.
le type de compte souhaité parmi les options à gauche.
choose_package_text2: >
Cliquez sur une option pour voir le détail du compte proposé, puis une
fois votre choix fait, cliquez sur le bouton rouge ENREGISTRER !
profile_only: Profil simple
profile_only_cost: " "
profile_only: Profil uniquement
profile_only_cost: "COÛT: CONTRIBUTION LIBRE"
profile_only_text1: >
Votre profil sera visible sur la carte, et depuis le menu “producteurs”.
Gagnez en visibilité, racontez votre histoire, et affichez vos coordonnées
pour pouvoir être contactés.
profile_only_text2: >
Nous vous invitons à renseigner votre profil de la façon la plus complète
possible. Un profil complet et avec des images attire plus ! Vous pourrez
mettre des liens pour rediriger les visiteurs vers votre site internet
ou espace de vente en ligne le cas échéant.
Si vous souhaitez vous concentrer sur votre activité de production,
et laisser à d'autre le soin de distribuer vos produits, vous n'avez
pas besoin d'une boutique sur Open Food France.
profile_only_text3: >
Vous pourrez renseigner votre catalogue produits et le partager avec
les circuits courts qui souhaitent vendre vos produits dans leur boutique
sur Open Food France.
Saisissez votre catalogue produits sur Open Food France, ce qui permettra
aux hubs-distributeurs utilisant la plateforme de les proposer dans
leurs boutiques (sur votre autorisation).
producer_shop: Boutique Producteur
producer_shop_text1: >
Vous pourrez paramétrer votre boutique en ligne pour ladapter à vos
besoins : méthodes de paiement et livraison proposées à vos acheteurs,
produits à mettre en vente parmi ceux de votre catalogue, rythmes de
commande et livraison, etc.
Vendez vos produits en direct aux mangeurs/restaurateurs/etc. via votre
propre Boutique Producteur sur Open Food France.
producer_shop_text2: >
Vous pourrez renseigner votre catalogue produits et le partager avec
dautres circuits courts qui souhaitent vendre vos produits dans leur
boutique sur Open Food France.
ATTENTION :
- Si vous vendez via un autre outil en ligne, et nenvisagez pas dutiliser
Open Food France pour organiser vos ventes / commandes, choisissiez
le type de profil “profil simple”.
- Si vous fournissez un circuit court utilisant Open Food France pour
vendre, mais ne vendez pas vous-même en direct sur Open Food France,
choisissez le type de profil “profil simple”.
producer_hub: Boutique multi-producteurs
Une Boutique Producteur vous permet de vendre uniquement vos propres
produits. Si vous voulez vendre d'autres produits, sélectionnez "Hub
Producteur"
producer_hub: Hub Producteur
producer_hub_text1: >
Vous pourrez paramétrer votre boutique en ligne pour ladapter à vos
besoins : méthodes de paiement et livraison proposées à vos acheteurs,produits
à mettre en vente parmi ceux votre catalogue et ceux des autres producteurs,
rythmes de commande et livraison, etc.
Vous vendez non seulement vos produits, mais aussi des produits d'autres
producteurs de votre région, artisans, ou distributeurs afin de proposer
une offre complète dans votre boutique. Vous soutenez ainsi le développement
de votre système alimentaire territorial !
producer_hub_text2: >
Vous pourrez renseigner votre catalogue produits et le partager avec
dautres circuits courts qui souhaitent vendre vos produits dans leur
boutique sur Open Food France.
Un hub producteur peut prendre différentes formes, une boutique de vente
directe, un magasin de producteurs en ligne, un drive fermier, etc.
producer_hub_text3: >
ATTENTION :
- Si vous vendez via un autre outil en ligne, et nenvisagez pas dutiliser
Open Food France pour organiser vos ventes / commandes, choisissiez
le type de profil “profil simple”.
- Si vous fournissez un circuit court utilisant Open Food France pour
vendre, mais ne vendez pas vous-même en direct sur Open Food France,
choisissez le type de profil “profil simple”.
get_listing: Pour apparaître sur la carte
always_free: ' '
sell_produce_others: Pour vendre des produits de différents fournisseurs
sell_own_produce: Pour vendre vos produits
sell_both: Pour vendre vos produits ainsi que ceux dautres producteurs
Open Food France soutient tous les modèles de hubs alimentaires, nous
pensons que la résilience du système viendra de la diversité des modèles.
Donc quel que soit votre modèle, nous souhaitons vous apporter les outils
de gestion donc vous avez besoin pour opérer votre circuit court.
get_listing: Référencez votre entreprise
always_free: CONTRIBUTION LIBRE
sell_produce_others: Vendez des produits de multiples fournisseurs différents
sell_own_produce: Vendez vos propres produits
sell_both: Vendez vos produits et ceux d'autres fournisseurs
enterprise_producer:
producer: Producteur
producer_text1: >
@@ -2658,8 +2640,6 @@ fr:
name_or_sku: "Nom ou Ref Produit (entrer au moins les 4 premiers caractères du nom du produit)"
resend: Renvoyer
back_to_orders_list: Retour à la liste des commandes
return_authorizations: Autorisations de retours
cannot_create_returns: Impossible de créer une autorisation de retour car aucun produit n'a été livré pour cette commande.
select_stock: "Sélectionner le stock"
location: "Localisation"
count_on_hand: "Quantité en stock"
@@ -3077,7 +3057,7 @@ fr:
invalid: invalide
order_mailer:
cancel_email:
customer_greeting: "Bonjour %{name} !"
customer_greeting: "Bonjour %{name}!"
instructions: "Votre commande a été ANNULÉE. Vous trouverez ci-dessous les informations concernant cette commande. "
order_summary_canceled: "Résumé de la commande [ANNULEE]"
subject: "Annulation de Commande"

View File

@@ -243,7 +243,6 @@ fr_BE:
reset_password_token: réinitialisation du mot de passe
expired: a expiré, veuillez en demander un nouveau
back_to_payments_list: "Retour à la liste des paiements"
ship: "Expédier"
actions:
create_and_add_another: "Créer et ajouter un nouveau"
create: "Créer"
@@ -632,7 +631,7 @@ fr_BE:
name: Nom
applies: Active?
manage: Gérer les méthodes de paiement
no_method_yet: Vous n'avez pas encore de méthode de paiement.
not_method_yet: Vous n'avez pas encore de méthode de paiement.
create_button: Créer une nouvelle méthode de paiement
create_one_button: En créer une maintenant
primary_details:
@@ -1112,6 +1111,7 @@ fr_BE:
footer_data_text_without_privacy_policy_html: "Nous prenons soin de vos données. Voir notre %{cookies_policy}."
footer_data_privacy_policy: "politique de confidentialité"
footer_data_cookies_policy: "politique de cookies"
footer_skylight_dashboard_html: Les informations de performance sont disponibles sur %{dashboard}.
shop:
messages:
login: "Se connecter"
@@ -1449,8 +1449,8 @@ fr_BE:
producer_mail_order_text: "Voilà la liste et les quantités des produits commandés vous concernant:"
producer_mail_delivery_instructions: "Modalités de livraison des produits:"
producer_mail_signoff: "Merci et belle fin de journée!"
shopping_oc_closed: Le comptoir est actuellement fermé
shopping_oc_closed_description: "Veuillez attendre l'ouverture du prochain cycle de vente (ou contactez directement le comptoir pour voir si nous pouvons accepter une commande tardive)."
shopping_oc_closed: La boutique est actuellement fermée
shopping_oc_closed_description: "Veuillez attendre l'ouverture du prochain cycle de vente (ou contactez-nous directement pour voir si nous pouvons accepter une commande tardive)"
shopping_oc_last_closed: "Le dernier cycle de vente s'est terminé il y a %{distance_of_time}"
shopping_oc_next_open: "Le prochain cycle de vente ouvrira dans %{distance_of_time}"
shopping_tabs_about: "A propos de %{distributor}"
@@ -1594,7 +1594,7 @@ fr_BE:
sell_groups_detail: "Créer un répertoire sur mesure (regroupant différents producteurs et comptoirs) pour votre région ou votre organisation."
sell_user_guide: "En savoir plus en explorant le guide utilisateur."
sell_listing_price: "L'inscription à l'OFN est libre de contribution. Ouvrir et utiliser un comptoir sur OFN vous permet de gagner jusqu'à 500 $ de ventes mensuelles. Si vous vendez plus, vous pouvez choisir votre contribution communautaire entre 1% et 3% des ventes. Pour plus de détails sur les prix, visitez la section Plateforme logicielle via le lien \"À propos\" de dans le menu supérieur."
sell_embed: "Dici là, vous pouvez également participer au projet. Soit en co-créant la communauté belge, en contribuant à lamélioration des fonctionnalités…  Soit en mettant à disposition : un local pour la démonstration de loutil ou un point relais pour faciliter les livraisons… Soit en le finançant par un don (déductible fiscalement à partir de 40€) versé à Oxfam-Magasins du monde qui coordonne le projet :  BE41 0682 2264 2410 com: Open Food Network Nous consulter sur les services des partenaires OFN."
sell_embed: "Dici là, vous pouvez également participer au projet. Soit en co-créant la communauté belge, en contribuant à lamélioration des fonctionnalités…  Soit en mettant à disposition : un local pour la démonstration de loutil ou un point relais pour faciliter les livraisons… Soit en le finançant BE41 0682 2264 2410 com: Open Food Network"
sell_ask_services: "Nous consulter sur les services des partenaires OFN."
shops_title: Comptoirs
shops_headline: Des achats qui transforment.

View File

@@ -246,8 +246,6 @@ fr_CA:
expired: a expiré, veuillez faire une nouvelle demande.
back_to_payments_list: "Retour à la liste des paiements"
maestro_or_solo_cards: "Cartes Maestro/Solo"
backordered: "à volonté"
ship: "Expédier"
actions:
create_and_add_another: "Créer et ajouter nouveau"
create: "Créer"
@@ -638,7 +636,7 @@ fr_CA:
name: Nom
applies: S'applique?
manage: Gérer les méthodes de paiement
no_method_yet: Vous n'avez pas encore de méthode de paiement.
not_method_yet: Vous n'avez pas encore de méthode de paiement.
create_button: Créer une nouvelle méthode de paiement
create_one_button: En créer une maintenant
primary_details:
@@ -1119,6 +1117,7 @@ fr_CA:
footer_data_text_without_privacy_policy_html: "Nous prenons soin de vos données. Voire notre ."
footer_data_privacy_policy: "politique de confidentialité"
footer_data_cookies_policy: "politique de cookies"
footer_skylight_dashboard_html: 'Les données relatives à la performance sont disponibles sur '
shop:
messages:
login: "se connecter"
@@ -2641,8 +2640,6 @@ fr_CA:
name_or_sku: "Nom ou Ref Produit (entrer au moins les 4 premiers caractères du nom du produit)"
resend: Renvoyer
back_to_orders_list: Retour à la liste des commandes
return_authorizations: Autorisations de retours
cannot_create_returns: Impossible de créer une autorisation de retour car aucun produit n'a été livré pour cette commande.
select_stock: "Sélectionner le stock"
location: "Localisation"
count_on_hand: "Quantité en stock"

View File

@@ -237,7 +237,6 @@ it:
reset_password_token: Token per il reset della password
expired: è scaduto, si prega di richiederne uno nuovo
back_to_payments_list: "Torna alla lista dei pagamenti"
ship: "Spedizione"
actions:
create_and_add_another: "Crea e aggiungi un altro"
create: "Crea"
@@ -623,7 +622,7 @@ it:
name: Nome
applies: Applica?
manage: Gestisci metodi di pagamento
no_method_yet: Non hai ancora nessun metodo di pagamento.
not_method_yet: Non hai ancora nessun metodo di pagamento.
create_button: Crea un nuovo metodo di pagamento
create_one_button: Crea uno ora
primary_details:
@@ -1088,6 +1087,7 @@ it:
footer_data_text_without_privacy_policy_html: "Ci prendiamo cura dei vostri dati. Vedi la nostra %{cookies_policy}"
footer_data_privacy_policy: "privacy policy"
footer_data_cookies_policy: "cookies policy"
footer_skylight_dashboard_html: I dati di rendimento sono disponibili in %{dashboard}.
shop:
messages:
login: "fai il login"

View File

@@ -245,8 +245,6 @@ nb:
expired: er utløpt, vennligst be om en ny
back_to_payments_list: "Tilbake til betalingsliste"
maestro_or_solo_cards: "Maestro/Solo kort"
backordered: "Restbestilte"
ship: "Levere"
actions:
create_and_add_another: "Opprett og legg til en annen"
create: "Opprett"
@@ -636,7 +634,7 @@ nb:
name: Navn
applies: Gjelder?
manage: Administrer Betalingsmetoder
no_method_yet: Du har ingen betalingsmetoder ennå.
not_method_yet: Du har ingen betalingsmetoder ennå.
create_button: Opprett Ny Betalingsmetode
create_one_button: Opprett en nå
primary_details:
@@ -921,7 +919,7 @@ nb:
hidden: SKJULTE
unitsize: ENHETSSTØRRELSE
total: SUM
total_items: TOTALT ANTALL
total_items: ANTALL
supplier_totals: Bestillingsrunde Leverandør Sum
supplier_totals_by_distributor: Bestillingsrunde Leverandør Totaler etter Distributør
totals_by_supplier: Bestillingsrunde Distributør Totaler etter Leverandør
@@ -1118,6 +1116,7 @@ nb:
footer_data_text_without_privacy_policy_html: "Vi tar godt vare på dine data. Se vår %{cookies_policy}"
footer_data_privacy_policy: "personvernpolicy"
footer_data_cookies_policy: "policy informasjonskapsler"
footer_skylight_dashboard_html: Ytelsesdata er tilgjengelig på %{dashboard}.
shop:
messages:
login: "innlogging"
@@ -2628,8 +2627,6 @@ nb:
name_or_sku: "Navn eller SKU (skriv inn minst 4 tegn av produktnavn)"
resend: Send på nytt
back_to_orders_list: Tilbake til Bestillingsliste
return_authorizations: Returautorisasjoner
cannot_create_returns: Kan ikke opprette retur da denne bestillingen ikke har noen sendte elementer.
select_stock: "Velg lager"
location: "Plassering"
count_on_hand: "Antall På Lager"

View File

@@ -243,7 +243,6 @@ nl_BE:
reset_password_token: Reset wachtwoord token
expired: is verlopen, gelieve een nieuwe aan te vragen
back_to_payments_list: "Terug naar Betalingslijst"
ship: "Verzenden"
actions:
create_and_add_another: "Een ander maken en toevoegen"
create: "Maak"
@@ -634,7 +633,7 @@ nl_BE:
name: Naam
applies: Van toepassing?
manage: Beheer betaalmogelijkheden
no_method_yet: Je hebt nog geen betaalmethodes.
not_method_yet: Je hebt nog geen betaalmethodes.
create_button: Creëer een nieuwe betaalmethode
create_one_button: Creëer er nu één
primary_details:
@@ -1114,6 +1113,7 @@ nl_BE:
footer_data_text_without_privacy_policy_html: "We dragen goed zorg voor je gegevens. Neem een kijk naar onze %{cookies_policy}."
footer_data_privacy_policy: "privacy beleid"
footer_data_cookies_policy: "cookie policy"
footer_skylight_dashboard_html: Prestatiegegevens zijn beschikbaar op %{dashboard}.
shop:
messages:
login: "login"

View File

@@ -237,7 +237,6 @@ pt:
reset_password_token: Redefinir palavra-passe
expired: expirou, por favor peça uma nova
back_to_payments_list: "Voltar à lista de pagamentos"
ship: "Enviar"
actions:
create_and_add_another: "Criar e acrescentar outro"
create: "Criar"
@@ -623,7 +622,7 @@ pt:
name: Nome
applies: Aplicável?
manage: Gerir métodos de pagamento
no_method_yet: Não tem nenhum método de pagamento.
not_method_yet: Não tem nenhum método de pagamento.
create_button: Criar Novo Método de Pagamento
create_one_button: 'Criar um agora '
primary_details:
@@ -1093,6 +1092,7 @@ pt:
footer_data_text_without_privacy_policy_html: "Nós tratamos com cuidado dos nosso dados. Veja a nossa %{cookies_policy}"
footer_data_privacy_policy: "politíca de privacidade"
footer_data_cookies_policy: "política de cookies"
footer_skylight_dashboard_html: Dados de performance disponível em %{dashboard}.
shop:
messages:
login: "Entrar"

File diff suppressed because it is too large Load Diff

View File

@@ -99,7 +99,6 @@ sv:
powered_by: Drivs av
blocked_cookies_alert: "Din webbläsare kan blockera cookies som behövs för att använda den här butiken. Klicka nedan för att tillåta cookies och ladda om sidan."
allow_cookies: "Tillåt cookies"
ship: "Frakta"
actions:
create: "Skapa"
cancel: "Avbryt"
@@ -336,7 +335,7 @@ sv:
name: Namn
applies: Gäller?
manage: Bestäm betalningssätt
no_method_yet: Du har ännu inte bestämt betalningssätt
not_method_yet: Du har ännu inte bestämt betalningssätt
create_button: Skapa ett nytt betalningssätt
create_one_button: Skapa en nu
primary_details:

View File

@@ -15,19 +15,6 @@ Openfoodnetwork::Application.routes.draw do
resources :variants, :only => [:index]
resources :orders, only: [:index] do
get :managed, on: :collection
resources :shipments, :only => [:create, :update] do
member do
put :ready
put :ship
put :add
put :remove
end
end
end
resources :enterprises do
post :update_image, on: :member
get :managed, on: :collection
@@ -46,6 +33,8 @@ Openfoodnetwork::Application.routes.draw do
get :accessible, on: :collection
end
resources :orders, only: [:index]
resource :status do
get :job_queue
end
@@ -55,18 +44,5 @@ Openfoodnetwork::Application.routes.draw do
resources :enterprise_fees, only: [:destroy]
post '/product_images/:product_id', to: 'product_images#update_product_image'
resources :taxons, :only => [:index]
resources :taxonomies do
member do
get :jstree
end
resources :taxons do
member do
get :jstree
end
end
end
end
end

View File

@@ -24,6 +24,12 @@ Spree::Core::Engine.routes.draw do
put '/password/change' => 'user_passwords#update', :as => :update_password
end
resource :session do
member do
get :nav_bar
end
end
resource :account, :controller => 'users'
namespace :admin do
@@ -55,6 +61,29 @@ Spree::Core::Engine.routes.prepend do
resources :users do
get :authorise_api, on: :collection
end
resources :orders do
get :managed, on: :collection
resources :shipments, :only => [:create, :update] do
member do
put :ready
put :ship
put :add
put :remove
end
end
end
resources :taxons, :only => [:index]
resources :taxonomies do
resources :taxons do
member do
get :jstree
end
end
end
end
namespace :admin do
@@ -98,9 +127,6 @@ Spree::Core::Engine.routes.prepend do
resources :products
# Used by spree_paypal_express
get '/checkout/:state', :to => 'checkout#edit', :as => :checkout_state
get '/unauthorized', :to => 'home#unauthorized', :as => :unauthorized
get '/content/cvv', :to => 'content#cvv', :as => :cvv
get '/content/*path', :to => 'content#show', :as => :content

View File

@@ -16,6 +16,10 @@ every 1.day, at: '01:00am' do
rake 'ofn:cache:check_products_integrity'
end
every 1.day, at: '12:05am' do
run_file "lib/open_food_network/integrity_checker.rb"
end
every 1.day, at: '2:45am' do
rake 'db2fog:clean' if ENV['S3_BACKUPS_BUCKET']
end

View File

@@ -1,5 +0,0 @@
class AddDeletedAtToSpreePrices < ActiveRecord::Migration
def change
add_column :spree_prices, :deleted_at, :datetime
end
end

View File

@@ -1,6 +0,0 @@
class ResetNegativeStockLevels < ActiveRecord::Migration
def up
# Reset stock to zero for all on_demand variants that have negative stock
execute "UPDATE spree_stock_items SET count_on_hand = '0' WHERE count_on_hand < 0 AND backorderable IS TRUE"
end
end

View File

@@ -1,17 +0,0 @@
class RemoveBrokenVariantsFromCarts < ActiveRecord::Migration
def up
# Removes line_items from open carts where the variant has a hard-deleted price
variants_without_prices = execute(
'SELECT spree_variants.id FROM spree_variants
LEFT OUTER JOIN spree_prices ON (spree_variants.id = spree_prices.variant_id)
WHERE spree_prices.id IS NULL'
).to_a.map{ |v| v['id'] }
broken_line_items = Spree::LineItem.
joins(:variant).where('spree_variants.id IN (?)', variants_without_prices).
joins(:order).merge(Spree::Order.where(state: 'cart'))
broken_line_items.each(&:destroy)
end
end

View File

@@ -1,5 +0,0 @@
class SetBackorderedInventoryToOnHand < ActiveRecord::Migration
def up
execute("UPDATE spree_inventory_units SET state = 'on_hand' WHERE state = 'backordered'")
end
end

View File

@@ -1,11 +0,0 @@
class ReplaceHardDeletedPrices < ActiveRecord::Migration
def up
ActiveRecord::Base.connection.execute(
"INSERT into spree_prices (variant_id, amount, currency, deleted_at)
SELECT spree_variants.id, '0.00', (SELECT value FROM spree_preferences WHERE key = 'spree/app_configuration/currency'), now()
FROM spree_variants
LEFT OUTER JOIN spree_prices ON (spree_variants.id = spree_prices.variant_id)
WHERE spree_prices.id IS NULL;"
)
end
end

View File

@@ -1,9 +0,0 @@
class AddLongCompoundIndexOnSpreeOrders < ActiveRecord::Migration
def change
add_index(
:spree_orders,
[:completed_at, :user_id, :created_by_id, :created_at],
name: 'spree_orders_completed_at_user_id_created_by_id_created_at_idx'
)
end
end

View File

@@ -1,5 +0,0 @@
class DropCompletedAtIndexOnSpreeOrders < ActiveRecord::Migration
def change
remove_index :spree_orders, :completed_at
end
end

View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20190916110029) do
ActiveRecord::Schema.define(:version => 20190701002454) do
create_table "adjustment_metadata", :force => true do |t|
t.integer "adjustment_id"
@@ -576,7 +576,7 @@ ActiveRecord::Schema.define(:version => 20190916110029) do
t.integer "created_by_id"
end
add_index "spree_orders", ["completed_at", "user_id", "created_by_id", "created_at"], :name => "spree_orders_completed_at_user_id_created_by_id_created_at_idx"
add_index "spree_orders", ["completed_at"], :name => "index_spree_orders_on_completed_at"
add_index "spree_orders", ["customer_id"], :name => "index_spree_orders_on_customer_id"
add_index "spree_orders", ["number"], :name => "index_orders_on_number"
@@ -649,10 +649,9 @@ ActiveRecord::Schema.define(:version => 20190916110029) do
add_index "spree_preferences", ["key"], :name => "index_spree_preferences_on_key", :unique => true
create_table "spree_prices", :force => true do |t|
t.integer "variant_id", :null => false
t.decimal "amount", :precision => 8, :scale => 2
t.string "currency"
t.datetime "deleted_at"
t.integer "variant_id", :null => false
t.decimal "amount", :precision => 8, :scale => 2
t.string "currency"
end
add_index "spree_prices", ["variant_id"], :name => "index_spree_prices_on_variant_id"

View File

@@ -1,332 +1,320 @@
{
"spec/features/admin/orders_spec.rb": 237.817884683609,
"spec/features/admin/order_cycles_spec.rb": 94.3379921913147,
"spec/features/admin/bulk_product_update_spec.rb": 78.97872257232666,
"spec/features/admin/bulk_order_management_spec.rb": 128.53619170188904,
"spec/features/consumer/shopping/checkout_spec.rb": 126.58671498298645,
"spec/features/consumer/shopping/shopping_spec.rb": 76.83493185043335,
"spec/features/admin/variant_overrides_spec.rb": 136.1164140701294,
"spec/features/admin/product_import_spec.rb": 111.82432579994202,
"spec/features/consumer/shopping/variant_overrides_spec.rb": 91.0473141670227,
"spec/features/admin/subscriptions_spec.rb": 80.61201500892639,
"spec/models/order_cycle_spec.rb": 51.933889865875244,
"spec/features/admin/payment_method_spec.rb": 64.49885392189026,
"spec/features/admin/customers_spec.rb": 41.059948205947876,
"spec/services/order_syncer_spec.rb": 35.46346163749695,
"spec/models/product_importer_spec.rb": 48.392107009887695,
"spec/controllers/api/orders_controller_spec.rb": 37.38580870628357,
"spec/models/spree/order_spec.rb": 43.49769330024719,
"spec/features/consumer/shops_spec.rb": 40.91608905792236,
"spec/features/admin/enterprise_relationships_spec.rb": 48.79179549217224,
"spec/features/admin/enterprises_spec.rb": 68.66470575332642,
"spec/features/consumer/shopping/orders_spec.rb": 50.41251015663147,
"spec/controllers/admin/subscriptions_controller_spec.rb": 33.12591361999512,
"spec/features/admin/shipping_methods_spec.rb": 45.78349208831787,
"spec/features/consumer/authentication_spec.rb": 80.65127658843994,
"spec/helpers/injection_helper_spec.rb": 34.83948469161987,
"spec/controllers/admin/bulk_line_items_controller_spec.rb": 23.70878767967224,
"spec/features/admin/enterprise_fees_spec.rb": 31.250224351882935,
"spec/features/admin/enterprise_roles_spec.rb": 41.325873374938965,
"spec/features/admin/tag_rules_spec.rb": 61.053430795669556,
"spec/features/consumer/shopping/cart_spec.rb": 27.45794367790222,
"spec/jobs/subscription_confirm_job_spec.rb": 27.508367776870728,
"spec/controllers/spree/orders_controller_spec.rb": 24.71937584877014,
"spec/features/admin/reports_spec.rb": 33.325284481048584,
"spec/features/consumer/account_spec.rb": 20.118611574172974,
"spec/features/admin/products_spec.rb": 36.03796911239624,
"spec/lib/open_food_network/order_cycle_permissions_spec.rb": 24.558523654937744,
"spec/models/spree/line_item_spec.rb": 24.942461490631104,
"spec/features/consumer/cookies_spec.rb": 29.341325521469116,
"spec/models/spree/ability_spec.rb": 11.801489353179932,
"spec/lib/open_food_network/products_cache_spec.rb": 13.28692364692688,
"spec/features/admin/adjustments_spec.rb": 23.726555824279785,
"spec/models/exchange_spec.rb": 18.231592655181885,
"spec/features/admin/enterprises/images_spec.rb": 21.89902114868164,
"spec/controllers/line_items_controller_spec.rb": 11.261710166931152,
"spec/mailers/producer_mailer_spec.rb": 19.540743350982666,
"spec/models/spree/product_spec.rb": 19.957887411117554,
"spec/features/consumer/shopping/embedded_shopfronts_spec.rb": 23.64180088043213,
"spec/models/spree/variant_spec.rb": 16.831849813461304,
"spec/features/admin/reports/enterprise_fee_summaries_spec.rb": 16.088922023773193,
"spec/jobs/subscription_placement_job_spec.rb": 17.93425989151001,
"spec/mailers/subscription_mailer_spec.rb": 19.027340412139893,
"spec/controllers/spree/admin/reports_controller_spec.rb": 21.17331314086914,
"spec/features/consumer/producers_spec.rb": 18.497092247009277,
"spec/models/spree/adjustment_spec.rb": 7.688546895980835,
"spec/features/admin/enterprise_groups_spec.rb": 11.997856616973877,
"spec/controllers/admin/proxy_orders_controller_spec.rb": 10.339219331741333,
"spec/features/consumer/shopping/checkout_auth_spec.rb": 16.628108501434326,
"spec/features/consumer/registration_spec.rb": 31.164623498916626,
"spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb": 9.818962812423706,
"spec/requests/checkout/stripe_connect_spec.rb": 8.772961616516113,
"spec/controllers/api/product_images_controller_spec.rb": 6.45292592048645,
"spec/lib/open_food_network/address_finder_spec.rb": 8.793009996414185,
"spec/features/consumer/groups_spec.rb": 26.977667093276978,
"spec/models/proxy_order_spec.rb": 13.104656219482422,
"spec/features/consumer/multilingual_spec.rb": 17.43264937400818,
"spec/lib/open_food_network/permissions_spec.rb": 13.183045625686646,
"spec/features/admin/variants_spec.rb": 17.20117712020874,
"spec/models/enterprise_spec.rb": 10.5332670211792,
"spec/models/variant_override_spec.rb": 7.334490060806274,
"spec/services/order_factory_spec.rb": 11.875489473342896,
"spec/lib/open_food_network/enterprise_fee_calculator_spec.rb": 12.027559757232666,
"spec/controllers/api/logos_controller_spec.rb": 7.298051834106445,
"spec/controllers/spree/admin/orders_controller_spec.rb": 7.250804662704468,
"spec/lib/open_food_network/order_cycle_form_applicator_spec.rb": 9.185548305511475,
"spec/lib/open_food_network/user_balance_calculator_spec.rb": 9.735471725463867,
"spec/lib/open_food_network/proxy_order_syncer_spec.rb": 11.126964092254639,
"spec/models/enterprise_relationship_spec.rb": 9.923192739486694,
"spec/lib/open_food_network/bulk_coop_report_spec.rb": 6.28821325302124,
"spec/models/spree/property_spec.rb": 6.4871885776519775,
"spec/services/subscription_estimator_spec.rb": 6.207820892333984,
"spec/lib/open_food_network/products_renderer_spec.rb": 6.318859338760376,
"spec/features/admin/schedules_spec.rb": 17.760894298553467,
"spec/lib/open_food_network/packing_report_spec.rb": 7.000155925750732,
"spec/models/spree/stock/availability_validator_spec.rb": 6.332439661026001,
"spec/models/enterprise_fee_spec.rb": 6.138005971908569,
"spec/lib/open_food_network/scope_variant_to_hub_spec.rb": 10.594756841659546,
"spec/features/consumer/shopping/embedded_groups_spec.rb": 18.79310703277588,
"spec/controllers/spree/users_controller_spec.rb": 5.807466983795166,
"spec/services/advance_order_service_spec.rb": 6.725487947463989,
"spec/features/admin/enterprises/index_spec.rb": 15.634530067443848,
"spec/jobs/order_cycle_notification_job_spec.rb": 4.208659410476685,
"spec/controllers/spree/admin/variants_controller_spec.rb": 5.583896160125732,
"spec/features/admin/overview_spec.rb": 5.639538526535034,
"spec/controllers/spree/admin/orders/customer_details_controller_spec.rb": 5.8910181522369385,
"spec/lib/open_food_network/products_and_inventory_report_spec.rb": 5.34000563621521,
"spec/controllers/admin/schedules_controller_spec.rb": 2.7360916137695312,
"spec/models/concerns/variant_stock_spec.rb": 4.917129993438721,
"spec/models/spree/payment_spec.rb": 5.25871467590332,
"spec/controllers/admin/enterprises_controller_spec.rb": 5.274713754653931,
"spec/controllers/admin/variant_overrides_controller_spec.rb": 5.423460245132446,
"spec/models/enterprise_caching_spec.rb": 3.049555778503418,
"spec/services/invoice_renderer_spec.rb": 3.769397258758545,
"spec/features/consumer/shopping/products_spec.rb": 6.6356730461120605,
"spec/lib/open_food_network/group_buy_report_spec.rb": 4.001709938049316,
"spec/controllers/shop_controller_spec.rb": 3.901616334915161,
"spec/features/admin/payments_spec.rb": 3.805184841156006,
"spec/lib/open_food_network/order_cycle_management_report_spec.rb": 3.7799723148345947,
"spec/controllers/spree/admin/payments_controller_spec.rb": 3.4514706134796143,
"spec/models/spree/image_spec.rb": 4.41399621963501,
"spec/helpers/enterprises_helper_spec.rb": 3.328219413757324,
"spec/features/consumer/account/settings_spec.rb": 5.9961183071136475,
"spec/features/consumer/account/cards_spec.rb": 3.517259120941162,
"spec/features/admin/authentication_spec.rb": 10.881295204162598,
"spec/services/subscription_variants_service_spec.rb": 3.4830353260040283,
"spec/controllers/spree/admin/products_controller_spec.rb": 4.002648830413818,
"spec/features/admin/users_spec.rb": 5.449582576751709,
"spec/controllers/api/promo_images_controller_spec.rb": 3.74454927444458,
"spec/lib/open_food_network/customers_report_spec.rb": 3.41019868850708,
"spec/lib/open_food_network/lettuce_share_report_spec.rb": 2.7670164108276367,
"spec/lib/open_food_network/scope_variants_to_search_spec.rb": 2.7599198818206787,
"spec/services/bulk_invoice_service_spec.rb": 2.5634195804595947,
"spec/controllers/admin/subscription_line_items_controller_spec.rb": 2.519078254699707,
"spec/controllers/admin/order_cycles_controller_spec.rb": 3.145948648452759,
"spec/controllers/admin/inventory_items_controller_spec.rb": 2.398263454437256,
"spec/controllers/enterprises_controller_spec.rb": 2.2687149047851562,
"spec/models/product_import/inventory_reset_strategy_spec.rb": 2.328801393508911,
"spec/features/consumer/footer_links_spec.rb": 7.389659404754639,
"spec/lib/open_food_network/subscription_payment_updater_spec.rb": 2.519193649291992,
"spec/models/product_import/products_reset_strategy_spec.rb": 2.208404064178467,
"spec/services/order_cycle_distributed_products_spec.rb": 1.9242751598358154,
"spec/requests/checkout/failed_checkout_spec.rb": 2.4253993034362793,
"spec/services/tax_rate_finder_spec.rb": 1.968726396560669,
"spec/models/producer_property_spec.rb": 1.9552044868469238,
"spec/controllers/cart_controller_spec.rb": 1.8240394592285156,
"spec/services/variants_stock_levels_spec.rb": 1.904362440109253,
"spec/features/admin/multilingual_spec.rb": 4.289350509643555,
"spec/controllers/checkout_controller_spec.rb": 1.6279420852661133,
"spec/models/concerns/order_shipment_spec.rb": 1.7712960243225098,
"spec/services/subscription_form_spec.rb": 1.7455992698669434,
"spec/requests/checkout/paypal_spec.rb": 1.5917167663574219,
"spec/models/spree/shipping_method_spec.rb": 2.04691219329834,
"spec/controllers/shops_controller_spec.rb": 1.0743358135223389,
"spec/services/subscription_validator_spec.rb": 1.422741413116455,
"spec/serializers/api/cached_enterprise_serializer_spec.rb": 1.5118434429168701,
"spec/features/admin/content_spec.rb": 1.3384621143341064,
"spec/models/spree/taxon_spec.rb": 1.4807021617889404,
"spec/lib/open_food_network/tag_rule_applicator_spec.rb": 1.3752143383026123,
"spec/services/cart_service_spec.rb": 1.4081895351409912,
"spec/mailers/order_mailer_spec.rb": 7.018088102340698,
"spec/controllers/spree/admin/shipping_methods_controller_spec.rb": 1.3566155433654785,
"spec/models/calculator/weight_spec.rb": 3.7783122062683105,
"spec/models/concerns/product_stock_spec.rb": 1.3806025981903076,
"spec/controllers/admin/customers_controller_spec.rb": 1.0804333686828613,
"spec/models/spree/product_set_spec.rb": 1.5525598526000977,
"spec/models/spree/order/checkout_spec.rb": 1.19655442237854,
"spec/requests/shop_spec.rb": 1.097696304321289,
"spec/features/admin/caching_spec.rb": 0.731848955154419,
"spec/features/admin/enterprise_user_spec.rb": 0.7907397747039795,
"spec/controllers/admin/manager_invitations_controller_spec.rb": 0.9135403633117676,
"spec/models/spree/user_spec.rb": 0.9081456661224365,
"spec/controllers/spree/admin/payment_methods_controller_spec.rb": 0.7309935092926025,
"spec/models/subscription_spec.rb": 0.8055622577667236,
"spec/services/subscriptions_count_spec.rb": 0.8070430755615234,
"spec/lib/open_food_network/order_and_distributor_report_spec.rb": 1.044970989227295,
"spec/requests/embedded_shopfronts_headers_spec.rb": 0.8394205570220947,
"spec/controllers/spree/admin/search_controller_spec.rb": 0.7693119049072266,
"spec/helpers/admin/subscriptions_helper_spec.rb": 0.7205362319946289,
"spec/models/spree/classification_spec.rb": 0.6712856292724609,
"spec/services/order_cycle_form_spec.rb": 0.7938394546508789,
"spec/models/order_updater_spec.rb": 0.605487585067749,
"spec/lib/open_food_network/enterprise_fee_applicator_spec.rb": 0.909766435623169,
"spec/controllers/spree/admin/reports/enterprise_fee_summaries_controller_spec.rb": 0.396237850189209,
"spec/models/spree/price_spec.rb": 0.8924257755279541,
"spec/controllers/spree/admin/adjustments_controller_spec.rb": 0.5939099788665771,
"spec/controllers/admin/stripe_accounts_controller_spec.rb": 0.4869372844696045,
"spec/models/spree/calculator/price_sack_spec.rb": 0.6309628486633301,
"spec/models/spree/calculator/flexi_rate_spec.rb": 0.58841872215271,
"spec/helpers/admin/orders_helper_spec.rb": 0.5381126403808594,
"spec/models/spree/calculator/flat_percent_item_total_spec.rb": 0.659644603729248,
"spec/controllers/spree/admin/overview_controller_spec.rb": 1.4906401634216309,
"spec/controllers/user_confirmations_controller_spec.rb": 0.4401402473449707,
"spec/models/spree/option_value_spec.rb": 0.5641300678253174,
"spec/models/spree/payment_method_spec.rb": 0.6061296463012695,
"spec/models/spree/gateway_tagging_spec.rb": 0.4723038673400879,
"spec/features/admin/tax_settings_spec.rb": 0.47362518310546875,
"spec/models/enterprise_group_spec.rb": 0.36635661125183105,
"spec/helpers/order_cycles_helper_spec.rb": 0.4308586120605469,
"spec/models/spree/option_type_spec.rb": 0.5037732124328613,
"spec/models/spree/product_property_spec.rb": 0.3868262767791748,
"spec/helpers/i18n_helper_spec.rb": 0.42139244079589844,
"spec/controllers/api/customers_controller_spec.rb": 0.3846399784088135,
"spec/jobs/products_cache_integrity_checker_job_spec.rb": 0.1914665699005127,
"spec/models/customer_spec.rb": 0.38435792922973633,
"spec/controllers/user_registrations_controller_spec.rb": 0.15586233139038086,
"spec/lib/open_food_network/users_and_enterprises_report_spec.rb": 0.3169522285461426,
"spec/controllers/stripe/callbacks_controller_spec.rb": 0.22754812240600586,
"spec/serializers/api/shipping_method_serializer_spec.rb": 0.31409788131713867,
"spec/controllers/spree/credit_cards_controller_spec.rb": 0.30093884468078613,
"spec/models/tag_rule/filter_shipping_methods_spec.rb": 0.2832508087158203,
"spec/features/admin/image_settings_spec.rb": 0.2664794921875,
"spec/controllers/spree/checkout_controller_spec.rb": 0.3376595973968506,
"spec/services/restart_checkout_spec.rb": 0.8919713497161865,
"spec/features/admin/external_services_spec.rb": 0.2553997039794922,
"spec/models/spree/tax_rate_spec.rb": 0.29668140411376953,
"spec/lib/stripe/account_connector_spec.rb": 0.31223392486572266,
"spec/mailers/user_mailer_spec.rb": 0.28792262077331543,
"spec/controllers/spree/paypal_controller_spec.rb": 0.28707265853881836,
"spec/lib/open_food_network/property_merge_spec.rb": 0.2984285354614258,
"spec/models/inventory_item_spec.rb": 0.2676277160644531,
"spec/lib/open_food_network/products_cache_refreshment_spec.rb": 0.5341198444366455,
"spec/models/spree/calculator/per_item_spec.rb": 0.31163692474365234,
"spec/controllers/groups_controller_spec.rb": 0.13434839248657227,
"spec/controllers/spree/admin/base_controller_spec.rb": 0.301377534866333,
"spec/models/stripe_account_spec.rb": 0.4118363857269287,
"spec/jobs/refresh_products_cache_job_spec.rb": 0.36127209663391113,
"spec/models/tag_rule/filter_payment_methods_spec.rb": 0.40189361572265625,
"spec/controllers/admin/stripe_connect_settings_controller_spec.rb": 0.34180450439453125,
"spec/features/consumer/confirm_invitation_spec.rb": 0.3606686592102051,
"spec/services/search_orders_spec.rb": 0.5707180500030518,
"spec/controllers/admin/tag_rules_controller_spec.rb": 0.44332337379455566,
"spec/controllers/api/enterprises_controller_spec.rb": 0.8137326240539551,
"spec/models/exchange_fee_spec.rb": 0.33515214920043945,
"spec/mailers/enterprise_mailer_spec.rb": 0.36087584495544434,
"spec/serializers/api/admin/product_serializer_spec.rb": 0.44899654388427734,
"spec/helpers/checkout_helper_spec.rb": 0.15273785591125488,
"spec/models/column_preference_spec.rb": 0.35555553436279297,
"spec/models/adjustment_metadata_spec.rb": 0.36631131172180176,
"spec/models/model_set_spec.rb": 0.3200507164001465,
"spec/lib/open_food_network/subscription_summary_spec.rb": 0.2988402843475342,
"spec/controllers/admin/column_preferences_controller_spec.rb": 0.3077270984649658,
"spec/models/tag_rule/filter_order_cycles_spec.rb": 0.3134000301361084,
"spec/models/tag_rule/filter_products_spec.rb": 0.23253226280212402,
"spec/controllers/user_passwords_controller_spec.rb": 0.15717339515686035,
"spec/controllers/stripe/webhooks_controller_spec.rb": 0.1401364803314209,
"spec/models/stock/package_spec.rb": 0.25682640075683594,
"spec/lib/open_food_network/enterprise_issue_validator_spec.rb": 0.0387272834777832,
"spec/helpers/spree/orders_helper_spec.rb": 0.12387847900390625,
"spec/lib/open_food_network/xero_invoices_report_spec.rb": 0.13364052772521973,
"spec/models/tag_rule/discount_order_spec.rb": 0.1327047348022461,
"spec/models/product_import/settings_spec.rb": 0.16132211685180664,
"spec/lib/open_food_network/option_value_namer_spec.rb": 0.5149452686309814,
"spec/models/coordinator_fee_spec.rb": 0.12866568565368652,
"spec/models/spree/credit_card_spec.rb": 0.2072758674621582,
"spec/lib/spree/product_filters_spec.rb": 0.12201762199401855,
"spec/models/spree/addresses_spec.rb": 0.11647152900695801,
"spec/services/default_stock_location_spec.rb": 0.09911870956420898,
"spec/lib/open_food_network/sales_tax_report_spec.rb": 0.10174679756164551,
"spec/controllers/api/enterprise_fees_controller_spec.rb": 0.11140251159667969,
"spec/lib/open_food_network/i18n_config_spec.rb": 0.09999489784240723,
"spec/controllers/registration_controller_spec.rb": 0.09182143211364746,
"spec/features/consumer/sitemap_spec.rb": 0.10870242118835449,
"spec/helpers/shared_helper_spec.rb": 0.07873010635375977,
"spec/lib/open_food_network/cached_products_renderer_spec.rb": 0.06981682777404785,
"spec/models/spree/gateway/stripe_connect_spec.rb": 0.05915951728820801,
"spec/helpers/navigation_helper_spec.rb": 0.061690330505371094,
"spec/lib/open_food_network/subscription_summarizer_spec.rb": 0.05331063270568848,
"spec/helpers/html_helper_spec.rb": 0.04561138153076172,
"spec/lib/stripe/webhook_handler_spec.rb": 0.05020856857299805,
"spec/models/spree/preference_spec.rb": 0.05530714988708496,
"spec/lib/open_food_network/order_grouper_spec.rb": 0.04380607604980469,
"spec/helpers/shop_helper_spec.rb": 0.056023359298706055,
"spec/lib/spree/localized_number_spec.rb": 0.04551959037780762,
"spec/models/spree/preferences/file_configuration_spec.rb": 0.04132723808288574,
"spec/jobs/welcome_enterprise_job_spec.rb": 0.04942655563354492,
"spec/models/tag_rule_spec.rb": 0.04657173156738281,
"spec/validators/date_time_string_validator_spec.rb": 0.05379605293273926,
"spec/controllers/spree/user_sessions_controller_spec.rb": 0.04584026336669922,
"spec/validators/integer_array_validator_spec.rb": 0.04658031463623047,
"spec/jobs/confirm_order_job_spec.rb": 0.041007280349731445,
"spec/models/product_import/entry_processor_spec.rb": 0.03451251983642578,
"spec/models/product_import/reset_absent_spec.rb": 0.03505396842956543,
"spec/lib/open_food_network/reports/report_spec.rb": 0.03907656669616699,
"spec/services/embedded_page_service_spec.rb": 0.03762197494506836,
"spec/controllers/api/statuses_controller_spec.rb": 0.036696434020996094,
"spec/models/subscription_line_item_spec.rb": 0.025917768478393555,
"spec/controllers/spree/store_controller_spec.rb": 0.03051137924194336,
"spec/requests/large_request_spec.rb": 0.021759748458862305,
"spec/models/calculator/flat_percent_per_item_spec.rb": 0.02252483367919922,
"spec/controllers/base_controller_spec.rb": 0.025274991989135742,
"spec/services/reset_order_service_spec.rb": 0.024686813354492188,
"spec/services/order_cycle_distributed_variants_spec.rb": 0.02391505241394043,
"spec/lib/open_food_network/referer_parser_spec.rb": 0.020322799682617188,
"spec/lib/open_food_network/reports/rule_spec.rb": 0.021949052810668945,
"spec/lib/open_food_network/feature_toggle_spec.rb": 0.020271778106689453,
"spec/jobs/confirm_signup_job_spec.rb": 0.021286725997924805,
"spec/jobs/heartbeat_job_spec.rb": 0.01560068130493164,
"spec/helpers/products_helper_spec.rb": 0.01751542091369629,
"spec/models/spree/calculator/flat_rate_spec.rb": 0.015111207962036133,
"spec/services/mail_configuration_spec.rb": 0.012917757034301758,
"spec/helpers/groups_helper_spec.rb": 0.018085002899169922,
"spec/helpers/spree/admin/base_helper_spec.rb": 0.008218050003051758,
"spec/lib/open_food_network/error_logger_spec.rb": 0.005335807800292969,
"spec/models/content_configuration_spec.rb": 0.006735563278198242,
"spec/services/upload_sanitizer_spec.rb": 0.0061757564544677734,
"spec/config/application_spec.rb": 0.004937887191772461,
"spec/lib/open_food_network/reports/row_spec.rb": 0.004645824432373047,
"spec/controllers/api/products_controller_spec.rb": 31.840720176696777,
"spec/controllers/api/shipments_controller_spec.rb": 23.73399782180786,
"spec/controllers/api/taxonomies_controller_spec.rb": 0.07463383674621582,
"spec/controllers/api/taxons_controller_spec.rb": 0.9186584949493408,
"spec/controllers/api/variants_controller_spec.rb": 17.02829670906067,
"spec/controllers/spree/admin/users_controller_spec.rb": 0.2153482437133789,
"spec/controllers/spree/api/base_controller_spec.rb": 0.1394824981689453,
"spec/features/admin/reports/packing_report_spec.rb": 5.037803411483765,
"spec/features/consumer/shopping/checkout_paypal_spec.rb": 9.92912220954895,
"spec/helpers/serializer_helper_spec.rb": 0.010895967483520508,
"spec/helpers/spree/admin/orders_helper_spec.rb": 0.05771446228027344,
"spec/models/spree/calculator_spec.rb": 3.1673130989074707,
"spec/models/spree/shipment_spec.rb": 1.092050313949585,
"spec/serializers/api/admin/customer_serializer_spec.rb": 0.1630871295928955,
"spec/serializers/api/admin/enterprise_serializer_spec.rb": 2.3938491344451904,
"spec/serializers/api/admin/exchange_serializer_spec.rb": 3.123688220977783,
"spec/serializers/api/admin/for_order_cycle/enterprise_serializer_spec.rb": 0.9490363597869873,
"spec/serializers/api/admin/for_order_cycle/supplied_product_serializer_spec.rb": 0.6075096130371094,
"spec/serializers/api/admin/index_enterprise_serializer_spec.rb": 0.18369698524475098,
"spec/serializers/api/admin/subscription_customer_serializer_spec.rb": 0.06726932525634766,
"spec/serializers/api/admin/variant_override_serializer_spec.rb": 0.44232988357543945,
"spec/serializers/api/admin/variant_serializer_spec.rb": 1.0454332828521729,
"spec/serializers/api/credit_card_serializer_spec.rb": 0.017533540725708008,
"spec/serializers/api/current_order_serializer_spec.rb": 2.1227188110351562,
"spec/serializers/api/enterprise_serializer_spec.rb": 0.14253616333007812,
"spec/serializers/api/enterprise_shopfront_list_serializer_spec.rb": 0.11119532585144043,
"spec/serializers/api/enterprise_shopfront_serializer_spec.rb": 1.827807903289795,
"spec/serializers/api/group_list_serializer_spec.rb": 0.14617300033569336,
"spec/serializers/api/order_cycle_serializer_spec.rb": 0.09012603759765625,
"spec/serializers/api/order_serializer_spec.rb": 4.509246826171875,
"spec/serializers/api/variant_serializer_spec.rb": 0.2834649085998535,
"spec/services/exchange_variant_bulk_updater_spec.rb": 1.3508999347686768,
"spec/views/spree/admin/orders/edit.html.haml_spec.rb": 2.0251882076263428,
"spec/views/spree/admin/orders/index.html.haml_spec.rb": 0.15261244773864746
"spec/features/admin/orders_spec.rb": 235.76097083091736,
"spec/features/admin/variant_overrides_spec.rb": 94.85978269577026,
"spec/features/admin/bulk_order_management_spec.rb": 151.3781042098999,
"spec/features/consumer/shopping/checkout_spec.rb": 118.2651891708374,
"spec/features/admin/payment_method_spec.rb": 54.268134117126465,
"spec/features/consumer/shopping/variant_overrides_spec.rb": 78.91740727424622,
"spec/features/consumer/shopping/shopping_spec.rb": 112.53912425041199,
"spec/features/consumer/shopping/cart_spec.rb": 27.87003493309021,
"spec/features/admin/order_cycles_spec.rb": 230.97479963302612,
"spec/features/admin/customers_spec.rb": 52.75454330444336,
"spec/features/admin/enterprise_fees_spec.rb": 36.99392628669739,
"spec/features/admin/bulk_product_update_spec.rb": 189.61147689819336,
"spec/features/admin/enterprise_relationships_spec.rb": 43.69444513320923,
"spec/features/admin/shipping_methods_spec.rb": 39.06390905380249,
"spec/features/admin/enterprises_spec.rb": 43.391074657440186,
"spec/features/consumer/shopping/orders_spec.rb": 41.26642346382141,
"spec/models/order_cycle_spec.rb": 58.54216384887695,
"spec/helpers/injection_helper_spec.rb": 38.74247694015503,
"spec/controllers/admin/subscriptions_controller_spec.rb": 40.60595989227295,
"spec/models/spree/order_spec.rb": 45.230292081832886,
"spec/lib/open_food_network/order_cycle_permissions_spec.rb": 26.51349425315857,
"spec/features/consumer/cookies_spec.rb": 26.292959928512573,
"spec/features/admin/tag_rules_spec.rb": 29.404080867767334,
"spec/models/spree/line_item_spec.rb": 26.38530206680298,
"spec/controllers/admin/bulk_line_items_controller_spec.rb": 37.692434310913086,
"spec/models/spree/product_spec.rb": 21.244173288345337,
"spec/controllers/spree/orders_controller_spec.rb": 27.444236278533936,
"spec/models/spree/variant_spec.rb": 18.080999851226807,
"spec/mailers/producer_mailer_spec.rb": 22.64667844772339,
"spec/features/consumer/shopping/embedded_shopfronts_spec.rb": 18.30157232284546,
"spec/controllers/api/orders_controller_spec.rb": 45.88059878349304,
"spec/models/exchange_spec.rb": 24.08130693435669,
"spec/features/consumer/shops_spec.rb": 44.24216866493225,
"spec/features/admin/adjustments_spec.rb": 24.634205102920532,
"spec/features/consumer/authentication_spec.rb": 39.03162908554077,
"spec/features/admin/enterprise_roles_spec.rb": 36.11720085144043,
"spec/controllers/line_items_controller_spec.rb": 23.03535532951355,
"spec/lib/open_food_network/products_cache_spec.rb": 25.271536827087402,
"spec/features/consumer/account_spec.rb": 27.02789568901062,
"spec/controllers/spree/api/products_controller_spec.rb": 27.727026224136353,
"spec/models/spree/ability_spec.rb": 25.817420959472656,
"spec/services/order_syncer_spec.rb": 50.39830207824707,
"spec/features/admin/enterprises/images_spec.rb": 23.51345205307007,
"spec/features/admin/enterprise_groups_spec.rb": 12.499099254608154,
"spec/features/admin/products_spec.rb": 26.72684335708618,
"spec/models/spree/adjustment_spec.rb": 13.502050876617432,
"spec/models/enterprise_spec.rb": 9.4689781665802,
"spec/lib/open_food_network/products_renderer_spec.rb": 6.759949207305908,
"spec/features/consumer/producers_spec.rb": 14.347290515899658,
"spec/lib/open_food_network/address_finder_spec.rb": 10.706343650817871,
"spec/lib/open_food_network/permissions_spec.rb": 9.547073364257812,
"spec/requests/checkout/stripe_connect_spec.rb": 10.927155494689941,
"spec/serializers/order_serializer_spec.rb": 4.6526429653167725,
"spec/features/admin/product_import_spec.rb": 82.43362879753113,
"spec/lib/open_food_network/enterprise_fee_calculator_spec.rb": 8.458034038543701,
"spec/features/consumer/shopping/checkout_auth_spec.rb": 12.009632349014282,
"spec/controllers/api/product_images_controller_spec.rb": 10.716242790222168,
"spec/lib/open_food_network/user_balance_calculator_spec.rb": 7.430835247039795,
"spec/features/consumer/multilingual_spec.rb": 9.649072170257568,
"spec/controllers/spree/users_controller_spec.rb": 5.731461763381958,
"spec/lib/open_food_network/order_cycle_form_applicator_spec.rb": 7.663759708404541,
"spec/lib/open_food_network/proxy_order_syncer_spec.rb": 7.425870656967163,
"spec/models/enterprise_relationship_spec.rb": 7.178626775741577,
"spec/controllers/api/logos_controller_spec.rb": 8.094348430633545,
"spec/models/spree/property_spec.rb": 6.901066303253174,
"spec/models/variant_override_spec.rb": 9.191428899765015,
"spec/services/subscription_estimator_spec.rb": 6.809471368789673,
"spec/lib/open_food_network/orders_and_fulfillments_report_spec.rb": 11.12765908241272,
"spec/features/consumer/groups_spec.rb": 10.6190824508667,
"spec/controllers/spree/api/variants_controller_spec.rb": 6.078902959823608,
"spec/features/consumer/registration_spec.rb": 11.338661909103394,
"spec/controllers/enterprises_controller_spec.rb": 2.6997263431549072,
"spec/controllers/spree/admin/reports_controller_spec.rb": 16.883267879486084,
"spec/lib/open_food_network/packing_report_spec.rb": 6.565235614776611,
"spec/lib/open_food_network/bulk_coop_report_spec.rb": 7.004760503768921,
"spec/services/order_factory_spec.rb": 8.499075889587402,
"spec/controllers/admin/enterprises_controller_spec.rb": 4.129201650619507,
"spec/helpers/enterprises_helper_spec.rb": 3.5127899646759033,
"spec/controllers/admin/schedules_controller_spec.rb": 4.543549060821533,
"spec/features/admin/schedules_spec.rb": 6.639188528060913,
"spec/features/admin/enterprises/index_spec.rb": 5.253607988357544,
"spec/lib/open_food_network/subscription_payment_updater_spec.rb": 2.4682815074920654,
"spec/controllers/spree/admin/orders/customer_details_controller_spec.rb": 4.674808502197266,
"spec/controllers/admin/order_cycles_controller_spec.rb": 2.808058261871338,
"spec/controllers/api/promo_images_controller_spec.rb": 3.05167293548584,
"spec/models/spree/image_spec.rb": 3.5584912300109863,
"spec/lib/open_food_network/group_buy_report_spec.rb": 3.9514505863189697,
"spec/features/admin/variants_spec.rb": 9.481645345687866,
"spec/controllers/admin/variant_overrides_controller_spec.rb": 4.023880243301392,
"spec/models/spree/payment_spec.rb": 4.27884316444397,
"spec/features/consumer/shopping/embedded_groups_spec.rb": 5.992724895477295,
"spec/lib/open_food_network/scope_variant_to_hub_spec.rb": 6.08787727355957,
"spec/features/admin/overview_spec.rb": 4.753745794296265,
"spec/models/enterprise_caching_spec.rb": 3.9775142669677734,
"spec/controllers/spree/admin/products_controller_spec.rb": 3.1087279319763184,
"spec/jobs/subscription_placement_job_spec.rb": 17.82094693183899,
"spec/models/product_import/inventory_reset_strategy_spec.rb": 2.6040756702423096,
"spec/lib/open_food_network/scope_variants_to_search_spec.rb": 2.849317789077759,
"spec/controllers/shop_controller_spec.rb": 3.859396457672119,
"spec/lib/open_food_network/customers_report_spec.rb": 2.9132230281829834,
"spec/controllers/cart_controller_spec.rb": 2.133087158203125,
"spec/jobs/order_cycle_notification_job_spec.rb": 5.136486768722534,
"spec/models/enterprise_fee_spec.rb": 6.337928771972656,
"spec/features/admin/authentication_spec.rb": 3.338393211364746,
"spec/features/consumer/shopping/products_spec.rb": 3.962737560272217,
"spec/serializers/admin/exchange_serializer_spec.rb": 2.8799095153808594,
"spec/features/admin/payments_spec.rb": 3.7063188552856445,
"spec/models/concerns/variant_stock_spec.rb": 4.282667875289917,
"spec/controllers/spree/admin/orders_controller_spec.rb": 7.792564153671265,
"spec/controllers/spree/admin/payments_controller_spec.rb": 3.5697567462921143,
"spec/features/admin/multilingual_spec.rb": 1.964205026626587,
"spec/controllers/admin/subscription_line_items_controller_spec.rb": 2.8258471488952637,
"spec/controllers/checkout_controller_spec.rb": 1.9465281963348389,
"spec/models/producer_property_spec.rb": 2.2676165103912354,
"spec/features/consumer/account/cards_spec.rb": 3.388315439224243,
"spec/controllers/admin/customers_controller_spec.rb": 1.3151507377624512,
"spec/controllers/spree/admin/shipping_methods_controller_spec.rb": 1.3816843032836914,
"spec/controllers/admin/inventory_items_controller_spec.rb": 2.704101324081421,
"spec/features/consumer/account/settings_spec.rb": 3.4794163703918457,
"spec/models/spree/shipping_method_spec.rb": 1.717087745666504,
"spec/requests/checkout/failed_checkout_spec.rb": 2.330630302429199,
"spec/features/consumer/footer_links_spec.rb": 2.529261827468872,
"spec/services/cart_service_spec.rb": 1.407466173171997,
"spec/serializers/admin/enterprise_serializer_spec.rb": 2.7000370025634766,
"spec/models/spree/taxon_spec.rb": 1.5338077545166016,
"spec/mailers/order_mailer_spec.rb": 1.3990452289581299,
"spec/serializers/current_order_serializer_spec.rb": 2.3723340034484863,
"spec/controllers/spree/admin/variants_controller_spec.rb": 4.840111494064331,
"spec/controllers/api/order_cycles_controller_spec.rb": 1.5593302249908447,
"spec/requests/shop_spec.rb": 1.2129430770874023,
"spec/services/order_cycle_form_spec.rb": 0.767514705657959,
"spec/features/admin/content_spec.rb": 1.5474770069122314,
"spec/lib/open_food_network/tag_rule_applicator_spec.rb": 1.4562907218933105,
"spec/controllers/spree/admin/payment_methods_controller_spec.rb": 0.8975794315338135,
"spec/features/admin/users_spec.rb": 3.0521957874298096,
"spec/requests/checkout/paypal_spec.rb": 1.7288799285888672,
"spec/models/spree/product_set_spec.rb": 1.2894904613494873,
"spec/features/admin/enterprise_user_spec.rb": 0.9565138816833496,
"spec/serializers/admin/for_order_cycle/supplied_product_serializer_spec.rb": 0.5980274677276611,
"spec/controllers/spree/admin/adjustments_controller_spec.rb": 0.6785888671875,
"spec/models/spree/price_spec.rb": 0.7076306343078613,
"spec/services/subscriptions_count_spec.rb": 0.8449611663818359,
"spec/helpers/admin/subscriptions_helper_spec.rb": 0.7964563369750977,
"spec/requests/embedded_shopfronts_headers_spec.rb": 0.8313610553741455,
"spec/controllers/admin/manager_invitations_controller_spec.rb": 0.9167764186859131,
"spec/controllers/spree/admin/overview_controller_spec.rb": 0.560481071472168,
"spec/models/order_updater_spec.rb": 0.7670226097106934,
"spec/lib/open_food_network/enterprise_fee_applicator_spec.rb": 0.7502515316009521,
"spec/features/admin/caching_spec.rb": 0.9656000137329102,
"spec/models/spree/user_spec.rb": 0.9020359516143799,
"spec/controllers/spree/admin/search_controller_spec.rb": 0.7993369102478027,
"spec/serializers/admin/for_order_cycle/enterprise_serializer_spec.rb": 1.0361318588256836,
"spec/models/spree/classification_spec.rb": 0.7726085186004639,
"spec/models/spree/calculator/price_sack_spec.rb": 0.602428674697876,
"spec/controllers/admin/stripe_accounts_controller_spec.rb": 0.6723847389221191,
"spec/models/subscription_spec.rb": 0.8647208213806152,
"spec/lib/open_food_network/order_and_distributor_report_spec.rb": 0.8442015647888184,
"spec/lib/open_food_network/xero_invoices_report_spec.rb": 0.13793277740478516,
"spec/services/subscription_validator_spec.rb": 1.617713451385498,
"spec/models/spree/option_value_spec.rb": 0.5321366786956787,
"spec/controllers/spree/api/line_items_controller_spec.rb": 0.5649716854095459,
"spec/controllers/api/customers_controller_spec.rb": 0.3856332302093506,
"spec/features/admin/tax_settings_spec.rb": 0.5059962272644043,
"spec/models/spree/product_property_spec.rb": 0.4123075008392334,
"spec/models/concerns/product_stock_spec.rb": 1.365936279296875,
"spec/controllers/user_confirmations_controller_spec.rb": 0.5572206974029541,
"spec/models/spree/option_type_spec.rb": 0.43832898139953613,
"spec/models/customer_spec.rb": 0.37362074851989746,
"spec/helpers/i18n_helper_spec.rb": 0.40643787384033203,
"spec/models/spree/payment_method_spec.rb": 0.5251181125640869,
"spec/helpers/order_cycles_helper_spec.rb": 0.4389002323150635,
"spec/features/admin/external_services_spec.rb": 0.31794238090515137,
"spec/controllers/spree/credit_cards_controller_spec.rb": 0.3527517318725586,
"spec/features/consumer/external_services_spec.rb": 0.4350574016571045,
"spec/lib/open_food_network/users_and_enterprises_report_spec.rb": 0.359036922454834,
"spec/models/enterprise_group_spec.rb": 0.44833922386169434,
"spec/models/tag_rule/filter_shipping_methods_spec.rb": 0.34696006774902344,
"spec/lib/open_food_network/property_merge_spec.rb": 0.29970407485961914,
"spec/features/admin/image_settings_spec.rb": 0.32785749435424805,
"spec/models/exchange_fee_spec.rb": 0.23130130767822266,
"spec/lib/stripe/account_connector_spec.rb": 0.3126180171966553,
"spec/lib/open_food_network/products_cache_refreshment_spec.rb": 0.29149460792541504,
"spec/models/spree/tax_rate_spec.rb": 0.3151886463165283,
"spec/controllers/groups_controller_spec.rb": 0.28598833084106445,
"spec/models/inventory_item_spec.rb": 0.297809362411499,
"spec/serializers/variant_serializer_spec.rb": 0.25783276557922363,
"spec/lib/open_food_network/enterprise_injection_data_spec.rb": 0.29270124435424805,
"spec/serializers/admin/variant_override_serializer_spec.rb": 0.29378700256347656,
"spec/controllers/spree/paypal_controller_spec.rb": 0.3015480041503906,
"spec/controllers/spree/checkout_controller_spec.rb": 0.3235130310058594,
"spec/controllers/stripe/callbacks_controller_spec.rb": 0.35881519317626953,
"spec/controllers/spree/admin/base_controller_spec.rb": 0.28447699546813965,
"spec/controllers/user_registrations_controller_spec.rb": 0.37039661407470703,
"spec/serializers/api/admin/product_serializer_spec.rb": 0.2211611270904541,
"spec/services/search_orders_spec.rb": 0.25273942947387695,
"spec/serializers/spree/variant_serializer_spec.rb": 0.2560765743255615,
"spec/mailers/enterprise_mailer_spec.rb": 0.22377276420593262,
"spec/jobs/products_cache_integrity_checker_job_spec.rb": 0.38372278213500977,
"spec/serializers/enterprise_serializer_spec.rb": 0.24865961074829102,
"spec/models/stripe_account_spec.rb": 0.2764317989349365,
"spec/controllers/admin/stripe_connect_settings_controller_spec.rb": 0.25455760955810547,
"spec/controllers/api/enterprises_controller_spec.rb": 0.2367243766784668,
"spec/models/tag_rule/filter_payment_methods_spec.rb": 0.2608637809753418,
"spec/services/order_cycle_distributed_variants_spec.rb": 0.027887344360351562,
"spec/controllers/admin/tag_rules_controller_spec.rb": 0.2483692169189453,
"spec/models/adjustment_metadata_spec.rb": 0.1961231231689453,
"spec/controllers/shops_controller_spec.rb": 1.6529083251953125,
"spec/models/column_preference_spec.rb": 0.19749212265014648,
"spec/serializers/admin/index_enterprise_serializer_spec.rb": 0.1634202003479004,
"spec/lib/open_food_network/subscription_summary_spec.rb": 0.18712377548217773,
"spec/serializers/admin/customer_serializer_spec.rb": 0.17607975006103516,
"spec/controllers/admin/column_preferences_controller_spec.rb": 0.1870410442352295,
"spec/models/model_set_spec.rb": 0.19138789176940918,
"spec/models/tag_rule/filter_order_cycles_spec.rb": 0.1799607276916504,
"spec/helpers/spree/orders_helper_spec.rb": 0.1408379077911377,
"spec/models/tag_rule/filter_products_spec.rb": 0.17629504203796387,
"spec/controllers/user_passwords_controller_spec.rb": 0.16375088691711426,
"spec/controllers/stripe/webhooks_controller_spec.rb": 0.15069150924682617,
"spec/models/stock/package_spec.rb": 0.14911603927612305,
"spec/models/tag_rule/discount_order_spec.rb": 0.13631701469421387,
"spec/features/consumer/confirm_invitation_spec.rb": 0.25405168533325195,
"spec/lib/spree/product_filters_spec.rb": 0.11962199211120605,
"spec/lib/open_food_network/option_value_namer_spec.rb": 0.13082218170166016,
"spec/mailers/user_mailer_spec.rb": 0.30326128005981445,
"spec/helpers/checkout_helper_spec.rb": 0.2074277400970459,
"spec/models/product_import/settings_spec.rb": 0.13475465774536133,
"spec/models/spree/credit_card_spec.rb": 0.12078642845153809,
"spec/models/coordinator_fee_spec.rb": 0.12605953216552734,
"spec/controllers/registration_controller_spec.rb": 0.09199261665344238,
"spec/lib/open_food_network/subscription_summarizer_spec.rb": 0.059951066970825195,
"spec/lib/open_food_network/sales_tax_report_spec.rb": 0.10369729995727539,
"spec/jobs/refresh_products_cache_job_spec.rb": 0.27120208740234375,
"spec/models/spree/addresses_spec.rb": 0.1175835132598877,
"spec/lib/open_food_network/i18n_config_spec.rb": 0.0969705581665039,
"spec/models/spree/order/checkout_spec.rb": 1.2646453380584717,
"spec/features/consumer/sitemap_spec.rb": 0.09025812149047852,
"spec/helpers/shared_helper_spec.rb": 0.07801532745361328,
"spec/models/spree/gateway/stripe_connect_spec.rb": 0.07303094863891602,
"spec/helpers/shop_helper_spec.rb": 0.058048248291015625,
"spec/serializers/admin/subscription_customer_serializer_spec.rb": 0.060986995697021484,
"spec/lib/open_food_network/cached_products_renderer_spec.rb": 0.07480335235595703,
"spec/models/spree/calculator/flexi_rate_spec.rb": 0.6015393733978271,
"spec/models/spree/preference_spec.rb": 0.05887198448181152,
"spec/lib/stripe/webhook_handler_spec.rb": 0.059610605239868164,
"spec/lib/open_food_network/order_grouper_spec.rb": 0.05851387977600098,
"spec/controllers/spree/user_sessions_controller_spec.rb": 0.051381826400756836,
"spec/helpers/html_helper_spec.rb": 0.05978536605834961,
"spec/helpers/navigation_helper_spec.rb": 0.06995773315429688,
"spec/models/tag_rule_spec.rb": 0.05184459686279297,
"spec/jobs/welcome_enterprise_job_spec.rb": 0.05195975303649902,
"spec/lib/open_food_network/enterprise_issue_validator_spec.rb": 0.14506173133850098,
"spec/jobs/confirm_order_job_spec.rb": 0.04619622230529785,
"spec/models/spree/preferences/file_configuration_spec.rb": 0.05427718162536621,
"spec/models/product_import/reset_absent_spec.rb": 0.04453468322753906,
"spec/models/product_import/entry_processor_spec.rb": 0.04535818099975586,
"spec/services/embedded_page_service_spec.rb": 0.04078173637390137,
"spec/lib/spree/localized_number_spec.rb": 0.05774712562561035,
"spec/lib/open_food_network/reports/report_spec.rb": 0.04312324523925781,
"spec/controllers/spree/store_controller_spec.rb": 0.032500505447387695,
"spec/models/spree/calculator/flat_percent_item_total_spec.rb": 0.5876741409301758,
"spec/controllers/api/statuses_controller_spec.rb": 0.04073929786682129,
"spec/controllers/base_controller_spec.rb": 0.030263423919677734,
"spec/models/subscription_line_item_spec.rb": 0.03436994552612305,
"spec/models/calculator/flat_percent_per_item_spec.rb": 0.030996322631835938,
"spec/lib/open_food_network/referer_parser_spec.rb": 0.027393817901611328,
"spec/services/reset_order_service_spec.rb": 0.028766632080078125,
"spec/models/spree/calculator/per_item_spec.rb": 0.291332483291626,
"spec/jobs/confirm_signup_job_spec.rb": 0.021788835525512695,
"spec/lib/open_food_network/reports/rule_spec.rb": 0.025704622268676758,
"spec/models/calculator/weight_spec.rb": 1.380509376525879,
"spec/requests/large_request_spec.rb": 0.03156089782714844,
"spec/serializers/credit_card_serializer_spec.rb": 0.023131370544433594,
"spec/models/feature_flags_spec.rb": 0.0632791519165039,
"spec/lib/open_food_network/feature_toggle_spec.rb": 0.02283477783203125,
"spec/jobs/heartbeat_job_spec.rb": 0.020235776901245117,
"spec/models/spree/calculator/flat_rate_spec.rb": 0.018027782440185547,
"spec/helpers/groups_helper_spec.rb": 0.016248464584350586,
"spec/helpers/products_helper_spec.rb": 0.018996000289916992,
"spec/services/mail_configuration_spec.rb": 0.01758885383605957,
"spec/helpers/spree/admin/base_helper_spec.rb": 0.008402109146118164,
"spec/lib/open_food_network/error_logger_spec.rb": 0.007436990737915039,
"spec/models/content_configuration_spec.rb": 0.0073282718658447266,
"spec/lib/open_food_network/reports/row_spec.rb": 0.006602764129638672,
"spec/config/application_spec.rb": 0.006625175476074219,
"spec/controllers/admin/proxy_orders_controller_spec.rb": 12.432438373565674,
"spec/controllers/api/enterprise_fees_controller_spec.rb": 0.1020348072052002,
"spec/controllers/spree/admin/reports/enterprise_fee_summaries_controller_spec.rb": 0.7282826900482178,
"spec/controllers/spree/api/shipments_controller_spec.rb": 14.814026355743408,
"spec/features/admin/reports/enterprise_fee_summaries_spec.rb": 17.826215505599976,
"spec/features/admin/reports_spec.rb": 27.360989332199097,
"spec/features/admin/subscriptions_spec.rb": 74.08096742630005,
"spec/helpers/admin/orders_helper_spec.rb": 0.5890231132507324,
"spec/jobs/subscription_confirm_job_spec.rb": 27.758408069610596,
"spec/lib/open_food_network/lettuce_share_report_spec.rb": 2.872073173522949,
"spec/lib/open_food_network/order_cycle_management_report_spec.rb": 3.6512515544891357,
"spec/lib/open_food_network/products_and_inventory_report_spec.rb": 4.582597970962524,
"spec/mailers/subscription_mailer_spec.rb": 17.476669549942017,
"spec/models/concerns/order_shipment_spec.rb": 1.8977851867675781,
"spec/models/product_import/products_reset_strategy_spec.rb": 2.3993682861328125,
"spec/models/product_importer_spec.rb": 49.001238107681274,
"spec/models/proxy_order_spec.rb": 9.741921663284302,
"spec/models/spree/gateway_tagging_spec.rb": 0.5152750015258789,
"spec/models/spree/stock/availability_validator_spec.rb": 6.4449944496154785,
"spec/serializers/api/cached_enterprise_serializer_spec.rb": 1.5803031921386719,
"spec/serializers/api/shipping_method_serializer_spec.rb": 0.3579277992248535,
"spec/services/advance_order_service_spec.rb": 5.4587037563323975,
"spec/services/bulk_invoice_service_spec.rb": 2.845306634902954,
"spec/services/default_stock_location_spec.rb": 0.11547493934631348,
"spec/services/invoice_renderer_spec.rb": 3.9688003063201904,
"spec/services/order_cycle_distributed_products_spec.rb": 2.3592758178710938,
"spec/services/restart_checkout_spec.rb": 0.3222994804382324,
"spec/services/subscription_form_spec.rb": 1.8038544654846191,
"spec/services/subscription_variants_service_spec.rb": 3.130023717880249,
"spec/services/tax_rate_finder_spec.rb": 2.2943179607391357,
"spec/services/upload_sanitizer_spec.rb": 0.006753444671630859,
"spec/services/variants_stock_levels_spec.rb": 2.1153390407562256,
"spec/validators/date_time_string_validator_spec.rb": 0.051422119140625,
"spec/validators/integer_array_validator_spec.rb": 0.0492095947265625
}

View File

@@ -0,0 +1,22 @@
require 'rspec/rails'
require 'rspec/autorun'
# This spec file is one part of a two-part strategy to maintain data integrity. The first part
# is to proactively protect data integrity using database constraints (not null, foreign keys,
# etc) and ActiveRecord validations. As a backup to those two techniques, and particularly in
# the cases where it's not possible to model an integrity concern with database constraints,
# we can add a reactive integrity test here.
# These tests are run nightly and the results are emailed to the MAILTO address in
# config/schedule.rb if any failures occur.
# Ref: http://pluralsight.com/training/Courses/TableOfContents/database-your-friend
describe "data integrity" do
it "has no deleted variants in order cycles" do
# When a variant is soft deleted, it should be removed from all order cycles
# via Spree::Product#delete or Spree::Variant#delete.
evs = ExchangeVariant.joins(:variant).where('spree_variants.deleted_at IS NOT NULL')
evs.count.should == 0
end
end

View File

@@ -2,10 +2,9 @@ require 'open_food_network/user_balance_calculator'
module OpenFoodNetwork
class OrderCycleManagementReport
DEFAULT_DATE_INTERVAL = 1.month
attr_reader :params
def initialize(user, params = {}, render_table = false)
@params = sanitize_params(params)
@params = params
@user = user
@render_table = render_table
end
@@ -134,12 +133,5 @@ module OpenFoodNetwork
customer = Customer.where(email: email).first
customer.nil? ? "" : customer.code
end
def sanitize_params(params)
params[:q] ||= {}
params[:q][:completed_at_gt] ||= Time.zone.today - DEFAULT_DATE_INTERVAL
params[:q][:completed_at_lt] ||= Time.zone.today
params
end
end
end

View File

@@ -15,6 +15,8 @@ namespace :ofn do
sql_delete_from "spree_line_items #{where_order_id_in_orders_to_delete}"
sql_delete_from "spree_payments #{where_order_id_in_orders_to_delete}"
sql_delete_from "spree_shipments #{where_order_id_in_orders_to_delete}"
sql_delete_from "billable_periods"
sql_delete_from "account_invoices"
Spree::ReturnAuthorization.delete_all
truncate_order_cycle_data

View File

@@ -1,32 +0,0 @@
require 'spec_helper'
module Api
describe TaxonomiesController do
render_views
let(:taxonomy) { create(:taxonomy) }
let(:taxon) { create(:taxon, name: "Ruby", taxonomy: taxonomy) }
let(:taxon2) { create(:taxon, name: "Rails", taxonomy: taxonomy) }
let(:attributes) { [:id, :name] }
before do
allow(controller).to receive(:spree_current_user) { current_api_user }
taxon2.children << create(:taxon, name: "3.2.2", taxonomy: taxonomy)
taxon.children << taxon2
taxonomy.root.children << taxon
end
context "as a normal user" do
let(:current_api_user) { build(:user) }
it "gets the jstree-friendly version of a taxonomy" do
api_get :jstree, id: taxonomy.id
expect(json_response["data"]).to eq(taxonomy.root.name)
expect(json_response["attr"]).to eq("id" => taxonomy.root.id, "name" => taxonomy.root.name)
expect(json_response["state"]).to eq("closed")
end
end
end
end

Some files were not shown because too many files have changed in this diff Show More