Recommended
PDF
View Customize Pluginで出来ること
PDF
View customize plugin for Redmineの紹介 (2019年版)
PDF
PDF
Redmineの画面をあなた好みにカスタマイズ - View customize pluginの紹介 - Redmine Japan 2020
PDF
PDF
View customize pluginを使いこなす
PDF
PDF
「Redmineの運用パターン集~私に聞くな、チケットシステムに聞け」
PDF
PDF
PDF
PDF
Redmine issue assign notice plugin の紹介
PDF
Redmineをちょっと便利に! プログラミング無しで使ってみるREST API
PDF
PDF
ある工場の Redmine 2022 〜ある工場の Redmine 5.0 バージョンアップ〜 ( Redmine of one plant 2022 ...
PDF
PDF
PPTX
Redmine本家コピー+投票サイト作成(Python-Redmine利用事例)
PDF
ある工場のRedmine画面カスタム【View customize plugin 活用例】
PPTX
PDF
PDF
PDF
PDF
PDF
Redmineチューニングの実際と限界(旧資料) - Redmine performance tuning(old), See Below.
PDF
PPTX
PDF
PDF
継続使用と新規追加したRedmine Plugin
PDF
20120711 WUM Redmineの使い道_公開版
More Related Content
PDF
View Customize Pluginで出来ること
PDF
View customize plugin for Redmineの紹介 (2019年版)
PDF
PDF
Redmineの画面をあなた好みにカスタマイズ - View customize pluginの紹介 - Redmine Japan 2020
PDF
PDF
View customize pluginを使いこなす
PDF
PDF
「Redmineの運用パターン集~私に聞くな、チケットシステムに聞け」
What's hot
PDF
PDF
PDF
PDF
Redmine issue assign notice plugin の紹介
PDF
Redmineをちょっと便利に! プログラミング無しで使ってみるREST API
PDF
PDF
ある工場の Redmine 2022 〜ある工場の Redmine 5.0 バージョンアップ〜 ( Redmine of one plant 2022 ...
PDF
PDF
PPTX
Redmine本家コピー+投票サイト作成(Python-Redmine利用事例)
PDF
ある工場のRedmine画面カスタム【View customize plugin 活用例】
PPTX
PDF
PDF
PDF
PDF
PDF
Redmineチューニングの実際と限界(旧資料) - Redmine performance tuning(old), See Below.
PDF
PPTX
PDF
Similar to Redmineをプラグインで拡張しよう
PDF
継続使用と新規追加したRedmine Plugin
PDF
20120711 WUM Redmineの使い道_公開版
PPTX
講演1 redmineの簡易crmとしての活用事例r2
PDF
PDF
PDF
PPTX
Redmine4時代のプラグイン開発 redmine.tokyo #13
PDF
ある工場の Redmine 2025 〜ある工場の Redmine 6.1 バージョンアップ〜 ( Redmine of one plant 2025 ...
PDF
PDF
PDF
はじめてのプロジェクト管理ツール-Redmine超入門-
PDF
はじめてのプロジェクト管理ツール-Redmine超入門
PDF
PDF
Redmine 300 310_new_feature
PDF
PDF
PDF
PDF
PDF
PDF
Redmineをプラグインで拡張しよう 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Ruby
Windows
• RubyInstaller for Windows + DevKit +pikがお勧め
• http://rubyinstaller.org
• 面倒ならBitNamiでRedmineごとインストール
• https://bitnami.com/stack/redmine
Mac, Linux
• rbenvで複数バージョンのrubyを管理
14. 15. 16. 17. Plugin Generator
$ $ ruby script/rails generate redmine_plugin redmine_demo
create plugins/redmine_demo/app
create plugins/redmine_demo/app/controllers
create plugins/redmine_demo/app/helpers
create plugins/redmine_demo/app/models
create plugins/redmine_demo/app/views
create plugins/redmine_demo/db/migrate
create plugins/redmine_demo/lib/tasks
create plugins/redmine_demo/assets/images
create plugins/redmine_demo/assets/javascripts
create plugins/redmine_demo/assets/stylesheets
create plugins/redmine_demo/config/locales
create plugins/redmine_demo/test
create plugins/redmine_demo/test/fixtures
create plugins/redmine_demo/test/unit
create plugins/redmine_demo/test/functional
create plugins/redmine_demo/test/integration
create plugins/redmine_demo/README.rdoc
create plugins/redmine_demo/init.rb
create plugins/redmine_demo/config/routes.rb
create plugins/redmine_demo/config/locales/en.yml
create plugins/redmine_demo/test/test_helper.rb
プラグインのひな形を作成するコマンド
Redmineインストールディレクトリ直下で実行する
18. 19. modelとcontrollerもスクリ
プトで生成
$ ruby script/rails generate redmine_plugin_model redmine_demo
sample_models field1:string field2:integer
create plugins/redmine_demo/app/models/sample_models.rb
create plugins/redmine_demo/test/unit/sample_models_test.rb
create plugins/redmine_demo/db/migrate/001_create_sample_models.rb
$ ruby script/rails generate redmine_plugin_controller redmine_demo Demo
sample_action
create plugins/redmine_demo/app/controllers/Demo_controller.rb
create plugins/redmine_demo/app/helpers/Demo_helper.rb
create plugins/redmine_demo/test/functional/Demo_controller_test.rb
create plugins/redmine_demo/app/views/Demo/sample_action.html.erb
テストコードのひな形も作成される
20. init.rb
Redmine::Plugin.register :redmine_demo do
name 'Redmine Demo plugin'
author 'Author name'
description 'This is a plugin for Redmine'
version '0.0.1'
url 'http://example.com/path/to/plugin'
author_url 'http://example.com/about'
end
プラグインの情報を定義する場所
Plugin Generatorが出力した内容を適宜書き
換える。
特に公開する場合は重要な情報となる。
21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. twitterマクロ(from Wiki Extensions)
Redmine::WikiFormatting::Macros.register do
# マクロの説明
desc "Creates link to twitter account page.nn" +
" !{{twitter(user_name)}}n”
# マクロの定義
macro :twitter do |obj, args|
return nil if args.length < 1 #引数が無かったら何もしない
user_name = args[0].strip # 第一引数をuser_nameに代入
# twitterへのリンクを作成
link_to(h("@#{user_name}"), "http://www.twitter.com/#{user_name}").html_safe
end
end
33. 34. 35. 36. 37. 38. 39. 40. Controller Hooksの書き方
class DemoHookListener < Redmine::Hook::Listener
!
def controller_issues_new_after_save(context = { })
project = context[:project]
request = context[:request]
!
#ここに処理を書く
end
end
• Listenerを継承したクラスを作成
• Hookと同じ名前のメソッドを定義
41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60.