jhove-service 1.1.5 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jhove_service.rb +5 -6
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdbb8877ed23658111dc081650fac9a4e510f9f6e3b40ad7724b1dab18b86b9e
4
- data.tar.gz: 1bdf7d5dc9d3ced16c2d01407fce5cecef49e027324536e0fc17efa11f9722db
3
+ metadata.gz: 17f3ed18fd1d407c10056554a95f24d3b9142f8149a8ca55faeb226f889cc622
4
+ data.tar.gz: 56e7c45e2bc2b92049101b3dac1885119d517e2e6474fa806c01a6e127dabbf3
5
5
  SHA512:
6
- metadata.gz: f40e654b0b769e41209a892a4e04e077367d36d69b05f26f4a142c79b21b5edb546cfe8044aa1862644b4629245d842910bf14fdc86b5a524640fd61404ffa9f
7
- data.tar.gz: 44b5cfd6a7e5e14d6d8aefcbaa4b5ba7c0504c3d345f4d99260f5afc27eea27315c041df1b7cfb28399ba5dc1906f676d9a53fc4364b45344ef2bf146714269b
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
- class JhoveService
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
- # @return [String] exitcode, or raised exception if there is a problem
67
+ # @raises [RuntimeError] if there is a problem running the command
67
68
  def exec_command(command)
68
- `#{command}`
69
- exitcode = $?.exitstatus
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.1.5
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-01-24 00:00:00.000000000 Z
12
+ date: 2019-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri