bearcat 1.3.38 → 1.3.39
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 +4 -4
- data/lib/bearcat/client/modules.rb +4 -0
- data/lib/bearcat/version.rb +1 -1
- data/spec/bearcat/client/modules_spec.rb +12 -1
- data/spec/fixtures/created_module.json +13 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 65123eeb33d4e34d269eb78e2dd2bbb24a3b0dd22ea8669a0aad71d95fcdd579
|
|
4
|
+
data.tar.gz: 27d69431eb95003df4f38413b12de69d797d5b1d1f55a1d2bc06f82a199bf229
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8826c81214be7c758f4f3c847407d9b2f926cfaabbcb8ae086108d4aa647dce1a9a6fb9d415dd0ff4982e9f484c7daa57d418fec1c03cc6ca12bd151cdd640ae
|
|
7
|
+
data.tar.gz: abc239a8e4211ff6da3af47a56e98a83385a8ca8cbc0ee17b39cbe8f6a4df8dfca72fddfd2e576313ffffd25d669ffa4b481f75886ab563245b9df5838bbf132
|
data/lib/bearcat/version.rb
CHANGED
|
@@ -28,5 +28,16 @@ describe Bearcat::Client::Modules do
|
|
|
28
28
|
expect(context_module['id']).to eq(2)
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
|
-
end
|
|
32
31
|
|
|
32
|
+
describe "#create_module" do
|
|
33
|
+
it "creates a new module" do
|
|
34
|
+
name = "new module"
|
|
35
|
+
stub_request(:post, "http://canvas.instructure.com/api/v1/courses/1/modules")
|
|
36
|
+
.with(body: {"name"=>"new module"})
|
|
37
|
+
.to_return(json_response("created_module.json"))
|
|
38
|
+
course_module = @client.create_module(1, { name: name })
|
|
39
|
+
course_module["name"].should == name
|
|
40
|
+
course_module["id"].should == 1
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": 1,
|
|
3
|
+
"name": "new module",
|
|
4
|
+
"position": 1,
|
|
5
|
+
"unlock_at": null,
|
|
6
|
+
"require_sequential_progress": true,
|
|
7
|
+
"publish_final_grade": false,
|
|
8
|
+
"prerequisite_module_ids": [],
|
|
9
|
+
"state": "active",
|
|
10
|
+
"completed_at": "2014-04-18T19:38:01Z",
|
|
11
|
+
"items_count": 0,
|
|
12
|
+
"items_url": "http://localhost:3000/api/v1/courses/1384/modules/1/items"
|
|
13
|
+
}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bearcat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.39
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Mills, Jake Sorce
|
|
@@ -270,6 +270,7 @@ files:
|
|
|
270
270
|
- spec/fixtures/created_group.json
|
|
271
271
|
- spec/fixtures/created_group_category.json
|
|
272
272
|
- spec/fixtures/created_group_membership.json
|
|
273
|
+
- spec/fixtures/created_module.json
|
|
273
274
|
- spec/fixtures/custom_data.json
|
|
274
275
|
- spec/fixtures/custom_food_data.json
|
|
275
276
|
- spec/fixtures/custom_gradebook_columns/column_data.json
|
|
@@ -499,6 +500,7 @@ test_files:
|
|
|
499
500
|
- spec/fixtures/user_profile.json
|
|
500
501
|
- spec/fixtures/create_course_discussion.json
|
|
501
502
|
- spec/fixtures/custom_food_data.json
|
|
503
|
+
- spec/fixtures/created_module.json
|
|
502
504
|
- spec/fixtures/course_groups.json
|
|
503
505
|
- spec/fixtures/reactivate_enrollment.json
|
|
504
506
|
- spec/fixtures/account_courses.json
|