30 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
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 4bc9c607c2 Skip some subversion specs if svnadmin unavailable 2023-06-06 11:46:35 +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 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 3967b051e8 Bump ruby to 3.2.0 2022-12-29 18:21:52 +01:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02: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
ulferts 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
ulferts 9e2287bfcc rename and inflect according to zeitwerk 2020-02-21 20:47:24 +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 c83ba63640 Revert revert unwanted in dev branch
This reverts commit b05a8f7b54.

The release/10 branch received a revert that was applied after changes
from dev unwillingly where merged into it. But when merging release/10.0
back into dev, that revert was also applied to dev where the changes are
indeed wanted. So we revert the revert for dev.
2019-09-20 08:36:05 +02:00
Oliver Günther b05a8f7b54 Revert "[31080] Trigger wpEvent after custom action" 2019-09-18 14:28:33 +02:00
Oliver Günther 693bd7760a Replace deprecated update_attribute with update
`update_attributes` was deprecated in Rails 6
2019-09-16 14:24:13 +02:00
Oliver Günther 059770f533 FactoryGirl => FactoryBot
Removes the deprecation
2018-05-07 22:38:20 +02:00
Oliver Günther ba491cbf47 Fix repository relocation on managed remote
Repositories were not properly relocated when using a managed remote.
This also changes the request to use an old identifier instead of the
whole path. The managed remote will build the correct old path itself.
2015-11-26 13:25:24 +01:00
Oliver Günther b29abfbdc0 Expect URL and path to be returned from the remote
This commit expects a managed remote to return at least a URL
to the repository, and optionally a path.

Note that OpenProject currently only supports local repositories for
Git, and thus using managed remotes with Git WILL require a path
returned from the remote.

For Subversion, also returning a `file://<path>` URL is sufficient,
since it can browse that. Returned external URLs must be accessible from
OpenProject, since we do not receive any authentication from the remote.
2015-10-28 17:05:15 +01:00
Oliver Günther 589ba8e7b1 Relocate repositories locally and remote
This commit introduces relocating a repository as a followup after
a project's identifier has been renamed.
2015-10-28 13:45:30 +01:00
Mohamed Wael Khobalatte 4764684089 Ensure warning-free use of raise_error 2015-10-04 20:56:15 +01:00
Oliver Günther 7cb8d62e92 Fix max_attempts for StorageUpdaterJob
This sets `max_attempts` for StorageUpdaterJob to 1,
as we prefer having an external event retrigger storage counting
rather than retrying from delayed_job.

The reason behind this is failing counting due to I/O or other
unforeseen issues (e.g. mount not available, .. ).

In this case, recounting soon after will not solve the problem
and only increase load on disk.
2015-09-07 11:46:27 +02:00
Oliver Günther 5b147e32d5 Storage performance and accuracy improvements
This commit allows storage counting to shell out to `du` where
available.

The method uses du with `-bs` to count the apparent file size in bytes.
Note that apparent size is NOT the same as the real required size on
file system, but is used to be consistent with other sizes displayed in
OpenProject (e.g., attachments size)

When du is either unavailable or incompatible, in that it doesn't
return the requested count, the ruby fallback counting method is used.

This method has been slightly altered to use `File.stat` instead of
`File.new(path).size` for reduced computational overhead compared to
`du`.
2015-08-27 15:36:44 +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 8b5a120052 Move storage information to database
This commit effectively adds a storage information column
to repositories.

It tests the functionality of the counting on subversion and git
repositories / adapters.
2015-08-03 09:55:36 +02:00