chore: rubocop

chore: fix api test conventions

chore: rubocop -A spec/

chore: more rubocop -A

fix failing test

rubocop fixes

removes helper methods that are in my opinion dead code

more rubocop fixes

rubocop -a --auto-gen-config
This commit is contained in:
Philipp Rothmann 2023-05-12 13:01:12 +02:00 committed by Philipp Rothmann
parent f6fb804bbe
commit fb2b4d8a8a
331 changed files with 4263 additions and 4507 deletions

View file

@ -1,5 +1,5 @@
require "deface"
require "foodsoft_current_orders/engine"
require 'deface'
require 'foodsoft_current_orders/engine'
module FoodsoftCurrentOrders
def self.enabled?

View file

@ -4,12 +4,15 @@ module FoodsoftCurrentOrders
return unless FoodsoftCurrentOrders.enabled?
return if primary[:orders].nil?
cond = Proc.new { current_user.role_orders? }
cond = proc { current_user.role_orders? }
[
SimpleNavigation::Item.new(primary, :stage_divider, nil, nil, class: 'divider', if: cond),
SimpleNavigation::Item.new(primary, :current_orders_receive, I18n.t('current_orders.navigation.receive'), context.receive_current_orders_orders_path, if: cond),
SimpleNavigation::Item.new(primary, :current_orders_articles, I18n.t('current_orders.navigation.articles'), context.current_orders_articles_path, if: cond),
SimpleNavigation::Item.new(primary, :current_orders_ordergroups, I18n.t('current_orders.navigation.ordergroups'), context.current_orders_ordergroups_path, if: cond)
SimpleNavigation::Item.new(primary, :current_orders_receive, I18n.t('current_orders.navigation.receive'),
context.receive_current_orders_orders_path, if: cond),
SimpleNavigation::Item.new(primary, :current_orders_articles, I18n.t('current_orders.navigation.articles'),
context.current_orders_articles_path, if: cond),
SimpleNavigation::Item.new(primary, :current_orders_ordergroups,
I18n.t('current_orders.navigation.ordergroups'), context.current_orders_ordergroups_path, if: cond)
].each { |i| primary[:orders].sub_navigation.items << i }
end
end

View file

@ -1,3 +1,3 @@
module FoodsoftCurrentOrders
VERSION = "0.0.1"
VERSION = '0.0.1'
end