43 Commits

Author SHA1 Message Date
Klaus Zanders e9459cfb46 remove test that assumes default activity 2025-01-21 15:46:01 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
ulferts 60f2c7433d use WorkPackages::UpdateService to update work packages via changeset 2024-04-09 17:46:45 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Klaus Zanders 78c1e4fadb Switch all uses of principal factories to use new interface 2023-10-09 10:39:44 +02:00
Christophe Bliard 4c2a9d0aa8 Enable RSpec zero monkey patching mode
The plan for RSpec 4.0 is to disable monkey patching.

See https://github.com/rspec/rspec-core/blob/main/features/configuration/zero_monkey_patching_mode.feature for details.
2023-05-31 19:22:29 +02:00
Christophe Bliard 9e865b4f7b lint: Run rubocop safe autocorrect
Command is `rubocop --safe --autocorrect app lib lib_static modules spec`
2023-03-09 10:25:57 +01:00
Christophe Bliard 2ab6a6baf2 lint: Make rubocop happier 2023-03-07 16:41:58 +01:00
Christophe Bliard c43fccf246 lint: autocorrect Style/HashSyntax
command is

    rubocop -A --only Style/HashSyntax app lib lib_static modules spec
2023-03-07 15:07:44 +01:00
Christophe Bliard aa23106c11 lint: autocorrect RSpec/FactoryBot/ConsistentParenthesesStyle
command is

    rubocop -A --only RSpec/FactoryBot/ConsistentParenthesesStyle modules spec
2023-03-07 15:04:32 +01:00
Christophe Bliard 85b3258a29 Autocorrect with some rubocop cops
RSpec/Rails/InferredSpecType and Style/RedundantConstantBase

rubocop --autocorrect-all --only RSpec/Rails/InferredSpecType,Style/RedundantConstantBase spec modules/*/spec
2023-01-13 14:28:59 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Christophe Bliard 47a297daae Fix argument alignment since f08bea3467 (#10129)
* Fix argument alignment since f08bea3467

The FactoryBot.* prefix has been removed in f08bea3467. Since then
rubocop complains about Layout/ArgumentAlignment. This commit fixes it.

* do not fix alignments for modules/*/spec yet

hoping to be under the limit of 65535 characters for reviewdog to report on rubocop errors
2022-02-02 21:48:06 +01:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +01:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.

Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
2021-01-13 17:47:45 +01:00
ulferts 6826f90ee2 Feature/remove timelog (#8557)
* rename costs, introduce budgets

* move files from costs to budgets

* rename cost_object to budget

* remove unused code

* move hook - should be turned into standard code in the long run

* move type attributes change over to budgets

* move patch to work_package proper

* move budget menu item up

* combine reporting, time and cost module

* remove rails based time_entries & reports code

* rename cost object filter

* adapt menu spec expectations

* use cost project module name in administration

* include timeline labels in migration

* properly place budget linking method

* fix permitted params

* remove outdated routing spec

* adapt budget request specs

* ensure order of descendent updates

* remove outdated specs

* fix checking for reporting to be enabled

* fix displaying spent units

* fix time entries activity event url

* reenable current rate tab

* fix path on budget page

* allow bulk editing of budgets only in one project scenario

* fix sanitizing reference in controller

* include module required for format_date

* fix reference to correct units from work package spent units

* linting

* remove outdated spec

* remove outdated views and permission references

* remove acts_as_event from time_entries

There is no atom link for time entries

* remove acts_as_event from projects

There are no atom links for projects

* introduce budget filter for cost reports

* remove actions added to removed controller

* move time entries to the costs module

* factor in view_own permission when calculating time entry visibility

* linting

* move mounting of time entries

* include budgets into api v3 documentation
2020-08-18 08:24:34 +02:00
ulferts 0efd4a5abd limit logged time to 24 hours a day 2020-01-29 08:56:11 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
ulferts 57f7da4f39 reuse project services in controller 2019-09-18 15:39:59 +02:00
Oliver Günther 1dfa9c1cf2 [30594] Implement separate version table for journals
This ensures inserts to the journal versions are atomtic, so we can
avoid locking the journals table.

https://community.openproject.com/wp/30594
2019-07-26 15:26:31 +02:00
Oliver Günther 059770f533 FactoryGirl => FactoryBot
Removes the deprecation
2018-05-07 22:38:20 +02:00
Oliver Günther 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Alex Coles e4c87bc2b4 Merge branch 'dev' into feature/rails4
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-08-08 19:44:58 +01:00
Oliver Günther e1bdb41bcd More complete specs wrt. coverage, cleanup 2015-07-22 14:40:16 +02:00
Oliver Günther 1e8c873544 Remove filesystem adapter
This commit removes the entire FileSystem repository and adapter.
It rids all specs (core and legacy) of remaining uses of this adpater
and replaces it with a temporary subversion repository, where necessary.

We also need to remove remaining filesystem instances from the database,
otherwise users will receive errors when accessing said repositories
on the Frontend.

This does not destroy any data on filesystem, but database information
on the repositories (remarks) are lost.
2015-07-22 14:40:16 +02:00
Alex Coles ce93701029 Fix syntax (w/Rubocop) in specs
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-06-30 12:08:28 +02:00
Jens Ulferts 4ad1bb96be Merge branch 'release/4.0' into fix/prevent_filesystem_scm_path_traversal
Conflicts:
	app/controllers/repositories_controller.rb
	app/models/repository/filesystem.rb
	app/views/settings/_repositories.html.erb
	features/step_definitions/repository_steps.rb
	spec/controllers/repositories_controller_spec.rb
	spec/lib/open_project/text_formatting_spec.rb
	spec/models/changeset_spec.rb
	spec/models/user_deletion_spec.rb
	test/functional/repositories_filesystem_controller_test.rb
	test/functional/user_mailer_test.rb
	test/unit/changeset_test.rb
	test/unit/helpers/application_helper_test.rb
	test/unit/repository_filesystem_test.rb
2015-03-18 10:22:45 +01:00
Jens Ulferts fce72938e3 prevent path traversal via filesystem scm
Setting up a filesystem scm now requires to specify a whitelist via the configuration
2015-03-17 12:58:43 +01:00
Alex Coles e0191e759c Update year in copyright header to 2015
[ci skip]
2015-01-01 00:02:57 +00:00
Alex Coles 5afc11f19e Fix syntax (w/Rubocop) in specs
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-04 00:50:36 +01:00
Alex Coles 03978767be Use 1.9+ Hash syntax in specs
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-11-03 23:49:02 +01:00
Alex Coles e137ed8135 Convert specs to RSpec 2.99.0 syntax with Transpec
This conversion is done by Transpec 2.3.1 with the following command:
    transpec

* 72 conversions
    from: describe 'some controller' { }
      to: describe 'some controller', :type => :controller { }

* 57 conversions
    from: describe 'some model' { }
      to: describe 'some model', :type => :model { }

* 49 conversions
    from: describe 'some view' { }
      to: describe 'some view', :type => :view { }

* 34 conversions
    from: obj.should
      to: expect(obj).to

* 27 conversions
    from: describe 'some routing' { }
      to: describe 'some routing', :type => :routing { }

* 8 conversions
    from: describe 'some feature' { }
      to: describe 'some feature', :type => :feature { }

* 7 conversions
    from: describe 'some helper' { }
      to: describe 'some helper', :type => :helper { }

* 5 conversions
    from: be_true
      to: be_truthy

* 5 conversions
    from: describe 'some request' { }
      to: describe 'some request', :type => :request { }

* 2 conversions
    from: obj.should_receive(:message)
      to: expect(obj).to receive(:message)

* 2 conversions
    from: obj.stub(:message)
      to: allow(obj).to receive(:message)

* 1 conversion
    from: before { example }
      to: before { |example| example }

* 1 conversion
    from: describe 'some mailer' { }
      to: describe 'some mailer', :type => :mailer { }

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2014-06-26 15:04:58 +02:00
Alex Coles 999ec99eaf Merge branch 'dev' into dev-angular
Signed-off-by: Alex Coles <alex@alexbcoles.com>

Conflicts:
	spec/controllers/work_packages_controller_spec.rb
	spec/features/work_packages/select_query_spec.rb
2014-04-10 13:17:15 +02:00
Alex Coles 0bdbdcac35 Convert specs to RSpec 2.14.8 syntax with Transpec
This conversion is done by Transpec 1.10.4 with the following command:
    transpec

* 1414 conversions
    from: obj.should
      to: expect(obj).to

* 646 conversions
    from: == expected
      to: eq(expected)

* 376 conversions
    from: obj.stub(:message)
      to: allow(obj).to receive(:message)

* 107 conversions
    from: obj.should_not
      to: expect(obj).not_to

* 70 conversions
    from: obj.should_receive(:message)
      to: expect(obj).to receive(:message)

* 45 conversions
    from: =~ [1, 2]
      to: match_array([1, 2])

* 27 conversions
    from: lambda { }.should
      to: expect { }.to

* 13 conversions
    from: Klass.any_instance.stub(:message)
      to: allow_any_instance_of(Klass).to receive(:message)

* 8 conversions
    from: === expected
      to: be === expected

* 7 conversions
    from: expect { }.not_to raise_error(SpecificErrorClass)
      to: expect { }.not_to raise_error

* 6 conversions
    from: =~ /pattern/
      to: match(/pattern/)

* 2 conversions
    from: obj.should_not_receive(:message)
      to: expect(obj).not_to receive(:message)

* 1 conversion
    from: < expected
      to: be < expected

* 1 conversion
    from: obj.stub!(:message)
      to: allow(obj).to receive(:message)

* 1 conversion
    from: stub('something')
      to: double('something')
2014-03-31 10:50:22 +02:00
Alex Coles 0902de1ebc Update Copyright headers in specs
Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-03-26 20:00:18 +01:00
Hagen Schink c645c0efd7 Adds specs 2014-02-21 15:32:19 +01:00