<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>VERSION</filename>
    </added>
    <added>
      <filename>rails/init.rb</filename>
    </added>
    <added>
      <filename>timesheet_plugin.gemspec</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -29,6 +29,8 @@ A copy of the released version can be downloaded from {Little Stream Software}[h
 2. Restart your Redmine web servers (e.g. mongrel, thin, mod_rails)
 3. Login and click the Timesheet Link in the top left menu
 
+TODO: gem installation: config.gem 'timesheet_plugin', :lib =&gt; false
+
 == Upgrade
 
 === Zip or tar files</diff>
      <filename>README.rdoc</filename>
    </modified>
    <modified>
      <diff>@@ -1,95 +1,33 @@
 #!/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__))
-REDMINE_APP = File.expand_path(File.dirname(__FILE__) + '/../../../app')
-REDMINE_LIB = File.expand_path(File.dirname(__FILE__) + '/../../../lib')
-
-require 'rake'
-require 'rake/clean'
-require 'rake/rdoctask'
-require 'spec/rake/spectask'
-
-PROJECT_NAME = 'timesheet_plugin'
-REDMINE_PROJECT_NAME = 'redmine-timesheet'
-CLEAN.include('**/semantic.cache', &quot;**/#{PROJECT_NAME}.zip&quot;, &quot;**/#{PROJECT_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 = 'timesheet_plugin'
+  plugin.default_task = [:spec]
+  plugin.tasks = [:doc, :release, :clean, :spec, :stats]
+  # TODO: gem not getting this automaticly
+  plugin.redmine_root = File.expand_path(File.dirname(__FILE__) + '/../../../')
 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
-end
-
-desc 'Generate documentation for the Budget plugin.'
-Rake::RDocTask.new(:doc) do |rdoc|
-  rdoc.rdoc_dir = 'doc'
-  rdoc.title    = PROJECT_NAME
-  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
-
-
-namespace :release do
-  desc &quot;Create a zip archive&quot;
-  task :zip =&gt; [:clean] do
-    sh &quot;git archive --format=zip --prefix=#{PROJECT_NAME}/ HEAD &gt; #{PROJECT_NAME}.zip&quot;
-  end
-
-  desc &quot;Create a tarball archive&quot;
-  task :tarball =&gt; [:clean] do
-    sh &quot;git archive --format=tar --prefix=#{PROJECT_NAME}/ HEAD | gzip &gt; #{PROJECT_NAME}.tar.gz&quot;
-  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_PROJECT_NAME}/doc`
-    `scp -r coverage/ dev.littlestreamsoftware.com:/home/websites/projects.littlestreamsoftware.com/shared/embedded_docs/#{REDMINE_PROJECT_NAME}/coverage`
+begin
+  require 'jeweler'
+  Jeweler::Tasks.new do |s|
+    s.name = &quot;timesheet_plugin&quot;
+    s.summary = &quot;A Timesheet plugin for Redmine to show timelogs for all projects&quot;
+    s.email = &quot;edavis@littlestreamsoftware.com&quot;
+    s.homepage = &quot;https://projects.littlestreamsoftware.com/projects/redmine-timesheet&quot;
+    s.description = &quot;A plugin to show and filter timelogs across all projects in Redmine.&quot;
+    s.authors = [&quot;Eric Davis&quot;]
+    s.files =  FileList[
+                        &quot;[A-Z]*&quot;,
+                        &quot;init.rb&quot;,
+                        &quot;rails/init.rb&quot;,
+                        &quot;{bin,generators,lib,test,app,assets,config,lang}/**/*&quot;,
+                        'lib/jeweler/templates/.gitignore'
+                       ]
   end
+rescue LoadError
+  puts &quot;Jeweler, or one of its dependencies, is not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com&quot;
 end</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,27 +1,2 @@
-require 'redmine'
+require File.dirname(__FILE__) + &quot;/rails/init&quot;
 
-Redmine::Plugin.register :timesheet_plugin do
-  name 'Timesheet Plugin'
-  author 'Eric Davis of Little Stream Software'
-  description 'This is a Timesheet plugin for Redmine to show timelogs for all projects'
-  url 'https://projects.littlestreamsoftware.com/projects/redmine-timesheet'
-  author_url 'http://www.littlestreamsoftware.com'
-
-  version '0.5.0'
-  requires_redmine :version_or_higher =&gt; '0.8.0'
-  
-  settings :default =&gt; {'list_size' =&gt; '5', 'precision' =&gt; '2'}, :partial =&gt; 'settings/timesheet_settings'
-
-  permission :see_project_timesheets, { }, :require =&gt; :member
-
-  menu(:top_menu,
-       :timesheet,
-       {:controller =&gt; 'timesheet', :action =&gt; 'index'},
-       :caption =&gt; :timesheet_title,
-       :if =&gt; Proc.new {
-         User.current.allowed_to?(:see_project_timesheets, nil, :global =&gt; true) ||
-         User.current.allowed_to?(:view_time_entries, nil, :global =&gt; true) ||
-         User.current.admin?
-       })
-
-end</diff>
      <filename>init.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>6dd0e533559a0258f2aecec759c72845600f9f4b</id>
    </parent>
    <parent>
      <id>cb50b7a7118eb16a8f8f70611e205c26b44889b3</id>
    </parent>
  </parents>
  <author>
    <name>Michele Franzin</name>
    <email>harakei@annapurna.local</email>
  </author>
  <url>http://github.com/michelefranzin/redmine-timesheet-plugin/commit/7a5b284f22a3d52939ca37cb832f5ffa51dbc099</url>
  <id>7a5b284f22a3d52939ca37cb832f5ffa51dbc099</id>
  <committed-date>2009-10-21T07:12:48-07:00</committed-date>
  <authored-date>2009-10-21T07:12:48-07:00</authored-date>
  <message>merged @cb50b7a7118eb16a8f8f70611e205c26b44889b3</message>
  <tree>cba464122a09cbe15f8a5ba4e6f46742fdf8f0d9</tree>
  <committer>
    <name>Michele Franzin</name>
    <email>harakei@annapurna.local</email>
  </committer>
</commit>
