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 => {