kellysutton-bliptv 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -1,18 +1,19 @@
1
1
  = Blip.tv Ruby Library
2
2
 
3
- A Ruby gem for accessing the Blip.tv REST API (http://wiki.blip.tv/index.php/REST_Upload_API)
3
+ A Ruby gem for accessing the blip.tv API (http://wiki.blip.tv/index.php/REST_Upload_API)
4
4
 
5
5
  == Install
6
6
 
7
- sudo gem install bliptv --source http://gems.github.com
7
+ sudo gem install kellysutton-bliptv --source http://gems.github.com
8
8
 
9
9
  == Usage
10
10
 
11
- While the Blip.tv is extremely simple to use, sometimes it's nice to have a wrapper
12
- library to make life even easier. The BlipTV Ruby library is just that.
11
+ While the blip.tv API is extremely simple to use, sometimes it's nice to have a wrapper
12
+ library to make life even easier. The BlipTV Ruby gem is just that.
13
13
 
14
14
  Let's say you want to upload a video:
15
15
 
16
+ require 'rubygems'
16
17
  require 'bliptv'
17
18
 
18
19
  client = BlipTV::Base.new
@@ -32,6 +33,7 @@ that you can play around with.
32
33
 
33
34
  Or what if you wanted a list of all videos by a user? Also easy:
34
35
 
36
+ require 'rubygems'
35
37
  require 'bliptv'
36
38
 
37
39
  client = BlipTV::Base.new
@@ -48,13 +50,13 @@ Kelly Sutton (http://michaelkellysutton.com)
48
50
 
49
51
  == Features
50
52
 
51
- Provides an easy way to interact with the Blip.tv API in Ruby.
53
+ Provides an easy way to interact with the blip.tv API in Ruby.
52
54
 
53
55
  == Special Thanks
54
56
 
55
57
  This gem is extensively based on Shane Vitrana's Viddler
56
58
  gem as well as the YouTubeG gem. Much of the code was simply
57
- copied and then tweaked to fit the Blip.tv nomenclature
59
+ copied and then tweaked to fit the blip.tv nomenclature
58
60
  of certain calls.
59
61
 
60
62
  == License
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('bliptv', '0.1.0') do |p|
5
+ Echoe.new('bliptv', '0.1.1') do |p|
6
6
  p.description = "A Ruby library from Blip.tv"
7
7
  p.url = "http://github.com/kellysutton/bliptv"
8
8
  p.author = "Michael Kelly Sutton"
data/bliptv.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{bliptv}
5
- s.version = "0.1.0"
5
+ s.version = "0.1.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Michael Kelly Sutton"]
data/lib/bliptv.rb CHANGED
@@ -1,3 +1,8 @@
1
+ #
2
+ # This is the main entry point for the library. All files in the project are
3
+ # included here, as well as anything required across the project.
4
+ #
5
+
1
6
  $:.unshift(File.dirname(__FILE__)) unless
2
7
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
8
 
@@ -74,8 +74,11 @@ module BlipTV
74
74
  def parse_response(raw_response)
75
75
  raise EmptyResponseError if raw_response.blank?
76
76
  response_hash = Hash.from_xml(raw_response)
77
- if response_error = response_hash["otter_responses"]["response"]["error"]
78
- raise ResponseError.new(bliptv_error_message(response_error))
77
+ begin
78
+ if response_error = response_hash["otter_responses"]["response"]["error"]
79
+ raise ResponseError.new(bliptv_error_message(response_error))
80
+ end
81
+ rescue # we don't care if it fails, that means it works
79
82
  end
80
83
  response_hash["post_url"] = raw_response.match(/\d{3,12}/)[0] # extracts the post_url, since from_xml isn't grabbing it
81
84
  response_hash
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kellysutton-bliptv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Kelly Sutton