oneroster 2.3.14 → 2.3.16

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62faceda39bd2fe1c5007662c3088afb4fe847dca3da6c818a36704f05aafd1c
4
- data.tar.gz: 5b0a666783ee99ce16e41ce6041b4c60c3c2a4cd2788c0e65ca738a28cf518ca
3
+ metadata.gz: 9fe9dad3ac5ec94b56e19e454c4f5b02cef8aa2d296ab9fd4712fecc5d5cb900
4
+ data.tar.gz: 56d71fcd5e105f8c39f1634be90ab0da4f88259a03c73c796f3a73c4eb86a55d
5
5
  SHA512:
6
- metadata.gz: d8c2d30730df77ac2f8b4fa92070b2fe4a352347295ab2f0226f262fa2a9dadba2cbf01d9e306e61b7c29594111557f43f1752f50ba8346e1598a721ef01c918
7
- data.tar.gz: e218e0be75fcba794d365fb9e06ae20f59969f816bf225c2f798255036f99330e758ba30a9675df7f0bc73086e2d0ebd6b450840c1da1990f8c0b1425ddd6b10
6
+ metadata.gz: 999b238ab6e94f5fb2f83517a282945e4d758ff6a5f297f8448d44321e4d79188c208d1aaa42cb0a184a5c4d7953754a4e6e4ba66693031ba3854d642506bb9c
7
+ data.tar.gz: c7abc5bd193fe99d7d6750889bda3ecf6c56f0fc14b46d25294f16003d96b2d6784c8e8df8d085f9ef16cff3e391838543287b9c6aa7a92202ffa76b62d5abaf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- oneroster (2.3.14)
4
+ oneroster (2.3.16)
5
5
  dry-inflector
6
6
  faraday
7
7
  faraday_middleware
@@ -60,7 +60,7 @@ module OneRoster
60
60
  course = courses.find { |course| course.uid == oneroster_class.course_uid }
61
61
  next unless course
62
62
 
63
- term = terms_hash[oneroster_class.term_id]
63
+ term = terms_hash[oneroster_class.term_id&.first]
64
64
 
65
65
  oneroster_classes << Types::Classroom.new(
66
66
  'id' => oneroster_class.uid,
@@ -71,7 +71,8 @@ module OneRoster
71
71
  'subjects' => oneroster_class.subjects,
72
72
  'term_name' => term&.name,
73
73
  'term_start_date' => term&.start_date,
74
- 'term_end_date' => term&.end_date
74
+ 'term_end_date' => term&.end_date,
75
+ 'term_id' => oneroster_class.term_id
75
76
  )
76
77
  end
77
78
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OneRoster
4
- VERSION = '2.3.14'
4
+ VERSION = '2.3.16'
5
5
  end
data/lib/types/class.rb CHANGED
@@ -20,7 +20,7 @@ module OneRoster
20
20
  @period = first_period(attributes) || period_from_code(attributes)
21
21
  @grades = presence(attributes['grades']) || []
22
22
  @subjects = presence(attributes['subjects']) || []
23
- @term_id = attributes.dig('terms', 0, 'sourcedId')
23
+ @term_id = attributes.dig('terms')&.map { |term| term['sourcedId'] } || []
24
24
  @provider = 'oneroster'
25
25
  end
26
26
 
@@ -12,7 +12,8 @@ module OneRoster
12
12
  :provider,
13
13
  :term_name,
14
14
  :term_start_date,
15
- :term_end_date
15
+ :term_end_date,
16
+ :term_id
16
17
 
17
18
  def initialize(attributes = {})
18
19
  @uid = attributes['id']
@@ -24,6 +25,7 @@ module OneRoster
24
25
  @term_name = attributes['term_name']
25
26
  @term_start_date = attributes['term_start_date']
26
27
  @term_end_date = attributes['term_end_date']
28
+ @term_id = attributes['term_id']
27
29
  @provider = 'oneroster'
28
30
  end
29
31
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oneroster
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.14
4
+ version: 2.3.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Julius
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-30 00:00:00.000000000 Z
11
+ date: 2024-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday