strongmind-platform-sdk 3.6.2 → 3.7.1
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/Gemfile.lock +29 -27
- data/README.md +1 -1
- data/lib/platform_sdk/edfi/client.rb +42 -0
- data/lib/platform_sdk/edfi.rb +13 -0
- data/lib/platform_sdk/version.rb +1 -1
- data/lib/platform_sdk.rb +1 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 31db31f4d8ace1dbe04d12513c4e1c927504fc9348a942980b64f6d4043e3d22
|
4
|
+
data.tar.gz: '09821f67491111fbc62854115f0c9b27f41a1c7d47157a7960881dc5d16f4db3'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 798ce1c9821925695b39a280edef2bc021cee9d2805b94c71a674966232d3244c825519e0343312d72b47890a895494bba4e3c960a6b2c20fff01456101d3514
|
7
|
+
data.tar.gz: f6dba455341de18ad13c33734883b8abd5731f9897a62991317ff390e3862ed03556a336f8c079dd43f64bc5308c7a33032f56f04435bb405d6700aeeb7fae0d
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
strongmind-platform-sdk (3.
|
4
|
+
strongmind-platform-sdk (3.7.1)
|
5
5
|
aws-sdk-secretsmanager (~> 1.66)
|
6
6
|
devise
|
7
7
|
faraday (~> 2.5, >= 2.5.2)
|
@@ -38,20 +38,21 @@ GEM
|
|
38
38
|
tzinfo (~> 2.0)
|
39
39
|
aes_key_wrap (1.1.0)
|
40
40
|
ast (2.4.2)
|
41
|
-
attr_required (1.0.
|
42
|
-
aws-eventstream (1.
|
43
|
-
aws-partitions (1.
|
44
|
-
aws-sdk-core (3.
|
45
|
-
aws-eventstream (~> 1, >= 1.0
|
41
|
+
attr_required (1.0.2)
|
42
|
+
aws-eventstream (1.3.0)
|
43
|
+
aws-partitions (1.876.0)
|
44
|
+
aws-sdk-core (3.190.1)
|
45
|
+
aws-eventstream (~> 1, >= 1.3.0)
|
46
46
|
aws-partitions (~> 1, >= 1.651.0)
|
47
|
-
aws-sigv4 (~> 1.
|
47
|
+
aws-sigv4 (~> 1.8)
|
48
48
|
jmespath (~> 1, >= 1.6.1)
|
49
|
-
aws-sdk-secretsmanager (1.
|
50
|
-
aws-sdk-core (~> 3, >= 3.
|
49
|
+
aws-sdk-secretsmanager (1.88.0)
|
50
|
+
aws-sdk-core (~> 3, >= 3.188.0)
|
51
51
|
aws-sigv4 (~> 1.1)
|
52
|
-
aws-sigv4 (1.
|
52
|
+
aws-sigv4 (1.8.0)
|
53
53
|
aws-eventstream (~> 1, >= 1.0.2)
|
54
|
-
|
54
|
+
base64 (0.2.0)
|
55
|
+
bcrypt (3.1.20)
|
55
56
|
bindata (2.4.15)
|
56
57
|
builder (3.2.4)
|
57
58
|
concurrent-ruby (1.2.2)
|
@@ -64,6 +65,8 @@ GEM
|
|
64
65
|
responders
|
65
66
|
warden (~> 1.2.3)
|
66
67
|
diff-lcs (1.5.0)
|
68
|
+
email_validator (2.2.4)
|
69
|
+
activemodel
|
67
70
|
erubi (1.12.0)
|
68
71
|
ethon (0.16.0)
|
69
72
|
ffi (>= 1.15.0)
|
@@ -85,14 +88,15 @@ GEM
|
|
85
88
|
concurrent-ruby (~> 1.0)
|
86
89
|
jmespath (1.6.2)
|
87
90
|
json (2.6.3)
|
88
|
-
json-jwt (1.16.
|
91
|
+
json-jwt (1.16.5)
|
89
92
|
activesupport (>= 4.2)
|
90
93
|
aes_key_wrap
|
94
|
+
base64
|
91
95
|
bindata
|
92
96
|
faraday (~> 2.0)
|
93
97
|
faraday-follow_redirects
|
94
98
|
jwt (1.5.6)
|
95
|
-
loofah (2.
|
99
|
+
loofah (2.22.0)
|
96
100
|
crass (~> 1.0.2)
|
97
101
|
nokogiri (>= 1.12.0)
|
98
102
|
mail (2.8.1)
|
@@ -104,7 +108,7 @@ GEM
|
|
104
108
|
mini_mime (1.1.5)
|
105
109
|
mini_portile2 (2.8.5)
|
106
110
|
minitest (5.18.0)
|
107
|
-
net-imap (0.4.
|
111
|
+
net-imap (0.4.9)
|
108
112
|
date
|
109
113
|
net-protocol
|
110
114
|
net-pop (0.1.2)
|
@@ -113,10 +117,10 @@ GEM
|
|
113
117
|
timeout
|
114
118
|
net-smtp (0.4.0)
|
115
119
|
net-protocol
|
116
|
-
nokogiri (1.
|
120
|
+
nokogiri (1.16.0)
|
117
121
|
mini_portile2 (~> 2.8.2)
|
118
122
|
racc (~> 1.4)
|
119
|
-
omniauth (2.1.
|
123
|
+
omniauth (2.1.2)
|
120
124
|
hashie (>= 3.4.6)
|
121
125
|
rack (>= 2.2.3)
|
122
126
|
rack-protection
|
@@ -126,34 +130,35 @@ GEM
|
|
126
130
|
omniauth_openid_connect (0.7.1)
|
127
131
|
omniauth (>= 1.9, < 3)
|
128
132
|
openid_connect (~> 2.2)
|
129
|
-
openid_connect (2.
|
133
|
+
openid_connect (2.3.0)
|
130
134
|
activemodel
|
131
135
|
attr_required (>= 1.0.0)
|
136
|
+
email_validator
|
132
137
|
faraday (~> 2.0)
|
133
138
|
faraday-follow_redirects
|
134
139
|
json-jwt (>= 1.16)
|
135
|
-
|
140
|
+
mail
|
136
141
|
rack-oauth2 (~> 2.2)
|
137
142
|
swd (~> 2.0)
|
138
143
|
tzinfo
|
139
|
-
validate_email
|
140
144
|
validate_url
|
141
145
|
webfinger (~> 2.0)
|
142
146
|
orm_adapter (0.5.0)
|
143
147
|
parallel (1.23.0)
|
144
148
|
parser (3.2.2.1)
|
145
149
|
ast (~> 2.4.1)
|
146
|
-
public_suffix (5.0.
|
150
|
+
public_suffix (5.0.4)
|
147
151
|
racc (1.7.3)
|
148
152
|
rack (2.2.8)
|
149
|
-
rack-oauth2 (2.2.
|
153
|
+
rack-oauth2 (2.2.1)
|
150
154
|
activesupport
|
151
155
|
attr_required
|
152
156
|
faraday (~> 2.0)
|
153
157
|
faraday-follow_redirects
|
154
158
|
json-jwt (>= 1.11.0)
|
155
159
|
rack (>= 2.1.0)
|
156
|
-
rack-protection (3.
|
160
|
+
rack-protection (3.2.0)
|
161
|
+
base64 (>= 0.1.0)
|
157
162
|
rack (~> 2.2, >= 2.2.4)
|
158
163
|
rack-test (2.1.0)
|
159
164
|
rack (>= 1.3)
|
@@ -208,7 +213,7 @@ GEM
|
|
208
213
|
strongmind-oneroster-client (2.0.3)
|
209
214
|
json (~> 2.1, >= 2.1.0)
|
210
215
|
typhoeus (~> 1.0, >= 1.0.1)
|
211
|
-
swd (2.0.
|
216
|
+
swd (2.0.3)
|
212
217
|
activesupport (>= 3)
|
213
218
|
attr_required (>= 0.0.5)
|
214
219
|
faraday (~> 2.0)
|
@@ -221,15 +226,12 @@ GEM
|
|
221
226
|
concurrent-ruby (~> 1.0)
|
222
227
|
unicode-display_width (2.4.2)
|
223
228
|
uri (0.13.0)
|
224
|
-
validate_email (0.1.6)
|
225
|
-
activemodel (>= 3.0)
|
226
|
-
mail (>= 2.2.5)
|
227
229
|
validate_url (1.0.15)
|
228
230
|
activemodel (>= 3.0.0)
|
229
231
|
public_suffix
|
230
232
|
warden (1.2.9)
|
231
233
|
rack (>= 2.0.9)
|
232
|
-
webfinger (2.1.
|
234
|
+
webfinger (2.1.3)
|
233
235
|
activesupport
|
234
236
|
faraday (~> 2.0)
|
235
237
|
faraday-follow_redirects
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ First [configure your GitHub credentials](#configure-github-credentials)
|
|
11
11
|
Install the gem and add to the application's Gemfile by executing:
|
12
12
|
|
13
13
|
```
|
14
|
-
gem "strongmind-platform-sdk", "~> 3.
|
14
|
+
gem "strongmind-platform-sdk", "~> 3.7.1"
|
15
15
|
```
|
16
16
|
|
17
17
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
@@ -0,0 +1,42 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module PlatformSdk
|
4
|
+
module Edfi
|
5
|
+
# IdMapper::Client
|
6
|
+
class Client
|
7
|
+
attr_reader :token, :domain, :conn
|
8
|
+
|
9
|
+
def initialize(base_url, auth_client)
|
10
|
+
@base_url ||= base_url
|
11
|
+
@auth_client = auth_client
|
12
|
+
|
13
|
+
@conn = Faraday.new(@base_url) do |faraday|
|
14
|
+
faraday.headers = headers
|
15
|
+
faraday.adapter Faraday.default_adapter
|
16
|
+
faraday.response :json, content_type: /\bjson$/
|
17
|
+
faraday.response :raise_error
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def get_student_programs(uid)
|
22
|
+
begin
|
23
|
+
response = @conn.get("/ed-fi/v5.1.0/api/data/v3/ed-fi/studentProgramAssociations?studentUniqueId=#{uid}")
|
24
|
+
response.body
|
25
|
+
rescue Faraday::ResourceNotFound => e
|
26
|
+
puts "Faraday::ResourceNotFound: #{e}"
|
27
|
+
[]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
def headers
|
34
|
+
{
|
35
|
+
"Authorization" => "Bearer #{@auth_client.auth_token}",
|
36
|
+
"Content-Type" => "application/json",
|
37
|
+
"Accept" => "application/json"
|
38
|
+
}
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
data/lib/platform_sdk/version.rb
CHANGED
data/lib/platform_sdk.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: strongmind-platform-sdk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Platform Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -188,6 +188,8 @@ files:
|
|
188
188
|
- lib/platform_sdk/aws/secrets_manager_client.rb
|
189
189
|
- lib/platform_sdk/data_pipeline.rb
|
190
190
|
- lib/platform_sdk/data_pipeline/data_pipeline_client.rb
|
191
|
+
- lib/platform_sdk/edfi.rb
|
192
|
+
- lib/platform_sdk/edfi/client.rb
|
191
193
|
- lib/platform_sdk/edkey.rb
|
192
194
|
- lib/platform_sdk/edkey/client.rb
|
193
195
|
- lib/platform_sdk/id_mapper.rb
|