diff --git a/gems/gitlab-housekeeper/README.md b/gems/gitlab-housekeeper/README.md index 642ace448314e23f36d0f3471a80ee466e679c6d..e73459f18fe941f61ab1d876a95a2b6b75f44056 100644 --- a/gems/gitlab-housekeeper/README.md +++ b/gems/gitlab-housekeeper/README.md @@ -169,3 +169,19 @@ Some best practices to consider when using a once-off keep: 1. Consider adding a link back to this MR in the description of your generated MRs. This allows reviewers to understand where this work comes from and can also help if they want to contribute improvements to an ongoing group of MRs. + +## Using Housekeeper in other projects + +Right now we do not publish housekeeper to RubyGems. We have published it once +to hold the name but it's not up to date. + +In order to use Housekeeper in another project you would need to add the +following to your `Gemfile` and run `bundle install`: + +``` +gem 'gitlab-housekeeper', git: 'https://gitlab.com/gitlab-org/gitlab.git', branch: 'master', glob: 'gems/gitlab-housekeeper/*.gemspec' +``` + +After that you can just run `bundle exec gitlab-housekeeper`. Housekeeper +defaults to loading all keeps in the `./keeps` directory so you would also +create that directory in your project and put your keeps there. diff --git a/gems/gitlab-housekeeper/lib/gitlab/housekeeper/runner.rb b/gems/gitlab-housekeeper/lib/gitlab/housekeeper/runner.rb index 5c9c91f174864253d998d78729a8c37921b53f9c..e7e960373bed7b9a6e99794d9a24a5747b4d465e 100644 --- a/gems/gitlab-housekeeper/lib/gitlab/housekeeper/runner.rb +++ b/gems/gitlab-housekeeper/lib/gitlab/housekeeper/runner.rb @@ -1,5 +1,7 @@ # frozen_string_literal: true +require 'active_support' +require 'active_support/core_ext' require 'active_support/core_ext/string' require 'gitlab/housekeeper/logger' require 'gitlab/housekeeper/keep'