Class: RooOnRails::Checks::Git::Origin
- Defined in:
- lib/roo_on_rails/checks/git/origin.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#intro ⇒ Object
Output context: - git_org (string) - git_repo (string).
Methods inherited from Base
Methods included from Helpers
Constructor Details
This class inherits a constructor from RooOnRails::Checks::Base
Instance Method Details
#call ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/roo_on_rails/checks/git/origin.rb', line 14 def call status, url = shell.run "git config remote.origin.url" fail! "Origin does not seem to be configured." unless status org, repo = url.strip.sub(%r{\.git$}, '').split(%r{[:/]}).last(2) context.git_org = org context.git_repo = repo pass "organisation #{bold org}, repository: #{bold repo}" end |
#intro ⇒ Object
Output context:
-
git_org (string)
-
git_repo (string)
10 11 12 |
# File 'lib/roo_on_rails/checks/git/origin.rb', line 10 def intro "Checking your Git origin remote..." end |