From 8e12d37cc6a6b366043e5f976653e1f28bd0a236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20R=CC=8Ci=CC=81man?= Date: Tue, 12 Jun 2012 14:06:45 +0200 Subject: [PATCH] preparing for redmine 2.0 (first steps) --- config/routes.rb | 6 ++---- init.rb | 9 ++++----- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index 93bd22b..ba1ed0b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,4 +1,2 @@ -ActionController::Routing::Routes.draw do |map| - map.resources :rates - map.connect 'rate_caches', :conditions => {:method => :put}, :controller => 'rate_caches', :action => 'update' -end +resources :rates +match 'rate_caches', :to => 'rate_caches#update', :method => :put diff --git a/init.rb b/init.rb index da7bda4..591be54 100644 --- a/init.rb +++ b/init.rb @@ -1,9 +1,8 @@ require 'redmine' -# Patches to the Redmine core -require 'dispatcher' +Rails.logger.info 'Starting Rate plugin for Redmine' -Dispatcher.to_prepare :redmine_rate do +ActionDispatch::Callbacks.to_prepare do gem 'lockfile' require_dependency 'application_controller' @@ -27,9 +26,9 @@ Redmine::Plugin.register :redmine_rate do url 'https://projects.littlestreamsoftware.com/projects/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.2.1' + version '0.3.0' - requires_redmine :version_or_higher => '1.0.0' + requires_redmine :version_or_higher => '2.0.0' # These settings are set automatically when caching settings(:default => {