PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/init.rb

https://bitbucket.org/xyz37/korean-translation-file
Ruby | 30 lines | 28 code | 2 blank | 0 comment | 2 complexity | 4fa43740c2cd05b44139f5e7db763536 MD5 | raw file
Possible License(s): BSD-3-Clause
  1. require 'application_patch'
  2. require 'wiki_controller_patch'
  3. require 'cleanup_tmp'
  4. require_dependency 'attachment_hook'
  5. if Gem::Version.new("3.0") > Gem::Version.new(Rails.version) then
  6. require 'dispatcher'
  7. end
  8. Redmine::Plugin.register :redmine_inline_attach_screenshot do
  9. name 'Redmine Attach Screenshot plugin'
  10. url 'https://bitbucket.org/StrangeWill/redmine-inline-attach-screenshot/'
  11. author 'Konstantin Zaitsev, Sergei Vasiliev, Alexandr Poplavsky, Axmor Software, Jens Alfke, Renzo Meister, YongKi Kim, William Roush'
  12. author_url 'https://bitbucket.org/StrangeWill/redmine-inline-attach-screenshot/'
  13. description 'Attach screenshots from clipboard directly to a Redmine issue.'
  14. version '0.4.6'
  15. if Gem::Version.new("3.0") > Gem::Version.new(Rails.version) then
  16. Dispatcher.to_prepare do
  17. ApplicationController.send(:include, AttachScreenshotPlugin::ApplicationControllerPatch)
  18. WikiController.send(:include, AttachScreenshotPlugin::WikiControllerPatch)
  19. AccountController.send(:include, AttachScreenshotPlugin::CleanupTmp)
  20. end
  21. else
  22. Rails.configuration.to_prepare do
  23. ApplicationController.send(:include, AttachScreenshotPlugin::ApplicationControllerPatch)
  24. WikiController.send(:include, AttachScreenshotPlugin::WikiControllerPatch)
  25. AccountController.send(:include, AttachScreenshotPlugin::CleanupTmp)
  26. end
  27. end
  28. end