Skip to content

Commit

Permalink
fix: cleanup Rakefile and README.txt to make it compliant with hoe
Browse files Browse the repository at this point in the history
  • Loading branch information
nel committed Feb 27, 2010
1 parent 9c616a0 commit 5e0d4f5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 14 deletions.
20 changes: 10 additions & 10 deletions README.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
=Hey!Watch - Video Encoding Web Service
= Hey!Watch - Video Encoding Web Service

Hey!Watch <http://heywatch.com> provides a simple and robust encoding plateform.
The service allows developers to access a fast, scalable and inexpensive web
Expand All @@ -8,9 +8,9 @@ in any web or desktop applications.
The documentation of the API can be found at http://wiki.heywatch.com/API_Documentation


==Getting started
== Getting started

===Transfer a video, encode it in ipod format and download the encoded video
=== Transfer a video, encode it in ipod format and download the encoded video

require 'heywatch'
include HeyWatch
Expand All @@ -31,7 +31,7 @@ The documentation of the API can be found at http://wiki.heywatch.com/API_Docume
puts "video saved in {path}"


===Upload a video from the disk, encode it with FTP auto transfer option
=== Upload a video from the disk, encode it with FTP auto transfer option

raw_video = Video.create(:file => 'videos/myvideo.avi', :title => 'Funny video') do |percent, total_size, received|
puts "#{percent}%"
Expand All @@ -40,20 +40,20 @@ The documentation of the API can be found at http://wiki.heywatch.com/API_Docume
Job.create :video_id => raw_video.id, :default_format => true, :ftp_directive => 'ftp://login:pass@host.com/heywatch_vids/'


===Generate a thumbnail
=== Generate a thumbnail

v = EncodedVideo.find(5400)
v.thumbnail :start => 15, :width => 640, :height => 480


===Update your account
=== Update your account

account = Account.find
account.update_attributes :ping_url_after_encode => 'http://yourhost.com/ping/encode'



==Integration in a rails application
== Integration in a rails application

This short HOWTO uses the ping options. So in your HeyWatch account, you must
configure all the ping URL (except transfer for this example).
Expand All @@ -64,15 +64,15 @@ Examples:
ping_url_if_error => http://myhost.com/ping/error


===Config
=== Config

In your config/environment.rb:

require 'heywatch'
HeyWatch::Base::establish_connection! :login => 'login', :password => 'passwd'


===Item Model
=== Item Model

create_table "items", :force => true do |t|
t.column "title", :string, :null => false
Expand Down Expand Up @@ -118,7 +118,7 @@ In app/models/item.rb:
end


===Ping Controller
=== Ping Controller

In app/controllers/ping_controller.rb:

Expand Down
4 changes: 0 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/testtask'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'rake/contrib/rubyforgepublisher'
require 'fileutils'
require 'hoe'
include FileUtils
require File.join(File.dirname(__FILE__), 'lib', 'heywatch', 'version')
Expand Down Expand Up @@ -52,7 +49,6 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
p.spec_extras = {:extra_rdoc_files => ["README.txt"], :rdoc_options => RDOC_OPTS} # A hash of extra values to set in the gemspec.
end


desc 'Generate website files'
task :website_generate do
Dir['website/**/*.txt'].each do |txt|
Expand Down

0 comments on commit 5e0d4f5

Please sign in to comment.