Sha256: 151e3e7a197f00f7f51e85a4f5ae9aab9011934e23bc80226397557919f1ce58
Contents?: true
Size: 679 Bytes
Versions: 31
Compression:
Stored size: 679 Bytes
Contents
require 'roo_on_rails/checks/base' module RooOnRails module Checks module Git class Origin < Base # Output context: # - git_org (string) # - git_repo (string) def intro "Checking your Git origin remote..." end 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 end end end end
Version data entries
31 entries across 31 versions & 1 rubygems