Project

General

Profile

hook list?

Added by Ivan Cenov about 11 years ago

There is in Hooks_List a note that says

To see the current list of plugin hooks, run rake redmine:plugins:hook_list in the Redmine directory.
This does not work in current pre-2.3.0 trunk. I also tried
rake redmine:hook_list
and it does not work too. May be this is obsolete format of the command? What is the new command format?


Replies (6)

RE: hook list? - Added by Jan from Planio www.plan.io about 11 years ago

Redmine 2 uses bundler, so you might be luckier with bundle exec redmine:plugins:hook_list instead. As an alternative, you could also just run grep -r call_hook * to show all source files that use hooks.

RE: hook list? - Added by Ivan Cenov about 11 years ago

No, I was not luckier ...

D:\apps\redmine_svn>bundle exec redmine:plugins:hook_list
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/cli.rb:428:in `exec': Invalid argument - redmine:plugins:h
ook_list (Errno::EINVAL)
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/cli.rb:428:in `exec'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor/task.rb:27:in `run'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task
'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor.rb:275:in `dispatch'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/vendor/thor/base.rb:408:in `start'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/bin/bundle:14:in `block in <top (required)>'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/lib/bundler/friendly_errors.rb:4:in `with_friendly_errors
'
        from C:/Ruby193/lib/ruby/gems/1.9.1/gems/bundler-1.2.1/bin/bundle:14:in `<top (required)>'
        from C:/Ruby193/bin/bundle:23:in `load'
        from C:/Ruby193/bin/bundle:23:in `<main>'

D:\apps\redmine_svn>bundle exec redmine:plugins:hook_list RAILS_ENV=production
bundler: command not found: redmine:plugins:hook_list
Install missing gem executables with `bundle install`
D:\apps\redmine_svn>bundle exec rake redmine:plugins:hook_list RAILS_ENV=production
rake aborted!
Don't know how to build task 'redmine:plugins:hook_list'

(See full trace by running task with --trace)

RE: hook list? - Added by Jan from Planio www.plan.io about 11 years ago

My bad, I missed the rake. The correct command should be bundle exec rake redmine:plugins:hook_list.

RE: hook list? - Added by Ivan Cenov about 11 years ago

 bundle exec rake redmine:plugins:hook_list
does not succeed...

RE: hook list? - Added by Jan from Planio www.plan.io about 11 years ago

Did you try grepping (as mentioned)? Assuming you are on Windows, you can download grep here: http://gnuwin32.sourceforge.net/packages/grep.htm. You can also just search for call_hook using your favorite IDE or possibly even Windows Explorer :)

RE: hook list? - Added by Mischa The Evil about 11 years ago

As far as I know the redmine:plugins:hook_list rake task has been deleted in r9490 as part of Rails-3.2 work.
No substitution has been implemented afterwards so it will come down to solutions like grepping as Jan already pointed out.

Maybe it's worth opening a FR with a request to re-implement such rake task? Any opinions?

Edit: I'll update the note on Hooks_List.

    (1-6/6)