<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,105 +1,13 @@
-PLUGIN_NAME = 'google_analytics_plugin'
+#!/usr/bin/env ruby
+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__))
-
-# In rails 1.2, plugins aren't available in the path until they're loaded.
-# Check to see if the rspec plugin is installed first and require
-# it if it is.  If not, use the gem version.
-rspec_base = File.expand_path(File.dirname(__FILE__) + '/../rspec/lib')
-$LOAD_PATH.unshift(rspec_base) if File.exist?(rspec_base)
-
-require 'rake'
-require 'rake/clean'
-require 'rake/rdoctask'
-begin
-  require 'spec/rake/spectask'
-  require 'spec/translator'
-rescue LoadError
-  puts (&quot;*&quot; * 20) + &quot; ERROR &quot; + ('*' *20)
-  puts &quot;RSpec or RSpec on Rails is not installed.  Please install them and retry. (http://rspec.info)&quot;
-  puts
-  puts (&quot;*&quot; * 20) + &quot; ERROR &quot; + ('*' *20)
-  exit -1
-end
-
-CLEAN.include(&quot;**/#{PLUGIN_NAME}.zip&quot;, &quot;**/#{PLUGIN_NAME}.tar.gz&quot;)
-
-
-# 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']
+RedminePluginSupport::Base.setup do |plugin|
+  plugin.project_name = 'google_analytics_plugin'
+  plugin.default_task = [:spec]
 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 = lambda do
-      IO.readlines(&quot;#{PLUGIN_ROOT}/spec/rcov.opts&quot;).map {|l| l.chomp.split &quot; &quot;}.flatten
-    end
-  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&quot;, &quot;--dry-run&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
-end
-
-desc 'Generate documentation for the Google Analytics plugin.'
-Rake::RDocTask.new(:rdoc) do |rdoc|
-  rdoc.rdoc_dir = 'doc'
-  rdoc.title    = 'Redmine Google Analytics Plugin'
-  rdoc.options &lt;&lt; '--line-numbers' &lt;&lt; '--inline-source'
-  rdoc.rdoc_files.include('README.rdoc')
-  rdoc.rdoc_files.include('lib/**/*.rb')
-  rdoc.rdoc_files.include('app/**/*.rb')
-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
-
-
 begin
   require 'jeweler'
   Jeweler::Tasks.new do |s|</diff>
      <filename>Rakefile</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>4b0de4bcc4744029ffafbbc6ed8036f4b8e9c14c</id>
    </parent>
  </parents>
  <author>
    <name>Eric Davis</name>
    <email>edavis@littlestreamsoftware.com</email>
  </author>
  <url>http://github.com/edavis10/redmine-google-analytics-plugin/commit/e75695f8567b630dfa2c0491526651ce5057a872</url>
  <id>e75695f8567b630dfa2c0491526651ce5057a872</id>
  <committed-date>2009-10-14T13:42:13-07:00</committed-date>
  <authored-date>2009-10-14T13:42:13-07:00</authored-date>
  <message>Updated Rakefile to use redmine_plugin_support</message>
  <tree>d5a0e276fa6dfab45366699f23989896466c1ab6</tree>
  <committer>
    <name>Eric Davis</name>
    <email>edavis@littlestreamsoftware.com</email>
  </committer>
</commit>
