bearcat 1.4.11 → 1.4.12

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
- SHA1:
3
- metadata.gz: 65992dcbb43af93a7a7f34bdf322bd82dd7ee45c
4
- data.tar.gz: 3bf3d5f3e0849977b01b64df3c544519c2da928c
2
+ SHA256:
3
+ metadata.gz: b9624073616df55ad692ec0eb808b54f351b41449f5bd6a75806b4ef6934bb87
4
+ data.tar.gz: c6eae2b5630dfd0c6b588d782055d414f5b2ae90e2c455aa71d2784c8b7e55dd
5
5
  SHA512:
6
- metadata.gz: 2936b59a7848832d98927f55e16abcce88f975a48319acaa2d8888ac5fe0ddb3e824f2eb1b638c44e0adeb0e5269eb6dd1304b0866feefca1714ce4c2c58565e
7
- data.tar.gz: 1f176cce865ed38077e99e8a4960a09953d9c62bc0dbf7e0353caf8d1fc281152764ffbe05321ad13c01986b148c7f5154c20dee1096ab44ec444692cbb360c8
6
+ metadata.gz: e2afebc157550a3372fdeee760f47b6bbba7a7c88f366d67f4d24abb8eee0f4e2deae063530b7eded3b6e608ff2213ba090abf2c4de3aa8c1a9c005aa1167701
7
+ data.tar.gz: 0dd4001957e00e222210560338f1790b3e09c9597e646375ac00ac3f7d6fd8028c5c91469ce77d69a9f07982d6f8f982e694d208ae389cff2f895d63722be773
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bearcat
4
+ class Client < Footrest::Client
5
+ module LearningOutcomes
6
+
7
+ def learning_outcome(outcome, params={})
8
+ get("/api/v1/outcomes/#{outcome}", params)
9
+ end
10
+
11
+ def update_learning_outcome(outcome, params={})
12
+ put("/api/v1/outcomes/#{outcome}", params)
13
+ end
14
+
15
+ end
16
+ end
17
+ end
@@ -1,3 +1,3 @@
1
1
  module Bearcat
2
- VERSION = '1.4.11' unless defined?(Bearcat::VERSION)
2
+ VERSION = '1.4.12' unless defined?(Bearcat::VERSION)
3
3
  end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'helper'
4
+
5
+ describe Bearcat::Client::LearningOutcomes do
6
+ before do
7
+ @client = Bearcat::Client.new(prefix: "http://canvas.instructure.com", token: "test_token")
8
+ end
9
+
10
+ it "returns an individual learning outcome" do
11
+ stub_get(@client, "/api/v1/outcomes/1").to_return(json_response("learning_outcomes.json"))
12
+ outcome = @client.learning_outcome(1)
13
+ outcome["id"].should == 1
14
+ outcome["context_type"].should == "Course"
15
+ outcome["title"].should == "First Outcome"
16
+ end
17
+
18
+ it "updates an individual learning outcome" do
19
+ stub_put(@client, "/api/v1/outcomes/1").to_return(json_response("learning_outcomes.json"))
20
+ outcome = @client.update_learning_outcome(1)
21
+ outcome["id"].should == 1
22
+ outcome["context_type"].should == "Course"
23
+ outcome["title"].should == "First Outcome"
24
+ end
25
+ end
@@ -0,0 +1,32 @@
1
+ {
2
+ "id": 1,
3
+ "context_id": 1,
4
+ "context_type": "Course",
5
+ "vendor_guid": null,
6
+ "display_name": "",
7
+ "title": "First Outcome",
8
+ "url": "/api/v1/outcomes/1",
9
+ "can_edit": true,
10
+ "has_updateable_rubrics": false,
11
+ "description": "<p>Description</p>",
12
+ "friendly_description": null,
13
+ "points_possible": 5.0,
14
+ "mastery_points": 3.0,
15
+ "ratings": [
16
+ {
17
+ "description": "Exceeds Expectations",
18
+ "points": 5.0
19
+ },
20
+ {
21
+ "description": "Meets Expectations",
22
+ "points": 3.0
23
+ },
24
+ {
25
+ "description": "Does Not Meet Expectations",
26
+ "points": 0.0
27
+ }
28
+ ],
29
+ "calculation_method": "decaying_average",
30
+ "calculation_int": 65,
31
+ "assessed": true
32
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bearcat
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.11
4
+ version: 1.4.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Mills, Jake Sorce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-13 00:00:00.000000000 Z
11
+ date: 2022-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -158,6 +158,7 @@ files:
158
158
  - lib/bearcat/client/group_categories.rb
159
159
  - lib/bearcat/client/group_memberships.rb
160
160
  - lib/bearcat/client/groups.rb
161
+ - lib/bearcat/client/learning_outcomes.rb
161
162
  - lib/bearcat/client/module_items.rb
162
163
  - lib/bearcat/client/modules.rb
163
164
  - lib/bearcat/client/o_auth2.rb
@@ -202,6 +203,7 @@ files:
202
203
  - spec/bearcat/client/group_categories_spec.rb
203
204
  - spec/bearcat/client/group_membership_spec.rb
204
205
  - spec/bearcat/client/groups_spec.rb
206
+ - spec/bearcat/client/learning_outcomes_spec.rb
205
207
  - spec/bearcat/client/module_items_spec.rb
206
208
  - spec/bearcat/client/modules_spec.rb
207
209
  - spec/bearcat/client/o_auth2_spec.rb
@@ -318,6 +320,7 @@ files:
318
320
  - spec/fixtures/group_category_groups.json
319
321
  - spec/fixtures/group_conferences.json
320
322
  - spec/fixtures/group_membership.json
323
+ - spec/fixtures/learning_outcome.json
321
324
  - spec/fixtures/link_unlink_outcome.json
322
325
  - spec/fixtures/merge_user.json
323
326
  - spec/fixtures/module.json
@@ -383,8 +386,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
383
386
  - !ruby/object:Gem::Version
384
387
  version: '0'
385
388
  requirements: []
386
- rubyforge_project:
387
- rubygems_version: 2.4.5.1
389
+ rubygems_version: 3.0.3
388
390
  signing_key:
389
391
  specification_version: 4
390
392
  summary: Canvas API
@@ -423,6 +425,7 @@ test_files:
423
425
  - spec/bearcat/client/external_tools_spec.rb
424
426
  - spec/bearcat/client/rubric_spec.rb
425
427
  - spec/bearcat/client/accounts_spec.rb
428
+ - spec/bearcat/client/learning_outcomes_spec.rb
426
429
  - spec/bearcat/client/outcomes_spec.rb
427
430
  - spec/bearcat/client/courses_spec.rb
428
431
  - spec/bearcat/client/reports_spec.rb
@@ -540,6 +543,7 @@ test_files:
540
543
  - spec/fixtures/account_admin_delete.json
541
544
  - spec/fixtures/account_reports_result_success.json
542
545
  - spec/fixtures/deleted_conversation.json
546
+ - spec/fixtures/learning_outcome.json
543
547
  - spec/fixtures/user_details.json
544
548
  - spec/fixtures/outcome_group_import.json
545
549
  - spec/fixtures/modules.json