mirror of https://github.com/captn3m0/muse-dl.git
[ci] Fixes CI Build
This commit is contained in:
parent
f4cf8ce97c
commit
18a051e20f
|
@ -3,3 +3,8 @@ language: crystal
|
|||
script:
|
||||
- crystal spec
|
||||
- crystal tool format --check
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- pdftk
|
|
@ -3,8 +3,6 @@ require "./spec_helper"
|
|||
describe Muse::Dl::Pdftk do
|
||||
it "should find pdftk binary" do
|
||||
pdftk = Muse::Dl::Pdftk.new
|
||||
if pdftk.binary
|
||||
pdftk.binary.should eq "/usr/sbin/pdftk"
|
||||
end
|
||||
pdftk.ready?.should eq true
|
||||
end
|
||||
end
|
||||
|
|
|
@ -7,14 +7,15 @@ require "dir"
|
|||
module Muse::Dl
|
||||
class Pdftk
|
||||
PDFTK_BINARY_NAME = "pdftk"
|
||||
@binary = "/usr/sbin/pdftk"
|
||||
@binary : String | Nil
|
||||
@tmp_file_path : String
|
||||
|
||||
getter :binary
|
||||
def ready?
|
||||
@binary != nil
|
||||
end
|
||||
|
||||
def initialize(tmp_file_path : String = Dir.tempdir)
|
||||
@tmp_file_path = tmp_file_path
|
||||
|
||||
possible_binary = Process.find_executable(Pdftk::PDFTK_BINARY_NAME)
|
||||
if possible_binary
|
||||
@binary = possible_binary
|
||||
|
|
Loading…
Reference in New Issue