Module: GemDocs::Badge
- Defined in:
- lib/gem_docs/badge.rb
Defined Under Namespace
Classes: Badge
Constant Summary collapse
- GITHUB_BADGE_RE =
%r{actions/workflows.*badge.svg}- GITLAB_BADGE_RE =
%r{badges/.*pipeline.svg}
Class Method Summary collapse
Class Method Details
.ensure! ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/gem_docs/badge.rb', line 10 def self.ensure! repo = Repo.from_gemspec return false if repo.workflow.to_s.match?(/\A\s*\z/) badge = make_badge(repo) ensure_badge!(badge, repo) end |