Move the init code.

This commit is contained in:
Eric Davis
2010-03-17 14:51:19 -07:00
parent 7f7b400f15
commit 8a70287e99
2 changed files with 32 additions and 32 deletions

32
init.rb
View File

@@ -1 +1,31 @@
require File.dirname(__FILE__) + "/rails/init" require 'redmine'
# Patches to the Redmine core
require 'dispatcher'
Dispatcher.to_prepare do
require_dependency 'users_helper'
require 'rate_sort_helper_patch'
require 'rate_time_entry_patch'
require 'rate_users_helper_patch'
SortHelper.send(:include, RateSortHelperPatch)
TimeEntry.send(:include, RateTimeEntryPatch)
UsersHelper.send(:include, RateUsersHelperPatch)
end
# Hooks
require 'rate_project_hook'
require 'rate_memberships_hook'
Redmine::Plugin.register :redmine_rate do
name 'Rate Plugin'
author 'Eric Davis'
url 'https://projects.littlestreamsoftware.com/projects/show/redmine-rate'
author_url 'http://www.littlestreamsoftware.com'
description "The Rate plugin provides an API that can be used to find the rate for a Member of a Project at a specific date. It also stores historical rate data so calculations will remain correct in the future."
version '0.1.0'
requires_redmine :version_or_higher => '0.8.0'
permission :view_rate, { }
end

View File

@@ -1,31 +1 @@
require 'redmine' require File.dirname(__FILE__) + "/../init"
# Patches to the Redmine core
require 'dispatcher'
Dispatcher.to_prepare do
require_dependency 'users_helper'
require 'rate_sort_helper_patch'
require 'rate_time_entry_patch'
require 'rate_users_helper_patch'
SortHelper.send(:include, RateSortHelperPatch)
TimeEntry.send(:include, RateTimeEntryPatch)
UsersHelper.send(:include, RateUsersHelperPatch)
end
# Hooks
require 'rate_project_hook'
require 'rate_memberships_hook'
Redmine::Plugin.register :redmine_rate do
name 'Rate Plugin'
author 'Eric Davis'
url 'https://projects.littlestreamsoftware.com/projects/show/redmine-rate'
author_url 'http://www.littlestreamsoftware.com'
description "The Rate plugin provides an API that can be used to find the rate for a Member of a Project at a specific date. It also stores historical rate data so calculations will remain correct in the future."
version '0.1.0'
requires_redmine :version_or_higher => '0.8.0'
permission :view_rate, { }
end