Bundle update rubocop and auto correct style issues

This commit is contained in:
Patrick Gansterer 2022-10-08 16:03:19 +02:00
parent f7f8774c43
commit a81bb25512
9 changed files with 875 additions and 883 deletions

File diff suppressed because it is too large Load diff

View file

@ -310,7 +310,7 @@ GEM
mini_portile2 (~> 2.8.0) mini_portile2 (~> 2.8.0)
racc (~> 1.4) racc (~> 1.4)
parallel (1.22.1) parallel (1.22.1)
parser (3.1.2.0) parser (3.1.2.1)
ast (~> 2.4.1) ast (~> 2.4.1)
pdf-core (0.9.0) pdf-core (0.9.0)
polyglot (0.3.5) polyglot (0.3.5)
@ -433,23 +433,24 @@ GEM
rspec-rerun (1.1.0) rspec-rerun (1.1.0)
rspec (~> 3.0) rspec (~> 3.0)
rspec-support (3.11.0) rspec-support (3.11.0)
rubocop (1.30.0) rubocop (1.36.0)
json (~> 2.3)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 3.1.0.0) parser (>= 3.1.2.1)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0) regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0) rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.18.0, < 2.0) rubocop-ast (>= 1.20.1, < 2.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0) unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.18.0) rubocop-ast (1.21.0)
parser (>= 3.1.1.0) parser (>= 3.1.1.0)
rubocop-rails (2.14.2) rubocop-rails (2.16.1)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
rack (>= 1.1) rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0) rubocop (>= 1.33.0, < 2.0)
rubocop-rspec (2.11.1) rubocop-rspec (2.13.2)
rubocop (~> 1.19) rubocop (~> 1.33)
ruby-filemagic (0.7.3) ruby-filemagic (0.7.3)
ruby-ole (1.2.12.2) ruby-ole (1.2.12.2)
ruby-prof (1.4.3) ruby-prof (1.4.3)

View file

@ -74,7 +74,7 @@ module Foodsoft
end end
# Foodsoft version # Foodsoft version
VERSION = File.read(Rails.root.join('VERSION')).strip VERSION = Rails.root.join('VERSION').read.strip
# Current revision, or +nil+ # Current revision, or +nil+
REVISION = (File.read(Rails.root.join('REVISION')).strip rescue nil) REVISION = (Rails.root.join('REVISION').read.strip rescue nil)
end end

View file

@ -166,6 +166,6 @@ class RenderPDF < Prawn::Document
end end
def font_path(name) def font_path(name)
File.join(Rails.root, 'vendor', 'assets', 'fonts', name) Rails.root.join('vendor', 'assets', 'fonts', name)
end end
end end

View file

@ -6,7 +6,7 @@ require 'pathname'
namespace :db do namespace :db do
namespace :seed do namespace :seed do
Dir.glob(Rails.root.join('db/seeds/*.seeds.rb')).sort.each do |seedfile| Rails.root.glob('db/seeds/*.seeds.rb').sort.each do |seedfile|
desc "Load the seed data from #{Pathname.new(seedfile).relative_path_from(Rails.root)}" desc "Load the seed data from #{Pathname.new(seedfile).relative_path_from(Rails.root)}"
task File.basename(seedfile, '.seeds.rb') => :environment do task File.basename(seedfile, '.seeds.rb') => :environment do
require_relative seedfile require_relative seedfile

View file

@ -21,7 +21,7 @@ describe Api::V1::User::FinancialTransactionsController, type: :controller do
before { request } before { request }
it "returns status 200" do it "returns status 200" do
expect(response.status).to eq 200 expect(response).to have_http_status :ok
end end
end end

View file

@ -23,7 +23,7 @@ describe Api::V1::User::GroupOrderArticlesController, type: :controller do
before { request } before { request }
it "returns status 200" do it "returns status 200" do
expect(response.status).to eq 200 expect(response).to have_http_status :ok
end end
it "returns the order_article" do it "returns the order_article" do

View file

@ -113,7 +113,7 @@ feature 'settling an order', js: true do
click_link I18n.t('ui.edit') click_link I18n.t('ui.edit')
end end
within("#edit_order_article_#{oa.id}") do within("#edit_order_article_#{oa.id}") do
find('#order_article_units_to_order').set(0) find_by_id('order_article_units_to_order').set(0)
sleep 0.25 sleep 0.25
find('input[type="submit"]').click find('input[type="submit"]').click
end end
@ -135,7 +135,7 @@ feature 'settling an order', js: true do
expect(page).to have_selector('form#new_group_order_article') expect(page).to have_selector('form#new_group_order_article')
within('#new_group_order_article') do within('#new_group_order_article') do
select user.ordergroup.name, :from => 'group_order_article_ordergroup_id' select user.ordergroup.name, :from => 'group_order_article_ordergroup_id'
find('#group_order_article_result').set(8) find_by_id('group_order_article_result').set(8)
sleep 0.25 sleep 0.25
find('input[type="submit"]').click find('input[type="submit"]').click
end end
@ -174,7 +174,7 @@ feature 'settling an order', js: true do
click_link I18n.t('finance.balancing.edit_results_by_articles.add_article') click_link I18n.t('finance.balancing.edit_results_by_articles.add_article')
expect(page).to have_selector('form#new_order_article') expect(page).to have_selector('form#new_order_article')
within('#new_order_article') do within('#new_order_article') do
find('#order_article_article_id').select(new_article.name) find_by_id('order_article_article_id').select(new_article.name)
sleep 0.25 sleep 0.25
find('input[type="submit"]').click find('input[type="submit"]').click
end end

View file

@ -4,8 +4,7 @@ describe BankTransaction do
let(:bank_account) { create :bank_account } let(:bank_account) { create :bank_account }
it 'empty content' do it 'empty content' do
content = <<-JSON content = ''
JSON
importer = BankAccountInformationImporter.new(bank_account) importer = BankAccountInformationImporter.new(bank_account)
expect(importer.import!(content)).to be_nil expect(importer.import!(content)).to be_nil