youtube_it 1.4.1 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/youtube_it/request/video_upload.rb +7 -3
- data/pkg/youtube_it-1.4.1.gem +0 -0
- data/youtube_it.gemspec +3 -2
- metadata +3 -2
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.4.
|
|
1
|
+
1.4.2
|
|
@@ -472,22 +472,26 @@ class YouTubeIt
|
|
|
472
472
|
msg_error = error.elements["internalReason"].text
|
|
473
473
|
elsif error.elements["location"]
|
|
474
474
|
msg_error = error.elements["location"].text[/media:group\/media:(.*)\/text\(\)/,1]
|
|
475
|
+
else
|
|
476
|
+
msg_error = "Unspecified error"
|
|
475
477
|
end
|
|
476
478
|
code = error.elements["code"].text if error.elements["code"]
|
|
477
479
|
all_faults + sprintf("%s: %s\n", msg_error, code)
|
|
478
480
|
end
|
|
479
481
|
rescue
|
|
480
|
-
string
|
|
482
|
+
string[/<TITLE>(.+)<\/TITLE>/, 1] || string
|
|
481
483
|
end
|
|
482
484
|
end
|
|
483
485
|
|
|
484
486
|
def raise_on_faulty_response(response)
|
|
485
487
|
response_code = response.code.to_i
|
|
488
|
+
msg = parse_upload_error_from(response.body.gsub(/\n/, ''))
|
|
489
|
+
|
|
486
490
|
if response_code == 403 || response_code == 401
|
|
487
491
|
#if response_code / 10 == 40
|
|
488
|
-
raise AuthenticationError,
|
|
492
|
+
raise AuthenticationError, msg
|
|
489
493
|
elsif response_code / 10 != 20 # Response in 20x means success
|
|
490
|
-
raise UploadError,
|
|
494
|
+
raise UploadError, msg
|
|
491
495
|
end
|
|
492
496
|
end
|
|
493
497
|
|
|
Binary file
|
data/youtube_it.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{youtube_it}
|
|
8
|
-
s.version = "1.4.
|
|
8
|
+
s.version = "1.4.2"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["kylejginavan", "chebyte", "mseppae"]
|
|
12
|
-
s.date = %q{2011-
|
|
12
|
+
s.date = %q{2011-04-08}
|
|
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 = [
|
|
@@ -44,6 +44,7 @@ Gem::Specification.new do |s|
|
|
|
44
44
|
"lib/youtube_it/request/video_upload.rb",
|
|
45
45
|
"lib/youtube_it/response/video_search.rb",
|
|
46
46
|
"lib/youtube_it/version.rb",
|
|
47
|
+
"pkg/youtube_it-1.4.1.gem",
|
|
47
48
|
"test/files/youtube_video_response.xml",
|
|
48
49
|
"test/helper.rb",
|
|
49
50
|
"test/test.mov",
|
metadata
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: youtube_it
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease:
|
|
5
|
-
version: 1.4.
|
|
5
|
+
version: 1.4.2
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
8
8
|
- kylejginavan
|
|
@@ -12,7 +12,7 @@ autorequire:
|
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
14
|
|
|
15
|
-
date: 2011-
|
|
15
|
+
date: 2011-04-08 00:00:00 -05:00
|
|
16
16
|
default_executable:
|
|
17
17
|
dependencies:
|
|
18
18
|
- !ruby/object:Gem::Dependency
|
|
@@ -74,6 +74,7 @@ files:
|
|
|
74
74
|
- lib/youtube_it/request/video_upload.rb
|
|
75
75
|
- lib/youtube_it/response/video_search.rb
|
|
76
76
|
- lib/youtube_it/version.rb
|
|
77
|
+
- pkg/youtube_it-1.4.1.gem
|
|
77
78
|
- test/files/youtube_video_response.xml
|
|
78
79
|
- test/helper.rb
|
|
79
80
|
- test/test.mov
|