Control Redmine from the command line

I’ve knocked up a ruby script for creating Redmine1 issues from the command line2. Here’s how you might use it:

red -r bug -s "Search results not sorted by relevance" -t google -a "Some poor soul" -i high -c search -f .red

This would automatically log the bug on the ‘Google’ project tracker, mark it as high priority, and assign it to some poor soul. Defaults are loaded from a YAML file called ‘.red’.

That’s all there is to it. More help is available on the Github page: http://github.com/textgoeshere/redcmd.

[1] Redmine is an excellent open-source Rails bug-tracker and project management system. [2] The command line is where dragons live.

4 Comments

  1. Simon Barber Says:

    On ubuntu this fails with:

    ~/redcmd$ ruby red.rb
    /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require’: no such file to load — trollop (LoadError)
    from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require’
    from red.rb:48

    I have installed the ruby-all package.

  2. Chris Says:

    Sorry to ask,

    But how do you install it?
    I currently have the bitnami redmine stack running on ubuntu and have no idea how I should install it. I am really green about ruby, any links or help would be appreciated…

    Thanks.
    Chris

  3. Károly Says:

    Hi !
    Can I use it to create plugins ?
    My main problem is can’t generate plugins from command line, the ruby die and doesn’t execute the command . . . can your script help my problem ?

  4. Dave Says:

    @simon that’s telling you that you need to install the trollop gem. gem install trollop normally does the trick but I recommend understanding ruby and rubygems before you go ahead.

    @chris save it somewhere, ensure red.rb has permissions to be executable, add the folder to your path PATH, run it from a command line in your RoR project root. If you google those phrases, you’ll get tons of help. It really is worth learning about this stuff (not just for my tiny rubbish script obviously).

    @Károly Szia? Hogy vagy? No it can’t and no it’s probably no the problem, sorry.

Say something

Questions and comments are welcome. You can use simple HTML and include links.