Permalink
Browse files

where did youtube-g go?

  • Loading branch information...
1 parent c26bf0f commit 6fec82f1ecbd85cb480f77b4879a9ed7b49b2f85 @kylejginavan kylejginavan committed May 1, 2011
View
BIN .DS_Store
Binary file not shown.
View
@@ -1,52 +0,0 @@
-* Implement video update and video delete in Upload
-* Refactor the uploader slightly
-* Use Builder to generate XML packets
-* Use a faster Camping-based URL escaper (also avoid cgi.rb)
-* Removed the logger nightmare, use YouTubeG.logger for everything whatever that may be
-* Use streams for file uploads instead of in-memory strings
-
-== 0.5.0 / 2009-01-07
-
-* Fixed bug in user favorites (thanks Pius Uzamere)
-
-== 0.4.9.9 / 2008-09-01
-
-* Add Geodata information (thanks Jose Galisteo)
-* Added :page and :per_page options, this allows easier usage of the will_paginate
- plugin with the library. The :offset and :max_results options are no longer available. [Daniel Insley]
-* Added ability to get video responses on the instances of the YouTube::Model::Video object. [Daniel Insley]
-* Added and improved the existing documentation [Daniel Insley]
-* Fixed usage of deprecated yt:racy, now using media:rating [Daniel Insley]
-* Renamed can_embed? method to embeddable? [Daniel Insley]
-* Added ability for padingation and ordering on standard feeds. [Daniel Insley]
-* Add error-handling for video upload errors. [FiXato]
-* Add error-handling for authentication errors from YouTube during video upload. [FiXato]
-* Add support for making videos private upon video upload. [FiXato]
-* Fix issue with REXML parsing of video upload response. [FiXato]
-* Fix issue with response code comparison. [FiXato]
-* Authcode is now retrieved for video uploads. [FiXato]
-* Add basic support for uploading videos [thanks Joe Damato]
-* Add basic support for related videos [tmm1]
-* Improve docs for order_by attribute [thanks Jason Arora]
-* Added support for the "racy" parameter (choices are "include" or "exclude") [thanks Jason Arora]
-* Add missing attribute reader for description [tmm1]
-* Fix issue with missing yt:statistics and viewCount [tmm1]
-* Allow Client#video_by to take either a url or a video id [tmm1]
-
-== 0.4.1 / 2008-02-11
-
-* Added 3GPP video format [shane]
-* Fixed tests [shane]
-
-== 0.4.0 / 2007-12-18
-
-* Fixed API projection in search URL [Pete Higgins]
-* Fixed embeddable video searching [Pete Higgins]
-* Fixed video embeddable detection [Pete Higgins]
-* Fixed unique id hyphen detection [Pete Higgins, Chris Taggart]
-
-== 0.3.0 / 2007-09-17
-
-* Initial public release
- * Birthday!
-
View
@@ -1,31 +0,0 @@
-History.txt
-Manifest.txt
-README.txt
-Rakefile
-TODO.txt
-lib/youtube_g.rb
-lib/youtube_g/chain_io.rb
-lib/youtube_g/client.rb
-lib/youtube_g/model/author.rb
-lib/youtube_g/model/category.rb
-lib/youtube_g/model/contact.rb
-lib/youtube_g/model/content.rb
-lib/youtube_g/model/playlist.rb
-lib/youtube_g/model/rating.rb
-lib/youtube_g/model/thumbnail.rb
-lib/youtube_g/model/user.rb
-lib/youtube_g/model/video.rb
-lib/youtube_g/parser.rb
-lib/youtube_g/record.rb
-lib/youtube_g/request/base_search.rb
-lib/youtube_g/request/standard_search.rb
-lib/youtube_g/request/user_search.rb
-lib/youtube_g/request/video_search.rb
-lib/youtube_g/request/video_upload.rb
-lib/youtube_g/response/video_search.rb
-lib/youtube_g/version.rb
-test/helper.rb
-test/test_chain_io.rb
-test/test_client.rb
-test/test_video.rb
-test/test_video_search.rb
View
@@ -0,0 +1,5 @@
+Hello all,
+
+This repository has moved to http://github.com/kylejginavan/youtube_it. The master branch that was here is the v0.0.3 branch in the new repository or the local zip file.
+
+-kylejginavan
View
@@ -1,97 +0,0 @@
-= youtube-g
-
-http://youtube-g.rubyforge.org/
-
-== DESCRIPTION:
-
-youtube-g is a pure Ruby client for the YouTube GData API. It provides an easy
-way to access the latest YouTube video search results from your own programs.
-In comparison with the earlier Youtube search interfaces, this new API and
-library offers much-improved flexibility around executing complex search
-queries to obtain well-targeted video search results.
-
-More detail on the underlying source Google-provided API is available at:
-
-http://code.google.com/apis/youtube/overview.html
-
-== AUTHORS
-
-Shane Vitarana and Walter Korman
-
-== WHERE TO GET HELP
-
-http://rubyforge.org/projects/youtube-g
-http://groups.google.com/group/ruby-youtube-library
-
-== FEATURES/PROBLEMS:
-
-* Aims to be in parity with Google's YouTube GData API. Core functionality
- is currently present -- work is in progress to fill in the rest.
-
-== SYNOPSIS:
-
-Create a client:
-
- require 'youtube_g'
- client = YouTubeG::Client.new
-
-Basic queries:
-
- client.videos_by(:query => "penguin")
- client.videos_by(:query => "penguin", :page => 2, :per_page => 15)
- client.videos_by(:tags => ['tiger', 'leopard'])
- client.videos_by(:categories => [:news, :sports])
- client.videos_by(:categories => [:news, :sports], :tags => ['soccer', 'football'])
- client.videos_by(:user => 'liz')
- client.videos_by(:favorites, :user => 'liz')
-
-Standard feeds:
-
- client.videos_by(:most_viewed)
- client.videos_by(:most_linked, :page => 3)
- client.videos_by(:top_rated, :time => :today)
-
-Advanced queries (with boolean operators OR (either), AND (include), NOT (exclude)):
-
- client.videos_by(:categories => { :either => [:news, :sports], :exclude => [:comedy] }, :tags => { :include => ['football'], :exclude => ['soccer'] })
-
-== LOGGING
-
-YouTubeG passes all logs through the logger variable on the class itself. In Rails context, assign the Rails logger to that variable to collect the messages
-(don't forget to set the level to debug):
-
- YouTubeG.logger = RAILS_DEFAULT_LOGGER
- RAILS_DEFAULT_LOGGER.level = Logger::DEBUG
-
-== REQUIREMENTS:
-
-* builder gem
-
-== INSTALL:
-
-* sudo gem install youtube-g
-
-== LICENSE:
-
-MIT License
-
-Copyright (c) 2007 Shane Vitarana and Walter Korman
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-'Software'), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,24 +0,0 @@
-require 'rubygems'
-require 'hoe'
-require 'lib/youtube_g/version'
-
-Hoe.new('youtube-g', YouTubeG::VERSION) do |p|
- p.rubyforge_name = 'youtube-g'
- p.author = ["Shane Vitarana", "Walter Korman", "Aman Gupta", "Filip H.F. Slagter", "msp"]
- p.email = 'shanev@gmail.com'
- p.summary = 'Ruby client for the YouTube GData API'
- p.url = 'http://rubyforge.org/projects/youtube-g/'
- p.extra_deps << 'builder'
- p.remote_rdoc_dir = ''
-end
-
-desc 'Tag release'
-task :tag do
- svn_root = 'svn+ssh://drummr77@rubyforge.org/var/svn/youtube-g'
- sh %(svn cp #{svn_root}/trunk #{svn_root}/tags/release-#{YouTubeG::VERSION} -m "Tag YouTubeG release #{YouTubeG::VERSION}")
-end
-
-desc 'Load the library in an IRB session'
-task :console do
- sh %(irb -r lib/youtube_g.rb)
-end
View
@@ -1,16 +0,0 @@
-[ ] stub out http request/response cycle for tests
-[ ] allow specifying values as single items where you don't need to wrap in a list, e.g. :tags => :chickens instead of :tags => [ 'chickens' ]
-[ ] make sure symbols will work as well as tags everywhere (again, :tags => :chickens is same as :tags => 'chickens')
-[ ] figure out better structure for class/file (either rename request/video_search.rb or split into one class per file again)
-[ ] restore spaces after method def names
-[ ] use a proxy for testing with static sample result xml so we have repeatable tests
-[ ] Clean up tests using Shoulda to define contexts
-[ ] Allow :category and :categories for query DSL
-[ ] Exception handling
-
-== API Features TODO
-
-[ ] Profile feed parsing
-[ ] Playlist feeds
-[ ] User subscriptions
-[ ] Video comments
View
@@ -1,67 +0,0 @@
-require 'logger'
-require 'open-uri'
-require 'net/https'
-require 'digest/md5'
-require 'rexml/document'
-require 'builder'
-
-class YouTubeG
-
- # Base error class for the extension
- class Error < RuntimeError
- end
-
- # URL-escape a string. Stolen from Camping (wonder how many Ruby libs in the wild can say the same)
- def self.esc(s) #:nodoc:
- s.to_s.gsub(/[^ \w.-]+/n){'%'+($&.unpack('H2'*$&.size)*'%').upcase}.tr(' ', '+')
- end
-
- # Set the logger for the library
- def self.logger=(any_logger)
- @logger = any_logger
- end
-
- # Get the logger for the library (by default will log to STDOUT). TODO: this is where we grab the Rails logger too
- def self.logger
- @logger ||= create_default_logger
- end
-
- # Gets mixed into the classes to provide the logger method
- module Logging #:nodoc:
-
- # Return the base logger set for the library
- def logger
- YouTubeG.logger
- end
- end
-
- private
- def self.create_default_logger
- logger = Logger.new(STDOUT)
- logger.level = Logger::DEBUG
- logger
- end
-end
-
-%w(
- version
- client
- record
- parser
- model/author
- model/category
- model/contact
- model/content
- model/playlist
- model/rating
- model/thumbnail
- model/user
- model/video
- request/base_search
- request/user_search
- request/standard_search
- request/video_upload
- request/video_search
- response/video_search
- chain_io
-).each{|m| require File.dirname(__FILE__) + '/youtube_g/' + m }
View
@@ -1,71 +0,0 @@
-require 'delegate'
-#:stopdoc:
-
-# Stream wrapper that reads IOs in succession. Can be fed to Net::HTTP as post body stream. We use it internally to stream file content
-# instead of reading whole video files into memory. Strings passed to the constructor will be wrapped in StringIOs. By default it will auto-close
-# file handles when they have been read completely to prevent our uploader from leaking file handles
-#
-# chain = ChainIO.new(File.open(__FILE__), File.open('/etc/passwd'), "abcd")
-class YouTubeG::ChainIO
- attr_accessor :autoclose
-
- def initialize(*any_ios)
- @autoclose = true
- @chain = any_ios.flatten.map{|e| e.respond_to?(:read) ? e : StringIO.new(e.to_s) }
- end
-
- def read(buffer_size = 1024)
- # Read off the first element in the stack
- current_io = @chain.shift
- return false if !current_io
-
- buf = current_io.read(buffer_size)
- if !buf && @chain.empty? # End of streams
- release_handle(current_io) if @autoclose
- false
- elsif !buf # This IO is depleted, but next one is available
- release_handle(current_io) if @autoclose
- read(buffer_size)
- elsif buf.length < buffer_size # This IO is depleted, but we were asked for more
- release_handle(current_io) if @autoclose
- buf + (read(buffer_size - buf.length) || '') # and recurse
- else # just return the buffer
- @chain.unshift(current_io) # put the current back
- buf
- end
- end
-
- # Predict the length of all embedded IOs. Will automatically send file size.
- def expected_length
- @chain.inject(0) do | len, io |
- if io.respond_to?(:length)
- len + (io.length - io.pos)
- elsif io.is_a?(File)
- len + File.size(io.path) - io.pos
- else
- raise "Cannot predict length of #{io.inspect}"
- end
- end
- end
-
- private
- def release_handle(io)
- io.close if io.respond_to?(:close)
- end
-end
-
-# Net::HTTP only can send chunks of 1024 bytes. This is very inefficient, so we have a spare IO that will send more when asked for 1024.
-# We use delegation because the read call is recursive.
-class YouTubeG::GreedyChainIO < DelegateClass(YouTubeG::ChainIO)
- BIG_CHUNK = 512 * 1024 # 500 kb
-
- def initialize(*with_ios)
- __setobj__(YouTubeG::ChainIO.new(with_ios))
- end
-
- def read(any_buffer_size)
- __getobj__.read(BIG_CHUNK)
- end
-end
-
-#:startdoc:
Oops, something went wrong.

0 comments on commit 6fec82f

Please sign in to comment.