Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move the init code back to init.rb

  • Loading branch information...
commit c021e8510c432a0976ffd7e1ff07a63e06972a3d 1 parent 8b96b02
@edavis10 edavis10 authored
Showing with 44 additions and 43 deletions.
  1. +43 −1 init.rb
  2. +1 −42 rails/init.rb
View
44 init.rb
@@ -1 +1,43 @@
-require File.dirname(__FILE__) + "/rails/init"
+require 'redmine'
+
+Dir[File.join(File.dirname(__FILE__),'vendor','plugins','*')].each do |dir|
+ path = File.join(dir, 'lib')
+ $LOAD_PATH << path
+ Dependencies.load_paths << path
+ Dependencies.load_once_paths.delete(path)
+end
+
+# Patches to Ruby, oh my
+require 'stuff_to_do_array_patch'
+
+# Patches to the Redmine core.
+require 'dispatcher'
+
+Dispatcher.to_prepare do
+ require_dependency 'project'
+ require_dependency 'issue'
+ Project.send(:include, StuffToDoProjectPatch)
+ Issue.send(:include, StuffToDoIssuePatch)
+end
+
+Redmine::Plugin.register :stuff_to_do_plugin do
+ name 'Stuff To Do Plugin'
+ author 'Eric Davis'
+ url 'https://projects.littlestreamsoftware.com/projects/show/redmine-stuff-to-do'
+ author_url 'http://www.littlestreamsoftware.com'
+ description "The Stuff To Do plugin allows a user to order and prioritize the issues they are doing into a specific order. It will also allow other privilged users to reorder the user's workload."
+ version '0.3.0'
+
+ requires_redmine :version_or_higher => '0.8.0'
+
+ settings(:partial => 'settings/stuff_to_do_settings',
+ :default => {
+ 'use_as_stuff_to_do' => '0',
+ 'threshold' => '1',
+ 'email_to' => 'example1@example.com,example2@example.com'
+ })
+
+ menu(:top_menu, :stuff_to_do, {:controller => "stuff_to_do", :action => 'index'}, :caption => :stuff_to_do_title, :if => Proc.new{ User.current.logged? })
+
+end
+
View
43 rails/init.rb
@@ -1,42 +1 @@
-require 'redmine'
-
-Dir[File.join(directory,'vendor','plugins','*')].each do |dir|
- path = File.join(dir, 'lib')
- $LOAD_PATH << path
- Dependencies.load_paths << path
- Dependencies.load_once_paths.delete(path)
-end
-
-# Patches to Ruby, oh my
-require 'stuff_to_do_array_patch'
-
-# Patches to the Redmine core.
-require 'dispatcher'
-
-Dispatcher.to_prepare do
- require_dependency 'project'
- require_dependency 'issue'
- Project.send(:include, StuffToDoProjectPatch)
- Issue.send(:include, StuffToDoIssuePatch)
-end
-
-Redmine::Plugin.register :stuff_to_do_plugin do
- name 'Stuff To Do Plugin'
- author 'Eric Davis'
- url 'https://projects.littlestreamsoftware.com/projects/show/redmine-stuff-to-do'
- author_url 'http://www.littlestreamsoftware.com'
- description "The Stuff To Do plugin allows a user to order and prioritize the issues they are doing into a specific order. It will also allow other privilged users to reorder the user's workload."
- version '0.3.0'
-
- requires_redmine :version_or_higher => '0.8.0'
-
- settings(:partial => 'settings/stuff_to_do_settings',
- :default => {
- 'use_as_stuff_to_do' => '0',
- 'threshold' => '1',
- 'email_to' => 'example1@example.com,example2@example.com'
- })
-
- menu(:top_menu, :stuff_to_do, {:controller => "stuff_to_do", :action => 'index'}, :caption => :stuff_to_do_title, :if => Proc.new{ User.current.logged? })
-
-end
+require File.dirname(__FILE__) + "/../init"
Please sign in to comment.
Something went wrong with that request. Please try again.