ebert 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/VERSION +1 -1
- data/ebert.gemspec +2 -2
- data/lib/ebert.rb +2 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
N2Y1YTFmMTQzNTBkZWQ3ZTJmN2FhZmM1MWNjMGYwNzI4NmRhYzVmMg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YWM3ZjBlMjYxMGViNmVmNDhjZGJiZGJmMzNlNzMwYjk4NTk2MGM4Yg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2Y1MDI5MTI0OTcyOGI3MzY4ZjE5YWNlZThjMDRiMmQwY2EyMDA1Nzc3OGIy
|
10
|
+
ZWFkNzdhOTllNDQyYWYwMjQxODg1MDQ4Y2I5NjczZjI4MjNlYTViZmQ0Mjkx
|
11
|
+
MWYwZDEwZTU1YTU5ZDcxMGU5OGVjZTQ1NzMzYTUxNWI5MWI1ODY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YWNhYWI5Y2Q1NjgxYzU2YTdjODAwYTcyNTU0M2VmYjFmODRhMDljNjc0OWY5
|
14
|
+
NWI2MzBlNWY1NTUzMDI0ZGQ3ZGI4MTIzOWQ0NTA5ZWFlNzllMDk1OGYyNmRl
|
15
|
+
OGExMDA1MTBmMmFjN2EzZjM0NGVjYmJkNTg0NTFmZTVhMTE2MzY=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.2.0
|
data/ebert.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: ebert 0.
|
5
|
+
# stub: ebert 0.2.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "ebert"
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.2.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
data/lib/ebert.rb
CHANGED
@@ -11,7 +11,6 @@ class Ebert
|
|
11
11
|
raise ArgumentError, "Must supply either an input file or a pregenerated response" if options[:raw_response].nil? and options[:file].nil?
|
12
12
|
raise ArgumentError, "File not found: #{options[:file]}" if options[:file] and !FileTest.exist?(options[:file])
|
13
13
|
full_response_command = options[:full_response] ? '-f' : ''
|
14
|
-
puts "Executing command 'mediainfo #{Shellwords.escape(options[:file])} #{full_response_command}'"
|
15
14
|
parse_results(options[:raw_response] || `mediainfo #{Shellwords.escape(options[:file])} #{full_response_command}`)
|
16
15
|
end
|
17
16
|
|
@@ -23,18 +22,16 @@ class Ebert
|
|
23
22
|
ebert_results[@prefix] ||= {}
|
24
23
|
elsif result.is_a?(Hash)
|
25
24
|
if @prefix.nil?
|
26
|
-
puts "No prefix #{result.keys.first}: #{result.values.first} \n"
|
27
25
|
if ebert_results.key?(result.keys.first)
|
28
26
|
ebert_results[result.keys.first] << result.values.first
|
29
27
|
else
|
30
|
-
ebert_results[result.keys.first] = result.values.first
|
28
|
+
ebert_results[result.keys.first] = [result.values.first]
|
31
29
|
end
|
32
30
|
else
|
33
|
-
puts "Prefix #{@prefix} - #{result.keys.first}: #{result.values.first} \n"
|
34
31
|
if ebert_results[@prefix].key?(result.keys.first)
|
35
32
|
ebert_results[@prefix][result.keys.first].push(result.values.first)
|
36
33
|
else
|
37
|
-
ebert_results[@prefix][result.keys.first] = result.values.first
|
34
|
+
ebert_results[@prefix][result.keys.first] = [result.values.first]
|
38
35
|
end
|
39
36
|
end
|
40
37
|
end
|