52 Commits

Author SHA1 Message Date
Alexander Brandon Coles 03572f4444 Freeze string literals in app/workers
rubocop -A --only Style/FrozenStringLiteralComment,Layout/EmptyLineAfterMagicComment,Style/RedundantFreeze app/workers
2025-07-18 17:42:42 +01:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Ivan Kuchin fa5d03eae0 rubocop safe autocorrect all except Rails/WhereRange 2024-05-30 19:54:08 +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
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 a33524ef6d remove ruby magic comment for utf-8
ruby interprets source encoding as utf-8 since 2.0.0, making magic comment redundant and useless
2022-03-10 19:36:58 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Markus Kahl f83f96a172 elevated prio for jobs users might wait for 2022-02-09 10:59:47 +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 1bdd2ab9ae safe automatic fixes by rubocop (#8994) 2021-02-11 16:02:18 +01:00
luz paz 3683042c9b Fix typos in user facing and non-user facing code
Found via `codespell v2.1.dev0`
2021-01-24 15:08:21 +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 4cb0d0ff91 Feature/delayed bcf export (#8275)
* delayed bcf export

* remove unnecessary eager loading

* Update rxjs polling statement with loading indicator

* Avoid error handling due to JSON parsing

* delay all wp list exports

Co-authored-by: Oliver Günther <mail@oliverguenther.de>

[ci skip]
2020-04-20 16:16:01 +02: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 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 6ef4211e77 Bump copyright to 2018 (#6171)
[ci skip]
2018-02-12 08:51:12 +01:00
Oliver Günther ade04a51d2 Fix net/http require on debian 9 (#5907)
[ci skip]
2017-09-08 14:14:55 +02:00
Oliver Günther 7cf11bb689 Update copyright notice 2017-01-10 15:11:43 +01:00
Markus Kahl 92506216d3 use common base class for jobs 2016-10-11 08:11:40 +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 dac730ac5a Add insecure option to managed remotes
Adds an `insecure` option to the `configuration.yml`.

This option only applies when the manages: key is set to a URL.

If the given URL uses SSL, certificate checking will be disabled.
This key is set for a packaged installation by default, since it communicates locally and
these installations may often include a snakeoil certificate.
2015-11-20 17:35:33 +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
Oliver Günther dd20da3baf Send access token and extend packaged configuration
Extends the packager `configuration.yml` to include vendor configuration
for Subversion and Git, when enabled through the wizard.

Also extends the remote repository request to send an optional, configurable
access token required to use the wrapper script.
2015-10-21 18:00:49 +02:00
Oliver Günther 58ced887a2 Repository Apache module
Provides a simple mod-perl based Apache wrapper around
remote repositories.

As its functionality is very limited, it is probably not of much use outside of the packager context.
2015-10-14 09:37:31 +02:00
Oliver Günther b7465b08a6 Remote managed repositories
This commit starts the work to provide functionality with remote service hooks for managing repositories.

The main driver behind this is packager, for which we want apache to be the sole owner of the repositories it delivers, and OpenProject only as a reader, however it benefits other installations as well.
2015-10-13 12:47:15 +02: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 379a36d3e8 Fix repeating failing jobs due to missing repository
When a StorageUpdater job is registered, but the associated object
is vanished in between request and execution, the job fails and is
repeated.

It should instead succeed with a warning.
2015-09-07 11:30:40 +02:00
Oliver Günther 701c49ab31 Correct parsing of string and octal chmod values 2015-08-25 11:08:05 +02:00
Oliver Günther ec7b33484b Force integral mode
ENV-based configuration passes a string to the chmod value,
which seemingly can't be turned into an integer.

Thus we work around this by casting the value to integer,
will also help users who are using strings in their configs
2015-08-21 16:37:34 +02:00
Jan Sandbrink 715c664cbe generalize module included in all delayed jobs
now also applies to other activities one might want to execute before all delayed jobs
(as discussed with @ulferts)
2015-08-07 16:00:19 +02:00
Jan Sandbrink 10d61b01e7 let delayed jobs reset the request store
This is especially neccessary since our Settings use the request store to determine, whether they need to invalidate the cache key.
If the request store was never reset, the settings in our delayed jobs would be cached at an old value forever (until the next restart).
2015-08-07 16:00:19 +02:00
Jan Sandbrink dc164ceb69 Merge pull request #3317 from oliverguenther/feature/managed_repos_structure
Remove repository project hierarchy
2015-08-07 15:56:58 +02:00
Oliver Günther 1b9ba9c4bf Remove repository project hierarchy
This commit removes the project hierarchy introduced with
repository management.
They are not required, incompatible with mod_dav_svn and provide
little to none advantage to storing all repositories in a flat
structure for the scale we require.
2015-08-06 18:01:37 +02:00
Oliver Günther ee77585299 Disallow setting the owner of a repository folder
The original repository management epic allows to define
an owner that a created repository is set to.

As this will not work for non-root users on *nix systems,
this commit removes this functionality in favor of setting
only the group.

This is allowed by non-privileged users _as long as_ users are
member of this group.
2015-08-06 17:47:10 +02:00
Oliver Günther c16c1e75d4 Extend SysController to allow WS to check / update storage 2015-08-03 09:55:39 +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
Oliver Günther 29ab3f74c0 Add quota display using .reposize file.
This commits add the basic functionality for:

- Retrieving the storage size of a repository in pure ruby.
- Retrieving the latest mtime of a file in a repository
- Asynchronously getting and writing this information in a separated
file inside that repository (`.reposize`) with YAML for convenience.
2015-08-03 09:54:35 +02:00
Oliver Günther 86f847043b Allow configuration to disable arbitrary SCM types
This commit provides:

- Configuration options for disabling any number of available
  types of that particular SCM vendor.
- Changes to the underlying structure to allow determination
  of which types are available on a class level.
2015-07-30 17:03:45 +02:00
Oliver Günther edf713fbd5 Rework managed repositories error handling
This commit:

- adds error messages for filesystem errors
- Forces services and views to use repository.root_url instead of
  managed_path, which may not be available when config is missing
2015-07-23 16:19:43 +02:00