Skip to content

Commit 06033de

Browse files
committed
Add mijn-bureau specific extensions and hooks
1 parent ff4ee79 commit 06033de

20 files changed

+621
-2
lines changed

COPYRIGHT

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
OpenProject is an open source project management software.
2+
3+
Copyright (C) 2012-2025 the OpenProject GmbH
4+
5+
This program is free software; you can redistribute it and/or
6+
modify it under the terms of the GNU General Public License
7+
version 3.
8+
9+
This program is distributed in the hope that it will be useful,
10+
but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
GNU General Public License for more details.
13+
14+
You should have received a copy of the GNU General Public License
15+
along with this program; if not, write to the Free Software
16+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17+
18+
See LICENSE for the full GPLv3 license text.
19+
20+
---
21+
22+
OpenProject is a derivative work based on ChiliProject, whose Copyright follows.
23+
24+
ChiliProject is a project management system.
25+
26+
Copyright (C) 2010-2013 the ChiliProject Team
27+
28+
This program is free software; you can redistribute it and/or
29+
modify it under the terms of the GNU General Public License
30+
as published by the Free Software Foundation; either version 2
31+
of the License, or (at your option) any later version.
32+
33+
This program is distributed in the hope that it will be useful,
34+
but WITHOUT ANY WARRANTY; without even the implied warranty of
35+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
36+
GNU General Public License for more details.
37+
38+
You should have received a copy of the GNU General Public License
39+
along with this program; if not, write to the Free Software
40+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
41+
42+
---
43+
44+
ChiliProject is a derivative work based on Redmine, whose Copyright follows.
45+
46+
Redmine - project management software
47+
Copyright (C) 2006-2017 Jean-Philippe Lang
48+
49+
This program is free software; you can redistribute it and/or
50+
modify it under the terms of the GNU General Public License
51+
as published by the Free Software Foundation; either version 2
52+
of the License, or (at your option) any later version.
53+
54+
This program is distributed in the hope that it will be useful,
55+
but WITHOUT ANY WARRANTY; without even the implied warranty of
56+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
57+
GNU General Public License for more details.
58+
59+
You should have received a copy of the GNU General Public License
60+
along with this program; if not, write to the Free Software
61+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Gemfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
source "https://rubygems.org"
2+
3+
gemspec
4+
5+
group :development, :test do
6+
gem "lefthook"
7+
gem "rubocop", require: false
8+
gem "rubocop-inflector", require: false
9+
gem "rubocop-openproject", require: false
10+
gem "rubocop-performance", require: false
11+
gem "rubocop-rails", require: false
12+
end

Gemfile.lock

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
PATH
2+
remote: .
3+
specs:
4+
openproject-mijn_bureau (0.0.1)
5+
6+
GEM
7+
remote: https://rubygems.org/
8+
specs:
9+
activesupport (7.0.8)
10+
concurrent-ruby (~> 1.0, >= 1.0.2)
11+
i18n (>= 1.6, < 2)
12+
minitest (>= 5.1)
13+
tzinfo (~> 2.0)
14+
ast (2.4.2)
15+
concurrent-ruby (1.2.2)
16+
i18n (1.14.1)
17+
concurrent-ruby (~> 1.0)
18+
json (2.7.2)
19+
language_server-protocol (3.17.0.3)
20+
lefthook (1.7.15)
21+
minitest (5.20.0)
22+
parallel (1.26.3)
23+
parser (3.3.5.0)
24+
ast (~> 2.4.1)
25+
racc
26+
racc (1.7.1)
27+
rack (2.2.8)
28+
rainbow (3.1.1)
29+
regexp_parser (2.9.2)
30+
rubocop (1.66.1)
31+
json (~> 2.3)
32+
language_server-protocol (>= 3.17.0)
33+
parallel (~> 1.10)
34+
parser (>= 3.3.0.2)
35+
rainbow (>= 2.2.2, < 4.0)
36+
regexp_parser (>= 2.4, < 3.0)
37+
rubocop-ast (>= 1.32.2, < 2.0)
38+
ruby-progressbar (~> 1.7)
39+
unicode-display_width (>= 2.4.0, < 3.0)
40+
rubocop-ast (1.32.3)
41+
parser (>= 3.3.1.0)
42+
rubocop-inflector (0.2.1)
43+
activesupport
44+
rubocop
45+
rubocop-rspec
46+
rubocop-openproject (0.1.0)
47+
rubocop
48+
rubocop-performance (1.21.1)
49+
rubocop (>= 1.48.1, < 2.0)
50+
rubocop-ast (>= 1.31.1, < 2.0)
51+
rubocop-rails (2.26.1)
52+
activesupport (>= 4.2.0)
53+
rack (>= 1.1)
54+
rubocop (>= 1.52.0, < 2.0)
55+
rubocop-ast (>= 1.31.1, < 2.0)
56+
rubocop-rspec (3.0.5)
57+
rubocop (~> 1.61)
58+
ruby-progressbar (1.13.0)
59+
tzinfo (2.0.6)
60+
concurrent-ruby (~> 1.0)
61+
unicode-display_width (2.5.0)
62+
63+
PLATFORMS
64+
ruby
65+
66+
DEPENDENCIES
67+
lefthook
68+
openproject-mijn_bureau!
69+
rubocop
70+
rubocop-inflector
71+
rubocop-openproject
72+
rubocop-performance
73+
rubocop-rails
74+
75+
BUNDLED WITH
76+
2.7.2

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
1-
# openproject-mijn_bureau
2-
This plugins extends OpenProject for special requirements of the Dutch software suite Mijn Bureau
1+
# OpenProject MinBZK integration
2+
3+
This plugin provides extensions and hooks into the MinBZK application suite.
4+
5+
## Copyright and License
6+
7+
OpenProject is licensed under the terms of the GNU General Public License version 3.
8+
See [COPYRIGHT](COPYRIGHT) and [LICENSE](LICENSE) files for details.
9+
10+
11+
## Reporting bugs
12+
13+
You found a bug? Please [report it](https://www.openproject.org/docs/development/report-a-bug/) to our [OpenProject community](https://community.openproject.com/projects/openproject). Thank you!
14+
15+
16+
## Contact
17+
18+
Here you can find our [contact information](https://www.openproject.org/contact/). If you are interested in development or have general questions, feel free to also join our [community discussion forums](https://community.openproject.org/projects/openproject/forums).

app/models/mijn_bureau.rb

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#-- copyright
2+
# OpenProject is an open source project management software.
3+
# Copyright (C) 2012-2022 the OpenProject GmbH
4+
#
5+
# This program is free software; you can redistribute it and/or
6+
# modify it under the terms of the GNU General Public License version 3.
7+
#
8+
# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
9+
# Copyright (C) 2006-2013 Jean-Philippe Lang
10+
# Copyright (C) 2010-2013 the ChiliProject Team
11+
#
12+
# This program is free software; you can redistribute it and/or
13+
# modify it under the terms of the GNU General Public License
14+
# as published by the Free Software Foundation; either version 2
15+
# of the License, or (at your option) any later version.
16+
#
17+
# This program is distributed in the hope that it will be useful,
18+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20+
# GNU General Public License for more details.
21+
#
22+
# You should have received a copy of the GNU General Public License
23+
# along with this program; if not, write to the Free Software
24+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25+
#
26+
# See COPYRIGHT and LICENSE files for more details.
27+
#++
28+
29+
module MijnBureau
30+
LinkedApplication = Struct.new(:identifier, :icon, :name, :link, keyword_init: true)
31+
ApplicationGroup = Struct.new(:identifier, :name, :items, keyword_init: true)
32+
end

bin/ci

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
export DOCKER_BUILDKIT=1
6+
export APP_USER_UID=$(id -u)
7+
export APP_USER_GID=$(id -g)
8+
export COMPOSE_FILE=docker-compose.ci.yml
9+
export RUBY_VERSION="$(cat .ruby-version)"
10+
export LOCAL_CACHE_PATH="./cache"
11+
12+
mkdir -p $LOCAL_CACHE_PATH/{bundle,node/.npm,node/node_modules,node/frontend/node_modules,angular,runtime-logs}
13+
14+
if [ "$1" = "down" ]; then
15+
exec docker compose down --remove-orphans --volumes
16+
else
17+
additional_args=""
18+
if [ "$CI_REBUILD" = "true" ]; then
19+
additional_args="$additional_args --build"
20+
fi
21+
exec docker compose run --rm --remove-orphans $additional_args app "$@"
22+
fi

bin/rails

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env ruby
2+
# This command will automatically be run when you run "rails" with Rails gems
3+
# installed from the root of your application.
4+
5+
ENGINE_ROOT = File.expand_path('../..', __FILE__)
6+
ENGINE_PATH = File.expand_path('../../lib/open_project/souvap/engine', __FILE__)
7+
8+
# Set up gems listed in the Gemfile.
9+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
10+
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
11+
12+
##
13+
# This is not ideal but better than nothing.
14+
if ENV['OPENPROJECT_ROOT']
15+
# /Users/mkahl/dev/openproject/release/lib
16+
path = Pathname(ENV["OPENPROJECT_ROOT"]).join("lib")
17+
$LOAD_PATH.unshift(path.to_s)
18+
path = Pathname(ENV["OPENPROJECT_ROOT"])
19+
$LOAD_PATH.unshift(path.to_s)
20+
else
21+
puts
22+
puts "Error: please define OPENPROJECT_ROOT pointing to your OpenProject core's root directory"
23+
puts
24+
Kernel.exit(1)
25+
end
26+
27+
require 'rails/all'
28+
require 'rails/engine/commands'

config/routes.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Rails.application.routes.draw do
2+
end

docker/ci/Dockerfile

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# syntax=docker/dockerfile:1.4
2+
ARG RUBY_VERSION
3+
FROM ruby:${RUBY_VERSION}-bookworm
4+
5+
ENV NODE_VERSION="20.9.0"
6+
ENV BUNDLER_VERSION="2.5.10"
7+
ENV DEBIAN_FRONTEND=noninteractive
8+
ENV BUNDLE_WITHOUT="development:production:docker"
9+
10+
ENV PGVERSION=13
11+
RUN wget --quiet -O- https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
12+
echo "deb http://apt.postgresql.org/pub/repos/apt bookworm-pgdg main" > /etc/apt/sources.list.d/pgdg.list
13+
14+
ENV CHROME_SOURCE_URL="https://dl.google.com/dl/linux/direct/google-chrome-stable_current_amd64.deb"
15+
RUN --mount=type=cache,target=/var/cache/apt export f="/tmp/chrome.deb" && wget --no-verbose -O $f $CHROME_SOURCE_URL && \
16+
apt-get update -qq && apt-get install -y "$f" postgresql-$PGVERSION postgresql-client-$PGVERSION time imagemagick default-jre-headless firefox-esr && \
17+
rm -f "$f" && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/lib/postgresql && find /usr/share/locale/* -maxdepth 0 -type d ! -name 'en' -exec rm -rf {} \;
18+
19+
RUN curl -L https://nodejs.org/dist/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.xz -o - | tar xJf - -C /usr/local --strip=1 && node --version
20+
21+
RUN rm -rf /usr/local/bundle && gem install bundler --version "$BUNDLER_VERSION" --no-document
22+
23+
ENV APP_USER=dev
24+
ENV APP_PATH=/app
25+
ARG APP_USER_UID
26+
ARG APP_USER_GID
27+
28+
RUN groupadd --force --gid $APP_USER_GID $APP_USER && \
29+
useradd -d $APP_PATH -m $APP_USER -s /bin/bash --uid $APP_USER_UID --gid $APP_USER_GID && \
30+
chown -R $APP_USER:$APP_USER /usr/local/bundle
31+
32+
ENV CI=true
33+
ENV RAILS_ENV=test
34+
ENV OPENPROJECT_DISABLE_DEV_ASSET_PROXY=1
35+
ENV CAPYBARA_DYNAMIC_BIND_IP=1
36+
ENV CAPYBARA_DOWNLOADED_FILE_DIR=/tmp
37+
# disable deprecations and other warnings in output
38+
ENV RUBYOPT="-W0"
39+
40+
WORKDIR $APP_PATH
41+
USER $APP_USER
42+
43+
RUN mkdir -p ./docker/ci
44+
COPY ./docker/ci/entrypoint.sh ./docker/ci/entrypoint.sh
45+
46+
ENTRYPOINT [ "/app/docker/ci/entrypoint.sh" ]
47+
CMD ["setup-tests", "bash"]

docker/ci/Gemfile.plugins

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
group :opf_plugins do
2+
gem "openproject-mijn-bureau", path: "modules/openproject-mijn-bureau"
3+
end

0 commit comments

Comments
 (0)