48 Commits

Author SHA1 Message Date
Jan Sandbrink 0b87e7543f Freeze string literals in specs
Rolling out frozen string literals further by freezing all
string literals in core specs.
2025-05-05 09:29:55 +02:00
Oliver Günther 4d7bff2103 Restore fetch changesets functionality 2024-12-06 10:00:23 +01:00
Oliver Günther 58c576f55d Remove unused sys actions
These actions were never documented except for fetch_changesets, and we
can use the 15.0 release to remove support for it.
2024-10-28 13:05:15 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +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 8fa8584538 Run rubocop --autocorrect on all files
Only the safe cops have run. rubocop version is 1.59.0.
2024-01-05 15:27:09 +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
ulferts 2b2abf864a introduce ProjectRole model 2023-10-09 14:34:20 +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 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 293b8935a2 legacy_spec to spec 2021-05-04 16:56:14 +02:00
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01: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 9e2287bfcc rename and inflect according to zeitwerk 2020-02-21 20:47:24 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Oliver Günther 7a09d8fcdd delay all jobs 2019-10-30 15:15:31 +01:00
Oliver Günther a7ed2e9da0 Rewrite jobs to use ActiveJob syntax 2019-10-25 09:09:45 +02:00
ulferts 4e5b9afef5 rename project attributes 2019-09-24 09:28:53 +02:00
Oliver Günther f2ceec1c78 Set DJ priorities and lower max attempts 2018-09-03 15:58:16 +02:00
Oliver Günther 059770f533 FactoryGirl => FactoryBot
Removes the deprecation
2018-05-07 22:38:20 +02:00
Jens Ulferts fc98634411 fix deprecated specs 2018-03-05 15:43:35 +01: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
Jens Ulferts 655638f803 more robust spec 2016-09-21 17:00:43 +02:00
Jens Ulferts 6932a6bc6a remove spec deprecations which lead to test failures 2016-09-12 11:02:37 +02:00
Oliver Günther 616ec628b5 Rewrite with_setting specs
And fix tests that do not expect settings to be
cached during the request with RequestStore.
2016-07-22 10:33:32 +02:00
Oliver Günther 4889b8615c Merge pull request #3375 from oliverguenther/feature/git_smart_http
Feature/git smart http
2015-08-21 17:18:18 +02:00
Oliver Günther 14a394842d Extract SCM authorization routines into policies per vendor 2015-08-19 10:13:18 +02:00
Philipp Tessenow 373473c563 Add git support to repository authentication script
Refactors the original PR from #1629
* dispersed authorization methods in SysController
* refactored and updated SysController specs
2015-08-19 10:13:18 +02:00
Oliver Günther 0b583c3ccf Extend autofetching of commits into update repository information
This commit extends the previous functionality of *autofetch commits*
into internal updating of repository information, which encompasses:

* Commit information (changesets)
* Disk space information

They are now both retrieved when browsing the repository and the latter
is fetched asynchronously whenever the last update is older than the
timeout setting.

This timeout setting is now user-configurable.
2015-08-19 09:36:52 +02:00
Oliver Günther 0610280e6f Cleanup 2015-08-03 09:55:40 +02:00
Oliver Günther c16c1e75d4 Extend SysController to allow WS to check / update storage 2015-08-03 09:55:39 +02:00
Alex Coles 3785fdc9ed Use #describe, #context with String arg not symbol
The semantics of `describe` have changed in RSpec 3: passing a symbol
rather than a string will change the value of the described object.

See discussion here: https://github.com/rspec/rspec-core/issues/1114

Signed-off-by: Alex Coles <alex@alexbcoles.com>
2015-03-11 01:13:11 -03: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 879fcd49f6 Convert specs to RSpec 2.99.0 syntax with Transpec
This conversion is done by Transpec 2.3.6 with the following command:
    transpec -f

* 66 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

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

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

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

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

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

* 7 conversions
    from: its(:attr) { }
      to: describe '#attr' do subject { super().attr }; it { } end

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

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

* 3 conversions
    from: be_true
      to: be_truthy

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

* 2 conversions
    from: its([:key]) { }
      to: describe '[:key]' do subject { super()[:key] }; it { } end

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

* 1 conversion
    from: be_false
      to: be_falsey

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

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

* 1 conversion
    from: it { should_not ... }
      to: it { is_expected.not_to ... }

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2014-08-07 11:25:52 +02:00
Alex Coles 083e71a00c Add/update Copyright headers in specs
[ci skip]

Signed-off-by: Alex Coles <alex@alexbcoles.com>
2014-07-24 17:45:34 +02:00
Philipp Tessenow 2f2c6e15b7 fix failing specs 2014-07-16 17:12:36 +02:00
Philipp Tessenow a7740a4c8e re-integrate repository_authentication plugin 2014-07-15 16:19:14 +02:00