Permalink
Browse files

Renaming app to Voyeur

  • Loading branch information...
Peter Garbers
Peter Garbers committed Nov 9, 2011
1 parent f5a808a commit 448606f98d5fbbb13d78d683de2b3010e59eab90
View
@@ -1,4 +1,4 @@
source "http://rubygems.org"
-# Specify your gem's dependencies in SUPERvideo.gemspec
+# Specify your gem's dependencies in Voyeur.gemspec
gemspec
@@ -1,17 +1,17 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
-require "SUPERvideo/version"
+require "Voyeur/version"
Gem::Specification.new do |s|
- s.name = "SUPERvideo"
- s.version = SuperVideo::VERSION
+ s.name = "Voyeur"
+ s.version = Voyeur::VERSION
s.authors = ["Peter Garbers", "Hendrik F. Louw"]
s.email = ["peter.garbers@gmail.com", "hflouw@gmail.com"]
s.homepage = ""
s.summary = %q{Ruby library to convert common video formats to HTML5 formats}
- s.description = %q{TODO: Write full description for teh SUPERVideo}
+ s.description = %q{TODO: Write full description for teh Voyeur}
- s.rubyforge_project = "SUPERvideo"
+ s.rubyforge_project = "Voyeur"
s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
View
@@ -1,11 +0,0 @@
-require "SUPERvideo/version"
-require "SUPERvideo/video"
-require "SUPERvideo/exceptions"
-require "SUPERvideo/video_converter"
-require "SUPERvideo/video_converters/ogv_converter"
-require "SUPERvideo/video_converters/mp4_converter"
-require "SUPERvideo/video_converters/webm_converter"
-
-module SuperVideo
-
-end
Binary file not shown.
View
@@ -0,0 +1,7 @@
+require "Voyeur/version"
+require "Voyeur/video"
+require "Voyeur/exceptions"
+require "Voyeur/video_converter"
+require "Voyeur/video_converters/ogv_converter"
+require "Voyeur/video_converters/mp4_converter"
+require "Voyeur/video_converters/webm_converter"
@@ -1,4 +1,4 @@
-module SuperVideo
+module Voyeur
module Exceptions
class NoVideoPresent < StandardError; end
end
@@ -1,3 +1,3 @@
-module SuperVideo
+module Voyeur
VERSION = "0.0.1"
end
@@ -1,4 +1,4 @@
-module SuperVideo
+module Voyeur
class Video
attr_reader :filename
def initialize(options)
@@ -7,7 +7,7 @@ def initialize(options)
def convert(options)
format = options[:to]
- converter = SuperVideo::VideoConverter.create(format: format)
+ converter = Voyeur::VideoConverter.create(format: format)
converter.convert
end
end
@@ -1,10 +1,10 @@
-module SuperVideo
+module Voyeur
class VideoConverter
attr_accessor :input_video
attr_reader :output_video
def self.create(options)
- constant = SuperVideo
+ constant = Voyeur
klass = "#{options[:format].capitalize}Converter"
klass = constant.const_get(klass)
klass.new
@@ -13,12 +13,12 @@ def self.create(options)
def convert(options)
begin
@input_video = options[:video]
- raise SuperVideo::Exceptions::NoVideoPresent unless @input_video
+ raise Voyeur::Exceptions::NoVideoPresent unless @input_video
@output_video = Video.new(filename: self.output_file_name(@input_video.filename))
`ffmpeg -i #{@input_video.filename} #{self.convert_options} #{@output_video.filename}`
return {status: :success, video: @output_video}
- rescue SuperVideo::Exceptions::NoVideoPresent
+ rescue Voyeur::Exceptions::NoVideoPresent
warn "There was no video attached"
end
end
@@ -1,10 +1,10 @@
-module SuperVideo
+module Voyeur
class Mp4Converter < VideoConverter
-
+
def file_extension
"mp4"
end
-
+
def convert_options
"-b 1500k -vcodec libx264 -vpre slow -vpre baseline -g 30"
end
@@ -1,10 +1,10 @@
-module SuperVideo
+module Voyeur
class OgvConverter < VideoConverter
-
+
def file_extension
"ogv"
end
-
+
def convert_options
"-b 1500k -vcodec libtheora -acodec libvorbis -ab 160000 -g 30"
end
@@ -1,10 +1,10 @@
-module SuperVideo
+module Voyeur
class WebmConverter < VideoConverter
-
+
def file_extension
"webm"
end
-
+
def convert_options
"-b 1500k -vcodec libvpx -acodec libvorbis -ab 160000 -f webm -g 30"
end
@@ -1,12 +1,12 @@
-describe SuperVideo::Mp4Converter do
+describe Voyeur::Mp4Converter do
context "New Video" do
before :each do
- @converter = SuperVideo::VideoConverter.create(format: :mp4)
- @video = SuperVideo::Video.new(filename: 'test_video.mpeg')
+ @converter = Voyeur::VideoConverter.create(format: :mp4)
+ @video = Voyeur::Video.new(filename: 'test_video.mpeg')
end
it "should use the correct factory" do
- @converter.class.to_s.should == "SuperVideo::Mp4Converter"
+ @converter.class.to_s.should == "Voyeur::Mp4Converter"
end
context "#convert_options" do
@@ -1,12 +1,12 @@
-describe SuperVideo::OgvConverter do
+describe Voyeur::OgvConverter do
context "New Video" do
before :each do
- @converter = SuperVideo::VideoConverter.create(format: :ogv)
- @video = SuperVideo::Video.new(filename: 'test_video.ogv')
+ @converter = Voyeur::VideoConverter.create(format: :ogv)
+ @video = Voyeur::Video.new(filename: 'test_video.ogv')
end
it "should use the correct factory" do
- @converter.class.to_s.should == "SuperVideo::OgvConverter"
+ @converter.class.to_s.should == "Voyeur::OgvConverter"
end
context "#convert_options" do
@@ -1,12 +1,12 @@
- describe SuperVideo::WebmConverter do
+ describe Voyeur::WebmConverter do
context "New Video" do
before :each do
- @converter = SuperVideo::VideoConverter.create(format: :webm)
- @video = SuperVideo::Video.new(filename: 'test_video.webm')
+ @converter = Voyeur::VideoConverter.create(format: :webm)
+ @video = Voyeur::Video.new(filename: 'test_video.webm')
end
it "should use the correct factory" do
- @converter.class.to_s.should == "SuperVideo::WebmConverter"
+ @converter.class.to_s.should == "Voyeur::WebmConverter"
end
context "#convert_options" do
View
@@ -1,5 +1,5 @@
require 'rspec'
-require 'SUPERvideo'
+require 'Voyeur'
RSpec.configure do |config|
config.color_enabled = true
@@ -1,5 +1,5 @@
require 'spec_helper'
-describe SuperVideo::VideoConverter do
+describe Voyeur::VideoConverter do
end
View
@@ -1,9 +1,9 @@
require 'spec_helper'
-describe SuperVideo::Video do
+describe Voyeur::Video do
it 'should create a new video object from a filename' do
video_input_name = 'test_file.mpeg'
- video = SuperVideo::Video.new filename: video_input_name
+ video = Voyeur::Video.new filename: video_input_name
video.filename.should == video_input_name
end
@@ -28,5 +28,5 @@
it "should allow the user to specify a path" do
pending "Video.new( filename: 'filename.mpeg').convert to: ogv, output_base_filename: icecream.ogv"
end
-
+
end

0 comments on commit 448606f

Please sign in to comment.