jhove-service 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jhove_service.rb +4 -3
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aa0685c415e5e2008e19e4a1e349e614e5d716b9
4
- data.tar.gz: e8bdfc822598531f9cb5784a11e9f99ebc1c5b37
3
+ metadata.gz: ed3e25c789329a1f299e16f39df8ebce4e6d7011
4
+ data.tar.gz: e96a4603bd25efd8b0a2d10541b8421e518d5a80
5
5
  SHA512:
6
- metadata.gz: 24f290d188efd7cc70cd68be08702640cc7d3edb94dfc679092439424960cab50ad720faada26f85b31e205f66f8ed2b0a0e90e22986b112e6eada1bdb0740e3
7
- data.tar.gz: 5f86847ce28c2265df555f13b2c92efb4b3a3eafbddadd4a067df0ad066c3a2af58286fe891a45839d1d45ff74214cf1c9e241300d99995d8391e596a16d5dfe
6
+ metadata.gz: 2fa07fc697eba4df0b3999674a0c25c333c7f5df3fadbaf636410843720f882fd99bbe539df34eca80550b2183337cac9b681dfc6531ee04cd8d51e99872a053
7
+ data.tar.gz: dd8ca346f92328e2aed5442cc842ed5c313f0d218d2d7d233a884b92a37d03a0ec0faf7ea765f9887e4cc8dbd3b59a377564803383446a353659928987c86dc2
@@ -70,11 +70,12 @@ require 'uri'
70
70
  exitcode
71
71
  end
72
72
 
73
- # @param content [Pathname,String] the directory path or filename containing the folder or file to be analyzed by JHOVE
73
+ # @param input_path [Pathname,String] the directory path or filename containing the folder or file to be analyzed by JHOVE
74
74
  # @param output_file [Pathname,String] the output file to write the XML to, defaults to filename specified in jhove_output
75
75
  # @return [String] The jhove-toolkit command to be exectuted in a system call
76
- def get_jhove_command(content,output_file = jhove_output)
77
- args = "-h xml -o \"#{output_file}\" \\\"#{content}"
76
+ def get_jhove_command(input_path,output_file = jhove_output)
77
+ filename = input_path.to_s.gsub("'", %q(\\\')).gsub('"', %q(\\\")) # escape any single or double quotes in the filename
78
+ args = "-h xml -o \"#{output_file}\" \\\"#{filename}"
78
79
  jhove_script = @bin_pathname.join('jhoveToolkit.sh')
79
80
  jhove_cmd = "#{jhove_script} #{args}"
80
81
  jhove_cmd
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.1
4
+ version: 1.1.2
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: 2017-03-24 00:00:00.000000000 Z
12
+ date: 2017-04-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri