ffmpeg-video-info 0.1.7 → 0.2.0

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: f3c93f4fa6cf6341f7ea1f82e0bc6e96189d445d
4
- data.tar.gz: c0fb418447df2ecbfbe096a430fd482807ba25a2
3
+ metadata.gz: d33444d94613aaae3c6fa3acbd9991ce6c1f4cfa
4
+ data.tar.gz: a6cfd972b3b3f1ee24a463cb1be948d88ff97c82
5
5
  SHA512:
6
- metadata.gz: 343e11d6422224f8ed357aacc09d13a4a6fecc26de87c2d06f6e21dc2a73308fbb319c195176f702f2d6010f2170bf540c4fcd5bf9daa905c8e50618548a521f
7
- data.tar.gz: 2af4e85e20f98684ea7471401d1eaefcb07716f82c52dede784051d93e856423e9d57cd85d72b364e4dda6d25181c969b75762a4380c8c63ff61b898dac79efd
6
+ metadata.gz: 6eb8bf59db6897efeb042f71f33267d402aca19fc70a55bdb50ba9a16a683aab0701381d448d8464fc65b43bb8b8c36ac197d7035e35dc2ecb9431746c517991
7
+ data.tar.gz: 688fc4067c56ab533b94cc7fd95a04898fae21e2733efed2b7f51ec1f3cce15d89201b96d49519a1ec89ddad4a429a1f16ad2dc4b1a64b1910e334ec16845569
data/Rakefile CHANGED
@@ -2,6 +2,7 @@ require 'rubygems'
2
2
  require 'bundler'
3
3
  require 'rake/extensiontask'
4
4
  require 'mini_portile'
5
+ require './lib/ffmpeg_video_info'
5
6
  begin
6
7
  Bundler.setup(:default, :development)
7
8
  rescue Bundler::BundlerError => e
@@ -21,7 +22,7 @@ Jeweler::Tasks.new do |gem|
21
22
  gem.description = %Q{It only provides gathering info about media files}
22
23
  gem.email = "fazzzenda@mail.ru"
23
24
  gem.authors = ["Pavel Tatarsky"]
24
- gem.extensions = %w[ext/ffmpeg_video_info/extconf.rb]
25
+ gem.extensions = %w[ext/ffmpeg_video_info_ext/extconf.rb]
25
26
  # dependencies defined in Gemfile
26
27
  end
27
28
  Jeweler::RubygemsDotOrgTasks.new
@@ -36,8 +37,8 @@ Rake::RDocTask.new do |rdoc|
36
37
  rdoc.rdoc_files.include('lib/**/*.rb')
37
38
  end
38
39
 
39
- recipe = MiniPortile.new('ffmpeg', '2.7.1')
40
- recipe.files = ['https://github.com/FFmpeg/FFmpeg/archive/n2.7.1.tar.gz']
40
+ recipe = MiniPortile.new('ffmpeg', FFmpeg::Version)
41
+ recipe.files = ["https://github.com/FFmpeg/FFmpeg/archive/n#{FFmpeg::Version}.tar.gz"]
41
42
  recipe.configure_options = ['--enable-shared']
42
43
  task :ffmpeg do
43
44
  checkpoint = ".#{recipe.name}-#{recipe.version}.installed"
@@ -47,9 +48,9 @@ task :ffmpeg do
47
48
  end
48
49
  recipe.activate
49
50
  end
50
- task :compile => [:ffmpeg, :'compile:ffmpeg_video_info']
51
+ task :compile => [:ffmpeg, :'compile:ffmpeg_video_info_ext']
51
52
 
52
53
  require "rake/extensiontask"
53
- Rake::ExtensionTask.new('ffmpeg_video_info') do |e|
54
+ Rake::ExtensionTask.new('ffmpeg_video_info_ext') do |e|
54
55
  e.config_includes = [recipe.path + '/include']
55
56
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.2.0
@@ -4,4 +4,4 @@ $CXXFLAGS += '-fPIC'
4
4
  have_library('avcodec') or raise
5
5
  have_library('avformat') or raise
6
6
 
7
- create_makefile('ffmpeg_video_info')
7
+ create_makefile('ffmpeg_video_info_ext')
@@ -341,8 +341,8 @@ VALUE get_info(VALUE self, VALUE arg)
341
341
  return res;
342
342
  }
343
343
  static VALUE rb_mFFmpegVideoInfo;
344
- void Init_ffmpeg_video_info()
344
+ void Init_ffmpeg_video_info_ext()
345
345
  {
346
- rb_mFFmpegVideoInfo = rb_define_module("FFmpegVideoInfo");
346
+ rb_mFFmpegVideoInfo = rb_define_module("FFmpegVideoInfoExt");
347
347
  rb_define_singleton_method(rb_mFFmpegVideoInfo, "get", get_info, 1);
348
348
  }
@@ -2,20 +2,20 @@
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: ffmpeg-video-info 0.1.7 ruby lib
6
- # stub: ext/ffmpeg_video_info/extconf.rb
5
+ # stub: ffmpeg-video-info 0.2.0 ruby lib
6
+ # stub: ext/ffmpeg_video_info_ext/extconf.rb
7
7
 
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "ffmpeg-video-info"
10
- s.version = "0.1.7"
10
+ s.version = "0.2.0"
11
11
 
12
12
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
13
13
  s.require_paths = ["lib"]
14
14
  s.authors = ["Pavel Tatarsky"]
15
- s.date = "2015-07-11"
15
+ s.date = "2015-07-13"
16
16
  s.description = "It only provides gathering info about media files"
17
17
  s.email = "fazzzenda@mail.ru"
18
- s.extensions = ["ext/ffmpeg_video_info/extconf.rb"]
18
+ s.extensions = ["ext/ffmpeg_video_info_ext/extconf.rb"]
19
19
  s.extra_rdoc_files = [
20
20
  "LICENSE.txt",
21
21
  "README.rdoc"
@@ -28,9 +28,10 @@ Gem::Specification.new do |s|
28
28
  "README.rdoc",
29
29
  "Rakefile",
30
30
  "VERSION",
31
- "ext/ffmpeg_video_info/extconf.rb",
32
- "ext/ffmpeg_video_info/ffmpeg_video_info.c",
31
+ "ext/ffmpeg_video_info_ext/extconf.rb",
32
+ "ext/ffmpeg_video_info_ext/ffmpeg_video_info_ext.c",
33
33
  "ffmpeg-video-info.gemspec",
34
+ "lib/ffmpeg_video_info.rb",
34
35
  "spec/fixtures/test.mp4",
35
36
  "spec/lib/info_spec.rb",
36
37
  "spec/spec_helper.rb"
@@ -0,0 +1,12 @@
1
+ require 'mini_portile'
2
+ module FFmpeg
3
+ Version = '2.7.1'
4
+ module Video
5
+ def self.info(path)
6
+ FFmpegVideoInfoExt.get(path)
7
+ end
8
+ end
9
+ recipe = MiniPortile.new('ffmpeg', FFmpeg::Version)
10
+ recipe.activate
11
+ end
12
+ autoload :FFmpegVideoInfoExt, 'ffmpeg_video_info_ext'
@@ -1,16 +1,16 @@
1
1
  require 'spec_helper'
2
2
  require 'ffmpeg_video_info'
3
3
  require 'ostruct'
4
- describe FFmpegVideoInfo do
5
- subject { FFmpegVideoInfo }
6
- context 'when .get' do
4
+ describe FFmpeg::Video do
5
+ subject { FFmpeg::Video }
6
+ context 'when .info' do
7
7
  context 'with wrong args' do
8
8
  specify do
9
- expect { subject.get('') }.to raise_error('ffmpeg: Unable to open input file')
9
+ expect { FFmpeg::Video.info('') }.to raise_error('ffmpeg: Unable to open input file')
10
10
  end
11
11
  end
12
12
  context 'with proper args' do
13
- subject { OpenStruct.new(FFmpegVideoInfo.get('./spec/fixtures/test.mp4')) }
13
+ subject { OpenStruct.new(FFmpeg::Video.info('./spec/fixtures/test.mp4')) }
14
14
  it 'prints proper data' do
15
15
  expect(subject.format_name).to eql 'mov,mp4,m4a,3gp,3g2,mj2'
16
16
  expect(subject.file_name).to eql './spec/fixtures/test.mp4'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ffmpeg-video-info
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Tatarsky
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-11 00:00:00.000000000 Z
11
+ date: 2015-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -112,7 +112,7 @@ description: It only provides gathering info about media files
112
112
  email: fazzzenda@mail.ru
113
113
  executables: []
114
114
  extensions:
115
- - ext/ffmpeg_video_info/extconf.rb
115
+ - ext/ffmpeg_video_info_ext/extconf.rb
116
116
  extra_rdoc_files:
117
117
  - LICENSE.txt
118
118
  - README.rdoc
@@ -124,9 +124,10 @@ files:
124
124
  - README.rdoc
125
125
  - Rakefile
126
126
  - VERSION
127
- - ext/ffmpeg_video_info/extconf.rb
128
- - ext/ffmpeg_video_info/ffmpeg_video_info.c
127
+ - ext/ffmpeg_video_info_ext/extconf.rb
128
+ - ext/ffmpeg_video_info_ext/ffmpeg_video_info_ext.c
129
129
  - ffmpeg-video-info.gemspec
130
+ - lib/ffmpeg_video_info.rb
130
131
  - spec/fixtures/test.mp4
131
132
  - spec/lib/info_spec.rb
132
133
  - spec/spec_helper.rb