jhove-service 1.1.5 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jhove_service.rb +5 -6
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17f3ed18fd1d407c10056554a95f24d3b9142f8149a8ca55faeb226f889cc622
|
4
|
+
data.tar.gz: 56e7c45e2bc2b92049101b3dac1885119d517e2e6474fa806c01a6e127dabbf3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 913e934b7fbd033a74af5e42b92233419ac414f865174514f642425945eecd5ac1633fcb511be493b06a5d614d9b7c5e043462879e642db911a29a449479997a
|
7
|
+
data.tar.gz: f3c7ca08df33e1897cc52f24a1179d0d0ef47f557cdcd8008c6e2416e355566540a9d4cbc869d5f1b02d4a6189da04d905a58da4d10a1d2b65ae1c85fd9590f7
|
data/lib/jhove_service.rb
CHANGED
@@ -4,8 +4,9 @@ require 'jhove_technical_metadata'
|
|
4
4
|
require 'stringio'
|
5
5
|
require 'uri'
|
6
6
|
require 'shellwords'
|
7
|
+
require 'open3'
|
7
8
|
|
8
|
-
|
9
|
+
class JhoveService
|
9
10
|
|
10
11
|
# @return [Pathname] The directory in which program files are located
|
11
12
|
attr_accessor :bin_pathname
|
@@ -63,12 +64,10 @@ require 'shellwords'
|
|
63
64
|
end
|
64
65
|
|
65
66
|
# @param command [String] the command to execute on the command line
|
66
|
-
# @
|
67
|
+
# @raises [RuntimeError] if there is a problem running the command
|
67
68
|
def exec_command(command)
|
68
|
-
|
69
|
-
|
70
|
-
raise "Error when running JHOVE #{command}" if (exitcode != 0)
|
71
|
-
exitcode
|
69
|
+
stdout, stderr, status = Open3.capture3(command)
|
70
|
+
raise "Error when running JHOVE #{command}:\n#{stderr}" unless status.success?
|
72
71
|
end
|
73
72
|
|
74
73
|
# @param input_path [Pathname,String] the directory path or filename containing the folder or file to be analyzed by JHOVE
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jhove-service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Richard Anderson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-05-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|