libis-format 0.9.46 → 0.9.47

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c702defaa0d1e02ec76075f37ef75296420f25d7
4
- data.tar.gz: 388175008ed119a9245a66bf3f325c561f63251b
3
+ metadata.gz: 60f01408433c394b0e0826fb5c5934c64f165d2b
4
+ data.tar.gz: 62c72ba1644f42e9fcb2aa4b0be30ceb8b8b9c1f
5
5
  SHA512:
6
- metadata.gz: 4bdbc44e8424e749d22a34acfe1d94138708cc4e5df3fe3795bd2531a0ae89bec1c52fd911f12544fe5319ca55f212f885939721c6d317773837d8ec3f749a71
7
- data.tar.gz: 0fd44ec84de3896163df19f69bd2eef5f5910f358794a83698355c530d8f35f8d6e377f7135c9d970674269628e6a01a1c315ebb6101798ee02ed866e075060d
6
+ metadata.gz: 8a2323fa374678ae0768951818ac5e6ac5ce4a5f90dafc2ba837b5ce67c0ee4ad7b4b1c5e42e8d7a6d8eed902cfb75bde475c8d9861dc1b15c8f47eb4f5818c2
7
+ data.tar.gz: fe587083feec9372ba709e76ca7707cf7801a5737f305209967101196715cf61a4b7770ce7f709391bf4e3b34c168946a494e444420239e7f593883d1589a4e8
data/.travis.yml CHANGED
@@ -3,21 +3,32 @@ sudo: false
3
3
  dist: trusty
4
4
  cache: bundler
5
5
  rvm:
6
- - 2.1.0
7
- - 2.2.0
6
+ - 2.1.10
7
+ - 2.2.8
8
+ - 2.3.5
9
+ - 2.4.2
8
10
  - ruby-head
9
- - jruby-9.0.1.0
11
+ - jruby-9.0.5.0
12
+ - jruby-9.1.9.0
13
+ - jruby-head
10
14
  jdk:
11
15
  - openjdk8
12
16
  - oraclejdk8
13
17
  matrix:
14
18
  exclude:
15
- - rvm: 2.1.0
19
+ - rvm: 2.1.10
16
20
  jdk: oraclejdk8
17
- - rvm: 2.2.0
21
+ - rvm: 2.2.8
22
+ jdk: oraclejdk8
23
+ - rvm: 2.3.5
24
+ jdk: oraclejdk8
25
+ - rvm: 2.4.2
18
26
  jdk: oraclejdk8
19
27
  - rvm: ruby-head
20
28
  jdk: oraclejdk8
29
+ allow_failures:
30
+ - rvm: ruby-head
31
+ - rvm: jruby-head
21
32
  branches:
22
33
  only:
23
34
  - master
@@ -16,11 +16,11 @@ module Libis
16
16
  Config[:droid_path] = '/opt/droid/droid.sh'
17
17
  Config[:fido_path] = '/usr/local/bin/fido'
18
18
  Config[:ffmpeg_path] = 'ffmpeg'
19
- data_dir = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'data'))
20
- Config[:fido_formats] = [(File.join(data_dir, 'lias_formats.xml'))]
19
+ Config[:fido_formats] = [(File.join(Libis::Format::DATA_DIR, 'lias_formats.xml'))]
20
+ Config[:pdf_tool] = [(File.join(Libis::Format::TOOL_DIR, 'PdfTool.jar'))]
21
21
  # noinspection RubyStringKeysInHashInspection
22
- Config[:xml_validations] = [['archive/ead', File.join(data_dir, 'ead.xsd')]]
23
- Config[:type_database] = File.join(data_dir, 'types.yml')
22
+ Config[:xml_validations] = [['archive/ead', File.join(Libis::Format::DATA_DIR, 'ead.xsd')]]
23
+ Config[:type_database] = File.join(Libis::Format::DATA_DIR, 'types.yml')
24
24
  Config[:raw_audio_convert_cmd] = 'sox %s -e signed -b 16 -t wav %s rate %d channels %d'
25
25
  Config[:watermark_font] = '/usr/share/fonts/truetype/liberation/LiberationSans-Regular.ttf'
26
26
 
@@ -18,8 +18,6 @@ module Libis
18
18
  end
19
19
 
20
20
  def run(source, target, options = [])
21
- tool_dir = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'tools'))
22
- jar_file = File.join(tool_dir, 'PdfTool.jar')
23
21
 
24
22
  if OS.java?
25
23
  # TODO: import library and execute in current VM. For now do exactly as in MRI.
@@ -27,7 +25,7 @@ module Libis
27
25
 
28
26
  Libis::Tools::Command.run(
29
27
  Libis::Format::Config[:java_path],
30
- '-cp', jar_file,
28
+ '-cp', Libis::Format::Config[:pdf_tool],
31
29
  'CopyPdf',
32
30
  '--file_input', source,
33
31
  '--file_output', target,
@@ -18,8 +18,6 @@ module Libis
18
18
  end
19
19
 
20
20
  def run(source, target, options = [])
21
- tool_dir = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'tools'))
22
- jar_file = File.join(tool_dir, 'PdfTool.jar')
23
21
  source = [source] unless source.is_a?(Array)
24
22
 
25
23
  if OS.java?
@@ -28,7 +26,7 @@ module Libis
28
26
 
29
27
  Libis::Tools::Command.run(
30
28
  Libis::Format::Config[:java_path],
31
- '-cp', jar_file,
29
+ '-cp', Libis::Format::Config[:pdf_tool],
32
30
  'MergePdf',
33
31
  '--file_output', target,
34
32
  *options,
@@ -18,15 +18,14 @@ module Libis
18
18
  end
19
19
 
20
20
  def run(source, target, options = [])
21
- tool_dir = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..', '..', 'tools'))
22
- jar_file = File.join(tool_dir, 'PdfTool.jar')
21
+
23
22
  if OS.java?
24
23
  # TODO: import library and execute in current VM. For now do exactly as in MRI.
25
24
  end
26
25
 
27
26
  Libis::Tools::Command.run(
28
27
  Libis::Format::Config[:java_path],
29
- '-cp', jar_file,
28
+ '-cp', Libis::Format::Config[:pdf_tool],
30
29
  'SplitPdf',
31
30
  '--file_input', source,
32
31
  '--file_output', target,
@@ -42,7 +42,7 @@ module Libis
42
42
  return false
43
43
  end
44
44
  else
45
- jar = File.join(Libis::Format::ROOT_DIR, 'tools', 'pdfbox', 'preflight-app-1.8.10.jar')
45
+ jar = File.join(Libis::Format::TOOL_DIR, 'pdfbox', 'preflight-app-1.8.10.jar')
46
46
  result = Libis::Tools::Command.run(
47
47
  Libis::Format::Config[:java_path],
48
48
  '-jar', jar,
@@ -1,5 +1,5 @@
1
1
  module Libis
2
2
  module Format
3
- VERSION = '0.9.46'
3
+ VERSION = '0.9.47'
4
4
  end
5
5
  end
data/lib/libis/format.rb CHANGED
@@ -11,6 +11,7 @@ module Libis
11
11
 
12
12
  ROOT_DIR = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..'))
13
13
  DATA_DIR = File.join(ROOT_DIR, 'data')
14
+ TOOL_DIR = File.join(ROOT_DIR, 'tools')
14
15
 
15
16
  end
16
17
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: libis-format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.46
4
+ version: 0.9.47
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-22 00:00:00.000000000 Z
11
+ date: 2017-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler