<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,104 +1,9 @@
 #!/usr/bin/env ruby
-require &quot;fileutils&quot;
-require 'rubygems'
-gem 'rspec'
-gem 'rspec-rails'
+require 'redmine_plugin_support'
 
 Dir[File.expand_path(File.dirname(__FILE__)) + &quot;/lib/tasks/**/*.rake&quot;].sort.each { |ext| load ext }
 
-# Modifided from the RSpec on Rails plugins
-PLUGIN_ROOT = File.expand_path(File.dirname(__FILE__))
-
-# Allows loading of an environment config based on the environment
-REDMINE_ROOT = ENV[&quot;REDMINE_ROOT&quot;] || File.dirname(__FILE__) + &quot;/../../..&quot;
-REDMINE_APP = File.expand_path(REDMINE_ROOT + '/app')
-REDMINE_LIB = File.expand_path(REDMINE_ROOT + '/lib')
-
-require 'rake'
-require 'rake/clean'
-require 'rake/rdoctask'
-require 'spec/rake/spectask'
-
-PROJECT_NAME = 'budget_plugin'
-ZIP_FILE = PROJECT_NAME + &quot;.zip&quot;
-CLEAN.include('**/semantic.cache', ZIP_FILE)
-
-# No Database needed
-spec_prereq = :noop
-task :noop do
-end
-
-task :default =&gt; :spec
-task :stats =&gt; &quot;spec:statsetup&quot;
-
-desc &quot;Run all specs in spec directory (excluding plugin specs)&quot;
-Spec::Rake::SpecTask.new(:spec =&gt; spec_prereq) do |t|
-  t.spec_opts = ['--options', &quot;\&quot;#{PLUGIN_ROOT}/spec/spec.opts\&quot;&quot;]
-  t.spec_files = FileList['spec/**/*_spec.rb']
-end
-
-namespace :spec do
-  desc &quot;Run all specs in spec directory with RCov (excluding plugin specs)&quot;
-  Spec::Rake::SpecTask.new(:rcov) do |t|
-    t.spec_opts = ['--options', &quot;\&quot;#{PLUGIN_ROOT}/spec/spec.opts\&quot;&quot;]
-    t.spec_files = FileList['spec/**/*_spec.rb']
-    t.rcov = true
-    t.rcov_opts &lt;&lt; [&quot;--rails&quot;, &quot;--sort=coverage&quot;, &quot;--exclude '/var/lib/gems,spec,#{REDMINE_APP},#{REDMINE_LIB}'&quot;]
-  end
-  
-  desc &quot;Print Specdoc for all specs (excluding plugin specs)&quot;
-  Spec::Rake::SpecTask.new(:doc) do |t|
-    t.spec_opts = [&quot;--format&quot;, &quot;specdoc&quot;, &quot;--dry-run&quot;]
-    t.spec_files = FileList['spec/**/*_spec.rb']
-  end
-
-  desc &quot;Print Specdoc for all specs as HTML (excluding plugin specs)&quot;
-  Spec::Rake::SpecTask.new(:htmldoc) do |t|
-    t.spec_opts = [&quot;--format&quot;, &quot;html:doc/rspec_report.html&quot;, &quot;--loadby&quot;, &quot;mtime&quot;]
-    t.spec_files = FileList['spec/**/*_spec.rb']
-  end
-
-  [:models, :controllers, :views, :helpers, :lib].each do |sub|
-    desc &quot;Run the specs under spec/#{sub}&quot;
-    Spec::Rake::SpecTask.new(sub =&gt; spec_prereq) do |t|
-      t.spec_opts = ['--options', &quot;\&quot;#{PLUGIN_ROOT}/spec/spec.opts\&quot;&quot;]
-      t.spec_files = FileList[&quot;spec/#{sub}/**/*_spec.rb&quot;]
-    end
-  end
+RedminePluginSupport::Base.setup do |plugin|
+  plugin.project_name = 'budget_plugin'
+  plugin.default_task = [:spec]
 end
-
-desc 'Generate documentation for the plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
-  rdoc.rdoc_dir = 'doc'
-  rdoc.title    = PROJECT_NAME
-  rdoc.options &lt;&lt; '--line-numbers' &lt;&lt; '--inline-source'
-  rdoc.rdoc_files.include('*.markdown')
-  rdoc.rdoc_files.include('*.rdoc')
-  rdoc.rdoc_files.include('*.txt')
-  rdoc.rdoc_files.include('lib/**/*.rb')
-  rdoc.rdoc_files.include('app/**/*.rb')
-end
-
-desc 'Uploads project documentation'
-task :upload_doc =&gt; ['spec:rcov', :doc, 'spec:htmldoc'] do |t|
-  # TODO: Get rdoc working without frames
-  `scp -r doc/ dev.littlestreamsoftware.com:/home/websites/projects.littlestreamsoftware.com/shared/embedded_docs/redmine-budget/doc`
-  `scp -r coverage/ dev.littlestreamsoftware.com:/home/websites/projects.littlestreamsoftware.com/shared/embedded_docs/redmine-budget/coverage`
-end
-
-desc &quot;Create release archives&quot;
-task :release =&gt; [:clean, :rdoc, 'release:zip', 'release:tarball']
-
-namespace :release do
-  desc &quot;Create a zip archive&quot;
-  task :zip =&gt; [:clean] do
-    sh &quot;git archive --format=zip --prefix=#{PLUGIN_NAME}/ HEAD &gt; #{PLUGIN_NAME}.zip&quot;
-  end
-
-  desc &quot;Create a tarball archive&quot;
-  task :tarball =&gt; [:clean] do
-    sh &quot;git archive --format=tar --prefix=#{PLUGIN_NAME}/ HEAD | gzip &gt; #{PLUGIN_NAME}.tar.gz&quot;
-  end  
-end
-
-</diff>
      <filename>Rakefile</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>f7733011df17476e476e3f0e695386436af7ab5e</id>
    </parent>
  </parents>
  <author>
    <name>Eric Davis</name>
    <email>edavis@littlestreamsoftware.com</email>
  </author>
  <url>http://github.com/edavis10/redmine-budget-plugin/commit/8413b26a15b74817b28509c3664da76f072ab36d</url>
  <id>8413b26a15b74817b28509c3664da76f072ab36d</id>
  <committed-date>2009-04-27T15:40:35-07:00</committed-date>
  <authored-date>2009-04-27T15:40:35-07:00</authored-date>
  <message>[#2431] Use RedminePluginSupport for rake tasks.</message>
  <tree>e6993717fcd18d3c85ba157498a09744dc2498b1</tree>
  <committer>
    <name>Eric Davis</name>
    <email>edavis@littlestreamsoftware.com</email>
  </committer>
</commit>
