zoom_rb 0.8.5 → 0.8.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 75edc34fea7b3e071e3ad573703f2add1e63fa6637c82204521e689ae2d77877
4
- data.tar.gz: 6b731098c8aadfd673dc2c007c96958fa0988d0fe4dab1bf54637db430d5c0db
3
+ metadata.gz: 87d7cc4ec57a2ec29ae1f363155844a1dcab08454beb12dafa37c87b4c14d5c3
4
+ data.tar.gz: bce3d9b5ba1cb6da18f8d647c8f7f99aa333083360f121714ef455e1f7730818
5
5
  SHA512:
6
- metadata.gz: af68381a81e9cd7b9a67e6f074fd796743f86a8de825f9723507e532461a3858e49d3eef370e3654559e60252812562d4d0f1c5086efb67084c285a07ad79b3c
7
- data.tar.gz: '0046856ea1f3d0bfa7cfa7eda072d148eb2c6285ecd4289b7d600eceed24b9b9de62ca1c61bd5bc9601d1a5a59fe9bb394be5e7f4241b8fbbf3ac0c3e78c3fea'
6
+ metadata.gz: 8d0cc2484ddfae76d99b745113e2376d41796f456bbff4d4bfa000086d5f5f7e5e6c30f29abacfd746aa931490620298aeadf268bf759342abea316c5ac5ccc7
7
+ data.tar.gz: 1bac71bc72c540a63af1929d50e28def004c9ea1c33e520a30a4f92c435384567ebfeb1b3acbcc53d3f5878172b7485f3d5bcde646f46289fc3ca929cd5aecf9
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- zoom_rb (0.8.3)
4
+ zoom_rb (0.8.6)
5
5
  httparty (~> 0.13)
6
- json (~> 2.1)
7
- jwt (~> 2.1)
6
+ json (>= 1.8)
7
+ jwt
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -93,9 +93,10 @@ module Zoom
93
93
  end
94
94
 
95
95
  def webinar_registrants_status_update(*args)
96
- # TODO: implement webinar_registrants_status_update
97
- # options = Utils.extract_options!(args)
98
- raise Zoom::NotImplemented, 'webinar_registrants_status_update is not yet implemented'
96
+ params = Zoom::Params.new(Utils.extract_options!(args))
97
+ params.require(:id, :action)
98
+ .permit(:occurrence_id, registrants: [])
99
+ Utils.parse_response self.class.put("/webinars/#{params[:id]}/registrants/status", body: params.except(:id, :occurrence_ids).to_json, query: params.slice(:occurrence_ids).merge(access_token: access_token))
99
100
  end
100
101
 
101
102
  def past_webinar_list(*args)
@@ -0,0 +1,42 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ RSpec.describe Zoom::Actions::Webinar do
6
+ let(:zc) { zoom_client }
7
+ let(:args) { { id: 'webinar_id', action: 'approve' } }
8
+
9
+ describe '#webinar_registrants_status_update' do
10
+ context 'with a valid response' do
11
+ before :each do
12
+ stub_request(
13
+ :put,
14
+ zoom_url("/webinars/#{args[:id]}/registrants/status")
15
+ ).to_return(status: 204)
16
+ end
17
+
18
+ it "requires a 'id' argument" do
19
+ expect { zc.webinar_registrants_status_update(filter_key(args, :id)) }.to raise_error(Zoom::ParameterMissing, [:id].to_s)
20
+ end
21
+
22
+ it "requires a 'action' argument" do
23
+ expect { zc.webinar_registrants_status_update(filter_key(args, :action)) }.to raise_error(Zoom::ParameterMissing, [:action].to_s)
24
+ end
25
+ end
26
+
27
+ context 'with a 4xx response' do
28
+ before :each do
29
+ stub_request(
30
+ :put,
31
+ zoom_url("/webinars/#{args[:id]}/registrants/status")
32
+ ).to_return(status: 404,
33
+ body: json_response('error', 'validation'),
34
+ headers: {"Content-Type"=> "application/json"})
35
+ end
36
+
37
+ it 'raises Zoom::Error exception' do
38
+ expect { zc.webinar_registrants_status_update(args) }.to raise_error(Zoom::Error)
39
+ end
40
+ end
41
+ end
42
+ end
@@ -25,5 +25,5 @@ Gem::Specification.new do |gem|
25
25
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
26
26
  gem.name = 'zoom_rb'
27
27
  gem.require_paths = ['lib']
28
- gem.version = '0.8.5'
28
+ gem.version = '0.8.6'
29
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zoom_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.5
4
+ version: 0.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle Boe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-20 00:00:00.000000000 Z
11
+ date: 2018-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -305,8 +305,8 @@ files:
305
305
  - spec/lib/zoom/actions/webinar/questions_spec.rb
306
306
  - spec/lib/zoom/actions/webinar/register_spec.rb
307
307
  - spec/lib/zoom/actions/webinar/registrants/add_spec.rb
308
- - spec/lib/zoom/actions/webinar/registrants/approve_spec.rb
309
308
  - spec/lib/zoom/actions/webinar/registrants/list_spec.rb
309
+ - spec/lib/zoom/actions/webinar/registrants/update_status_spec.rb
310
310
  - spec/lib/zoom/actions/webinar/registration_cancel_spec.rb
311
311
  - spec/lib/zoom/actions/webinar/registration_spec.rb
312
312
  - spec/lib/zoom/actions/webinar/update_spec.rb
@@ -477,8 +477,8 @@ test_files:
477
477
  - spec/lib/zoom/actions/webinar/questions_spec.rb
478
478
  - spec/lib/zoom/actions/webinar/register_spec.rb
479
479
  - spec/lib/zoom/actions/webinar/registrants/add_spec.rb
480
- - spec/lib/zoom/actions/webinar/registrants/approve_spec.rb
481
480
  - spec/lib/zoom/actions/webinar/registrants/list_spec.rb
481
+ - spec/lib/zoom/actions/webinar/registrants/update_status_spec.rb
482
482
  - spec/lib/zoom/actions/webinar/registration_cancel_spec.rb
483
483
  - spec/lib/zoom/actions/webinar/registration_spec.rb
484
484
  - spec/lib/zoom/actions/webinar/update_spec.rb
@@ -1,3 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'spec_helper'