vzaar 1.3.0 → 1.3.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: a0f8c545d337aa9a7a6ac806dbaf953b94626c11
4
- data.tar.gz: fbf6792107a9b92b0db766751513d556daa99667
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MWYxZGZkYzUzYzg1NWJkZTIwMzY0NDAxYTZhOTEyZWExODYwNGUwZQ==
5
+ data.tar.gz: !binary |-
6
+ NDcwYTZmZWYzZmMwM2I5N2M0YjM0MjRmMGU0Y2MwOWE5MDg2MWYxZg==
5
7
  SHA512:
6
- metadata.gz: b6ad173b1e4851f03347435aae3a75b36ad4d4dab5405564c244ee712c7f6db36411eb742fe5cc8fed6c5786b6c291f32cb63a11c071a596a8fc001838943cfd
7
- data.tar.gz: 872224645b46d7a36d2364f21d38e55e903e789f13c85d2ed47a5ba9975d5a09310f049b6ff7a63e3b67603f62174b2187a07fee5e3f5012eb4425256a50b124
8
+ metadata.gz: !binary |-
9
+ NjNjM2UyOGZmNzNiOTUxMjYyY2JjYzc5NTdkNDIxNGFjM2Y5MjhjZDM0MjBm
10
+ MTE2MDQ3YmE5OTI3MGFiMWEzNDM5Y2JlMTViMzY4NzcwNjE3NzVlOTM3ODdi
11
+ NmIzODA1ZWMzOGRhMDcyY2RlNzcxM2U5YWZjMGFiNWRkNjcwN2E=
12
+ data.tar.gz: !binary |-
13
+ MDdkNDIyNTBhYjlmMmVmMTBhNDc4YjEwYjYwOTQ1ODY0NTRjM2ZkNzdkNDU3
14
+ MzZjMGViYTMxNzRlY2E3N2RmZjJiMTUyZWVhOTg0ZjdhMWM4YjM1ODg3N2Fh
15
+ ZmFiM2IwZmE3YTJmYjAxNGY4ZGRlMzM4MzExZDc3MzRiZGEyYjg=
@@ -0,0 +1 @@
1
+ vzaar-api
@@ -1 +1 @@
1
- 2.1.1
1
+ 2.1.2
@@ -1,3 +1,3 @@
1
1
  rvm:
2
2
  - 1.9.3
3
- - 2.0.0
3
+ - 2.1.2
data/LICENSE CHANGED
@@ -1,4 +1,6 @@
1
- Copyright (c) 2013 Ed James
1
+ Copyright (c) 2014 vzaar Ltd
2
+
3
+ MIT License
2
4
 
3
5
  Permission is hereby granted, free of charge, to any person obtaining
4
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -2,7 +2,11 @@
2
2
 
3
3
  A Ruby gem for the vzaar API.
4
4
 
5
- Note: This version is a beta release.
5
+ ---
6
+
7
+ >vzaar is the go to video hosting platform for business. Affordable, customizable and secure. Leverage the power of online video and enable commerce with vzaar. For more details and signup please visit [http://vzaar.com](http://vzaar.com)
8
+
9
+ ----
6
10
 
7
11
  ### Installation
8
12
 
@@ -61,7 +65,7 @@ api.videos
61
65
 
62
66
  Removing video from vzaar: (authentication required)
63
67
  ```ruby
64
- api.delete(video_id)
68
+ api.delete_video(video_id)
65
69
  ```
66
70
 
67
71
  Updating existing video (authentication required):
data/Rakefile CHANGED
@@ -14,5 +14,13 @@ namespace :spec do
14
14
  exec 'API_ENV=development bundle exec rspec examples'
15
15
  end
16
16
 
17
+ task :qa do
18
+ exec 'API_ENV=qa bundle exec rspec examples'
19
+ end
20
+
21
+ task :prod do
22
+ exec 'API_ENV=production bundle exec rspec examples'
23
+ end
24
+
17
25
  end
18
26
  end
@@ -22,6 +22,16 @@ describe "Delete Video" do
22
22
  end
23
23
 
24
24
  context "Authenticated User" do
25
+ context "different account" do
26
+ specify do
27
+ api = _api(login: user2["login"],
28
+ application_token: user2["rw_token"])
29
+ expect do
30
+ api.delete_video(vid_id)
31
+ end.to raise_error(Vzaar::Error, "Protected Resource")
32
+ end
33
+ end
34
+
25
35
  context "RW token" do
26
36
  before(:all) do
27
37
  @res = @api.delete_video(vid_id)
@@ -1,6 +1,6 @@
1
1
  require_relative './spec_helper'
2
2
 
3
- describe "Upload Thumbnail" do
3
+ describe "Edit Video" do
4
4
  context "when user is unauthenticated" do
5
5
  it_behaves_like "Unauthenticated", -> (api) do
6
6
  api.edit_video(test_video_id("user1"), title: "foo")
@@ -8,6 +8,17 @@ describe "Upload Thumbnail" do
8
8
  end
9
9
 
10
10
  context "Authenticated User" do
11
+ context "different account" do
12
+ specify do
13
+ api = _api(login: user2["login"],
14
+ application_token: user2["rw_token"])
15
+
16
+ expect do
17
+ api.edit_video(test_video_id("user1"))
18
+ end.to raise_error(Vzaar::Error, "Moved Temporarily")
19
+ end
20
+ end
21
+
11
22
  context "RW token" do
12
23
  before(:all) do
13
24
  @api = _api(login: user1["login"],
@@ -0,0 +1,66 @@
1
+ require_relative './spec_helper'
2
+
3
+ describe "Signature" do
4
+ describe "signature" do
5
+ context "when user is unauthenticated" do
6
+ it_behaves_like "Unauthenticated", -> (api) { api.signature }
7
+ end
8
+
9
+ context "with no :sucess_action_redirect" do
10
+ it "should be successful" do
11
+ api = _api(login: user1["login"],
12
+ application_token: user1["rw_token"])
13
+
14
+ expect(api.signature.http_status_code).to eq(200)
15
+ end
16
+ end
17
+
18
+ context "with unencoded :success_action_redirect" do
19
+ it "should be successful" do
20
+ api = _api(login: user1["login"],
21
+ application_token: user1["rw_token"])
22
+ expect(
23
+ api.signature(
24
+ :success_action_redirect => "http://test.com"
25
+ ).http_status_code
26
+ ).to eq(200)
27
+ end
28
+ end
29
+
30
+ context "with URI encoded :success_action_redirect" do
31
+ it "should be successful" do
32
+ api = _api(login: user1["login"],
33
+ application_token: user1["rw_token"])
34
+ expect(
35
+ api.signature(
36
+ :success_action_redirect => CGI.escape("http://test.com")
37
+ ).http_status_code
38
+ ).to eq(200)
39
+ end
40
+ end
41
+
42
+ context "encoded :success_action_redirect with qs parameters" do
43
+ it "should be successful" do
44
+ api = _api(login: user1["login"],
45
+ application_token: user1["rw_token"])
46
+ expect(
47
+ api.signature(
48
+ :success_action_redirect => CGI.escape("http://test.com?x=y")
49
+ ).http_status_code
50
+ ).to eq(200)
51
+ end
52
+ end
53
+
54
+ context "with a :success_action_redirect with qs parameters" do
55
+ it "should be successful" do
56
+ api = _api(login: user1["login"],
57
+ application_token: user1["rw_token"])
58
+ expect(
59
+ api.signature(
60
+ :success_action_redirect => "http://test.com?x"
61
+ ).http_status_code
62
+ ).to eq(200)
63
+ end
64
+ end
65
+ end
66
+ end
@@ -3,6 +3,9 @@ require 'vzaar'
3
3
  require 'yaml'
4
4
  require 'pry'
5
5
 
6
+ RSpec.configure do |config|
7
+ config.order = 'defined'
8
+ end
6
9
 
7
10
  RSpec.shared_examples("RO only") do |login, token, fn|
8
11
  specify do
@@ -50,6 +53,8 @@ end
50
53
  def server
51
54
  case env
52
55
  when "development" then "http://app.vzaar.localhost"
56
+ when "qa" then "https://app.qavzr.com"
57
+ when "production" then "https://app.vzaar.com"
53
58
  end
54
59
  end
55
60
 
@@ -3,7 +3,6 @@ module Vzaar
3
3
  class LinkUpload < Base
4
4
  root_node "//vzaar-api"
5
5
  attribute :id, type: Integer
6
- attribute :error
7
6
  end
8
7
  end
9
8
  end
@@ -1,3 +1,3 @@
1
1
  module Vzaar
2
- VERSION = "1.3.0"
2
+ VERSION = "1.3.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.3.0
4
+ version: 1.3.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: 2014-08-22 00:00:00.000000000 Z
12
+ date: 2014-11-20 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-version"
179
- - ".rvmrc"
180
- - ".travis.yml"
176
+ - .gitignore
177
+ - .rspec
178
+ - .ruby-gemset
179
+ - .ruby-version
180
+ - .travis.yml
181
181
  - Gemfile
182
182
  - Guardfile
183
183
  - LICENSE
184
- - LICENSE.txt
185
184
  - README.md
186
185
  - Rakefile
187
186
  - examples/account_details_spec.rb
@@ -192,6 +191,7 @@ files:
192
191
  - examples/edit_video_spec.rb
193
192
  - examples/generate_thumbnail_spec.rb
194
193
  - examples/readme.md
194
+ - examples/signature_spec.rb
195
195
  - examples/spec_helper.rb
196
196
  - examples/upload_thumbnail_spec.rb
197
197
  - examples/upload_video_spec.rb
@@ -299,12 +299,12 @@ require_paths:
299
299
  - lib
300
300
  required_ruby_version: !ruby/object:Gem::Requirement
301
301
  requirements:
302
- - - ">="
302
+ - - ! '>='
303
303
  - !ruby/object:Gem::Version
304
304
  version: '1.9'
305
305
  required_rubygems_version: !ruby/object:Gem::Requirement
306
306
  requirements:
307
- - - ">="
307
+ - - ! '>='
308
308
  - !ruby/object:Gem::Version
309
309
  version: '0'
310
310
  requirements: []
@@ -312,7 +312,7 @@ rubyforge_project:
312
312
  rubygems_version: 2.2.2
313
313
  signing_key:
314
314
  specification_version: 4
315
- summary: vzaar-1.3.0
315
+ summary: vzaar-1.3.1
316
316
  test_files:
317
317
  - spec/fixtures/vcr_cassettes/account_type-fail.yml
318
318
  - spec/fixtures/vcr_cassettes/account_type-success.yml
data/.rvmrc DELETED
@@ -1 +0,0 @@
1
- rvm use ruby-2.1.1@vzaar --create
@@ -1,22 +0,0 @@
1
- Copyright (c) 2013 Ed James
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.