Obituary detects archived GitHub repositories for your RubyGem dependencies. It can be used as a CLI command in CI or as an RSpec matcher to keep dependency health visible.
Install the gem and add to the application's Gemfile by executing:
bundle add obituaryIf bundler is not being used to manage dependencies, install the gem by executing:
gem install obituarySet your GitHub token in the environment so the GitHub API can be queried.
export GITHUB_TOKEN=your_token_hereObituary reads .obituary.yml from the project root by default.
include_transitive: false
github_token_env: "GITHUB_TOKEN"
ignore:
- some_archived_but_ok_gem
overrides:
some_gem: "https://github.com/owner/repo"bundle exec obituary
bundle exec obituary --include-transitive
bundle exec obituary --format jsonrequire "obituary/rspec"
RSpec.describe "Dependency health" do
it "does not depend on archived gems" do
expect(:bundle).not_to have_archived_gems
end
endname: Dependency Health Check
on:
schedule:
- cron: '0 9 * * 1'
workflow_dispatch:
jobs:
check-archived:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: gem install obituary
- run: obituary check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}- Only GitHub repositories are supported.
- Private repositories require a token with access.
After checking out the repo, run bundle exec rspec to run the tests.
The gem is available as open source under the terms of the MIT License.