vzaar 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 486996c87c849996d434bbb52f2ad894f243b528
4
- data.tar.gz: e3e1ca8593af8e1627b62228ac4ec1bc3fbb47fb
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ YWZiOGEwMDkzOTEzNDUyMWVlOWIyODY0NDkwZjU1ODc0NmYyNDM2Yw==
5
+ data.tar.gz: !binary |-
6
+ NzZmN2I2NzAxYTZlMTdmZGY0ZTU0Y2ZiZWRlMTNiYWZkN2EwODY2MQ==
5
7
  SHA512:
6
- metadata.gz: 5cf5f7a6a62ae932d7648f53be4eb68f6c97d674a70bbc6d47a406fd12343016273e61e52a9581f279124b2c0cdaaa64e786aa3cbaa884fa4d24e6a7385553ad
7
- data.tar.gz: 551a3afd1e144fcab2f7cdf705983bac04c790625a3191936952cf25c6af9ebc2c1ac44e022dd89558d016bf7473160fb2756b39350be148649826947b3fb899
8
+ metadata.gz: !binary |-
9
+ NmY1ZTFiMjQ1OTMwN2YzYWVlYjBmNmQzNTg5ZGEzZDE2NTM2YWZkM2FhOWQ0
10
+ MjA2MGU2NzdkY2FlM2RmMjU4ZTczYmEzMjZjYmRiODNhZjU1M2M5MWZkNTQ2
11
+ ZjVjYmQwYjMxMWRlNmI5NGU5ZmViMjliNjJkODkzMmQ0OTUyY2Y=
12
+ data.tar.gz: !binary |-
13
+ NjM5OWE2ZWZmODBiMWNlNDNmYTJkOWQ4YjkwZWYwYTNiNzhhMzIxNDM1YjU0
14
+ ZTczYjhkYTZiYWJmZmU2NmViZWI4YTA4NDVlNmE1OWI3ZWI1MjI5NDM2MDdm
15
+ YjYxMzU4YzE4N2YwNTAxZDc3MDczOGJlZjM5OWRlNzU1MmFiMzQ=
data/ChangeLog CHANGED
@@ -1,3 +1,7 @@
1
+ 2015-03-27 JC <jozef@vzaar.com>
2
+
3
+ * escaping special chars from xml added
4
+
1
5
  2015-02-19 JC <jozef@vzaar.com>
2
6
 
3
7
  * renditions added to Vzaar::Resource::Video
@@ -17,7 +17,7 @@ module Vzaar
17
17
  "subtitle" => {
18
18
  "language" => options[:language],
19
19
  "video_id" => options[:video_id],
20
- "body" => options[:body]
20
+ "body" => sanitize_str(options[:body])
21
21
  }
22
22
  }
23
23
  }
@@ -84,6 +84,10 @@ module Vzaar
84
84
  def data
85
85
  xml? ? xml_body : json_body
86
86
  end
87
+
88
+ def sanitize_str(str)
89
+ (str || "").encode(xml: :text)
90
+ end
87
91
  end
88
92
  end
89
93
  end
@@ -22,9 +22,9 @@ module Vzaar
22
22
  def get_opts
23
23
  { "vzaar-api" => {
24
24
  "video" => {
25
- "title" => options[:title],
26
- "seo_url" => options[:seo_url],
27
- "description" => options[:description],
25
+ "title" => sanitize_str(options[:title]),
26
+ "seo_url" => sanitize_str(options[:seo_url]),
27
+ "description" => sanitize_str(options[:description]),
28
28
  "private" => options[:private]
29
29
  }
30
30
  }
@@ -17,10 +17,10 @@ module Vzaar
17
17
  link_upload: {
18
18
  key: options[:key],
19
19
  guid: options[:guid],
20
- url: options[:url],
20
+ url: sanitize_str(options[:url]),
21
21
  encoding_params: {
22
- title: options[:title],
23
- description: options[:description],
22
+ title: sanitize_str(options[:title]),
23
+ description: sanitize_str(options[:description]),
24
24
  size_id: options[:profile],
25
25
  bitrate: options[:bitrate],
26
26
  width: options[:width],
@@ -25,6 +25,10 @@ module Vzaar
25
25
  raise Vzaar::Error, "Guid required to process video." unless options[:guid]
26
26
 
27
27
  h = options.dup.delete_if { |k,v| v.nil? }
28
+ [:description, :title, :labels].each do|k|
29
+ sanitized_val = sanitize_str(h[k])
30
+ h[k] = sanitized_val unless blank?(sanitized_val)
31
+ end
28
32
 
29
33
  if include_encoding_options?
30
34
  width = h.delete(:width)
@@ -4,7 +4,7 @@ module Vzaar
4
4
  endpoint { |o| "/api/videos/#{o.video_id}/upload_thumb" }
5
5
 
6
6
  def data
7
- { file: File.open(options[:path]) }
7
+ { file: File.open(sanitize_str(options[:path])) }
8
8
  end
9
9
  end
10
10
  end
data/lib/vzaar/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Vzaar
2
- VERSION = "1.5.0"
2
+ VERSION = "1.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vzaar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ed James
@@ -9,160 +9,160 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-02-19 00:00:00.000000000 Z
12
+ date: 2015-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ~>
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.6'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ~>
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.6'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: httpclient
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ~>
33
33
  - !ruby/object:Gem::Version
34
34
  version: '2.3'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ~>
40
40
  - !ruby/object:Gem::Version
41
41
  version: '2.3'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: oauth
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ~>
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0.4'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ~>
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0.4'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: bundler
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ~>
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.3'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.3'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: fuubar
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - ~>
75
75
  - !ruby/object:Gem::Version
76
76
  version: '1.2'
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - "~>"
81
+ - - ~>
82
82
  - !ruby/object:Gem::Version
83
83
  version: '1.2'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rake
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - "~>"
88
+ - - ~>
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
91
  type: :development
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - "~>"
95
+ - - ~>
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: growl
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - "~>"
102
+ - - ~>
103
103
  - !ruby/object:Gem::Version
104
104
  version: '1.0'
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - "~>"
109
+ - - ~>
110
110
  - !ruby/object:Gem::Version
111
111
  version: '1.0'
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: guard-rspec
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - "~>"
116
+ - - ~>
117
117
  - !ruby/object:Gem::Version
118
118
  version: '4.0'
119
119
  type: :development
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - "~>"
123
+ - - ~>
124
124
  - !ruby/object:Gem::Version
125
125
  version: '4.0'
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: rspec
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - "~>"
130
+ - - ~>
131
131
  - !ruby/object:Gem::Version
132
132
  version: '2.14'
133
133
  type: :development
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - "~>"
137
+ - - ~>
138
138
  - !ruby/object:Gem::Version
139
139
  version: '2.14'
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: vcr
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - "~>"
144
+ - - ~>
145
145
  - !ruby/object:Gem::Version
146
146
  version: '2.7'
147
147
  type: :development
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - "~>"
151
+ - - ~>
152
152
  - !ruby/object:Gem::Version
153
153
  version: '2.7'
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: webmock
156
156
  requirement: !ruby/object:Gem::Requirement
157
157
  requirements:
158
- - - "~>"
158
+ - - ~>
159
159
  - !ruby/object:Gem::Version
160
160
  version: '1.16'
161
161
  type: :development
162
162
  prerelease: false
163
163
  version_requirements: !ruby/object:Gem::Requirement
164
164
  requirements:
165
- - - "~>"
165
+ - - ~>
166
166
  - !ruby/object:Gem::Version
167
167
  version: '1.16'
168
168
  description: A Ruby gem for the vzaar API
@@ -173,11 +173,11 @@ executables: []
173
173
  extensions: []
174
174
  extra_rdoc_files: []
175
175
  files:
176
- - ".gitignore"
177
- - ".rspec"
178
- - ".ruby-gemset"
179
- - ".ruby-version"
180
- - ".travis.yml"
176
+ - .gitignore
177
+ - .rspec
178
+ - .ruby-gemset
179
+ - .ruby-version
180
+ - .travis.yml
181
181
  - ChangeLog
182
182
  - Gemfile
183
183
  - Guardfile
@@ -304,20 +304,20 @@ require_paths:
304
304
  - lib
305
305
  required_ruby_version: !ruby/object:Gem::Requirement
306
306
  requirements:
307
- - - ">="
307
+ - - ! '>='
308
308
  - !ruby/object:Gem::Version
309
309
  version: '1.9'
310
310
  required_rubygems_version: !ruby/object:Gem::Requirement
311
311
  requirements:
312
- - - ">="
312
+ - - ! '>='
313
313
  - !ruby/object:Gem::Version
314
314
  version: '0'
315
315
  requirements: []
316
316
  rubyforge_project:
317
- rubygems_version: 2.4.2
317
+ rubygems_version: 2.2.2
318
318
  signing_key:
319
319
  specification_version: 4
320
- summary: vzaar-1.5.0
320
+ summary: vzaar-1.5.1
321
321
  test_files:
322
322
  - spec/fixtures/vcr_cassettes/account_type-fail.yml
323
323
  - spec/fixtures/vcr_cassettes/account_type-success.yml