Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fix scribe check for apache fop

  • Loading branch information...
commit 104e1c8c802760a000991a319ac0ce5480301f93 1 parent 59aff59
Sergey Avseyev avsej authored

Showing 2 changed files with 12 additions and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/git-scribe/check.rb
  2. +11 0 test/check_test.rb
2  lib/git-scribe/check.rb
@@ -42,7 +42,7 @@ def check(args = [])
42 42
43 43
44 44 # check for fop
45   - if !check_can_run('fop -version')
  45 + if !check_can_run('fop -v -out list')
46 46 info "fop is not present, please install for PDF generation"
47 47 status[:fop] = false
48 48 else
11 test/check_test.rb
@@ -9,4 +9,15 @@
9 9 status = @scribe.check
10 10 assert_equal status.size, 6
11 11 end
  12 +
  13 + # there no option '-version' for apache fop cli
  14 + # it accepts only '-v' option but doesn't exit immediately.
  15 + # it should be additional no-op flag provided (like '-out list')
  16 + #
  17 + # see http://svn.apache.org/repos/asf/xmlgraphics/fop/trunk/src/java/org/apache/fop/cli/CommandLineOptions.java
  18 + test "scribe should correctly check fop availability" do
  19 + assert_equal @scribe.check_can_run('fop -v -out list'), true
  20 + assert_equal @scribe.check_can_run('fop -v'), false
  21 + assert_equal @scribe.check_can_run('fop -version'), false
  22 + end
12 23 end

0 comments on commit 104e1c8

Please sign in to comment.
Something went wrong with that request. Please try again.