Bundle update rubocop and auto correct style issues
This commit is contained in:
parent
f7f8774c43
commit
a81bb25512
9 changed files with 875 additions and 883 deletions
1718
.rubocop_todo.yml
1718
.rubocop_todo.yml
File diff suppressed because it is too large
Load diff
19
Gemfile.lock
19
Gemfile.lock
|
@ -310,7 +310,7 @@ GEM
|
|||
mini_portile2 (~> 2.8.0)
|
||||
racc (~> 1.4)
|
||||
parallel (1.22.1)
|
||||
parser (3.1.2.0)
|
||||
parser (3.1.2.1)
|
||||
ast (~> 2.4.1)
|
||||
pdf-core (0.9.0)
|
||||
polyglot (0.3.5)
|
||||
|
@ -433,23 +433,24 @@ GEM
|
|||
rspec-rerun (1.1.0)
|
||||
rspec (~> 3.0)
|
||||
rspec-support (3.11.0)
|
||||
rubocop (1.30.0)
|
||||
rubocop (1.36.0)
|
||||
json (~> 2.3)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.1.0.0)
|
||||
parser (>= 3.1.2.1)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.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)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.18.0)
|
||||
rubocop-ast (1.21.0)
|
||||
parser (>= 3.1.1.0)
|
||||
rubocop-rails (2.14.2)
|
||||
rubocop-rails (2.16.1)
|
||||
activesupport (>= 4.2.0)
|
||||
rack (>= 1.1)
|
||||
rubocop (>= 1.7.0, < 2.0)
|
||||
rubocop-rspec (2.11.1)
|
||||
rubocop (~> 1.19)
|
||||
rubocop (>= 1.33.0, < 2.0)
|
||||
rubocop-rspec (2.13.2)
|
||||
rubocop (~> 1.33)
|
||||
ruby-filemagic (0.7.3)
|
||||
ruby-ole (1.2.12.2)
|
||||
ruby-prof (1.4.3)
|
||||
|
|
|
@ -74,7 +74,7 @@ module Foodsoft
|
|||
end
|
||||
|
||||
# Foodsoft version
|
||||
VERSION = File.read(Rails.root.join('VERSION')).strip
|
||||
VERSION = Rails.root.join('VERSION').read.strip
|
||||
# Current revision, or +nil+
|
||||
REVISION = (File.read(Rails.root.join('REVISION')).strip rescue nil)
|
||||
REVISION = (Rails.root.join('REVISION').read.strip rescue nil)
|
||||
end
|
||||
|
|
|
@ -166,6 +166,6 @@ class RenderPDF < Prawn::Document
|
|||
end
|
||||
|
||||
def font_path(name)
|
||||
File.join(Rails.root, 'vendor', 'assets', 'fonts', name)
|
||||
Rails.root.join('vendor', 'assets', 'fonts', name)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ require 'pathname'
|
|||
|
||||
namespace :db 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)}"
|
||||
task File.basename(seedfile, '.seeds.rb') => :environment do
|
||||
require_relative seedfile
|
||||
|
|
|
@ -21,7 +21,7 @@ describe Api::V1::User::FinancialTransactionsController, type: :controller do
|
|||
before { request }
|
||||
|
||||
it "returns status 200" do
|
||||
expect(response.status).to eq 200
|
||||
expect(response).to have_http_status :ok
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -23,7 +23,7 @@ describe Api::V1::User::GroupOrderArticlesController, type: :controller do
|
|||
before { request }
|
||||
|
||||
it "returns status 200" do
|
||||
expect(response.status).to eq 200
|
||||
expect(response).to have_http_status :ok
|
||||
end
|
||||
|
||||
it "returns the order_article" do
|
||||
|
|
|
@ -113,7 +113,7 @@ feature 'settling an order', js: true do
|
|||
click_link I18n.t('ui.edit')
|
||||
end
|
||||
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
|
||||
find('input[type="submit"]').click
|
||||
end
|
||||
|
@ -135,7 +135,7 @@ feature 'settling an order', js: true do
|
|||
expect(page).to have_selector('form#new_group_order_article')
|
||||
within('#new_group_order_article') do
|
||||
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
|
||||
find('input[type="submit"]').click
|
||||
end
|
||||
|
@ -174,7 +174,7 @@ feature 'settling an order', js: true do
|
|||
click_link I18n.t('finance.balancing.edit_results_by_articles.add_article')
|
||||
expect(page).to have_selector('form#new_order_article')
|
||||
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
|
||||
find('input[type="submit"]').click
|
||||
end
|
||||
|
|
|
@ -4,8 +4,7 @@ describe BankTransaction do
|
|||
let(:bank_account) { create :bank_account }
|
||||
|
||||
it 'empty content' do
|
||||
content = <<-JSON
|
||||
JSON
|
||||
content = ''
|
||||
|
||||
importer = BankAccountInformationImporter.new(bank_account)
|
||||
expect(importer.import!(content)).to be_nil
|
||||
|
|
Loading…
Reference in a new issue