youtube_it 2.0.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,11 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'oauth'
4
+ gem 'simple_oauth'
5
+ gem 'builder'
6
+ gem 'faraday'
7
+ gem 'nokogiri'
8
+
9
+ group :test do
10
+ gem 'webmock'
11
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,29 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ addressable (2.2.6)
5
+ builder (3.0.0)
6
+ crack (0.3.1)
7
+ faraday (0.7.5)
8
+ addressable (~> 2.2.6)
9
+ multipart-post (~> 1.1.3)
10
+ rack (>= 1.1.0, < 2)
11
+ multipart-post (1.1.4)
12
+ nokogiri (1.5.0)
13
+ oauth (0.4.5)
14
+ rack (1.3.5)
15
+ simple_oauth (0.1.5)
16
+ webmock (1.7.7)
17
+ addressable (~> 2.2, > 2.2.5)
18
+ crack (>= 0.1.7)
19
+
20
+ PLATFORMS
21
+ ruby
22
+
23
+ DEPENDENCIES
24
+ builder
25
+ faraday
26
+ nokogiri
27
+ oauth
28
+ simple_oauth
29
+ webmock
data/README.rdoc CHANGED
@@ -15,6 +15,14 @@
15
15
 
16
16
  Note: youtube_it supports ClientLogin(YouTube account), OAuth or AuthSub authentication methods.
17
17
 
18
+ == Example Rails 3 App
19
+
20
+ You can get an example how you can use youtube_it with Rails 3 here: http://github.com/chebyte/youtube_it_rails_app_example
21
+
22
+ == DEMO
23
+
24
+ You can see to youtube_it in action here: http://youtube-it.heroku.com
25
+
18
26
  == ESTABLISHING A CLIENT
19
27
 
20
28
  Creating a client:
@@ -47,6 +55,7 @@ Basic Queries:
47
55
  $ client.videos_by(:user => 'liz')
48
56
  $ client.videos_by(:favorites, :user => 'liz')
49
57
  $ client.video_by("FQK1URcxmb4")
58
+ $ client.video_by("https://www.youtube.com/watch?v=QsbmrCtiEUU")
50
59
  $ client.video_by_user("chebyte","FQK1URcxmb4")
51
60
 
52
61
  Standard Queries:
@@ -146,6 +155,21 @@ Add Video To Playlist:
146
155
 
147
156
  Remove Video From Playlist:
148
157
  $ client.remove_video_from_playlist(playlist_id, playlist_entry_id)
158
+
159
+ List Related Videos
160
+ $ video = client.video_by("https://www.youtube.com/watch?v=QsbmrCtiEUU&feature=player_embedded")
161
+ $ video.related.videos
162
+
163
+ Add Response Video
164
+ $ video.add_response(original_video_id, response_video_id)
165
+
166
+ Delete Response Video
167
+ $ video.delete_response(original_video_id, response_video_id)
168
+
169
+ List Response Videos
170
+ $ video = client.video_by("https://www.youtube.com/watch?v=QsbmrCtiEUU&feature=player_embedded")
171
+ $ video.responses.videos
172
+
149
173
 
150
174
  == ACCESS CONTROL LIST
151
175
 
@@ -212,19 +236,13 @@ YouTubeIt passes all logs through the logger variable on the class itself. In Ra
212
236
  $ YouTubeIt.logger = RAILS_DEFAULT_LOGGER
213
237
  $ RAILS_DEFAULT_LOGGER.level = Logger::DEBUG
214
238
 
215
- == Example Rails 3 App
216
-
217
- You can get an example how you can use youtube_it with Rails 3 here: http://github.com/chebyte/youtube_it_rails_app_example
218
-
219
- == DEMO
220
-
221
- You can see to youtube_it in action here: http://youtube-it.heroku.com
222
-
223
239
  == CONTRIBUTORS:
224
240
 
225
241
  * Kyle J. Ginavan.
226
242
  * Mauro Torres - http://github.com/chebyte
227
243
  * Marko Seppa - https://github.com/mseppae
244
+ * Walter Korman - https://github.com/shaper
245
+ * Shane Vitarana - https://github.com/shanev
228
246
 
229
247
  == LICENSE:
230
248
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.1
1
+ 2.1.0
@@ -83,8 +83,15 @@ class YouTubeIt
83
83
  #
84
84
  # === Returns
85
85
  # YouTubeIt::Model::Video
86
- def video_by(vid)
87
- video_id = vid =~ /^http/ ? vid : "http://gdata.youtube.com/feeds/api/videos/#{vid}?v=2#{@dev_key ? '&key='+@dev_key : ''}"
86
+ def video_by(video)
87
+ vid = nil
88
+ vid_regex = /(?:youtube.com|youtu.be).*(?:\/|v=)(\w+)/
89
+ if video =~ vid_regex
90
+ vid = $1
91
+ else
92
+ vid = video
93
+ end
94
+ video_id ="http://gdata.youtube.com/feeds/api/videos/#{vid}?v=2#{@dev_key ? '&key='+@dev_key : ''}"
88
95
  parser = YouTubeIt::Parser::VideoFeedParser.new(video_id)
89
96
  parser.parse
90
97
  end
@@ -194,6 +201,14 @@ class YouTubeIt
194
201
  def enable_http_debugging
195
202
  client.enable_http_debugging
196
203
  end
204
+
205
+ def add_response(original_video_id, response_video_id)
206
+ client.add_response(original_video_id, response_video_id)
207
+ end
208
+
209
+ def delete_response(original_video_id, response_video_id)
210
+ client.delete_response(original_video_id, response_video_id)
211
+ end
197
212
 
198
213
  def current_user
199
214
  client.get_current_user
@@ -355,14 +370,16 @@ class YouTubeIt
355
370
  end
356
371
 
357
372
  def current_user
358
- yt_session = Faraday.new(:url => "http://gdata.youtube.com") do |builder|
359
- builder.use Faraday::Response::YouTubeIt
360
- builder.use Faraday::Request::OAuth, config_token
361
- builder.adapter Faraday.default_adapter
373
+ profile = access_token.get("http://gdata.youtube.com/feeds/api/users/default")
374
+ response_code = profile.code.to_i
375
+
376
+ if response_code/10 == 20 # success
377
+ REXML::Document.new(profile.body).elements["entry"].elements['author'].elements['name'].text
378
+ elsif response_code == 403 || response_code == 401 # auth failure
379
+ raise YouTubeIt::Upload::AuthenticationError.new(profile.inspect, response_code)
380
+ else
381
+ raise YouTubeIt::Upload::UploadError.new(profile.inspect, response_code)
362
382
  end
363
-
364
- body = yt_session.get("/feeds/api/users/default").body
365
- REXML::Document.new(body).elements["entry"].elements['author'].elements['name'].text
366
383
  end
367
384
 
368
385
  private
@@ -130,17 +130,15 @@ class YouTubeIt
130
130
  # === Returns
131
131
  # YouTubeIt::Response::VideoSearch
132
132
  def related
133
- YouTubeIt::Parser::VideosFeedParser.new("http://gdata.youtube.com/feeds/api/videos/#{unique_id}/related").parse
133
+ YouTubeIt::Parser::VideosFeedParser.new("http://gdata.youtube.com/feeds/api/videos/#{unique_id}/related?v=2").parse
134
134
  end
135
-
136
135
  # Video responses to the current video.
137
136
  #
138
137
  # === Returns
139
138
  # YouTubeIt::Response::VideoSearch
140
139
  def responses
141
- YouTubeIt::Parser::VideosFeedParser.new("http://gdata.youtube.com/feeds/api/videos/#{unique_id}/responses").parse
140
+ YouTubeIt::Parser::VideosFeedParser.new("http://gdata.youtube.com/feeds/api/videos/#{unique_id}/responses?v=2").parse
142
141
  end
143
-
144
142
  # The ID of the video, useful for searching for the video again without having to store it anywhere.
145
143
  # A regular query search, with this id will return the same video.
146
144
  #
@@ -2,7 +2,7 @@ class YouTubeIt
2
2
  module Parser #:nodoc:
3
3
  class FeedParser #:nodoc:
4
4
  def initialize(content)
5
- @content = open(content).read
5
+ @content = (content =~ URI::regexp(%w(http https)) ? open(content).read : content)
6
6
 
7
7
  rescue OpenURI::HTTPError => e
8
8
  raise OpenURI::HTTPError.new(e.io.status[0],e)
@@ -41,8 +41,8 @@ class YouTubeIt
41
41
  protected
42
42
  def parse_entry(entry)
43
43
  author = YouTubeIt::Model::Author.new(
44
- :name => entry.elements["author"].elements["name"].text,
45
- :uri => entry.elements["author"].elements["uri"].text
44
+ :name => (entry.elements["author"].elements["name"].text rescue nil),
45
+ :uri => (entry.elements["author"].elements["uri"].text rescue nil)
46
46
  )
47
47
  YouTubeIt::Model::Comment.new(
48
48
  :author => author,
@@ -1,5 +1,20 @@
1
1
  class YouTubeIt
2
2
  module Upload
3
+
4
+ class UploadError < YouTubeIt::Error; end
5
+
6
+ class AuthenticationError < YouTubeIt::Error; end
7
+
8
+ # Implements video uploads/updates/deletions
9
+ #
10
+ # require 'youtube_it'
11
+ #
12
+ # uploader = YouTubeIt::Upload::VideoUpload.new("user", "pass", "dev-key")
13
+ # uploader.upload File.open("test.m4v"), :title => 'test',
14
+ # :description => 'cool vid d00d',
15
+ # :category => 'People',
16
+ # :keywords => %w[cool blah test]
17
+ #
3
18
  class VideoUpload
4
19
  include YouTubeIt::Logging
5
20
 
@@ -60,7 +75,7 @@ class YouTubeIt
60
75
  @opts = { :mime_type => 'video/mp4',
61
76
  :title => '',
62
77
  :description => '',
63
- :category => '',
78
+ :category => 'People',
64
79
  :keywords => [] }.merge(opts)
65
80
 
66
81
  @opts[:filename] ||= generate_uniq_filename_from(data)
@@ -88,7 +103,11 @@ class YouTubeIt
88
103
  # :private
89
104
  # When the authentication credentials are incorrect, an AuthenticationError will be raised.
90
105
  def update(video_id, options)
91
- @opts = options
106
+ @opts = { :title => '',
107
+ :description => '',
108
+ :category => 'People',
109
+ :keywords => [] }.merge(options)
110
+
92
111
  update_body = video_xml
93
112
  update_url = "/feeds/api/users/default/uploads/%s" % video_id
94
113
  response = yt_session.put(update_url, update_body)
@@ -156,7 +175,6 @@ class YouTubeIt
156
175
  comment_url = "/feeds/api/videos/%s/comments?" % video_id
157
176
  comment_url << opts.collect { |k,p| [k,p].join '=' }.join('&')
158
177
  response = yt_session.get(comment_url)
159
-
160
178
  return YouTubeIt::Parser::CommentsFeedParser.new(response).parse
161
179
  end
162
180
 
@@ -289,6 +307,22 @@ class YouTubeIt
289
307
 
290
308
  return REXML::Document.new(response.body).elements["entry"].elements['author'].elements['name'].text
291
309
  end
310
+
311
+ def add_response(original_video_id, response_video_id)
312
+ response_body = video_xml_for(:response => response_video_id)
313
+ response_url = "/feeds/api/videos/%s/responses" % original_video_id
314
+ response = yt_session.post(response_url, response_body)
315
+
316
+ return {:code => response.status, :body => response.body}
317
+ end
318
+
319
+ def delete_response(original_video_id, response_video_id)
320
+ response_url = "/feeds/api/videos/%s/responses/%s" % [original_video_id, response_video_id]
321
+ response = yt_session.delete(response_url)
322
+
323
+ return {:code => response.status, :body => response.body}
324
+ end
325
+
292
326
 
293
327
  private
294
328
 
@@ -315,6 +349,36 @@ class YouTubeIt
315
349
  header
316
350
  end
317
351
 
352
+ def parse_upload_error_from(string)
353
+ begin
354
+ REXML::Document.new(string).elements["//errors"].inject('') do | all_faults, error|
355
+ if error.elements["internalReason"]
356
+ msg_error = error.elements["internalReason"].text
357
+ elsif error.elements["location"]
358
+ msg_error = error.elements["location"].text[/media:group\/media:(.*)\/text\(\)/,1]
359
+ else
360
+ msg_error = "Unspecified error"
361
+ end
362
+ code = error.elements["code"].text if error.elements["code"]
363
+ all_faults + sprintf("%s: %s\n", msg_error, code)
364
+ end
365
+ rescue
366
+ string[/<TITLE>(.+)<\/TITLE>/, 1] || string
367
+ end
368
+ end
369
+
370
+ def raise_on_faulty_response(response)
371
+ response_code = response.code.to_i
372
+ msg = parse_upload_error_from(response.body.gsub(/\n/, ''))
373
+
374
+ if response_code == 403 || response_code == 401
375
+ #if response_code / 10 == 40
376
+ raise AuthenticationError.new(msg, response_code)
377
+ elsif response_code / 10 != 20 # Response in 20x means success
378
+ raise UploadError.new(msg, response_code)
379
+ end
380
+ end
381
+
318
382
  def uploaded_video_id_from(string)
319
383
  xml = REXML::Document.new(string)
320
384
  xml.elements["//id"].text[/videos\/(.+)/, 1]
@@ -342,7 +406,7 @@ class YouTubeIt
342
406
 
343
407
  def auth_token
344
408
  @auth_token ||= begin
345
- http = Faraday.new("https://www.google.com")
409
+ http = Faraday.new("https://www.google.com", :ssl => {:verify => false})
346
410
  body = "Email=#{YouTubeIt.esc @user}&Passwd=#{YouTubeIt.esc @password}&service=youtube&source=#{YouTubeIt.esc @client_id}"
347
411
  response = http.post("/youtube/accounts/ClientLogin", body, "Content-Type" => "application/x-www-form-urlencoded")
348
412
  raise ::AuthenticationError.new(response.body[/Error=(.+)/,1], response.status.to_i) if response.status.to_i != 200
@@ -378,7 +442,7 @@ class YouTubeIt
378
442
  b.instruct!
379
443
  b.entry(:xmlns => "http://www.w3.org/2005/Atom", 'xmlns:yt' => "http://gdata.youtube.com/schemas/2007") do | m |
380
444
  m.content(data[:comment]) if data[:comment]
381
- m.id(data[:favorite] || data[:playlist]) if data[:favorite] || data[:playlist]
445
+ m.id(data[:favorite] || data[:playlist] || data[:response]) if data[:favorite] || data[:playlist] || data[:response]
382
446
  m.tag!("yt:rating", :value => data[:rating]) if data[:rating]
383
447
  if(data[:subscribe])
384
448
  m.category(:scheme => "http://gdata.youtube.com/schemas/2007/subscriptiontypes.cat", :term => "channel")
@@ -420,11 +484,12 @@ class YouTubeIt
420
484
  end
421
485
 
422
486
  def yt_session(url = nil)
423
- Faraday.new(:url => url ? url : base_url) do |builder|
487
+ Faraday.new(:url => (url ? url : base_url), :ssl => {:verify => false}) do |builder|
424
488
  builder.use Faraday::Request::OAuth, @config_token if @config_token
425
489
  builder.use Faraday::Request::AuthHeader, authorization_headers
426
490
  builder.use Faraday::Response::YouTubeIt
427
- builder.adapter Faraday.default_adapter
491
+ builder.adapter Faraday.default_adapter
492
+
428
493
  end
429
494
  end
430
495
  end
data/lib/youtube_it.rb CHANGED
@@ -8,16 +8,21 @@ require 'oauth'
8
8
  require 'faraday'
9
9
 
10
10
  class YouTubeIt
11
-
11
+
12
12
  # Base error class for the extension
13
13
  class Error < RuntimeError
14
+ attr_reader :code
15
+ def initialize(msg, code = 0)
16
+ super(msg)
17
+ @code = code
18
+ end
14
19
  end
15
-
16
- # URL-escape a string. Stolen from Camping (wonder how many Ruby libs in the wild can say the same)
20
+
17
21
  def self.esc(s) #:nodoc:
18
- s.to_s.gsub(/[^ \w.-]+/n){'%'+($&.unpack('H2'*$&.size)*'%').upcase}.tr(' ', '+')
22
+ # URI encodes correctly Unicode characters
23
+ URI.encode(s.to_s.tr(' ','+'))
19
24
  end
20
-
25
+
21
26
  # Set the logger for the library
22
27
  def self.logger=(any_logger)
23
28
  @logger = any_logger
@@ -27,16 +32,16 @@ class YouTubeIt
27
32
  def self.logger
28
33
  @logger ||= create_default_logger
29
34
  end
30
-
35
+
31
36
  # Gets mixed into the classes to provide the logger method
32
37
  module Logging #:nodoc:
33
-
38
+
34
39
  # Return the base logger set for the library
35
40
  def logger
36
41
  YouTubeIt.logger
37
42
  end
38
43
  end
39
-
44
+
40
45
  private
41
46
  def self.create_default_logger
42
47
  logger = Logger.new(STDOUT)
@@ -45,7 +50,7 @@ class YouTubeIt
45
50
  end
46
51
  end
47
52
 
48
- %w(
53
+ %w(
49
54
  version
50
55
  client
51
56
  record
@@ -69,8 +74,8 @@ end
69
74
  request/video_upload
70
75
  request/video_search
71
76
  response/video_search
72
- middleware/faraday_authheader.rb
73
- middleware/faraday_oauth.rb
77
+ middleware/faraday_authheader.rb
78
+ middleware/faraday_oauth.rb
74
79
  middleware/faraday_youtubeit.rb
75
80
  chain_io
76
81
  ).each{|m| require File.dirname(__FILE__) + '/youtube_it/' + m }
data/test/test_client.rb CHANGED
@@ -1,3 +1,5 @@
1
+ #encoding: utf-8
2
+
1
3
  require File.expand_path(File.dirname(__FILE__) + '/helper')
2
4
 
3
5
  class TestClient < Test::Unit::TestCase
@@ -233,13 +235,13 @@ class TestClient < Test::Unit::TestCase
233
235
  assert video.noembed
234
236
  @client.video_delete(video.unique_id)
235
237
  end
236
-
238
+
237
239
 
238
240
  def test_should_add_new_comment
239
241
  video = @client.video_upload(File.open("test/test.mov"), OPTIONS)
240
242
  @client.add_comment(video.unique_id, "test comment")
241
243
  comment = @client.comments(video.unique_id).first.content
242
- assert comment.match(/test comment/)
244
+ assert comment, "test comment"
243
245
  @client.video_delete(video.unique_id)
244
246
  end
245
247
 
@@ -342,6 +344,21 @@ class TestClient < Test::Unit::TestCase
342
344
  sleep 4
343
345
  assert @client.delete_favorite(video_id)
344
346
  end
347
+
348
+ def test_esc
349
+ result = YouTubeIt.esc("спят усталые игрушки")
350
+ assert result, "спят+усталые+игрушки"
351
+ end
352
+
353
+ def test_unicode_query
354
+ videos = @client.videos_by(:query => 'спят усталые игрушки').videos
355
+ assert videos.map(&:unique_id).include?("w-7BT2CFYNU")
356
+ end
357
+
358
+ def test_return_video_by_url
359
+ video = @client.video_by("https://www.youtube.com/watch?v=EkF4JD2rO3Q")
360
+ assert_valid_video video
361
+ end
345
362
 
346
363
  private
347
364
 
data/test/test_video.rb CHANGED
@@ -15,9 +15,9 @@ class TestVideo < Test::Unit::TestCase
15
15
  video = YouTubeIt::Model::Video.new(:video_id => "tag:youtube.com,2008:video:BDqs-OZWw9o")
16
16
  response = video.related
17
17
 
18
- assert_equal "http://gdata.youtube.com/feeds/api/videos/BDqs-OZWw9o/related", response.feed_id
18
+ assert_equal "tag:youtube.com,2008:video:BDqs-OZWw9o:related", response.feed_id
19
19
  assert_equal 25, response.max_result_count
20
- assert_equal 25, response.videos.length
20
+ assert_equal 23, response.videos.length
21
21
  assert_equal 1, response.offset
22
22
  assert(response.total_result_count > 0)
23
23
  assert_instance_of Time, response.updated_at
@@ -27,7 +27,7 @@ class TestVideo < Test::Unit::TestCase
27
27
  video = YouTubeIt::Model::Video.new(:video_id => "tag:youtube.com,2008:video:BDqs-OZWw9o")
28
28
  response = video.responses
29
29
 
30
- assert_equal "http://gdata.youtube.com/feeds/api/videos/BDqs-OZWw9o/responses", response.feed_id
30
+ assert_equal "tag:youtube.com,2008:video:BDqs-OZWw9o:responses", response.feed_id
31
31
  assert_equal 25, response.max_result_count
32
32
  assert_equal 25, response.videos.length
33
33
  assert_equal 1, response.offset
data/youtube_it.gemspec CHANGED
@@ -5,17 +5,19 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{youtube_it}
8
- s.version = "2.0.1"
8
+ s.version = "2.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = [%q{kylejginavan}, %q{chebyte}, %q{mseppae}]
12
- s.date = %q{2011-09-02}
11
+ s.authors = ["kylejginavan", "chebyte", "mseppae"]
12
+ s.date = %q{2011-12-16}
13
13
  s.description = %q{Upload, delete, update, comment on youtube videos all from one gem.}
14
14
  s.email = %q{kylejginavan@gmail.com}
15
15
  s.extra_rdoc_files = [
16
16
  "README.rdoc"
17
17
  ]
18
18
  s.files = [
19
+ "Gemfile",
20
+ "Gemfile.lock",
19
21
  "Manifest.txt",
20
22
  "README.rdoc",
21
23
  "Rakefile",
@@ -61,34 +63,40 @@ Gem::Specification.new do |s|
61
63
  "youtube_it.gemspec"
62
64
  ]
63
65
  s.homepage = %q{http://github.com/kylejginavan/youtube_it}
64
- s.require_paths = [%q{lib}]
65
- s.rubygems_version = %q{1.8.8}
66
+ s.require_paths = ["lib"]
67
+ s.rubygems_version = %q{1.5.2}
66
68
  s.summary = %q{The most complete Ruby wrapper for youtube api's}
67
- s.test_files = [
68
- "test/helper.rb",
69
- "test/test_chain_io.rb",
70
- "test/test_client.rb",
71
- "test/test_field_search.rb",
72
- "test/test_video.rb",
73
- "test/test_video_feed_parser.rb",
74
- "test/test_video_search.rb"
75
- ]
76
69
 
77
70
  if s.respond_to? :specification_version then
78
71
  s.specification_version = 3
79
72
 
80
73
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
74
+ s.add_runtime_dependency(%q<oauth>, [">= 0"])
75
+ s.add_runtime_dependency(%q<simple_oauth>, [">= 0"])
76
+ s.add_runtime_dependency(%q<builder>, [">= 0"])
77
+ s.add_runtime_dependency(%q<faraday>, [">= 0"])
78
+ s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
81
79
  s.add_runtime_dependency(%q<oauth>, [">= 0.4.4"])
82
80
  s.add_runtime_dependency(%q<simple_oauth>, [">= 0.1.5"])
83
81
  s.add_runtime_dependency(%q<faraday>, [">= 0.7.3"])
84
82
  s.add_runtime_dependency(%q<builder>, [">= 0"])
85
83
  else
84
+ s.add_dependency(%q<oauth>, [">= 0"])
85
+ s.add_dependency(%q<simple_oauth>, [">= 0"])
86
+ s.add_dependency(%q<builder>, [">= 0"])
87
+ s.add_dependency(%q<faraday>, [">= 0"])
88
+ s.add_dependency(%q<nokogiri>, [">= 0"])
86
89
  s.add_dependency(%q<oauth>, [">= 0.4.4"])
87
90
  s.add_dependency(%q<simple_oauth>, [">= 0.1.5"])
88
91
  s.add_dependency(%q<faraday>, [">= 0.7.3"])
89
92
  s.add_dependency(%q<builder>, [">= 0"])
90
93
  end
91
94
  else
95
+ s.add_dependency(%q<oauth>, [">= 0"])
96
+ s.add_dependency(%q<simple_oauth>, [">= 0"])
97
+ s.add_dependency(%q<builder>, [">= 0"])
98
+ s.add_dependency(%q<faraday>, [">= 0"])
99
+ s.add_dependency(%q<nokogiri>, [">= 0"])
92
100
  s.add_dependency(%q<oauth>, [">= 0.4.4"])
93
101
  s.add_dependency(%q<simple_oauth>, [">= 0.1.5"])
94
102
  s.add_dependency(%q<faraday>, [">= 0.7.3"])
metadata CHANGED
@@ -1,8 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: youtube_it
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 11
4
5
  prerelease:
5
- version: 2.0.1
6
+ segments:
7
+ - 2
8
+ - 1
9
+ - 0
10
+ version: 2.1.0
6
11
  platform: ruby
7
12
  authors:
8
13
  - kylejginavan
@@ -12,52 +17,141 @@ autorequire:
12
17
  bindir: bin
13
18
  cert_chain: []
14
19
 
15
- date: 2011-09-02 00:00:00 Z
20
+ date: 2011-12-16 00:00:00 -06:00
21
+ default_executable:
16
22
  dependencies:
17
23
  - !ruby/object:Gem::Dependency
18
- name: oauth
19
- prerelease: false
24
+ type: :runtime
20
25
  requirement: &id001 !ruby/object:Gem::Requirement
21
26
  none: false
22
27
  requirements:
23
28
  - - ">="
24
29
  - !ruby/object:Gem::Version
25
- version: 0.4.4
26
- type: :runtime
30
+ hash: 3
31
+ segments:
32
+ - 0
33
+ version: "0"
34
+ name: oauth
27
35
  version_requirements: *id001
28
- - !ruby/object:Gem::Dependency
29
- name: simple_oauth
30
36
  prerelease: false
37
+ - !ruby/object:Gem::Dependency
38
+ type: :runtime
31
39
  requirement: &id002 !ruby/object:Gem::Requirement
32
40
  none: false
33
41
  requirements:
34
42
  - - ">="
35
43
  - !ruby/object:Gem::Version
36
- version: 0.1.5
37
- type: :runtime
44
+ hash: 3
45
+ segments:
46
+ - 0
47
+ version: "0"
48
+ name: simple_oauth
38
49
  version_requirements: *id002
39
- - !ruby/object:Gem::Dependency
40
- name: faraday
41
50
  prerelease: false
51
+ - !ruby/object:Gem::Dependency
52
+ type: :runtime
42
53
  requirement: &id003 !ruby/object:Gem::Requirement
43
54
  none: false
44
55
  requirements:
45
56
  - - ">="
46
57
  - !ruby/object:Gem::Version
47
- version: 0.7.3
48
- type: :runtime
49
- version_requirements: *id003
50
- - !ruby/object:Gem::Dependency
58
+ hash: 3
59
+ segments:
60
+ - 0
61
+ version: "0"
51
62
  name: builder
63
+ version_requirements: *id003
52
64
  prerelease: false
65
+ - !ruby/object:Gem::Dependency
66
+ type: :runtime
53
67
  requirement: &id004 !ruby/object:Gem::Requirement
54
68
  none: false
55
69
  requirements:
56
70
  - - ">="
57
71
  - !ruby/object:Gem::Version
72
+ hash: 3
73
+ segments:
74
+ - 0
58
75
  version: "0"
59
- type: :runtime
76
+ name: faraday
60
77
  version_requirements: *id004
78
+ prerelease: false
79
+ - !ruby/object:Gem::Dependency
80
+ type: :runtime
81
+ requirement: &id005 !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ hash: 3
87
+ segments:
88
+ - 0
89
+ version: "0"
90
+ name: nokogiri
91
+ version_requirements: *id005
92
+ prerelease: false
93
+ - !ruby/object:Gem::Dependency
94
+ type: :runtime
95
+ requirement: &id006 !ruby/object:Gem::Requirement
96
+ none: false
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ hash: 7
101
+ segments:
102
+ - 0
103
+ - 4
104
+ - 4
105
+ version: 0.4.4
106
+ name: oauth
107
+ version_requirements: *id006
108
+ prerelease: false
109
+ - !ruby/object:Gem::Dependency
110
+ type: :runtime
111
+ requirement: &id007 !ruby/object:Gem::Requirement
112
+ none: false
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ hash: 17
117
+ segments:
118
+ - 0
119
+ - 1
120
+ - 5
121
+ version: 0.1.5
122
+ name: simple_oauth
123
+ version_requirements: *id007
124
+ prerelease: false
125
+ - !ruby/object:Gem::Dependency
126
+ type: :runtime
127
+ requirement: &id008 !ruby/object:Gem::Requirement
128
+ none: false
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ hash: 5
133
+ segments:
134
+ - 0
135
+ - 7
136
+ - 3
137
+ version: 0.7.3
138
+ name: faraday
139
+ version_requirements: *id008
140
+ prerelease: false
141
+ - !ruby/object:Gem::Dependency
142
+ type: :runtime
143
+ requirement: &id009 !ruby/object:Gem::Requirement
144
+ none: false
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ hash: 3
149
+ segments:
150
+ - 0
151
+ version: "0"
152
+ name: builder
153
+ version_requirements: *id009
154
+ prerelease: false
61
155
  description: Upload, delete, update, comment on youtube videos all from one gem.
62
156
  email: kylejginavan@gmail.com
63
157
  executables: []
@@ -67,6 +161,8 @@ extensions: []
67
161
  extra_rdoc_files:
68
162
  - README.rdoc
69
163
  files:
164
+ - Gemfile
165
+ - Gemfile.lock
70
166
  - Manifest.txt
71
167
  - README.rdoc
72
168
  - Rakefile
@@ -110,6 +206,7 @@ files:
110
206
  - test/test_video_feed_parser.rb
111
207
  - test/test_video_search.rb
112
208
  - youtube_it.gemspec
209
+ has_rdoc: true
113
210
  homepage: http://github.com/kylejginavan/youtube_it
114
211
  licenses: []
115
212
 
@@ -123,25 +220,25 @@ required_ruby_version: !ruby/object:Gem::Requirement
123
220
  requirements:
124
221
  - - ">="
125
222
  - !ruby/object:Gem::Version
223
+ hash: 3
224
+ segments:
225
+ - 0
126
226
  version: "0"
127
227
  required_rubygems_version: !ruby/object:Gem::Requirement
128
228
  none: false
129
229
  requirements:
130
230
  - - ">="
131
231
  - !ruby/object:Gem::Version
232
+ hash: 3
233
+ segments:
234
+ - 0
132
235
  version: "0"
133
236
  requirements: []
134
237
 
135
238
  rubyforge_project:
136
- rubygems_version: 1.8.8
239
+ rubygems_version: 1.5.2
137
240
  signing_key:
138
241
  specification_version: 3
139
242
  summary: The most complete Ruby wrapper for youtube api's
140
- test_files:
141
- - test/helper.rb
142
- - test/test_chain_io.rb
143
- - test/test_client.rb
144
- - test/test_field_search.rb
145
- - test/test_video.rb
146
- - test/test_video_feed_parser.rb
147
- - test/test_video_search.rb
243
+ test_files: []
244
+