bridge_api 0.1.18 → 0.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/bridge_api/client/enrollment.rb +4 -0
- data/lib/bridge_api/version.rb +1 -1
- data/spec/bridge_api/client/enrollment_spec.rb +6 -0
- data/spec/support/fake_bridge.rb +4 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3f0334f3a6655f847d70e5729d08c781b8a11e8
|
4
|
+
data.tar.gz: f80efa53388376683211866398fec9b56c1de348
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73b4a30e9020da739154f77d36ef6f8064b135944c42314bc7c4a373af07c9194e3f11486886da1fc66802b40e4f7e717832f2ac8a252c413ec5ad980a69c922
|
7
|
+
data.tar.gz: 5e06c3034a3df303e3a086f2adb3fc9783059738fb2684d0fc0feb2fc37f50169a74897e4182b3679e5548908b79ef5a48e918d5cee7a7e8f3de543544078aba
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bridge_api (0.1.
|
4
|
+
bridge_api (0.1.19)
|
5
5
|
faraday (~> 0.9.0)
|
6
6
|
faraday_middleware (~> 0.9.0)
|
7
7
|
footrest (>= 0.5.1)
|
@@ -9,7 +9,7 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (5.1.
|
12
|
+
activesupport (5.1.5)
|
13
13
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
14
|
i18n (~> 0.7)
|
15
15
|
minitest (~> 5.1)
|
@@ -31,7 +31,7 @@ GEM
|
|
31
31
|
faraday (~> 0.9.0)
|
32
32
|
link_header (>= 0.0.7)
|
33
33
|
hashdiff (0.3.2)
|
34
|
-
i18n (0.9.
|
34
|
+
i18n (0.9.5)
|
35
35
|
concurrent-ruby (~> 1.0)
|
36
36
|
link_header (0.0.8)
|
37
37
|
method_source (0.8.2)
|
@@ -18,6 +18,10 @@ module BridgeAPI
|
|
18
18
|
get("#{API_PATH}#{AUTHOR_PATH}#{COURSE_TEMPLATE_PATH}/#{course_template_id}#{ENROLLMENT_PATH}", params)
|
19
19
|
end
|
20
20
|
|
21
|
+
def update_enrollment_due_date(enrollment_id, params = {})
|
22
|
+
post("#{API_PATH}#{AUTHOR_PATH}#{ENROLLMENT_PATH}/#{enrollment_id}/due_date", params)
|
23
|
+
end
|
24
|
+
|
21
25
|
end
|
22
26
|
end
|
23
27
|
end
|
data/lib/bridge_api/version.rb
CHANGED
@@ -27,5 +27,11 @@ describe BridgeAPI::Client::Enrollment do
|
|
27
27
|
expect(enrollments.length).to(eq(2))
|
28
28
|
end
|
29
29
|
|
30
|
+
it 'should update due date for enrollments' do
|
31
|
+
enrollment = [{end_at: nil}]
|
32
|
+
response = @client.update_enrollment_due_date(1, enrollment)
|
33
|
+
expect(response.status).to(eq 200)
|
34
|
+
end
|
35
|
+
|
30
36
|
end
|
31
37
|
|
data/spec/support/fake_bridge.rb
CHANGED
@@ -98,6 +98,10 @@ class FakeBridge < Sinatra::Base
|
|
98
98
|
get_json_data 200, 'enrollment.json'
|
99
99
|
end
|
100
100
|
|
101
|
+
post %r{/api/author/enrollments/\d+/due_date$} do
|
102
|
+
get_json_data 200, 'enrollment.json'
|
103
|
+
end
|
104
|
+
|
101
105
|
#Custom Fields
|
102
106
|
|
103
107
|
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.
|
4
|
+
version: 0.1.19
|
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
|
+
date: 2018-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -254,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
254
254
|
version: '0'
|
255
255
|
requirements: []
|
256
256
|
rubyforge_project:
|
257
|
-
rubygems_version: 2.
|
257
|
+
rubygems_version: 2.4.8
|
258
258
|
signing_key:
|
259
259
|
specification_version: 4
|
260
260
|
summary: Bridge API
|
@@ -290,4 +290,3 @@ test_files:
|
|
290
290
|
- spec/fixtures/users.json
|
291
291
|
- spec/support/fake_bridge.rb
|
292
292
|
- spec/test_helper.rb
|
293
|
-
has_rdoc:
|