module AssistedWorkflow::Addons

wrapper class to pivotal api client

wrapper class to pivotal api client

Public Class Methods

load_tracker(out, configuration) click to toggle source

based on configuration keys, load the tracker addon

# File lib/assisted_workflow.rb, line 15
def self.load_tracker(out, configuration)
  if configuration[:jira] && configuration[:jira][:project]
    Jira.new(out, configuration[:jira])
  elsif configuration[:pivotal] && configuration[:pivotal][:project_id]
    Pivotal.new(out, configuration[:pivotal])
  end
end

Public Instance Methods

branch_name(story, username) click to toggle source
# File lib/assisted_workflow/addons/git.rb, line 100
def branch_name(story, username)
  description = story.name.to_s.downcase.gsub(/\W/, "_").slice(0, DESCRIPTION_LIMIT)
  [username, story.id, description].join(".").downcase
end
check_everything_commited!() click to toggle source
# File lib/assisted_workflow/addons/git.rb, line 109
def check_everything_commited!
  raise AssistedWorkflow::Error, "git: there are not commited changes" unless not_commited_changes.empty?
end
not_commited_changes() click to toggle source
# File lib/assisted_workflow/addons/git.rb, line 105
def not_commited_changes
  git("status --porcelain", :silent => true).split("\n")
end
system(command) click to toggle source
# File lib/assisted_workflow/addons/git.rb, line 92
def system(command)
  %x{#{command}}.chomp
end
system_error?() click to toggle source
# File lib/assisted_workflow/addons/git.rb, line 96
def system_error?
  $? != 0
end
validate_options!(options) click to toggle source
# File lib/assisted_workflow/addons/base.rb, line 35
def validate_options!(options)
  if options.nil?
    raise AssistedWorkflow::Error, "#{name} missing configuration"
  end
  missing_keys = self.class.get_required_options - options.keys
  if missing_keys.size > 0
    raise AssistedWorkflow::Error, "#{name} missing configuration: #{missing_keys.inspect}"
  end
end