<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>lib/ginatra.rb</filename>
    </added>
    <added>
      <filename>lib/ginatra/helpers.rb</filename>
    </added>
    <added>
      <filename>lib/ginatra/repo.rb</filename>
    </added>
    <added>
      <filename>lib/ginatra/repo_list.rb</filename>
    </added>
    <added>
      <filename>lib/sinatra/partials.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,7 +1,9 @@
 require 'rubygems'
 require 'cucumber/rake/task'
 require 'spec/rake/spectask'
-require &quot;ginatra.rb&quot;
+
+current_path = File.expand_path(File.dirname(__FILE__))
+require &quot;#{current_path}/lib/ginatra&quot;
 
 task :default =&gt; ['rake:spec', 'rake:features']
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ Feature: Page
   I want to see the home page
 
   Scenario:
-    When I go to the homepage
+    When I open '/'
     Then I should see &quot;Ginatra&quot;
     And I should see &quot;View My Rusty Git Repositories&quot;
     And I should see &quot;Test&quot;</diff>
      <filename>features/pages.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,9 @@
-Given /^I am on (.+)$/ do |page_name|
-  visit path_to(page_name)
+Given /^I am on '([^\']*)'$/ do |path|
+  get path
 end
  
 When /^I open '([^\']*)'$/ do |path|
-  visit path
-end
-
-When /^I go to (.+)$/ do |page_name|
-  visit path_to(page_name)
+  get path
 end
  
 When /^I press &quot;([^\&quot;]*)&quot;$/ do |button|
@@ -22,91 +18,12 @@ When /^I fill in &quot;([^\&quot;]*)&quot; with &quot;([^\&quot;]*)&quot;$/ do |field, value|
   fill_in(field, :with =&gt; value) 
 end
  
-When /^I select &quot;([^\&quot;]*)&quot; from &quot;([^\&quot;]*)&quot;$/ do |value, field|
-  select(value, :from =&gt; field) 
-end
- 
-# Use this step in conjunction with Rail's datetime_select helper. For example:
-# When I select &quot;December 25, 2008 10:00&quot; as the date and time 
-When /^I select &quot;([^\&quot;]*)&quot; as the date and time$/ do |time|
-  select_datetime(time)
-end
- 
-# Use this step when using multiple datetime_select helpers on a page or 
-# you want to specify which datetime to select. Given the following view:
-#   &lt;%%= f.label :preferred %&gt;&lt;br /&gt;
-#   &lt;%%= f.datetime_select :preferred %&gt;
-#   &lt;%%= f.label :alternative %&gt;&lt;br /&gt;
-#   &lt;%%= f.datetime_select :alternative %&gt;
-# The following steps would fill out the form:
-# When I select &quot;November 23, 2004 11:20&quot; as the &quot;Preferred&quot; data and time
-# And I select &quot;November 25, 2004 10:30&quot; as the &quot;Alternative&quot; data and time
-When /^I select &quot;([^\&quot;]*)&quot; as the &quot;([^\&quot;]*)&quot; date and time$/ do |datetime, datetime_label|
-  select_datetime(datetime, :from =&gt; datetime_label)
-end
- 
-# Use this step in conjunction with Rail's time_select helper. For example:
-# When I select &quot;2:20PM&quot; as the time
-# Note: Rail's default time helper provides 24-hour time-- not 12 hour time. Webrat
-# will convert the 2:20PM to 14:20 and then select it. 
-When /^I select &quot;([^\&quot;]*)&quot; as the time$/ do |time|
-  select_time(time)
-end
- 
-# Use this step when using multiple time_select helpers on a page or you want to
-# specify the name of the time on the form.  For example:
-# When I select &quot;7:30AM&quot; as the &quot;Gym&quot; time
-When /^I select &quot;([^\&quot;]*)&quot; as the &quot;([^\&quot;]*)&quot; time$/ do |time, time_label|
-  select_time(time, :from =&gt; time_label)
-end
- 
-# Use this step in conjunction with Rail's date_select helper.  For example:
-# When I select &quot;February 20, 1981&quot; as the date
-When /^I select &quot;([^\&quot;]*)&quot; as the date$/ do |date|
-  select_date(date)
-end
- 
-# Use this step when using multiple date_select helpers on one page or
-# you want to specify the name of the date on the form. For example:
-# When I select &quot;April 26, 1982&quot; as the &quot;Date of Birth&quot; date
-When /^I select &quot;([^\&quot;]*)&quot; as the &quot;([^\&quot;]*)&quot; date$/ do |date, date_label|
-  select_date(date, :from =&gt; date_label)
-end
- 
-When /^I check &quot;([^\&quot;]*)&quot;$/ do |field|
-  check(field) 
-end
- 
-When /^I uncheck &quot;([^\&quot;]*)&quot;$/ do |field|
-  uncheck(field) 
-end
-
-When /^I choose &quot;([^\&quot;]*)&quot;$/ do |field|
-  choose(field)
-end
- 
-When /^I attach the file at &quot;([^\&quot;]*)&quot; to &quot;([^\&quot;]*)&quot;$/ do |path, field|
-  attach_file(field, path)
-end
- 
 Then /^I should see &quot;([^\&quot;]*)&quot;$/ do |text|
-  response.should contain(text)
+  last_response.should contain(text)
 end
  
 Then /^I should not see &quot;([^\&quot;]*)&quot;$/ do |text|
-  response.should_not contain(text)
-end
- 
-Then /^the &quot;([^\&quot;]*)&quot; field should contain &quot;([^\&quot;]*)&quot;$/ do |field, value|
-    field_labeled(field).value.should =~ /#{value}/
-end
- 
-Then /^the &quot;([^\&quot;]*)&quot; field should not contain &quot;([^\&quot;]*)&quot;$/ do |field, value|
-    field_labeled(field).value.should_not =~ /#{value}/
-end
-    
-Then /^the &quot;([^\&quot;]*)&quot; checkbox should be checked$/ do |label|
-  field_labeled(label).should be_checked
+  last_response.should_not contain(text)
 end
  
 Then /^I should be on (.+)$/ do |page_name|</diff>
      <filename>features/step_definitions/page_steps.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,25 +1,12 @@
-# Sinatra
-app_file = File.join(File.dirname(__FILE__), *%w[.. .. ginatra.rb])
-require app_file
-# Force the application name because polyglot breaks the auto-detection logic.
-Sinatra::Application.app_file = app_file
-
-# RSpec matchers
-require 'spec/expectations'
-
-# Webrat
-require 'webrat'
-Webrat.configure do |config|
-  config.mode = :sinatra
-end
-
-require &quot;#{File.dirname(__FILE__)}/paths.rb&quot;
+current_path = File.expand_path(File.dirname(__FILE__))
+require &quot;#{current_path}/../../spec/spec_helper&quot;
 
 World do
-  include NavigationHelpers
-  session = Webrat::SinatraSession.new
-  session.extend(Webrat::Matchers)
-  session.extend(Webrat::HaveTagMatcher)
-  session
+  def app
+    Ginatra::App
+  end
+  include Rack::Test::Methods
+  include Webrat::Methods
+  include Webrat::Matchers
 end
 </diff>
      <filename>features/support/env.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
-require 'sinatra'
-require 'rubygems'
- 
-set :run, false
- 
-require 'ginatra.rb'
-run Sinatra::Application
+current_path = File.expand_path(File.dirname(__FILE__))
+
+require &quot;#{current_path}/lib/ginatra&quot;
+
+map '/' do
+  run Ginatra::App
+end</diff>
      <filename>rackup.ru</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ describe &quot;Ginatra&quot; do
     before(:each) do
       @ginatra_repolist = Ginatra::RepoList.new
       @ginatra_repo = @ginatra_repolist.find(&quot;test&quot;)
-      @grit_repo = Grit::Repo.new(File.join(Sinatra::Application.git_dir, &quot;test.git&quot;), {})
+      @grit_repo = Grit::Repo.new(File.join(Ginatra::App.git_dir, &quot;test.git&quot;), {})
     end
 
     it &quot;should have a name&quot; do
@@ -32,7 +32,7 @@ describe &quot;Ginatra&quot; do
     end
 
     it &quot;should be the same thing using #find or #new&quot; do
-      Ginatra::RepoList.new.find(&quot;test&quot;) == Ginatra::Repo.new(File.join(Sinatra::Application.git_dir, &quot;test.git&quot;))
+      Ginatra::RepoList.new.find(&quot;test&quot;) == Ginatra::Repo.new(File.join(Ginatra::App.git_dir, &quot;test.git&quot;))
     end
 
   end
@@ -59,7 +59,7 @@ describe &quot;Ginatra&quot; do
     before(:each) do
       @ginatra_multirepolist = Ginatra::MultiRepoList.new
       @ginatra_multirepo = @ginatra_multirepolist.find(&quot;test&quot;)
-      @grit_repo = Grit::Repo.new(File.join(Sinatra::Application.git_dir, &quot;test.git&quot;))
+      @grit_repo = Grit::Repo.new(File.join(Ginatra::App.git_dir, &quot;test.git&quot;))
     end
 
     it &quot;should have a name&quot; do
@@ -84,7 +84,7 @@ describe &quot;Ginatra&quot; do
     end
 
     it &quot;should create the same thing using .create! or .new&quot; do
-      Ginatra::MultiRepoList.new.find(&quot;test&quot;) == Ginatra::MultiRepo.new(File.join(Sinatra::Application.git_dir, &quot;test.git&quot;))
+      Ginatra::MultiRepoList.new.find(&quot;test&quot;) == Ginatra::MultiRepo.new(File.join(Ginatra::App.git_dir, &quot;test.git&quot;))
     end
 
   end</diff>
      <filename>spec/ginatra_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,20 +1,29 @@
 require 'rubygems'
-require 'sinatra'
+
+gem 'rspec'
+require 'spec'
+
+current_path = File.expand_path(File.dirname(__FILE__))
+require &quot;#{current_path}/../lib/ginatra&quot;
+
+gem 'webrat', '~&gt;0.4.4'
+require 'webrat/sinatra'
+gem 'rack-test', '~&gt;0.3.0'
 require 'rack/test'
- 
-module RackTestMethods
-  def app
-    Sinatra::Application.new
-  end
+
+Webrat.configure do |config|
+  config.mode = :sinatra
 end
- 
+
+Ginatra::App.set :environment, :test
  
 Spec::Runner.configure do |config|
-  config.include Rack::Test::Methods
-  config.include RackTestMethods
-end
- 
-require 'ginatra'
-
-@app = Sinatra::Application
+  def app
+    Ginatra::App
+  end
+  
+  config.include(Rack::Test::Methods)
+  config.include(Webrat::Methods)
+  config.include(Webrat::Matchers)
+end 
 </diff>
      <filename>spec/spec_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 &lt;h3&gt;Repositories&lt;/h3&gt;
 &lt;div class=&quot;active repo-list&quot;&gt;
   &lt;div class=&quot;commit-info&quot;&gt;
-    &lt;%=h Sinatra::Application.description %&gt;
+    &lt;%=h Ginatra::App.description %&gt;
   &lt;/div&gt;
   &lt;dl&gt;
     &lt;% @repo_list.each do |repo| %&gt;</diff>
      <filename>views/index.erb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>features/support/paths.rb</filename>
    </removed>
    <removed>
      <filename>ginatra.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>82dcd0abf7c7b0e45b818b82dbd9cabfcd716d02</id>
    </parent>
  </parents>
  <author>
    <name>Samuel Elliott</name>
    <email>sam@lenary.co.uk</email>
  </author>
  <url>http://github.com/lenary/ginatra/commit/aa2eda6a7b0ea5dad113a186a65c15f235a50a82</url>
  <id>aa2eda6a7b0ea5dad113a186a65c15f235a50a82</id>
  <committed-date>2009-06-15T06:55:42-07:00</committed-date>
  <authored-date>2009-06-15T06:55:42-07:00</authored-date>
  <message>Converted Ginatra to a Classy Sinatra App.

The main App logic is now in `Ginatra::App`, and the other peices of Ginatra are now in files in lib. The app still works by running `shotgun rackup.ru` or using any of the other ways of mounting a rackup file as an app.</message>
  <tree>3d3f6010b0631bae58778fa9c6b1c656f78167be</tree>
  <committer>
    <name>Samuel Elliott</name>
    <email>sam@lenary.co.uk</email>
  </committer>
</commit>
