youtube_it 1.2.7 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.7
1
+ 1.2.8
@@ -413,6 +413,9 @@ class YouTubeIt
413
413
  else
414
414
  response = @access_token.get("http://gdata.youtube.com/feeds/api/users/default")
415
415
  end
416
+
417
+ puts response.body
418
+ puts response.inspect
416
419
  raise_on_faulty_response(response)
417
420
  REXML::Document.new(response.body).elements["entry"].elements['author'].elements['name'].text
418
421
  end
@@ -470,9 +473,10 @@ class YouTubeIt
470
473
  end
471
474
 
472
475
  def raise_on_faulty_response(response)
473
- if response.code.to_i == 403
476
+ response_code = response.code.to_i
477
+ if response_code == 403 || response_code == 401
474
478
  raise AuthenticationError, response.body[/<TITLE>(.+)<\/TITLE>/, 1]
475
- elsif response.code.to_i / 10 != 20 # Response in 20x means success
479
+ elsif response_code / 10 != 20 # Response in 20x means success
476
480
  raise UploadError, parse_upload_error_from(response.body.gsub(/\n/,''))
477
481
  end
478
482
  end
Binary file
data/youtube_it.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{youtube_it}
8
- s.version = "1.2.7"
8
+ s.version = "1.2.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["chebyte", "kylejginavan"]
@@ -43,15 +43,7 @@ Gem::Specification.new do |s|
43
43
  "lib/youtube_it/request/video_upload.rb",
44
44
  "lib/youtube_it/response/video_search.rb",
45
45
  "lib/youtube_it/version.rb",
46
- "pkg/youtube_it-0.0.8.gem",
47
- "pkg/youtube_it-1.0.0.gem",
48
- "pkg/youtube_it-1.1.0.gem",
49
- "pkg/youtube_it-1.2.0.gem",
50
- "pkg/youtube_it-1.2.1.gem",
51
- "pkg/youtube_it-1.2.3.gem",
52
- "pkg/youtube_it-1.2.4.gem",
53
- "pkg/youtube_it-1.2.5.gem",
54
- "pkg/youtube_it-1.2.6.gem",
46
+ "pkg/youtube_it-1.2.7.gem",
55
47
  "test/helper.rb",
56
48
  "test/test.mov",
57
49
  "test/test_chain_io.rb",
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 2
8
- - 7
9
- version: 1.2.7
8
+ - 8
9
+ version: 1.2.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - chebyte
@@ -82,15 +82,7 @@ files:
82
82
  - lib/youtube_it/request/video_upload.rb
83
83
  - lib/youtube_it/response/video_search.rb
84
84
  - lib/youtube_it/version.rb
85
- - pkg/youtube_it-0.0.8.gem
86
- - pkg/youtube_it-1.0.0.gem
87
- - pkg/youtube_it-1.1.0.gem
88
- - pkg/youtube_it-1.2.0.gem
89
- - pkg/youtube_it-1.2.1.gem
90
- - pkg/youtube_it-1.2.3.gem
91
- - pkg/youtube_it-1.2.4.gem
92
- - pkg/youtube_it-1.2.5.gem
93
- - pkg/youtube_it-1.2.6.gem
85
+ - pkg/youtube_it-1.2.7.gem
94
86
  - test/helper.rb
95
87
  - test/test.mov
96
88
  - test/test_chain_io.rb
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file