vzaar 0.2.0 → 0.2.1

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.
@@ -371,6 +371,7 @@ module Vzaar
371
371
 
372
372
  def upload_to_s3(acl, bucket, policy, aws_access_key, signature, key, file_path)
373
373
  client = HTTPClient.new
374
+ client.send_timeout = 1800
374
375
  url = "https://#{bucket}.s3.amazonaws.com/"
375
376
  begin
376
377
  file = File.open file_path
@@ -2,30 +2,66 @@ module Vzaar
2
2
 
3
3
  class VideoDetails
4
4
 
5
- attr_accessor :xml, :version, :type, :title, :author_name, :author_url,
6
- :author_account_type_id, :provider_name, :provider_url, :html, :height,
7
- :width, :borderless, :duration
5
+ attr_accessor :xml,
6
+ :author_account_type_id,
7
+ :author_name,
8
+ :author_url,
9
+ :duration,
10
+ :framegrab_height,
11
+ :framegrab_url,
12
+ :framegrab_width,
13
+ :height,
14
+ :html,
15
+ :provider_name,
16
+ :provider_url,
17
+ :thumbnail_height,
18
+ :thumbnail_url,
19
+ :thumbnail_width,
20
+ :title,
21
+ :type,
22
+ :version,
23
+ :video_status_id,
24
+ :video_url,
25
+ :width
8
26
 
9
27
  def initialize(xml)
10
28
  @xml = xml
11
29
  doc = REXML::Document.new xml
12
- @version = doc.elements['oembed/version'] ?
13
- doc.elements['oembed/version'].text : ''
14
- @type = doc.elements['oembed/type'] ? doc.elements['oembed/type'].text : ''
15
- @title = doc.elements['oembed/title'] ? doc.elements['oembed/title'].text : ''
30
+ @author_account_type_id = doc.elements['oembed/author_account'] ?
31
+ doc.elements['oembed/author_account'].text : ''
16
32
  @author_name = doc.elements['oembed/author_name'] ?
17
33
  doc.elements['oembed/author_name'].text : ''
18
34
  @author_url = doc.elements['oembed/author_url'] ?
19
35
  doc.elements['oembed/author_url'].text : ''
20
- @author_account_type_id = doc.elements['oembed/author_account'] ?
21
- doc.elements['oembed/author_account'].text : ''
36
+ @duration = doc.elements['oembed/duration'] ?
37
+ doc.elements['oembed/duration'].text : ''
38
+ @framegrab_height = doc.elements['oembed/framegrab_height'] ?
39
+ doc.elements['oembed/framegrab_height'].text : ''
40
+ @framegrab_url = doc.elements['oembed/framegrab_url'] ?
41
+ doc.elements['oembed/framegrab_url'].text : ''
42
+ @framegrab_width = doc.elements['oembed/framegrab_width'] ?
43
+ doc.elements['oembed/framegrab_width'].text : ''
44
+ @height = doc.elements['oembed/height'] ? doc.elements['oembed/height'].text : ''
45
+ @html = doc.elements['oembed/html'] ? doc.elements['oembed/html'].texts[1] : ''
22
46
  @provider_name = doc.elements['oembed/provider_name'] ?
23
47
  doc.elements['oembed/provider_name'].text : ''
24
48
  @provider_url = doc.elements['oembed/provider_url'] ?
25
49
  doc.elements['oembed/provider_url'].text : ''
26
- @html = doc.elements['oembed/html'] ? doc.elements['oembed/html'].texts[1] : ''
50
+ @thumbnail_height = doc.elements['oembed/thumbnail_height'] ?
51
+ doc.elements['oembed/thumbnail_height'].text : ''
52
+ @thumbnail_url = doc.elements['oembed/thumbnail_url'] ?
53
+ doc.elements['oembed/thumbnail_url'].text : ''
54
+ @thumbnail_width = doc.elements['oembed/thumbnail_width'] ?
55
+ doc.elements['oembed/thumbnail_width'].text : ''
56
+ @title = doc.elements['oembed/title'] ? doc.elements['oembed/title'].text : ''
57
+ @type = doc.elements['oembed/type'] ? doc.elements['oembed/type'].text : ''
58
+ @version = doc.elements['oembed/version'] ?
59
+ doc.elements['oembed/version'].text : ''
60
+ @video_status_id = doc.elements['oembed/video_status_id'] ?
61
+ doc.elements['oembed/video_status_id'].text : ''
62
+ @video_url = doc.elements['oembed/video_url'] ?
63
+ doc.elements['oembed/video_url'].text : ''
27
64
  @width = doc.elements['oembed/width'] ? doc.elements['oembed/width'].text : ''
28
- @height = doc.elements['oembed/height'] ? doc.elements['oembed/height'].text : ''
29
65
  end
30
66
 
31
67
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 0
9
- version: 0.2.0
8
+ - 1
9
+ version: 0.2.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mariusz Lusiak