stupeflix 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/examples/example.rb CHANGED
@@ -45,7 +45,7 @@ while result.nil?
45
45
  err
46
46
  elsif yt_id = status['available-1-url'].scan(/v=([^&]+)/i).flatten.first rescue nil
47
47
  "Complete: http://www.youtube.com/watch?v=#{yt_id}&hd=1"
48
- elsif (%w(queued info generating generated uploading available).include? status['status'] rescue nil)
48
+ elsif (%w(queued info starting generating generated uploading available).include? status['status'] rescue nil)
49
49
  p "#{status['status'].capitalize}..."; nil
50
50
  elsif (status.response.code.to_i != 200 rescue nil)
51
51
  "Error: #{status}"
@@ -1,3 +1,3 @@
1
1
  module Stupeflix
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
data/lib/stupeflix.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  require 'stupeflix/version'
2
2
  require 'httparty'
3
3
  require 'nokogiri'
4
+ require 'cgi'
4
5
 
5
6
  module Stupeflix
6
7
  class Video
@@ -25,7 +26,7 @@ module Stupeflix
25
26
 
26
27
  # TODO make this an array or..?
27
28
  def profiles= profiles_xml
28
- params, headers = req('POST', body = "ProfilesXML=#{CGI::escape profiles_xml}",
29
+ params, headers = req('POST', body = "ProfilesXML=#{::CGI::escape profiles_xml}",
29
30
  'application/x-www-form-urlencoded', Time.now.to_i, url = "#{self.url}/")
30
31
  self.class.post url, query: params, headers: headers, body: body
31
32
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stupeflix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-15 00:00:00.000000000 Z
12
+ date: 2013-06-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty