Class: CreateGithubRelease::Assertions::GhAuthenticated
- Inherits:
-
CreateGithubRelease::AssertionBase
- Object
- CreateGithubRelease::AssertionBase
- CreateGithubRelease::Assertions::GhAuthenticated
- Defined in:
- lib/create_github_release/assertions/gh_authenticated.rb
Overview
Assert that the 'gh' command is in the path
Instance Attribute Summary
Attributes inherited from CreateGithubRelease::AssertionBase
Instance Method Summary collapse
-
#assert
Make sure that the 'gh' command is authenticated.
Methods inherited from CreateGithubRelease::AssertionBase
#backtick_debug?, #error, #initialize, #print, #puts
Methods included from BacktickDebug
Constructor Details
This class inherits a constructor from CreateGithubRelease::AssertionBase
Instance Method Details
#assert
This method returns an undefined value.
Make sure that the 'gh' command is authenticated
32 33 34 35 36 37 38 39 40 |
# File 'lib/create_github_release/assertions/gh_authenticated.rb', line 32 def assert print 'Checking that the gh command is authenticated...' output = `gh auth status 2>&1` if $CHILD_STATUS.success? puts 'OK' else error "gh not authenticated:\n#{output}" end end |