Skip to content
This repository has been archived by the owner on Dec 28, 2017. It is now read-only.

Commit

Permalink
now works with new API
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Cook committed Jan 8, 2012
1 parent 00d20a7 commit 2b27482
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions bin/epub_validator
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,20 @@ $LOAD_PATH.unshift(lib) if File.directory?(lib) && !$LOAD_PATH.include?(lib)
require 'epub_validator'
#require 'epub_validator/command'

# Thanks heroku!
# From heroku!
args = ARGV.dup
ARGV.clear
command = args.shift.strip rescue 'help'

# need to implement Command class
#EpubValidator::Command.run(command, args)

puts "Checking...."
print "\nChecking...."
ev = EpubValidator.check(command)
puts ev
if (ev[:valid] == 1)
print "Passed.\n"
else
print "FAILED!\n\n"
puts ev[:message]
end

0 comments on commit 2b27482

Please sign in to comment.