<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,13 +1,9 @@
 == (In Git)
 
-
 === New Features
 * Added support for Uzbek (msarvar)
 * The file argument on the cucumber command line will replace contents of file on cli if file is prefixed with @ (Tero Tilus)
 
-=== Changed Features
-* Cucumber::Cli::Main.execute(argv) has been replaced with Cucumber::Cli::Main.new(argv).execute! (Aslak Helles&#248;y)
-
 === Bugfixes
 * Backtraces on JRuby are handled in a cleaner way when the exception comes from Java (NativeException). (Aslak Helles&#248;y)
 * When exceptions occur in a Before block the rest of the scenario is now skipped (#331 Matt Wynne)</diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ require 'cucumber/rspec_neuter'
 require 'cucumber/cli/main'
 begin
   # The dup is to keep ARGV intact, so that tools like ruby-debug can respawn.
-  failure = Cucumber::Cli::Main.new(ARGV.dup).execute!
+  failure = Cucumber::Cli::Main.execute(ARGV.dup)
   Kernel.exit(failure ? 1 : 0)
 rescue SystemExit =&gt; e
   Kernel.exit(e.status)</diff>
      <filename>bin/cucumber</filename>
    </modified>
    <modified>
      <diff>@@ -30,14 +30,6 @@ module Cucumber
         set_environment_variables
       end
 
-      def step_mother
-        return @step_mother if @step_mother
-        @step_mother = StepMother.new
-        @step_mother.options = self.options
-        @step_mother.log = self.log
-        @step_mother
-      end
-
       def verbose?
         @options[:verbose]
       end</diff>
      <filename>lib/cucumber/cli/configuration.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,7 +23,7 @@ http://wiki.github.com/aslakhellesoy/cucumber/spoken-languages
       end
 
       def self.list_keywords(io, lang)
-        language = Parser::NaturalLanguage.get(StepMother.new, lang)
+        language = Parser::NaturalLanguage.get(nil, lang)
         raw = Parser::NaturalLanguage::KEYWORD_KEYS.map do |key|
           [key, language.keywords(key)]
         end
@@ -46,7 +46,7 @@ http://wiki.github.com/aslakhellesoy/cucumber/spoken-languages
       def visit_table_cell_value(value, status)
         if @col == 1
           if(@options[:check_lang])
-            @incomplete = Parser::NaturalLanguage.get(StepMother.new, value).incomplete?
+            @incomplete = Parser::NaturalLanguage.get(nil, value).incomplete?
           end
           status = :comment 
         elsif @incomplete</diff>
      <filename>lib/cucumber/cli/language_help_formatter.rb</filename>
    </modified>
    <modified>
      <diff>@@ -14,17 +14,23 @@ module Cucumber
     class Main
       FAILURE = 1
 
+      class &lt;&lt; self
+        def step_mother
+          @step_mother ||= StepMother.new
+        end
+
+        def execute(args)
+          new(args).execute!(step_mother)
+        end
+      end
+
       def initialize(args, out_stream = STDOUT, error_stream = STDERR)
         @args         = args
         @out_stream   = out_stream == STDOUT ? Formatter::ColorIO.new : out_stream
         @error_stream = error_stream
       end
 
-      def step_mother
-        configuration.step_mother
-      end
-
-      def execute!
+      def execute!(step_mother)
         trap_interrupt
         if configuration.drb?
           begin
@@ -33,6 +39,8 @@ module Cucumber
             @error_stream.puts &quot;WARNING: #{e.message} Running features locally:&quot;
           end
         end
+        step_mother.options = configuration.options
+        step_mother.log = configuration.log
 
         step_mother.load_code_files(configuration.support_to_load)
         step_mother.after_configuration(configuration)</diff>
      <filename>lib/cucumber/cli/main.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,12 +17,12 @@ module Cucumber
         @keywords = Cucumber::LANGUAGES[lang]
         raise &quot;Language not supported: #{lang.inspect}&quot; if @keywords.nil?
         @keywords['grammar_name'] = @keywords['name'].gsub(/\s/, '')
-        register_adverbs(step_mother)
+        register_adverbs(step_mother) if step_mother
       end
 
       def register_adverbs(step_mother)
         adverbs = %w{given when then and but}.map{|keyword| @keywords[keyword].split('|').map{|w| w.gsub(/\s/, '')}}.flatten
-        step_mother.register_adverbs(adverbs)
+        step_mother.register_adverbs(adverbs) if step_mother
       end
 
       def parser</diff>
      <filename>lib/cucumber/parser/natural_language.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,11 +4,10 @@ module Cucumber
   module Ast
     describe StepCollection do
       it &quot;should convert And to Given in snippets&quot; do
-        sm = StepMother.new
         s1 = Step.new(1, 'Given', 'cukes')
         s2 = Step.new(2, 'And', 'turnips')
-        s1.stub!(:language).and_return(Parser::NaturalLanguage.get(sm, 'en'))
-        s2.stub!(:language).and_return(Parser::NaturalLanguage.get(sm, 'en'))
+        s1.stub!(:language).and_return(Parser::NaturalLanguage.get(nil, 'en'))
+        s2.stub!(:language).and_return(Parser::NaturalLanguage.get(nil, 'en'))
         c = StepCollection.new([s1, s2])
         actual_keywords = c.step_invocations.map{|i| i.actual_keyword}
         actual_keywords.should == %w{Given Given}</diff>
      <filename>spec/cucumber/ast/step_collection_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -29,7 +29,7 @@ module Cucumber
 
           FeatureFile.stub!(:new).and_return(mock(&quot;feature file&quot;, :parse =&gt; @empty_feature))
 
-          @cli.execute!
+          @cli.execute!(StepMother.new)
 
           @out.string.should include('example.feature')
         end
@@ -52,7 +52,7 @@ module Cucumber
 
           ::Spec::Expectations::Differs::Default.should_receive(:new)
 
-          @cli.execute!
+          @cli.execute!(@step_mother)
         end
 
         it &quot;does not use Spec Differ::Default when diff is disabled&quot; do
@@ -60,7 +60,7 @@ module Cucumber
 
           ::Spec::Expectations::Differs::Default.should_not_receive(:new)
 
-          @cli.execute!
+          @cli.execute!(@step_mother)
         end
 
       end
@@ -80,7 +80,7 @@ module Cucumber
             Object.should_receive(:const_get).with('ZooModule').and_return(mock_module)
             mock_module.should_receive(:const_get).with('MonkeyFormatterClass').and_return(mock('formatter class', :new =&gt; f))
 
-            cli.execute!
+            cli.execute!(StepMother.new)
           end
 
         end
@@ -90,7 +90,7 @@ module Cucumber
         
         it &quot;should load files and execute hooks in order&quot; do
           Configuration.stub!(:new).and_return(configuration = mock('configuration', :null_object =&gt; true))
-          step_mother = configuration.step_mother
+          step_mother = mock('step mother', :null_object =&gt; true)
           configuration.stub!(:drb?).and_return false
           cli = Main.new(%w{--verbose example.feature}, @out)
           cli.stub!(:require)
@@ -111,7 +111,7 @@ module Cucumber
           step_mother.should_receive(:load_plain_text_features).ordered
           step_mother.should_receive(:load_code_files).with(['step defs']).ordered
 
-          cli.execute!
+          cli.execute!(step_mother)
         end
         
       end
@@ -123,7 +123,7 @@ module Cucumber
         configuration.stub!(:parse!).and_raise(exception_klass.new(&quot;error message&quot;))
 
         main = Main.new('', out = StringIO.new, error = StringIO.new)
-        main.execute!.should be_true
+        main.execute!(StepMother.new).should be_true
         error.string.should == &quot;error message\n&quot;
       end
     end
@@ -137,30 +137,31 @@ module Cucumber
           @args = ['features']
 
           @cli = Main.new(@args, @out, @err)
+          @step_mother = mock('StepMother', :null_object =&gt; true)
         end
 
         it &quot;delegates the execution to the DRB client passing the args and streams&quot; do
           @configuration.stub :drb_port =&gt; 1450
           DRbClient.should_receive(:run).with(@args, @err, @out, 1450).and_return(true)
-          @cli.execute!
+          @cli.execute!(@step_mother)
         end
 
         it &quot;returns the result from the DRbClient&quot; do
           DRbClient.stub!(:run).and_return('foo')
-          @cli.execute!.should == 'foo'
+          @cli.execute!(@step_mother).should == 'foo'
         end
 
         it &quot;ceases execution if the DrbClient is able to perform the execution&quot; do
           DRbClient.stub!(:run).and_return(true)
           @configuration.should_not_receive(:build_formatter_broadcaster)
-          @cli.execute!
+          @cli.execute!(@step_mother)
         end
 
         context &quot;when the DrbClient is unable to perfrom the execution&quot; do
           before { DRbClient.stub!(:run).and_raise(DRbClientError.new('error message.')) }
 
           it &quot;alerts the user that execution will be performed locally&quot; do
-            @cli.execute!
+            @cli.execute!(@step_mother)
             @err.string.should include(&quot;WARNING: error message. Running features locally:&quot;)
           end
 </diff>
      <filename>spec/cucumber/cli/main_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>8316da8d6c7a49a835b6467fc6538728275c7672</id>
    </parent>
  </parents>
  <author>
    <name>Aslak Helles&#248;y</name>
    <email>aslak.hellesoy@gmail.com</email>
  </author>
  <url>http://github.com/garnierjm/cucumber/commit/3c0ba6560644d814a3f8c8fdb7c1dd0ccbcb7bc9</url>
  <id>3c0ba6560644d814a3f8c8fdb7c1dd0ccbcb7bc9</id>
  <committed-date>2009-09-08T18:35:49-07:00</committed-date>
  <authored-date>2009-09-08T18:35:49-07:00</authored-date>
  <message>Revert &quot;Cucumber::Cli::Main.execute(argv) has been replaced with Cucumber::Cli::Main.new(argv).execute\!&quot;

This reverts commit 3c712bcf8b3d2d086bc2a5da000a6f3660e3f24c.</message>
  <tree>69de8cc1a5cb3107b0e64003cbc2be7076ad673c</tree>
  <committer>
    <name>Aslak Helles&#248;y</name>
    <email>aslak.hellesoy@gmail.com</email>
  </committer>
</commit>
