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.
Installation
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 obituarySetup
Set your GitHub token in the environment so the GitHub API can be queried.
export GITHUB_TOKEN=your_token_hereConfiguration
Obituary 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"Usage (CLI)
bundle exec obituary
bundle exec obituary --include-transitive
bundle exec obituary --format jsonUsage (RSpec)
require "obituary/rspec"
RSpec.describe "Dependency health" do
it "does not depend on archived gems" do
expect(:bundle).not_to have_archived_gems
end
endCI Example
name: 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 }}Limitations
- Only GitHub repositories are supported.
- Private repositories require a token with access.
Development
After checking out the repo, run bundle exec rspec to run the tests.
License
The gem is available as open source under the terms of the MIT License.