From 4e1fd0d76788dad641d18fcd206b6092812f0bc3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 11:46:17 +0000 Subject: [PATCH 1/3] Initial plan From 1547979a20cf43696e885ea4f42dab4062ff0c60 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 11:49:09 +0000 Subject: [PATCH 2/3] feat: initialize basic OpenProject plugin infrastructure Co-authored-by: machisuji <158871+machisuji@users.noreply.github.com> --- README.md | 25 ++++++++++++++++++++++++- lib/open_project/dev_tools.rb | 5 +++++ lib/open_project/dev_tools/engine.rb | 18 ++++++++++++++++++ lib/open_project/dev_tools/version.rb | 5 +++++ lib/openproject-dev_tools.rb | 1 + openproject-dev_tools.gemspec | 17 +++++++++++++++++ 6 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 lib/open_project/dev_tools.rb create mode 100644 lib/open_project/dev_tools/engine.rb create mode 100644 lib/open_project/dev_tools/version.rb create mode 100644 lib/openproject-dev_tools.rb create mode 100644 openproject-dev_tools.gemspec diff --git a/README.md b/README.md index 083231c..58bcdce 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,25 @@ # openproject-dev_tools -OpenProject plugin adding tools helping with local development of OpenProject + +OpenProject plugin adding tools helping with local development of OpenProject. + +## Installation + +To include this plugin in your OpenProject installation, add the following to a `Gemfile.local` file in your OpenProject root directory: + +```ruby +gem "openproject-dev_tools", git: "https://github.com/opf/openproject-dev_tools.git", branch: "main" +``` + +If you have checked out the plugin locally, you can reference the local path instead: + +```ruby +gem "openproject-dev_tools", path: "/path/to/openproject-dev_tools" +``` + +After adding the gem, run the following from your OpenProject root directory to install the plugin: + +```bash +bundle install +``` + +Then restart your OpenProject server. diff --git a/lib/open_project/dev_tools.rb b/lib/open_project/dev_tools.rb new file mode 100644 index 0000000..da3dd25 --- /dev/null +++ b/lib/open_project/dev_tools.rb @@ -0,0 +1,5 @@ +module OpenProject + module DevTools + require "open_project/dev_tools/engine" + end +end diff --git a/lib/open_project/dev_tools/engine.rb b/lib/open_project/dev_tools/engine.rb new file mode 100644 index 0000000..c49e013 --- /dev/null +++ b/lib/open_project/dev_tools/engine.rb @@ -0,0 +1,18 @@ +# Prevent load-order problems in case openproject-plugins is listed after a plugin in the Gemfile +# or not at all +require 'active_support/dependencies' +require 'open_project/plugins' + +module OpenProject::DevTools + class Engine < ::Rails::Engine + engine_name :openproject_dev_tools + + include OpenProject::Plugins::ActsAsOpEngine + + register( + 'openproject-dev_tools', + :author_url => 'https://openproject.org', + :requires_openproject => '>= 13.1.0' + ) + end +end diff --git a/lib/open_project/dev_tools/version.rb b/lib/open_project/dev_tools/version.rb new file mode 100644 index 0000000..b81b975 --- /dev/null +++ b/lib/open_project/dev_tools/version.rb @@ -0,0 +1,5 @@ +module OpenProject + module DevTools + VERSION = "1.0.0" + end +end diff --git a/lib/openproject-dev_tools.rb b/lib/openproject-dev_tools.rb new file mode 100644 index 0000000..91c405d --- /dev/null +++ b/lib/openproject-dev_tools.rb @@ -0,0 +1 @@ +require 'open_project/dev_tools' diff --git a/openproject-dev_tools.gemspec b/openproject-dev_tools.gemspec new file mode 100644 index 0000000..5501ed9 --- /dev/null +++ b/openproject-dev_tools.gemspec @@ -0,0 +1,17 @@ +# encoding: UTF-8 +$:.push File.expand_path("../lib", __FILE__) + +require 'open_project/dev_tools/version' + +Gem::Specification.new do |s| + s.name = "openproject-dev_tools" + s.version = OpenProject::DevTools::VERSION + s.authors = ["OpenProject GmbH"] + s.email = "info@openproject.org" + s.homepage = "https://github.com/opf/openproject-dev_tools" + s.summary = 'OpenProject Dev Tools Plugin' + s.description = "An OpenProject plugin adding tools helping with local development of OpenProject" + s.license = "GPLv3" + + s.files = Dir["{app,config,db,lib}/**/*"] + %w(README.md) +end From 038937103500fdc542c1cb1883cb14c0b819f92b Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 4 Mar 2026 11:53:50 +0000 Subject: [PATCH 3/3] docs: wrap Gemfile.local snippets in development group Co-authored-by: machisuji <158871+machisuji@users.noreply.github.com> --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 58bcdce..72b5823 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,17 @@ OpenProject plugin adding tools helping with local development of OpenProject. To include this plugin in your OpenProject installation, add the following to a `Gemfile.local` file in your OpenProject root directory: ```ruby -gem "openproject-dev_tools", git: "https://github.com/opf/openproject-dev_tools.git", branch: "main" +group :development do + gem "openproject-dev_tools", git: "https://github.com/opf/openproject-dev_tools.git", branch: "main" +end ``` If you have checked out the plugin locally, you can reference the local path instead: ```ruby -gem "openproject-dev_tools", path: "/path/to/openproject-dev_tools" +group :development do + gem "openproject-dev_tools", path: "/path/to/openproject-dev_tools" +end ``` After adding the gem, run the following from your OpenProject root directory to install the plugin: