clever 2.2.0 → 2.3.0

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
  SHA1:
3
- metadata.gz: 31937aa6d83d7456eac854bd077475ddf5d39299
4
- data.tar.gz: 77406af9971e86d2044dee2fb97f39d26b5fc77e
3
+ metadata.gz: eadea65a93fb58c3c03e4669c9eee742a4d0ca3b
4
+ data.tar.gz: 5cf08d8b4e9c9aa374b522e448ef867fc95db0f6
5
5
  SHA512:
6
- metadata.gz: fd292670c55b4206b3ba68dc009e79084e9eb6d601e2179d9a0b6f499542892a4ea470ec789dfb4f0aa244c85e0d5e06f49b1001a6ef92a8ee072c9fd7e67bda
7
- data.tar.gz: feea3b0b8dbd0e131bdfd1243425e924850a683c8f86e873b46d06b2f26f50e41abfda429c336440d587ea2a55f76487d40aa3c117b2d24653dd2c8823c71509
6
+ metadata.gz: 8d8ba0401e1c2076e71b8e633a53d2e388a72b1e4c1bd49ac01d1792e0801002c12d743578be42ba75deacd96355f80c5a4584a49aa6e40ca50e19352de6fed5
7
+ data.tar.gz: 55e3247234f4b6612f6ee9dd90c16773608b5c042042e323f562446341e5f8226cdd582a98c198814a3ad36b94d3c49eb60e1fc661cb55c47ec9e324af258dad
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- clever (2.2.0)
4
+ clever (2.3.0)
5
5
  faraday
6
6
  faraday_middleware
7
7
 
@@ -136,7 +136,8 @@ module Clever
136
136
  section.teachers.each do |teacher_uid|
137
137
  enrollments[:teacher] << Types::Enrollment.new(
138
138
  'classroom_uid' => section.uid,
139
- 'user_uid' => teacher_uid
139
+ 'user_uid' => teacher_uid,
140
+ 'primary' => section.primary_teacher_uid == teacher_uid
140
141
  )
141
142
  end
142
143
  end
@@ -5,12 +5,14 @@ module Clever
5
5
  class Enrollment < Base
6
6
  attr_reader :classroom_uid,
7
7
  :user_uid,
8
- :provider
8
+ :provider,
9
+ :primary
9
10
 
10
11
  def initialize(attributes = {})
11
- @classroom_uid = attributes['classroom_uid']
12
- @user_uid = attributes['user_uid']
13
- @provider = 'clever'
12
+ @classroom_uid = attributes['classroom_uid']
13
+ @user_uid = attributes['user_uid']
14
+ @provider = 'clever'
15
+ @primary = attributes.dig('primary') || false
14
16
  end
15
17
  end
16
18
  end
@@ -12,19 +12,21 @@ module Clever
12
12
  :students,
13
13
  :teachers,
14
14
  :term_id,
15
- :provider
15
+ :provider,
16
+ :primary_teacher_uid
16
17
 
17
18
  def initialize(attributes = {}, *)
18
- @uid = attributes['id']
19
- @name = attributes['name']
20
- @period = attributes['period']
21
- @course = attributes['course']
22
- @grades = [presence(attributes['grade'])].compact
23
- @subjects = [presence(attributes['subject'])].compact
24
- @students = attributes['students']
25
- @teachers = attributes['teachers']
26
- @term_id = attributes['term_id']
27
- @provider = 'clever'
19
+ @uid = attributes['id']
20
+ @name = attributes['name']
21
+ @period = attributes['period']
22
+ @course = attributes['course']
23
+ @grades = [presence(attributes['grade'])].compact
24
+ @subjects = [presence(attributes['subject'])].compact
25
+ @students = attributes['students']
26
+ @teachers = attributes['teachers']
27
+ @term_id = attributes['term_id']
28
+ @provider = 'clever'
29
+ @primary_teacher_uid = attributes['teacher']
28
30
  end
29
31
  end
30
32
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Clever
4
- VERSION = '2.2.0'
4
+ VERSION = '2.3.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: clever
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Julius
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-28 00:00:00.000000000 Z
11
+ date: 2020-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday