<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -13,11 +13,8 @@ require 'reek/options'
 def reek(args)
   begin
     source = Reek::Options.parse(args)
-    if source.smelly?
-      puts source.report
-      return 2
-    end
-    return 0
+    puts source.full_report
+    return source.smelly? ? 2 : 0
   rescue SystemExit =&gt; ex
     return ex.status
   rescue Exception =&gt; error</diff>
      <filename>bin/reek</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ Feature: Masking smells using config files
     Then it fails with exit status 2
     And it reports:
       &quot;&quot;&quot;
-      &quot;spec/samples/empty_config_file/dirty.rb&quot; -- 6 warnings:
+      spec/samples/empty_config_file/dirty.rb -- 6 warnings:
         Dirty has the variable name '@s' (Uncommunicative Name)
         Dirty#a calls @s.title multiple times (Duplication)
         Dirty#a calls puts(@s.title) multiple times (Duplication)
@@ -34,7 +34,7 @@ Feature: Masking smells using config files
     Then it fails with exit status 2
     And it reports:
       &quot;&quot;&quot;
-      &quot;spec/samples/masked/dirty.rb&quot; -- 3 warnings:
+      spec/samples/masked/dirty.rb -- 3 warnings:
         Dirty#a calls @s.title multiple times (Duplication)
         Dirty#a calls puts(@s.title) multiple times (Duplication)
         Dirty#a/block/block is nested (Nested Iterators)</diff>
      <filename>features/masking_smells.feature</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@ Feature: Basic smell detection
     Then it fails with exit status 2
     And it reports:
     &quot;&quot;&quot;
-    &quot;spec/samples/inline.rb&quot; -- 32 warnings:
+    spec/samples/inline.rb -- 32 warnings:
       Inline::C has at least 13 instance variables (Large Class)
       Inline::C#build calls ($? == 0) multiple times (Duplication)
       Inline::C#build calls Inline.directory multiple times (Duplication)
@@ -50,7 +50,7 @@ Feature: Basic smell detection
     Then it fails with exit status 2
     And it reports:
     &quot;&quot;&quot;
-    &quot;spec/samples/optparse.rb&quot; -- 117 warnings:
+    spec/samples/optparse.rb -- 117 warnings:
       OptionParser has at least 59 methods (Large Class)
       OptionParser#CompletingHash#match/block/block is nested (Nested Iterators)
       OptionParser#Completion::complete calls candidates.size multiple times (Duplication)
@@ -176,7 +176,7 @@ Feature: Basic smell detection
     Then it fails with exit status 2
     And it reports:
     &quot;&quot;&quot;
-    &quot;spec/samples/redcloth.rb&quot; -- 93 warnings:
+    spec/samples/redcloth.rb -- 93 warnings:
       RedCloth has at least 44 methods (Large Class)
       RedCloth#block has the variable name 'a' (Uncommunicative Name)
       RedCloth#block has the variable name 'b' (Uncommunicative Name)</diff>
      <filename>features/samples.feature</filename>
    </modified>
    <modified>
      <diff>@@ -7,26 +7,27 @@ Feature: Reek reads from $stdin when no files are given
   Scenario: return zero status with no smells
     When I pass &quot;def simple() @fred = 3 end&quot; to reek
     Then it succeeds
+    And it reports:
+      &quot;&quot;&quot;
+      $stdin -- 0 warnings
+
+      &quot;&quot;&quot;
 
   Scenario: outputs nothing on empty stdin
     When I pass &quot;&quot; to reek
     Then it succeeds
-    And stdout equals &quot;&quot;
-
-  Scenario: return non-zero status when there are smells
-    When I pass &quot;def x() 3; end&quot; to reek
-    Then it fails with exit status 2
+    And it reports:
+      &quot;&quot;&quot;
+      $stdin -- 0 warnings
 
-  Scenario: output nothing when no smells
-    When I pass &quot;def simple() @fred = 3; end&quot; to reek
-    Then it succeeds
-    And stdout equals &quot;&quot;
+      &quot;&quot;&quot;
 
-  Scenario: report smells correctly
+  Scenario: return non-zero status when there are smells
     When I pass &quot;class Turn; def y() @x = 3; end end&quot; to reek
     Then it fails with exit status 2
     And it reports:
       &quot;&quot;&quot;
+      $stdin -- 2 warnings:
         Turn has the variable name '@x' (Uncommunicative Name)
         Turn#y has the name 'y' (Uncommunicative Name)
 </diff>
      <filename>features/stdin.feature</filename>
    </modified>
    <modified>
      <diff>@@ -46,7 +46,7 @@ EOB
       if args.length &gt; 0
         return Source.from_pathlist(args)
       else
-        return Source.from_io($stdin, 'stdin')
+        return Source.from_io($stdin, '$stdin')
       end
     end
 </diff>
      <filename>lib/reek/options.rb</filename>
    </modified>
    <modified>
      <diff>@@ -55,7 +55,7 @@ module Reek
     end
 
     def header(desc, num_smells)
-      result = &quot;\&quot;#{desc}\&quot; -- #{num_smells} warning&quot;
+      result = &quot;#{desc} -- #{num_smells} warning&quot;
       result += 's' unless num_smells == 1
       result += &quot; (+#{@masked_smells.length} masked)&quot; unless @masked_smells.empty?
       result
@@ -94,7 +94,7 @@ module Reek
       @sources.select {|src| src.smelly? }
     end
 
-    def to_s
+    def full_report
       @sources.map { |src| src.full_report }.join(&quot;\n&quot;)
     end
   end</diff>
      <filename>lib/reek/report.rb</filename>
    </modified>
    <modified>
      <diff>@@ -118,6 +118,10 @@ module Reek
       @sources.any? {|source| source.smelly? }
     end
 
+    def full_report
+      ReportList.new(@sources).full_report
+    end
+
     def report
       ReportList.new(@sources)
     end</diff>
      <filename>lib/reek/source.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,6 +15,6 @@ end
 describe 'RakeTask' do
   it 'should report no duplication' do
     report = `rake reek`.split(&quot;\n&quot;)
-    report.length.should == 1
+    $?.exitstatus.should == 0
   end
 end</diff>
      <filename>spec/slow/reek_source_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>71133c46da5c40a6804d4a6ad32b1de73f4fe668</id>
    </parent>
  </parents>
  <author>
    <name>Kevin Rutherford</name>
    <email>kevin@rutherford-software.com</email>
  </author>
  <url>http://github.com/kevinrutherford/reek/commit/32893fcab01a55e234bb2bade21e7d78328992b5</url>
  <id>32893fcab01a55e234bb2bade21e7d78328992b5</id>
  <committed-date>2009-06-28T14:07:59-07:00</committed-date>
  <authored-date>2009-06-28T14:07:59-07:00</authored-date>
  <message>Header now printed for every source</message>
  <tree>cabc4dcacf017c96ccac7489779f8a52a4db6031</tree>
  <committer>
    <name>Kevin Rutherford</name>
    <email>kevin@rutherford-software.com</email>
  </committer>
</commit>
