Sha256: 7068b72c0422e702dbf242bf2e05d6a69aa12199d31da4281ea59865447d1b37

Contents?: true

Size: 563 Bytes

Versions: 22

Compression:

Stored size: 563 Bytes

Contents

module Softcover
  module Commands
    module EpubValidator
      extend Softcover::Utils
      extend self

      # Validates a book according to the EPUB standard.
      def validate!
        epub = Dir.glob('ebooks/*.epub').first
        puts "Validating EPUB..."
        system("#{java} -jar #{epubcheck} #{epub}")
      end

      private

        def java
          @java ||= executable(dependency_filename(:java))
        end

        def epubcheck
          @epubcheck ||= executable(dependency_filename(:epubcheck)).inspect
        end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
softcover-0.9.22 lib/softcover/commands/epub_validator.rb
softcover-0.9.21 lib/softcover/commands/epub_validator.rb
softcover-0.9.20 lib/softcover/commands/epub_validator.rb
softcover-0.9.19 lib/softcover/commands/epub_validator.rb
softcover-0.9.18 lib/softcover/commands/epub_validator.rb
softcover-0.9.17 lib/softcover/commands/epub_validator.rb
softcover-0.9.16 lib/softcover/commands/epub_validator.rb
softcover-0.9.15 lib/softcover/commands/epub_validator.rb
softcover-0.9.13 lib/softcover/commands/epub_validator.rb
softcover-0.9.12 lib/softcover/commands/epub_validator.rb
softcover-0.9.11 lib/softcover/commands/epub_validator.rb
softcover-0.9.10 lib/softcover/commands/epub_validator.rb
softcover-0.9.9 lib/softcover/commands/epub_validator.rb
softcover-0.9.8 lib/softcover/commands/epub_validator.rb
softcover-0.9.7 lib/softcover/commands/epub_validator.rb
softcover-0.9.6 lib/softcover/commands/epub_validator.rb
softcover-0.9.5 lib/softcover/commands/epub_validator.rb
softcover-0.9.4 lib/softcover/commands/epub_validator.rb
softcover-0.9.3 lib/softcover/commands/epub_validator.rb
softcover-0.9.2 lib/softcover/commands/epub_validator.rb