jhove-service 1.1.1 → 1.1.2
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.
- checksums.yaml +4 -4
- data/lib/jhove_service.rb +4 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed3e25c789329a1f299e16f39df8ebce4e6d7011
|
4
|
+
data.tar.gz: e96a4603bd25efd8b0a2d10541b8421e518d5a80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fa07fc697eba4df0b3999674a0c25c333c7f5df3fadbaf636410843720f882fd99bbe539df34eca80550b2183337cac9b681dfc6531ee04cd8d51e99872a053
|
7
|
+
data.tar.gz: dd8ca346f92328e2aed5442cc842ed5c313f0d218d2d7d233a884b92a37d03a0ec0faf7ea765f9887e4cc8dbd3b59a377564803383446a353659928987c86dc2
|
data/lib/jhove_service.rb
CHANGED
@@ -70,11 +70,12 @@ require 'uri'
|
|
70
70
|
exitcode
|
71
71
|
end
|
72
72
|
|
73
|
-
# @param
|
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(
|
77
|
-
|
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.
|
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-
|
12
|
+
date: 2017-04-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|