vzaar 1.5.2 → 1.5.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 1e2ef09a5076d11df5cdfd5bfd7b639ee45a4b47
4
- data.tar.gz: 46e30e707950d88b0aef75d072c7d156bd98af56
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ OWFiMzNjOTQxM2I2M2YzZDNiYWIxNTRiNzA0YTk5ZDcwNzk3ZmNlZQ==
5
+ data.tar.gz: !binary |-
6
+ OWM0OThiZjlhYWMwOWE3ZjI1NWI2ZWY1YjBjZTZkNmI5NjhhM2VkMA==
5
7
  SHA512:
6
- metadata.gz: e70d32b4d9741e7a1a88a3cbee50c630fccf3223842db6adb50f17afe28964eb21b10924e148b0791a87a426f149822e03b014ffde9ba6bb599b0a0c73b45f18
7
- data.tar.gz: 4ca12a6b6b56bfebc991b5ae9ed491b2a84ccdc3cee7e66c13e104988919f351b1fd4e81e78349039b186039e648a43e306f1de383400ae1b1116cd7c26c1e78
8
+ metadata.gz: !binary |-
9
+ Y2I5YTM4MmMxMGE5NzQyOTBiOTkzZGVlNDc4ZWExZDEzNWVmMDRkY2VlYWYx
10
+ ZTczOGY1YzcxNWRiYjkyNGQwMWYzZmRhODk2Y2I2MjQ1Mjc4YjUwNDY5MTM1
11
+ MDc2MThjYzQ0MTM1OTMxM2IyYjBjYzlkOTc1YWYzM2RmZGU1M2U=
12
+ data.tar.gz: !binary |-
13
+ MTQ4ZGNmYzhjZjUyOGFlMmM1YWIyOTY3NDkyNDY3YjRhNTI3MzU0NzNmY2Jh
14
+ NmFiZDQ3MWFlMWUyNDczMmQyOWQ0ZWU3YTZhZmI3OWM5ODhjM2ZmMTYyNjBk
15
+ NWQ1MGNhYmZkM2E2YzJkNGYwOWYxZTZhMjc4OWFhYTU1YWMwZDQ=
@@ -1,3 +1,4 @@
1
1
  rvm:
2
2
  - 1.9.3
3
- - 2.1.2
3
+ - 2.1.6
4
+ - 2.2.2
data/README.md CHANGED
@@ -127,3 +127,7 @@ This version is not backwards compatible with any of the previous versions of vz
127
127
  3. Commit your changes (`git commit -am 'Add some feature'`)
128
128
  4. Push to the branch (`git push origin my-new-feature`)
129
129
  5. Create new Pull Request
130
+
131
+ ### License
132
+
133
+ Released under the [MIT License](http://www.opensource.org/licenses/MIT).
@@ -2,7 +2,7 @@ require_relative './spec_helper'
2
2
 
3
3
  describe "Add Subtitle" do
4
4
  context "when user is unauthenticated" do
5
- it_behaves_like "Unauthenticated", -> (api) do
5
+ it_behaves_like "Unauthenticated", ->(api) do
6
6
  api.add_subtitle(test_video_id("user1"), body: "x", language: "en")
7
7
  end
8
8
  end
@@ -35,7 +35,7 @@ describe "Add Subtitle" do
35
35
 
36
36
 
37
37
  context "RO token" do
38
- it_behaves_like "RO only", user1["login"], user1["ro_token"], -> (api) do
38
+ it_behaves_like "RO only", user1["login"], user1["ro_token"], ->(api) do
39
39
  api.add_subtitle(test_video_id("user1"), body: "SRT", language: "en")
40
40
  end
41
41
  end
@@ -3,7 +3,7 @@ require_relative './spec_helper'
3
3
  describe "Authentication" do
4
4
  describe "whoami" do
5
5
  context "when user is unauthenticated" do
6
- it_behaves_like "Unauthenticated", -> (api) { api.whoami }
6
+ it_behaves_like "Unauthenticated", ->(api) { api.whoami }
7
7
  end
8
8
 
9
9
  context "when auth success" do
@@ -9,7 +9,7 @@ describe "Delete Video" do
9
9
  before(:all) do
10
10
  @api = _api(login: user1["login"],
11
11
  application_token: user1["rw_token"])
12
-
12
+
13
13
  title = "api-test-#{rand_str}"
14
14
  res = @api.upload_video(path: file_path, title: title, description: desc)
15
15
  @vid_id = res.id
@@ -20,7 +20,7 @@ describe "Delete Video" do
20
20
  specify do
21
21
  opts = { video_id: @vid_id, http_verb: :post}
22
22
  req = Vzaar::Request::DeleteVideo.new(@api.conn, opts)
23
-
23
+
24
24
  expect { req.execute }.to raise_error(Vzaar::Error)
25
25
  end
26
26
  end
@@ -29,7 +29,7 @@ describe "Delete Video" do
29
29
  specify do
30
30
  opts = { video_id: @vid_id, http_verb: :post, format: :json}
31
31
  req = Vzaar::Request::DeleteVideo.new(@api.conn, opts)
32
-
32
+
33
33
  expect { req.execute }.to raise_error(Vzaar::Error)
34
34
  end
35
35
  end
@@ -55,7 +55,7 @@ describe "Delete Video" do
55
55
  res = @api.upload_video(path: file_path, title: title, description: desc)
56
56
  vid_id = res.id
57
57
 
58
-
58
+
59
59
  opts = { video_id: vid_id, http_verb: :post, format: :json}
60
60
  req = Vzaar::Request::DeleteVideo.new(@api.conn, opts)
61
61
 
@@ -83,7 +83,7 @@ describe "Delete Video" do
83
83
  end
84
84
 
85
85
  context "when user is unauthenticated" do
86
- it_behaves_like "Unauthenticated", -> (api) do
86
+ it_behaves_like "Unauthenticated", ->(api) do
87
87
  api.delete_video(vid_id)
88
88
  end
89
89
  end
@@ -109,7 +109,7 @@ describe "Delete Video" do
109
109
  end
110
110
 
111
111
  context "RO token" do
112
- it_behaves_like "RO only", user1["login"], user1["ro_token"], -> (api) do
112
+ it_behaves_like "RO only", user1["login"], user1["ro_token"], ->(api) do
113
113
  api.delete_video(vid_id)
114
114
  end
115
115
  end
@@ -4,7 +4,7 @@ describe "Edit Video" do
4
4
  file_path = "./spec/support/video.mov"
5
5
 
6
6
  context "when user is unauthenticated" do
7
- it_behaves_like "Unauthenticated", -> (api) do
7
+ it_behaves_like "Unauthenticated", ->(api) do
8
8
  api.edit_video(test_video_id("user1"), title: "foo")
9
9
  end
10
10
  end
@@ -118,7 +118,7 @@ describe "Edit Video" do
118
118
  end
119
119
 
120
120
  context "RO token" do
121
- it_behaves_like "RO only", user1["login"], user1["ro_token"], -> (api) do
121
+ it_behaves_like "RO only", user1["login"], user1["ro_token"], ->(api) do
122
122
  api.edit_video(test_video_id("user1"), title: "woof")
123
123
  end
124
124
  end
@@ -7,7 +7,7 @@ describe "Generate Thumbnail" do
7
7
  end
8
8
 
9
9
  context "when user is unauthenticated" do
10
- it_behaves_like "Unauthenticated", -> (api) do
10
+ it_behaves_like "Unauthenticated", ->(api) do
11
11
  api.generate_thumbnail(test_video_id("user1"), time: 3)
12
12
  end
13
13
  end
@@ -35,14 +35,14 @@ describe "Generate Thumbnail" do
35
35
  it_behaves_like "422 Failure"
36
36
 
37
37
  specify do
38
- expect(@res.errors.first["thumb_time"]).to eq("invalid integer")
38
+ expect(@res.errors.first["thumb_time"]).to eq("invalid decimal")
39
39
  end
40
40
  end
41
41
  end
42
42
 
43
43
 
44
44
  context "RO token" do
45
- it_behaves_like "RO only", user1["login"], user1["ro_token"], -> (api) do
45
+ it_behaves_like "RO only", user1["login"], user1["ro_token"], ->(api) do
46
46
  api.generate_thumbnail(test_video_id("user1"), time: 3)
47
47
  end
48
48
  end
@@ -3,7 +3,7 @@ require_relative './spec_helper'
3
3
  describe "Signature" do
4
4
  describe "signature" do
5
5
  context "when user is unauthenticated" do
6
- it_behaves_like "Unauthenticated", -> (api) { api.signature }
6
+ it_behaves_like "Unauthenticated", ->(api) { api.signature }
7
7
  end
8
8
 
9
9
  context "with no :sucess_action_redirect" do
@@ -21,14 +21,14 @@ describe "Upload Audio" do
21
21
  end
22
22
 
23
23
  context "RO token" do
24
- it_behaves_like "RO only", user1["login"], user1["ro_token"], -> (api) do
24
+ it_behaves_like "RO only", user1["login"], user1["ro_token"], ->(api) do
25
25
  api.upload_audio(path: file_path, description: desc, bitrate: 192)
26
26
  end
27
27
  end
28
28
  end
29
29
 
30
30
  context "when user is unauthenticated" do
31
- it_behaves_like "Unauthenticated", -> (api) do
31
+ it_behaves_like "Unauthenticated", ->(api) do
32
32
  api.upload_audio(path: file_path, title: "woof", description: desc, bitrate: 192)
33
33
  end
34
34
  end
@@ -4,7 +4,7 @@ describe "Upload Thumbnail" do
4
4
  file_path = "./spec/support/pic.jpg"
5
5
 
6
6
  context "when user is unauthenticated" do
7
- it_behaves_like "Unauthenticated", -> (api) do
7
+ it_behaves_like "Unauthenticated", ->(api) do
8
8
  api.upload_thumbnail(test_video_id("user1"), path: file_path)
9
9
  end
10
10
  end
@@ -26,7 +26,7 @@ describe "Upload Thumbnail" do
26
26
  end
27
27
 
28
28
  context "RO token" do
29
- it_behaves_like "RO only", user1["login"], user1["ro_token"], -> (api) do
29
+ it_behaves_like "RO only", user1["login"], user1["ro_token"], ->(api) do
30
30
  api.upload_thumbnail(test_video_id("user1"), path: file_path)
31
31
  end
32
32
  end
@@ -45,14 +45,14 @@ describe "Upload Video" do
45
45
  end
46
46
 
47
47
  context "RO token" do
48
- it_behaves_like "RO only", user1["login"], user1["ro_token"], -> (api) do
48
+ it_behaves_like "RO only", user1["login"], user1["ro_token"], ->(api) do
49
49
  api.upload_video(path: file_path, description: desc)
50
50
  end
51
51
  end
52
52
  end
53
53
 
54
54
  context "when user is unauthenticated" do
55
- it_behaves_like "Unauthenticated", -> (api) do
55
+ it_behaves_like "Unauthenticated", ->(api) do
56
56
  api.upload_video(path: file_path, title: "woof", description: desc)
57
57
  end
58
58
  end
@@ -81,7 +81,7 @@ describe "Upload Video" do
81
81
  end
82
82
 
83
83
  context "when user is unauthenticated" do
84
- it_behaves_like "Unauthenticated", -> (api) do
84
+ it_behaves_like "Unauthenticated", ->(api) do
85
85
  api.upload_video(url: file_url, title: "woof", description: desc)
86
86
  end
87
87
  end
@@ -5,16 +5,16 @@ describe "Video Details" do
5
5
  before do
6
6
  api = _api(login: user1["login"],
7
7
  application_token: user1["rw_token"])
8
-
8
+
9
9
  @res = api.video_details(test_video_id("user1"), authenticated: true)
10
10
  end
11
11
 
12
12
  it_behaves_like "200 OK"
13
13
  end
14
-
14
+
15
15
  describe "Unauthenticated" do
16
16
  context "Fully Protected API" do
17
- it_behaves_like "Unauthenticated", -> (api) do
17
+ it_behaves_like "Unauthenticated", ->(api) do
18
18
  api.video_details(test_video_id("user1"))
19
19
  end
20
20
  end
@@ -41,7 +41,7 @@ describe "Video Details" do
41
41
  end
42
42
 
43
43
  context "when video is private" do
44
- it_behaves_like "Unauthenticated", -> (api) do
44
+ it_behaves_like "Unauthenticated", ->(api) do
45
45
  api.video_details(scope["test_video_id"])
46
46
  end
47
47
  end
@@ -6,14 +6,14 @@ describe "Video List" do
6
6
  before do
7
7
  api = _api(login: user1["login"],
8
8
  application_token: user1["rw_token"])
9
-
9
+
10
10
  @res = api.video_list(user1["login"], authenticated: true, params: { labels: "api,api2" })
11
11
  end
12
12
 
13
13
  specify { expect(@res.count).to eq(1) }
14
14
  end
15
15
  end
16
-
16
+
17
17
  describe "Unauthenticated" do
18
18
  context "when Public API Feeds is enabled" do
19
19
  describe "params" do
@@ -47,7 +47,7 @@ describe "Video List" do
47
47
  end
48
48
 
49
49
  context "when Public API Feeds is disabled" do
50
- it_behaves_like "Unauthenticated", -> (api) do
50
+ it_behaves_like "Unauthenticated", ->(api) do
51
51
  api.video_list(user1["login"])
52
52
  end
53
53
  end
@@ -10,6 +10,8 @@ module Vzaar
10
10
  @application_token = options[:application_token]
11
11
  @force_http = options[:force_http]
12
12
  @login = options[:login]
13
+ @timeout = options[:timeout]
14
+ @open_timeout = options[:open_timeout]
13
15
  end
14
16
 
15
17
  def using_connection(url, opts={}, &block)
@@ -47,7 +49,7 @@ module Vzaar
47
49
 
48
50
  def consumer(authorised = false)
49
51
  site = "#{protocol(authorised)}://#{server}"
50
- c = OAuth::Consumer.new('', '', { :site => site })
52
+ c = OAuth::Consumer.new('', '', { :site => site, :timeout => @timeout, :open_timeout => @open_timeout })
51
53
  c.extend(OAuthExt::Multipart)
52
54
  end
53
55
 
@@ -1,3 +1,3 @@
1
1
  module Vzaar
2
- VERSION = "1.5.2"
2
+ VERSION = "1.5.3"
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.2
4
+ version: 1.5.3
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-04-13 00:00:00.000000000 Z
12
+ date: 2015-07-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,15 +173,14 @@ 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
184
- - LICENSE
185
184
  - README.md
186
185
  - Rakefile
187
186
  - examples/account_details_spec.rb
@@ -304,20 +303,20 @@ require_paths:
304
303
  - lib
305
304
  required_ruby_version: !ruby/object:Gem::Requirement
306
305
  requirements:
307
- - - ">="
306
+ - - ! '>='
308
307
  - !ruby/object:Gem::Version
309
308
  version: '1.9'
310
309
  required_rubygems_version: !ruby/object:Gem::Requirement
311
310
  requirements:
312
- - - ">="
311
+ - - ! '>='
313
312
  - !ruby/object:Gem::Version
314
313
  version: '0'
315
314
  requirements: []
316
315
  rubyforge_project:
317
- rubygems_version: 2.4.2
316
+ rubygems_version: 2.2.2
318
317
  signing_key:
319
318
  specification_version: 4
320
- summary: vzaar-1.5.2
319
+ summary: vzaar-1.5.3
321
320
  test_files:
322
321
  - spec/fixtures/vcr_cassettes/account_type-fail.yml
323
322
  - spec/fixtures/vcr_cassettes/account_type-success.yml
data/LICENSE DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 vzaar Ltd
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.