<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/features2cards/card.rb</filename>
    </added>
    <added>
      <filename>lib/features2cards/cli.rb</filename>
    </added>
    <added>
      <filename>lib/features2cards/prawn.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,4 +2,4 @@
 
 require File.expand_path(File.dirname(__FILE__) + &quot;/../lib/features2cards&quot;)
 
-Features2Cards.execute
\ No newline at end of file
+Features2Cards::CLI.execute
\ No newline at end of file</diff>
      <filename>bin/features2cards</filename>
    </modified>
    <modified>
      <diff>@@ -1,126 +1,10 @@
 require &quot;rubygems&quot;
 require &quot;prawn&quot;
 
-class Card
-  
-  attr_reader :type
-  attr_reader :body
-  attr_reader :footer
-  
-  def initialize(type, body, footer = nil)
-    @type = type
-    @body = body
-    @footer = footer
-  end
-  
-end
-
-class Prawn::Document
-  CARD_WIDTH  = 72 * 5 # 5 inches
-  CARD_HEIGHT = 72 * 3 # 3 inches
-  
-  def margin_box(margin, &amp;block)
-    bounding_box [bounds.left + margin, bounds.top - margin],
-      :width =&gt; bounds.width - (margin * 2), :height =&gt; bounds.height - (margin * 2),
-      &amp;block
-  end
-  
-  def outline_box
-    stroke_rectangle bounds.top_left, bounds.width, bounds.height
-  end
+$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__))) unless $LOAD_PATH.include?(File.expand_path(File.dirname(__FILE__)))
 
-  def draw_card(card, row, col)
-    bounding_box [CARD_WIDTH * col, CARD_HEIGHT * row + ((bounds.height - (2*CARD_HEIGHT))/2)],
-      :width =&gt; CARD_WIDTH, :height =&gt; CARD_HEIGHT do
-        
-      outline_box
-    
-      margin_box 18 do
-        # outline_box
-        text card.type + &quot;: &quot;, :size =&gt; 14
-        
-        margin_box 36 do
-          # outline_box
-          text card.body, :size =&gt; 16, :align =&gt; :center
-        end
-        
-        bounding_box [bounds.left, bounds.bottom + 18], :width =&gt; bounds.width, :height =&gt; 18 do
-          # outline_box
-          text card.footer, :align =&gt; :right
-        end
-      end
-    end
-  end
-  
-end
+require &quot;features2cards/cli&quot;
 
-class Features2Cards
+module Features2Cards
   VERSION = '0.1.0'
-  
-  def self.execute
-    load_cucumber
-    new.execute
-  end
-  
-  def self.load_cucumber
-    $LOAD_PATH.unshift(File.expand_path(&quot;./vendor/plugins/cucumber/lib&quot;))
-    
-    require &quot;cucumber&quot;
-    require &quot;cucumber/treetop_parser/feature_en&quot;
-    Cucumber.load_language(&quot;en&quot;)
-    
-    Cucumber::Tree::Feature.class_eval do
-      attr_reader :scenarios
-    end
-  end
-  
-  def execute
-    files = ARGV
-    parser = Cucumber::TreetopParser::FeatureParser.new
-    
-    features = []
-    
-    files.each do |file|
-      features &lt;&lt; parser.parse_feature(file)
-    end
-    
-    cards = features_to_cards(features)
-    generate_pdf(cards)
-  end
-  
-  def features_to_cards(features)
-    cards = []
-    
-    features.map { |f| f.scenarios }.flatten.each do |scenario|
-      cards &lt;&lt; Card.new(&quot;Scenario&quot;, scenario.name, scenario.feature.header.split(&quot;\n&quot;).first)
-    end
-    
-    cards
-  end
-  
-  def generate_pdf(cards)
-    Prawn::Document.generate(&quot;cards.pdf&quot;, :page_layout =&gt; :landscape) do
-      row = 2
-      col = 0
-      
-      cards.each do |card|
-        if row == 0
-          start_new_page
-          row = 2
-          col = 0
-        end
-        
-        draw_card(card, row, col)
-        
-        col += 1
-        
-        if col &gt; 1
-          col = 0
-          row -= 1
-        end
-      end
-    end
-    
-  end
-  
-end
\ No newline at end of file
+end</diff>
      <filename>lib/features2cards.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c8569429c990e75f9cc9d3237d167a3c873fa582</id>
    </parent>
  </parents>
  <author>
    <name>Bryan Helmkamp</name>
    <email>bryan@brynary.com</email>
  </author>
  <url>http://github.com/aslakhellesoy/features2cards/commit/8c3ee9c2a9286ade7f7e7749925dbb3471e3e2e6</url>
  <id>8c3ee9c2a9286ade7f7e7749925dbb3471e3e2e6</id>
  <committed-date>2008-12-08T17:45:50-08:00</committed-date>
  <authored-date>2008-12-08T17:45:50-08:00</authored-date>
  <message>Moving files around</message>
  <tree>61bb338990b50042efabaea6c1cb51233e656119</tree>
  <committer>
    <name>Bryan Helmkamp</name>
    <email>bryan@brynary.com</email>
  </committer>
</commit>
