Class: CreateGithubRelease::ReleaseAssertions
- Inherits:
-
Object
- Object
- CreateGithubRelease::ReleaseAssertions
- Defined in:
- lib/create_github_release/release_assertions.rb
Overview
Assertions that must be true for a new Github release to be created
Constant Summary collapse
- ASSERTIONS =
The assertions that must be true for a new Github release to be created
The assertions are run in the order they are defined in this array.
[ CreateGithubRelease::Assertions::GitCommandExists, CreateGithubRelease::Assertions::BundleIsUpToDate, CreateGithubRelease::Assertions::InGitRepo, CreateGithubRelease::Assertions::InRepoRootDirectory, CreateGithubRelease::Assertions::OnDefaultBranch, CreateGithubRelease::Assertions::NoUncommittedChanges, CreateGithubRelease::Assertions::NoStagedChanges, CreateGithubRelease::Assertions::LocalAndRemoteOnSameCommit, CreateGithubRelease::Assertions::LastReleaseTagExists, CreateGithubRelease::Assertions::LocalReleaseTagDoesNotExist, CreateGithubRelease::Assertions::RemoteReleaseTagDoesNotExist, CreateGithubRelease::Assertions::LocalReleaseBranchDoesNotExist, CreateGithubRelease::Assertions::RemoteReleaseBranchDoesNotExist, CreateGithubRelease::Assertions::GhCommandExists, CreateGithubRelease::Assertions::GhAuthenticated, CreateGithubRelease::Assertions::ReleasePrLabelExists ].freeze
Instance Attribute Summary collapse
-
#options ⇒ CreateGithubRelease::CommandLine::Options
readonly
The options used in the assertions.
Instance Method Summary collapse
-
#initialize(options) ⇒ ReleaseAssertions
constructor
Create a new instance of ReleaseAssertions.
-
#make_assertions
Run all assertions.
Constructor Details
#initialize(options) ⇒ ReleaseAssertions
Create a new instance of ReleaseAssertions
39 40 41 |
# File 'lib/create_github_release/release_assertions.rb', line 39 def initialize() @options = end |
Instance Attribute Details
#options ⇒ CreateGithubRelease::CommandLine::Options (readonly)
The options used in the assertions
28 29 30 |
# File 'lib/create_github_release/release_assertions.rb', line 28 def @options end |
Instance Method Details
#make_assertions
This method returns an undefined value.
Run all assertions
81 82 83 84 85 86 |
# File 'lib/create_github_release/release_assertions.rb', line 81 def make_assertions ASSERTIONS.each do |assertion_class| # @sg-ignore assertion_class.new().assert end end |