<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>tasks/build.rake</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -2,7 +2,7 @@
 
 === Major enhancements:
 
-* Place *.reek files in source folder to configure smell detection behaviour
+* Use *.reek files in source tree to configure Reek's behaviour
 * Added -f option to configure report format
 * --sort_order replaced by -f, -c and -s
 * Matchers provided for rspec; eg. foo.should_not reek
@@ -17,7 +17,6 @@
 
 * Corrected false reports of long arg lists to yield
 * A method can now be a UtilityFunction only when it includes a call
-* Removed the website from the gem [#12]
 
 == 0.3.1 2008-11-17
 </diff>
      <filename>History.txt</filename>
    </modified>
    <modified>
      <diff>@@ -10,6 +10,7 @@ PKG_DIR = &quot;#{BUILD_DIR}/pkg&quot;; directory PKG_DIR
 RDOC_DIR = &quot;#{BUILD_DIR}/rdoc&quot;; directory RDOC_DIR
 
 GEM_MANIFEST = &quot;Manifest.txt&quot;
+VERSION_FILE = 'lib/reek.rb'
 
 CLOBBER.include(&quot;#{BUILD_DIR}/*&quot;)
 </diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -9,6 +9,13 @@ begin
 rescue Gem::LoadError
 end
 
+GEMSPEC = &quot;#{PROJECT_NAME}.$gemspec&quot;
+HISTORY_FILE = 'History.txt'
+
+NEWS_FILE = &quot;#{BUILD_DIR}/news.txt&quot;
+RELEASE_TIMESTAMP = &quot;#{BUILD_DIR}/.last-release&quot;
+MANIFEST_CHECKED = &quot;#{BUILD_DIR}/.manifest-checked&quot;
+
 $gemspec = Gem::Specification.new do |s|
   s.name = PROJECT_NAME
   s.version = ::Reek::VERSION
@@ -31,110 +38,138 @@ For more information on reek, see http://wiki.github.com/kevinrutherford/reek
 '
 end
 
+class File
+  def self.touch(path, text)
+    File.open(path, 'w') { |ios| ios.puts text }
+  end
+end
+
 class String
   def rdoc_to_markdown
     self.gsub(/^(=+)/) { &quot;#&quot; * $1.size }
   end
-end
 
-def changes
-  File.read(&quot;History.txt&quot;).split(/^(== .*)/)[2].strip
+  def touch(text = DateTime.now)
+    File.touch(self, text)
+  end
 end
 
-def announcement
-  subject = &quot;#{PROJECT_NAME} #{::Reek::VERSION} Released&quot;
-  title   = &quot;#{PROJECT_NAME} version #{::Reek::VERSION} has been released!&quot;
-  body    = &quot;#{$gemspec.description}\n\nChanges:\n\n#{changes}&quot;.rdoc_to_markdown
-  urls    = &lt;&lt;EOU
-* http://wiki.github.com/kevinrutherford/reek
-* http://reek.rubyforge.org/rdoc/
-EOU
-  return subject, title, body, urls
-end
+class Description
 
-desc 'Post announcement to rubyforge'
-task :post_news do
-  subject, title, body, urls = announcement
-  rf = RubyForge.new.configure
-  rf.login
-  rf.post_news(PROJECT_NAME, subject, &quot;#{title}\n\n#{body}&quot;)
-  puts &quot;Posted to rubyforge&quot;
-end
+  def description
+    &quot;Reek detects smells in Ruby code. It can be used as a stand-alone
+command, or as a Rake task, or as an expectation in Rspec examples.&quot;
+  end
 
-desc 'Generate email announcement'
-task :email do
-  subject, title, body, urls = announcement
-  email = &lt;&lt;EOM
-Subject: [ANN] #{subject}
+  def changes
+    File.read(&quot;History.txt&quot;).split(/^(== .*)/)[2].strip
+  end
 
-#{title}
+  def subject
+    &quot;#{PROJECT_NAME} #{::Reek::VERSION} released&quot;
+  end
+  def title
+    &quot;#{PROJECT_NAME} version #{::Reek::VERSION} has been released!&quot;
+  end
+  def body
+    &quot;#{$gemspec.description}\n\n## Changes:\n\n#{changes}&quot;.rdoc_to_markdown
+  end
+  def urls
+    result = &lt;&lt;EOR
+* http://wiki.github.com/kevinrutherford/#{PROJECT_NAME}
+* http://#{PROJECT_NAME}.rubyforge.org/rdoc/
+EOR
+    result
+  end
 
-#{urls}
+  def news
+    news = &lt;&lt;-EOM
+    #{title}
 
-#{body}
+    #{description}
 
-#{urls}
-EOM
-  puts email
-end
+    ## Changes in this release:
 
-class ::Rake::SshDirPublisher
-  attr_reader :host, :remote_dir, :local_dir
-end
+    #{changes.rdoc_to_markdown}
 
-GEMSPEC = &quot;#{PROJECT_NAME}.$gemspec&quot;
+    ## More information:
 
-file GEMSPEC =&gt; [GEM_MANIFEST, 'lib/reek.rb', __FILE__] do
-  puts &quot;Generating #{GEMSPEC}&quot;
-  File.open(GEMSPEC, 'w') do |file|
-    file.puts $gemspec.to_ruby
+    #{urls}
+    EOM
+    return news
   end
-end
 
-namespace :build do
-  Rake::GemPackageTask.new($gemspec) do |task|
-    task.package_dir = PKG_DIR
-    task.need_tar = true
-    task.need_zip = false
-  end
+  def email
+    result = &lt;&lt;EOM
+&quot;Subject: [ANN] #{subject}&quot;
 
-  task :gem =&gt; ['rspec:all']
+&quot;#{title}&quot;
 
-  Rake::RDocTask.new do |rd|
-    rd.main = 'README.txt'
-    rd.rdoc_dir = RDOC_DIR
-    files = $gemspec.files.grep(/^(lib|bin|ext)|txt|rdoc$/)
-    files -= [GEM_MANIFEST]
-    rd.rdoc_files.push(*files)
-    title = &quot;#{PROJECT_NAME}-#{::Reek::VERSION} Documentation&quot;
-    rd.options &lt;&lt; &quot;-t #{title}&quot;
+&quot;#{urls}&quot;
+
+&quot;#{body}&quot;
+
+&quot;#{urls}&quot;
+EOM
+    result
   end
+end
+
+file NEWS_FILE =&gt; [HISTORY_FILE] do
+  NEWS_FILE.touch(Description.new.news)
+end
+#
+#file VERSION_FILE =&gt; [RELEASE_TIMESTAMP] do
+#  abort &quot;Version #{::Reek::VERSION} has already been released!&quot;
+#end
 
-  task :rdoc =&gt; [RDOC_DIR]
-  task :all =&gt; ['build:package', 'build:rdoc']
+class ::Rake::SshDirPublisher
+  attr_reader :host, :remote_dir, :local_dir
+end
+
+file GEMSPEC =&gt; [GEM_MANIFEST, VERSION_FILE, __FILE__] do
+  GEMSPEC.touch($gemspec.to_ruby)
 end
 
 namespace :release do
-  task :version_bumped do
-    #abort 'Version not bumped!'
-  end
 
   desc 'Minor release on github only'
-  task :minor =&gt; ['version_bumped', 'build:package', 'rubyforge:rdoc'] do
+  task :minor =&gt; [VERSION_FILE, 'build:package', 'rubyforge:rdoc'] do
     puts &lt;&lt;-EOS
       1) git commit -a -m &quot;Release #{Reek::VERSION}&quot;
       2) git tag -a &quot;v#{Reek::VERSION}&quot; -m &quot;Release #{Reek::VERSION}&quot;
       3) git push
       4) git push --tags
     EOS
+    RELEASE_TIMESTAMP.touch(::Reek::VERSION)
   end
 
   desc 'Major release (github+rubyforge) with news'
-  task :major do
+  task :major =&gt; ['release:minor', NEWS_FILE, 'rubyforge:news'] do
     
   end
 end
 
+def pkg_files
+  require 'find'
+  result = []
+  Find.find '.' do |path|
+    next unless File.file? path
+    next if path =~ /\.git|build/
+    result &lt;&lt; path[2..-1]
+  end
+  result
+end
+
+$package_files = pkg_files
+
+def display_manifest_diff
+  f = &quot;Manifest.tmp&quot;
+  f.touch(pkg_files.sort.join(&quot;\n&quot;))
+  system &quot;diff -du #{GEM_MANIFEST} #{f}&quot;
+  rm f
+end
+
 namespace :test do
   desc 'Install the gem locally'
   task :install =&gt; [:clean, 'build:all'] do
@@ -142,24 +177,22 @@ namespace :test do
     sh &quot;sudo gem install --local #{gem}&quot;
   end
 
-  desc 'Verify the manifest'
-  task :manifest =&gt; [:clobber] do
-    f = &quot;Manifest.tmp&quot;
-    require 'find'
-    files = []
-    Find.find '.' do |path|
-      next unless File.file? path
-      next if path =~ /\.git|build/
-      files &lt;&lt; path[2..-1]
-    end
-    files = files.sort.join &quot;\n&quot;
-    File.open(f, 'w') do |fp| fp.puts files end
-    system &quot;diff -du #{GEM_MANIFEST} #{f}&quot;
-    rm f
-  end
-
   desc 'Show the gemspec'
   task :gemspec do
     puts $gemspec.to_ruby
   end
 end
+
+def query(msg)
+  print msg
+  $stdin.gets
+end
+
+file MANIFEST_CHECKED =&gt; $package_files do
+  display_manifest_diff
+  if query('Is this manifest good to go? [yN]') =~ /y/i
+    MANIFEST_CHECKED.touch
+  else
+    abort 'Check the manifest and try again'
+  end
+end</diff>
      <filename>tasks/deployment.rake</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,6 @@ CLOBBER.include(CONFIG_DIR)
 
 directory CONFIG_DIR
 
-desc 'creates the default config file'
 file CONFIG_FILE =&gt; [CONFIG_DIR] do
   config = {}
   Reek::SmellConfig::SMELL_CLASSES.each do |klass|</diff>
      <filename>tasks/develop.rake</filename>
    </modified>
    <modified>
      <diff>@@ -8,29 +8,40 @@ def user_at_host
   &quot;#{config[&quot;username&quot;]}@rubyforge.org&quot;
 end
 
+def rsync(local, remote)
+  sh %{rsync -av --delete --ignore-errors #{local}/ #{user_at_host}:#{remote}}
+end
+
 namespace :rubyforge do
   desc 'Upload website files to rubyforge'
   task :website do
-    sh %{rsync -av --delete --ignore-errors website/ #{user_at_host}:#{REMOTE_PROJECT_DIR}}
+    rsync('website', REMOTE_PROJECT_DIR)
   end
 
   desc 'Upload the gem to rubyforge'
-  task :gem =&gt; ['clean', 'build:package'] do |t|
+  task :gem =&gt; ['build:package'] do |t|
     pkg = &quot;#{PKG_DIR}/#{PROJECT_NAME}-#{::Reek::VERSION}&quot;
     rf = RubyForge.new.configure
-    puts &quot;Logging in&quot;
     rf.login
     c = rf.userconfig
-    c[&quot;release_notes&quot;] = @description if @description     # TODO!!
-    c[&quot;release_changes&quot;] = changes if changes
+    proj = Description.new
+    c[&quot;release_notes&quot;] = proj.description
+    c[&quot;release_changes&quot;] = proj.changes
     c[&quot;preformatted&quot;] = true
     files = [&quot;#{pkg}.tgz&quot;, &quot;#{pkg}.gem&quot;].compact
-    puts &quot;Releasing #{PROJECT_NAME} v. #{::Reek::VERSION}&quot;
     rf.add_release(PROJECT_NAME, PROJECT_NAME, ::Reek::VERSION, *files)
   end
 
   desc 'Upload the rdoc to rubyforge'
-  task :rdoc =&gt; ['clean', 'build:rdoc'] do
-    sh %{rsync -av --delete --ignore-errors #{RDOC_DIR}/ #{user_at_host}:#{REMOTE_PROJECT_DIR}/rdoc}
+  task :rdoc =&gt; ['build:rdoc'] do
+    rsync(RDOC_DIR, &quot;#{REMOTE_PROJECT_DIR}/rdoc&quot;)
+  end
+
+  desc 'Post news announcement to rubyforge'
+  task :news do
+    proj = Description.new
+    rf = RubyForge.new.configure
+    rf.login
+    puts &quot;rf.post_news(#{PROJECT_NAME}, #{proj.subject}, #{proj.news})&quot;
   end
 end</diff>
      <filename>tasks/rubyforge.rake</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>51d13794a01bca9d16d9f24c82bab0b0ea6f7479</id>
    </parent>
  </parents>
  <author>
    <name>Kevin Rutherford</name>
    <email>kevin@rutherford-software.com</email>
  </author>
  <url>http://github.com/kevinrutherford/reek/commit/6d52fc4daf7320c2a10f5f142483ad5655bb907a</url>
  <id>6d52fc4daf7320c2a10f5f142483ad5655bb907a</id>
  <committed-date>2009-04-05T05:21:59-07:00</committed-date>
  <authored-date>2009-04-05T05:21:59-07:00</authored-date>
  <message>Builds now auto-check the manifest</message>
  <tree>0fcf86943f0c241c233311eeab0e70fb68377b69</tree>
  <committer>
    <name>Kevin Rutherford</name>
    <email>kevin@rutherford-software.com</email>
  </committer>
</commit>
