bridge_api 0.1.48 → 0.1.49

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: 757bc0d323c278bd190a57adbed819655384dfde356a94d3f75261c8b636d1a3
4
- data.tar.gz: 9cdfd99253f8a9dc34c2c1bf6baa76fb812c56d8722f8df588cc2cc4ffbbb215
3
+ metadata.gz: 1b27b51312f62d92a1d419e64d8bb10ec4f992e53324c2457532667df42cdebe
4
+ data.tar.gz: aca732c96ce3a4bbdf95909e390d7697be30603888228dfb992a4ac60342bfee
5
5
  SHA512:
6
- metadata.gz: 82362409dee64a4fedda2f6f87b9ef0cf0121c8b7ab133768c9c71270aad6a7821f864f80b9578c29811f0ba12e977a7c06de435b16994cc96ece7b168889428
7
- data.tar.gz: 2515324336c1c1c06f640b3184d15ce07bc6ef73eb73688c66d7daf4bcc5c9d8a079c8bee0023109fe4def2b40b31db437ccefae10449f689e61ce7e21f695e5
6
+ metadata.gz: 90451393ad730daab429e5fa239ffa56773f69f8de24380318c05ee080b98354432a0d7527af5a27c30b23f872905cbe06f91ede9bd43dc521811a6632c03196
7
+ data.tar.gz: e763cd9abcac17a4f0fca1155c385f38d5e20d8b4a93fd177cf2c3557022ab57110bfc14f3362bab0003266884499cc55bb929dc123f4ec482aca975fbf334a7
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bridge_api (0.1.47)
4
+ bridge_api (0.1.48)
5
5
  faraday (~> 0.9.0)
6
6
  faraday_middleware (>= 0.12.2)
7
7
  footrest (>= 0.5.1)
@@ -11,7 +11,7 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activesupport (5.2.1)
14
+ activesupport (5.2.2)
15
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
16
  i18n (>= 0.7, < 2)
17
17
  minitest (~> 5.1)
@@ -20,7 +20,7 @@ GEM
20
20
  public_suffix (>= 2.0.2, < 4.0)
21
21
  byebug (8.2.5)
22
22
  coderay (1.1.2)
23
- concurrent-ruby (1.1.1)
23
+ concurrent-ruby (1.1.3)
24
24
  crack (0.4.3)
25
25
  safe_yaml (~> 1.0.0)
26
26
  diff-lcs (1.3)
@@ -92,4 +92,4 @@ DEPENDENCIES
92
92
  webmock (~> 1.22.6)
93
93
 
94
94
  BUNDLED WITH
95
- 1.16.3
95
+ 1.17.1
@@ -40,6 +40,8 @@ module BridgeAPI
40
40
  PUBLISH_PATH = '/publish'.freeze
41
41
  WEB_CONFERENCE_PATH = '/web_conference'.freeze
42
42
  RESTORE_PATH = '/restore'.freeze
43
+ DUE_DATE_PATH = '/due_date'.freeze
44
+ RESET_PATH = '/reset'.freeze
43
45
  RESULT_MAPPING = {}
44
46
 
45
47
  Dir[File.dirname(__FILE__) + '/client/*.rb'].each do |file|
@@ -18,7 +18,11 @@ module BridgeAPI
18
18
  end
19
19
 
20
20
  def update_enrollment_due_date(enrollment_id, params = {})
21
- post("#{API_PATH}#{AUTHOR_PATH}#{ENROLLMENT_PATH}/#{enrollment_id}/due_date", params)
21
+ post("#{API_PATH}#{AUTHOR_PATH}#{ENROLLMENT_PATH}/#{enrollment_id}#{DUE_DATE_PATH}", params)
22
+ end
23
+
24
+ def reset_enrollment(enrollment_id, params = {})
25
+ post("#{API_PATH}#{ADMIN_PATH}#{ENROLLMENT_PATH}/#{enrollment_id}#{RESET_PATH}", params)
22
26
  end
23
27
  end
24
28
  end
@@ -1,3 +1,3 @@
1
1
  module BridgeAPI
2
- VERSION = '0.1.48'.freeze unless defined?(BridgeAPI::VERSION)
2
+ VERSION = '0.1.49'.freeze unless defined?(BridgeAPI::VERSION)
3
3
  end
@@ -28,6 +28,11 @@ describe BridgeAPI::Client::Enrollment do
28
28
  it 'should update due date for enrollments' do
29
29
  enrollment = [{ end_at: nil }]
30
30
  response = @client.update_enrollment_due_date(1, enrollment)
31
- expect(response.status).to(eq 200)
31
+ expect(response.status).to(eq(200))
32
+ end
33
+
34
+ it 'should reset an enrollment for a course template' do
35
+ response = @client.reset_enrollment(1)
36
+ expect(response.status).to(eq(204))
32
37
  end
33
38
  end
@@ -112,6 +112,10 @@ class FakeBridge < Sinatra::Base
112
112
  get_json_data 200, 'enrollment.json'
113
113
  end
114
114
 
115
+ post %r{/api/admin/enrollments/\d+/reset} do
116
+ get_json_data 204, 'enrollment.json'
117
+ end
118
+
115
119
  # Custom Fields
116
120
 
117
121
  get %r{/api/author/custom_fields} do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridge_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.48
4
+ version: 0.1.49
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Shaffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-05 00:00:00.000000000 Z
11
+ date: 2018-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler