OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
linting hash value
ulferts941ae9628f6c
diff --git a/spec/factories/work_package_factory.rb b/spec/factories/work_package_factory.rbindex ebeaca799e6..e56eef11802 100644--- a/spec/factories/work_package_factory.rb+++ b/spec/factories/work_package_factory.rb@@ -68,7 +68,7 @@ FactoryBot.define doif custom_values.is_a? Hashcustom_values.each_pair do |custom_field_id, value|- work_package.custom_values.build custom_field_id: custom_field_id, value: value+ work_package.custom_values.build custom_field_id:, value:endelsecustom_values.each { |cv| work_package.custom_values << cv }diff --git a/spec/features/work_packages/details/date_editor_spec.rb b/spec/features/work_packages/details/date_editor_spec.rbindex defb6b9cdf0..f88dad0b8ac 100644--- a/spec/features/work_packages/details/date_editor_spec.rb+++ b/spec/features/work_packages/details/date_editor_spec.rb@@ -37,7 +37,7 @@ describe 'date inplace editor',with_settings: { date_format: '%Y-%m-%d' },js: true, selenium: true dolet(:project) { create :project_with_types, public: true }- let(:work_package) { create :work_package, project: project, start_date: Date.parse('2016-01-02') }+ let(:work_package) { create :work_package, project:, start_date: Date.parse('2016-01-02') }let(:user) { create :admin }let(:work_packages_page) { Pages::FullWorkPackage.new(work_package, project) }let(:wp_table) { Pages::WorkPackagesTable.new(project) }@@ -95,7 +95,7 @@ describe 'date inplace editor',context 'with start and end date set' dolet(:work_package) docreate :work_package,- project: project,+ project:,start_date: Date.parse('2016-01-02'),due_date: Date.parse('2016-01-25')end@@ -161,7 +161,7 @@ describe 'date inplace editor',endcontext 'with the start date empty' do- let(:work_package) { create :work_package, project: project, start_date: nil }+ let(:work_package) { create :work_package, project:, start_date: nil }it 'can set "today" as a date via the provided link' dostart_date.activate!@@ -245,7 +245,7 @@ describe 'date inplace editor',let(:cf_field) { EditField.new page, :"customField#{date_cf.id}" }let(:datepicker) { ::Components::Datepicker.new }- let(:create_page) { ::Pages::FullWorkPackageCreate.new(project: project) }+ let(:create_page) { ::Pages::FullWorkPackageCreate.new(project:) }it 'can handle creating a CF date' docreate_page.visit!diff --git a/spec/features/work_packages/scheduling/scheduling_mode_spec.rb b/spec/features/work_packages/scheduling/scheduling_mode_spec.rbindex 8f8afd7ae48..1264eb18d1e 100644--- a/spec/features/work_packages/scheduling/scheduling_mode_spec.rb+++ b/spec/features/work_packages/scheduling/scheduling_mode_spec.rb@@ -52,27 +52,27 @@ describe 'scheduling mode',#let!(:wp) docreate :work_package,- project: project,+ project:,start_date: Date.parse('2016-01-01'),due_date: Date.parse('2016-01-05'),parent: wp_parentendlet!(:wp_parent) docreate(:work_package,- project: project,+ project:,start_date: Date.parse('2016-01-01'),due_date: Date.parse('2016-01-05'))endlet!(:wp_child) docreate(:work_package,- project: project,+ project:,start_date: Date.parse('2016-01-01'),due_date: Date.parse('2016-01-05'),parent: wp)endlet!(:wp_pre) docreate(:work_package,- project: project,+ project:,start_date: Date.parse('2015-12-15'),due_date: Date.parse('2015-12-31')).tap do |pre|create(:follows_relation, from: wp, to: pre)@@ -80,7 +80,7 @@ describe 'scheduling mode',endlet!(:wp_suc) docreate(:work_package,- project: project,+ project:,start_date: Date.parse('2016-01-06'),due_date: Date.parse('2016-01-10'),parent: wp_suc_parent).tap do |suc|@@ -89,13 +89,13 @@ describe 'scheduling mode',endlet!(:wp_suc_parent) docreate(:work_package,- project: project,+ project:,start_date: Date.parse('2016-01-06'),due_date: Date.parse('2016-01-10'))endlet!(:wp_suc_child) docreate(:work_package,- project: project,+ project:,start_date: Date.parse('2016-01-06'),due_date: Date.parse('2016-01-10'),parent: wp_suc)diff --git a/spec/features/wysiwyg/macros/quicklink_macros_spec.rb b/spec/features/wysiwyg/macros/quicklink_macros_spec.rbindex abd6af950ae..92f389408eb 100644--- a/spec/features/wysiwyg/macros/quicklink_macros_spec.rb+++ b/spec/features/wysiwyg/macros/quicklink_macros_spec.rb@@ -35,7 +35,7 @@ describe 'Wysiwyg work package quicklink macros', type: :feature, js: true dolet!(:work_package) docreate(:work_package,subject: "Foo Bar",- project: project,+ project:,start_date: Date.parse('2020-01-01'),due_date: Date.parse('2020-02-01'))enddiff --git a/spec/services/work_packages/set_attributes_service_spec.rb b/spec/services/work_packages/set_attributes_service_spec.rbindex 8b5867e1913..8a439de8f9a 100644--- a/spec/services/work_packages/set_attributes_service_spec.rb+++ b/spec/services/work_packages/set_attributes_service_spec.rb@@ -37,7 +37,7 @@ describe WorkPackages::SetAttributesService, type: :model dopendlet(:work_package) do- wp = build_stubbed(:work_package, project: project)+ wp = build_stubbed(:work_package, project:)wp.type = initial_typewp.send(:clear_changes_information)@@ -64,7 +64,7 @@ describe WorkPackages::SetAttributesService, type: :model doinstance_double(ActiveModel::Errors)endlet(:instance) do- described_class.new(user: user,+ described_class.new(user:,model: work_package,contract_class: mock_contract)end@@ -280,9 +280,9 @@ describe WorkPackages::SetAttributesService, type: :model doendlet(:user) { build_stubbed(:admin) }let(:instance) do- described_class.new(user: user,+ described_class.new(user:,model: invalid_wp,- contract_class: contract_class)+ contract_class:)endcontext 'with a current invalid start date' do@@ -312,7 +312,7 @@ describe WorkPackages::SetAttributesService, type: :model dolet(:parent_due_date) { Time.zone.today + 10.days }context 'with the parent having dates and not providing own dates' do- let(:call_attributes) { { parent: parent } }+ let(:call_attributes) { { parent: } }it_behaves_like 'service call' doit "sets the start_date to the parent`s start_date" do@@ -332,7 +332,7 @@ describe WorkPackages::SetAttributesService, type: :model doendcontext 'with the parent having start date (no due) and not providing own dates' do- let(:call_attributes) { { parent: parent } }+ let(:call_attributes) { { parent: } }let(:parent_due_date) { nil }it_behaves_like 'service call' do@@ -353,7 +353,7 @@ describe WorkPackages::SetAttributesService, type: :model doendcontext 'with the parent having due date (no start) and not providing own dates' do- let(:call_attributes) { { parent: parent } }+ let(:call_attributes) { { parent: } }let(:parent_start_date) { nil }it_behaves_like 'service call' do@@ -374,7 +374,7 @@ describe WorkPackages::SetAttributesService, type: :model doendcontext 'with the parent having dates but providing own dates' do- let(:call_attributes) { { parent: parent, start_date: Time.zone.today, due_date: Time.zone.today + 1.day } }+ let(:call_attributes) { { parent:, start_date: Time.zone.today, due_date: Time.zone.today + 1.day } }it_behaves_like 'service call' doit "sets the start_date to the provided date" do@@ -394,7 +394,7 @@ describe WorkPackages::SetAttributesService, type: :model doendcontext 'with the parent having dates but providing own start_date' do- let(:call_attributes) { { parent: parent, start_date: Time.zone.today } }+ let(:call_attributes) { { parent:, start_date: Time.zone.today } }it_behaves_like 'service call' doit "sets the start_date to the provided date" do@@ -414,7 +414,7 @@ describe WorkPackages::SetAttributesService, type: :model doendcontext 'with the parent having dates but providing own due_date' do- let(:call_attributes) { { parent: parent, due_date: Time.zone.today + 4.days } }+ let(:call_attributes) { { parent:, due_date: Time.zone.today + 4.days } }it_behaves_like 'service call' doit "sets the start_date to the parent's start date" do@@ -434,7 +434,7 @@ describe WorkPackages::SetAttributesService, type: :model doendcontext 'with the parent having dates but providing own empty start_date' do- let(:call_attributes) { { parent: parent, start_date: nil } }+ let(:call_attributes) { { parent:, start_date: nil } }it_behaves_like 'service call' doit "sets the start_date to nil" do@@ -454,7 +454,7 @@ describe WorkPackages::SetAttributesService, type: :model doendcontext 'with the parent having dates but providing own empty due_date' do- let(:call_attributes) { { parent: parent, due_date: nil } }+ let(:call_attributes) { { parent:, due_date: nil } }it_behaves_like 'service call' doit "sets the start_date to the parent's start date" do@@ -474,7 +474,7 @@ describe WorkPackages::SetAttributesService, type: :model doendcontext 'with the parent having dates but providing a start date that is before parent`s due date`' do- let(:call_attributes) { { parent: parent, start_date: parent_due_date - 4.days } }+ let(:call_attributes) { { parent:, start_date: parent_due_date - 4.days } }it_behaves_like 'service call' doit "sets the start_date to the provided date" do@@ -494,7 +494,7 @@ describe WorkPackages::SetAttributesService, type: :model doendcontext 'with the parent having dates but providing a start date that is after the parent`s due date`' do- let(:call_attributes) { { parent: parent, start_date: parent_due_date + 1.day } }+ let(:call_attributes) { { parent:, start_date: parent_due_date + 1.day } }it_behaves_like 'service call' doit "sets the start_date to the provided date" do@@ -514,7 +514,7 @@ describe WorkPackages::SetAttributesService, type: :model doendcontext 'with the parent having dates but providing a due date that is before the parent`s start date`' do- let(:call_attributes) { { parent: parent, due_date: parent_start_date - 3.days } }+ let(:call_attributes) { { parent:, due_date: parent_start_date - 3.days } }it_behaves_like 'service call' doit "leaves the start date empty" do@@ -928,7 +928,6 @@ describe WorkPackages::SetAttributesService, type: :model doendend- # rubocop:disable RSpec/MultipleMemoizedHelperscontext 'when switching the project' dolet(:new_project) { build_stubbed(:project) }let(:version) { build_stubbed(:version) }@@ -1121,7 +1120,6 @@ describe WorkPackages::SetAttributesService, type: :model doendendend- # rubocop:enable RSpec/MultipleMemoizedHelperscontext 'for custom fields' dosubject { instance.call(call_attributes) }@@ -1142,7 +1140,7 @@ describe WorkPackages::SetAttributesService, type: :model docontext 'when switching back to automatic scheduling' dolet(:work_package) dowp = build_stubbed(:work_package,- project: project,+ project:,schedule_manually: true,start_date: Time.zone.today,due_date: Time.zone.today + 5.days)