Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ obituary Public

Obituary detects archived GitHub repositories for your RubyGem dependencies.

License

Notifications You must be signed in to change notification settings

ydah/obituary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Obituary Gem Version Ruby

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 obituary

If bundler is not being used to manage dependencies, install the gem by executing:

gem install obituary

Setup

Set your GitHub token in the environment so the GitHub API can be queried.

export GITHUB_TOKEN=your_token_here

Configuration

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 json

Usage (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
end

CI 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.

About

Obituary detects archived GitHub repositories for your RubyGem dependencies.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages