Class: Terradactyl::StacksPlanFilterGitDiffOriginBranch
Constant Summary
Constants included
from Common
Common::BORDER_CHAR, Common::COLUMN_WIDTH
Class Method Summary
collapse
Instance Method Summary
collapse
#sift
#sift, #stack_name
Methods included from Common
border, centre, config, cputs, dot_icon, print_content, print_crit, print_dot, print_header, print_line, print_message, print_ok, print_warning, required_versions_re, stack_icon, supported_revisions, tag, terraform_binary
Class Method Details
.desc ⇒ Object
70
71
72
|
# File 'lib/terradactyl/filters.rb', line 70
def self.desc
'A list of all stacks that differ from Git origin/HEAD'
end
|
.name ⇒ Object
66
67
68
|
# File 'lib/terradactyl/filters.rb', line 66
def self.name
'diff-origin'
end
|
Instance Method Details
#current_branch ⇒ Object
74
75
76
|
# File 'lib/terradactyl/filters.rb', line 74
def current_branch
`git symbolic-ref -q --short HEAD`
end
|
#git_cmd ⇒ Object
78
79
80
81
82
|
# File 'lib/terradactyl/filters.rb', line 78
def git_cmd
`git --no-pager diff --name-only origin/#{current_branch} .`
rescue StandardError
String.new
end
|