hydra-file_characterization 0.1.2 → 0.1.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b75ad5f0b18e047cebdb796c7f8ba98cd992a019
4
- data.tar.gz: f53ac70d926460f8f3ec8b827ee5673fe07784a2
3
+ metadata.gz: 2274d4a30e9297d0a50618e43cf37a32b61c636b
4
+ data.tar.gz: 95f2b5c7c203375348c299ace5ffa8a70dfc8138
5
5
  SHA512:
6
- metadata.gz: 77cd1a59aa05a2ad96531b48e5191df939c84a4e15a67417c11c852860972ed02bf51d869b1d08ee98740210c4a211d48a0521e8d086e81fa3d3f944069b09b2
7
- data.tar.gz: 28acf276a405e40d53d0101459be9b27f70bf3f7602251c992ff9f1deb0525901f20e6fb8776fa6d93d9d2dd3bc7a61635830330c113b05c0f59b86c8f06c42c
6
+ metadata.gz: 46f13a52337a8251753768fbd6de683ebd9d0d61242a3a4e5600d70f388ddf04fb173eadc9489c49799d2836f755e4d92b11e6a0e43b4d0a2bc54a4cbd2b1ce8
7
+ data.tar.gz: 220e1e5c34ed0cf3286d8e7efa47146306d03ebc3d1cff491e177d5fc31ca48a645995a45c313d0e5d931d5e8bcb15a10688ce60fa1bb4349ce536ef3a7a9a00
@@ -8,9 +8,23 @@ require "active_support/configurable"
8
8
  module Hydra
9
9
 
10
10
  module_function
11
- def characterize(content, filename, *options)
11
+
12
+ #
13
+ # Run all of the specified tools against the given content and filename.
14
+ #
15
+ # @param [String] content - The contents of the original file
16
+ # @param [String] filename - The original file's filename; Some
17
+ # characterization tools take hints from the file names
18
+ # @param [Array] tool_names - A list of tool names available on the system
19
+ #
20
+ # @return [String, Array<String>] -
21
+ # String - When a single tool_name is given, returns the raw XML as a
22
+ # string
23
+ # Array<String> - When multiple tool_names are given, returns an equal
24
+ # length Array of XML strings
25
+ def characterize(content, filename, *tool_names)
12
26
  tool_outputs = []
13
- tool_names = Array(options).flatten.compact
27
+ tool_names = Array(tool_names).flatten.compact
14
28
  FileCharacterization::ToTempFile.open(content, filename) do |f|
15
29
  tool_names.each do |tool_name|
16
30
  tool_outputs << FileCharacterization.characterize_with(tool_name, f.path)
@@ -1,5 +1,5 @@
1
1
  module Hydra
2
2
  module FileCharacterization
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hydra-file_characterization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Treacy