class Terradactyl::StacksPlanFilterGitDiffHead

Public Class Methods

desc() click to toggle source
# File lib/terradactyl/filters.rb, line 37
def self.desc
  'A list of all stacks that differ from Git HEAD'
end
name() click to toggle source
# File lib/terradactyl/filters.rb, line 33
def self.name
  'diff-head'
end

Public Instance Methods

git_cmd() click to toggle source
# File lib/terradactyl/filters.rb, line 41
def git_cmd
  `git --no-pager diff --name-only HEAD .`
end
sift(stacks) click to toggle source
# File lib/terradactyl/filters.rb, line 45
def sift(stacks)
  modified = git_cmd.split.each_with_object([]) do |path, memo|
    memo << stack_name(path) if path =~ /#{base_dir}/
  end
  stacks & modified
end