class PivotalBrancher::App

Public Class Methods

new() click to toggle source
# File lib/pivotal-brancher/app.rb, line 6
def initialize
  @files = Valise::define do
    rw ".pivotal-brancher"
    rw "~/.pivotal-brancher"

    handle "*.yaml", :yaml, :hash_merge
  end
  configure_pivotal
end

Public Instance Methods

configs() click to toggle source
# File lib/pivotal-brancher/app.rb, line 16
def configs
  @files.find("config.yaml").contents
end
configure_pivotal() click to toggle source
# File lib/pivotal-brancher/app.rb, line 20
def configure_pivotal
  PivotalTracker::Client.token = configs["token"]
  PivotalTracker::Client.use_ssl
  #RestClient.log = "stdout"
end
project() click to toggle source
# File lib/pivotal-brancher/app.rb, line 26
def project
  @project = PivotalTracker::Project.find(configs["project"])
end
started_stories() click to toggle source
# File lib/pivotal-brancher/app.rb, line 30
def started_stories
  project.stories.all(:current_state => "started", :owned_by => configs["user"])
end