greatseth / mediainfo

Ruby wrapper for the mediainfo CLI. http://mediainfo.sourceforge.net

This URL has Read+Write access

mediainfo / Rakefile
100644 37 lines (31 sloc) 0.864 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
require "rake/testtask"
load "Rakefile.cloud" if File.exist? "Rakefile.cloud"
 
Rake::TestTask.new do |t|
  t.libs << "test"
  t.test_files = FileList["test/*_test.rb"]
  t.verbose = true
end
 
task :default => :test
 
namespace :mediainfo do
  task :fixture do
    unless file = ENV["file"]
      puts "Usage: rake mediainfo:fixture file=/path/to/file"
      exit
    end
    fixture = File.expand_path "./test/fixtures/#{File.basename file}.txt"
    system "mediainfo #{file} > #{fixture}"
    if File.exist? fixture
      puts "Generated fixture #{fixture}."
    else
      puts "Error generating fixture. #{fixture} not created."
    end
  end
end
 
require "rubygems"
require "echoe"
 
Echoe.new "mediainfo" do |p|
  p.author = "Seth Thomas Rasmussen"
  p.email = "sethrasmussen@gmail.com"
  p.url = "http://greatseth.com"
  p.ignore_pattern = %w( test/**/* )
end