/init.rb
Ruby | 30 lines | 28 code | 2 blank | 0 comment | 2 complexity | 4fa43740c2cd05b44139f5e7db763536 MD5 | raw file
Possible License(s): BSD-3-Clause
- require 'application_patch'
- require 'wiki_controller_patch'
- require 'cleanup_tmp'
- require_dependency 'attachment_hook'
- if Gem::Version.new("3.0") > Gem::Version.new(Rails.version) then
- require 'dispatcher'
- end
-
- Redmine::Plugin.register :redmine_inline_attach_screenshot do
- name 'Redmine Attach Screenshot plugin'
- url 'https://bitbucket.org/StrangeWill/redmine-inline-attach-screenshot/'
- author 'Konstantin Zaitsev, Sergei Vasiliev, Alexandr Poplavsky, Axmor Software, Jens Alfke, Renzo Meister, YongKi Kim, William Roush'
- author_url 'https://bitbucket.org/StrangeWill/redmine-inline-attach-screenshot/'
- description 'Attach screenshots from clipboard directly to a Redmine issue.'
- version '0.4.6'
-
- if Gem::Version.new("3.0") > Gem::Version.new(Rails.version) then
- Dispatcher.to_prepare do
- ApplicationController.send(:include, AttachScreenshotPlugin::ApplicationControllerPatch)
- WikiController.send(:include, AttachScreenshotPlugin::WikiControllerPatch)
- AccountController.send(:include, AttachScreenshotPlugin::CleanupTmp)
- end
- else
- Rails.configuration.to_prepare do
- ApplicationController.send(:include, AttachScreenshotPlugin::ApplicationControllerPatch)
- WikiController.send(:include, AttachScreenshotPlugin::WikiControllerPatch)
- AccountController.send(:include, AttachScreenshotPlugin::CleanupTmp)
- end
- end
- end