Sha256: 91109a71f374a9649456536136d150db9dbea0581963cef983f718c1492d2d4a

Contents?: true

Size: 886 Bytes

Versions: 1

Compression:

Stored size: 886 Bytes

Contents

require 'rubygems'
require "pivotal_to_pdf/version"
require 'rainbow'
require 'thor'
require 'active_resource'
require 'pivotal_to_pdf/simple_text_formatter'
require 'pivotal_to_pdf/pivotal'
require 'pivotal_to_pdf/iteration'
require 'pivotal_to_pdf/story'
require 'pivotal_to_pdf/pdf_writer'
module PivotalToPdf
  class Main < Thor
    class << self
      def story(story_id)
        story = Story.find(story_id)
        PivotalToPdf::PdfWriter.new(story).write_to
      end

      def current_iteration
        iteration = Iteration.find(:all, :params => {:group => "current"}).first
        PivotalToPdf::PdfWriter.new(iteration).write_to
      end

      def iteration(iteration_number)
        iteration = Iteration.find(:all, :params => {:offset => iteration_number.to_i - 1, :limit => 1}).first
        PivotalToPdf::PdfWriter.new(iteration).write_to
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pivotal_to_pdf-1.0.0 lib/pivotal_to_pdf.rb