mediainfo 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a980499371cba6af063e9a484fefdc52bb0ac1d0cf231c2477a9cad13c5a81c9
4
- data.tar.gz: 86137ca8a4adf93980fa3069cd828584b974c53a7e7c43375a0f67f13e19a727
3
+ metadata.gz: 0f010ee33c89c683b3d413280d599017d3974e9cffc256fdec2a521b0b34a3ee
4
+ data.tar.gz: e601d403a247ecd73f09b4236b4f949532d7d4de0f7322bfc2015f4903611065
5
5
  SHA512:
6
- metadata.gz: 754815e1737c88fa9b1512eb79ef0f9d610d472f6a1b0c283009319f5d7a1d7f6277470398df1f66f3bf69483d3392658da8827df1f9a780d1cd7c5dfd680b23
7
- data.tar.gz: d984ab7702fbba06307f56f510744ca11a4bd6beb9d7ab5e936a4e470a84fa94a4ced6466e26248adc59f6e31abed251cea8b4d7faa2e66654c218c9782eeecd
6
+ metadata.gz: 69550b2d504d19ad7350ef8b35bed031302c15bec267b74bc057b4e253cd44f4bcb04d8884066abdebce9f86b5732c567ad3c747b4c75738ca871c74157be928
7
+ data.tar.gz: 44a6f8f273e29fc6f6e068b13ea8ed05cb6d89c39c7367bdabc31ae7e2a4e3b058508c1ecbf5d065df6fbc0b875640e81eed778c62fb6844b2af71ca847ad02e
data/Gemfile CHANGED
@@ -1,5 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  git_source(:github) {|repo_name| "https://github.com/greatseth/#{repo_name}" }
4
- gem 'pry'
5
4
  gemspec
data/lib/mediainfo.rb CHANGED
@@ -24,7 +24,8 @@ module MediaInfo
24
24
  else
25
25
  mediainfo_location = ENV['MEDIAINFO_PATH']
26
26
  end
27
- raise EnvironmentError, "#{mediainfo_location} cannot be found. Are you sure mediainfo is installed?" unless ::File.exist? mediainfo_location
27
+ raise EnvironmentError, "MediaInfo binary cannot be found. Are you sure mediainfo is installed?" if which('mediainfo').nil?
28
+ raise EnvironmentError, "MediaInfo path you provided cannot be found. Please check your mediainfo installation location..." unless ::File.exist? mediainfo_location
28
29
  return mediainfo_location
29
30
  end
30
31
 
@@ -98,11 +99,9 @@ module MediaInfo
98
99
  def self.from_uri(input)
99
100
  http = Net::HTTP.new(input.host, input.port) # Check if input is valid
100
101
  request = Net::HTTP::Head.new(input.request_uri) # Only grab the Headers to be sure we don't try and download the whole file
101
-
102
102
  http.use_ssl = true if input.is_a? URI::HTTPS # For https support
103
-
104
- raise RemoteUrlError, "HTTP call to #{input} is not working!" unless http.request(request).is_a?(Net::HTTPOK)
105
-
103
+ http_request = http.request(request)
104
+ raise RemoteUrlError, "HTTP call to #{input} is not working : #{http_request.value}" unless http_request.is_a?(Net::HTTPOK)
106
105
  MediaInfo::Tracks.new(MediaInfo.run(URI.escape(input.to_s)))
107
106
  end
108
107
 
@@ -1,3 +1,3 @@
1
1
  module MediaInfo
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mediainfo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Thomas Rasmussen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-06 00:00:00.000000000 Z
11
+ date: 2019-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -83,7 +83,6 @@ files:
83
83
  - ".gitignore"
84
84
  - ".rspec"
85
85
  - ".travis.yml"
86
- - ".vscode/settings.json"
87
86
  - Changelog
88
87
  - Gemfile
89
88
  - LICENSE
@@ -120,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
119
  - !ruby/object:Gem::Version
121
120
  version: '1.2'
122
121
  requirements: []
123
- rubygems_version: 3.0.2
122
+ rubygems_version: 3.0.3
124
123
  signing_key:
125
124
  specification_version: 3
126
125
  summary: MediaInfo is a class wrapping the mediainfo CLI (http://mediainfo.sourceforge.net)