learnosity-sdk 0.2.2 → 0.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
  SHA256:
3
- metadata.gz: e1b27ed22a689e2e1f36aa33f042acb3562919089628503575ad67a2b919c4a8
4
- data.tar.gz: a35af7e9fa7b838322f7751efe2f942e9599a785fece6813e475bd9c9b4cac54
3
+ metadata.gz: 6d90f14540c688f96421e9cf91925e65868d316ada287955fa74083f0798db05
4
+ data.tar.gz: c5a79a3bb3e1a2610c79210b65abbe0c83b5a25134cc5e60d9e6dedb98277953
5
5
  SHA512:
6
- metadata.gz: a5ed2d8fc9dba2277ca2232b9d8d5fb30bd38cd2d6bd3b4fee732e09981f7df3f2fc3600a16b1324c4d5c49c5734b82fa2615fbe28faf7224b5373f8d11618a2
7
- data.tar.gz: d3fbaa32870101f42837bc38d5fceeca2acaab7d3228e618de349b8ca9f4dbf79de8f15794cdc9c59dae8ad601a094662c02ea5d814a83d797a024b0feb61405
6
+ metadata.gz: ffa6fa9e7c1b1e1b8ebe549eb1e7e0e9e7f192bea5b76a96bd03f50561796461f1a946bde865271b3a36ab45d3eefa0ba5387636222e8cfa8690569ad117b196
7
+ data.tar.gz: 36fd5d5a4787652eeae1916eac9d7b91a763ce2d543cb82dbd744577727cf7408a66057b805d5def84b26730dcadb96845943a181eab80fc202e8e82903403fc
data/ChangeLog.md CHANGED
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [v0.3.0] - 2024-07-12
11
+ ### Added
12
+ - Add support for api-authoraide.
13
+
10
14
  ## [v0.2.2] - 2023-06-29
11
15
  ### Security
12
16
  - Upgraded signature to match the security standard.
@@ -0,0 +1,32 @@
1
+ require 'learnosity/sdk/request/init' # Learnosity helper.
2
+ require 'securerandom'
3
+
4
+ class AuthoraideController < ApplicationController
5
+
6
+ @@security_packet = {
7
+ # XXX: This is a Learnosity Demos consumer; replace it with your own consumer key. Set values in application.rb.
8
+ 'consumer_key' => Rails.configuration.consumer_key,
9
+ 'domain' => 'localhost',
10
+ }
11
+
12
+ # XXX: The consumer secret should be in a properly secured credential store, and *NEVER* checked into version control
13
+ @@consumer_secret = Rails.configuration.consumer_secret
14
+
15
+ @@authoraide_request = {
16
+ "user"=> {
17
+ "id" => "brianmoser",
18
+ "firstname" => "Test",
19
+ "lastname" => "Test",
20
+ "email" => "test@test.com"
21
+ }
22
+ }
23
+
24
+ def index
25
+ @init = Learnosity::Sdk::Request::Init.new(
26
+ 'authoraide',
27
+ @@security_packet,
28
+ @@consumer_secret,
29
+ @@authoraide_request
30
+ )
31
+ end
32
+ end
@@ -0,0 +1,6 @@
1
+ <h1>Standalone Authoraide Example</h1>
2
+ <div id="aiApp"></div>
3
+ <script src="https://authoraide.learnosity.com"></script>
4
+ <script>
5
+ var authoraideApp = LearnosityAuthorAide.init(<%= raw @init.generate %>, "#aiApp");
6
+ </script>
@@ -29,6 +29,10 @@
29
29
  <td>Reports API</td>
30
30
  <td><%=link_to("Here", reports_index_path, target: '_blank') %></td>
31
31
  </tr>
32
+ <tr>
33
+ <td>Authoraide API</td>
34
+ <td><%=link_to("Here", authoraide_index_path, target: '_blank') %> </td>
35
+ </tr>
32
36
  </table>
33
37
  </body>
34
38
  </html>
@@ -3,6 +3,7 @@ Rails.application.routes.draw do
3
3
  get 'index/index'
4
4
  get 'questions/index', as: 'questions_index'
5
5
  get 'author/index' , as: 'author_index'
6
+ get 'authoraide/index' , as: 'authoraide_index'
6
7
  get 'reports/index', as: 'reports_index'
7
8
  get 'items/index', as: 'items_index'
8
9
  # get 'abc' , to: "index#index"
@@ -19,7 +19,7 @@ module Learnosity
19
19
  @@valid_security_keys = ['consumer_key', 'domain', 'timestamp', 'expires', 'user_id'];
20
20
 
21
21
  # Service names that are valid for `$service`
22
- @@valid_services = ['assess', 'author', 'data', 'events', 'items', 'questions', 'reports'];
22
+ @@valid_services = ['assess', 'author', 'data', 'events', 'items', 'questions', 'reports', 'authoraide'];
23
23
 
24
24
  # Determines if telemetry is enabled
25
25
  @@telemetry_enabled = true
@@ -77,7 +77,7 @@ module Learnosity
77
77
  output = {}
78
78
 
79
79
  case @service
80
- when 'assess', 'author', 'data', 'items', 'reports'
80
+ when 'assess', 'author', 'data', 'items', 'reports', 'authoraide'
81
81
  output['security'] = @security_packet
82
82
 
83
83
  unless @request_packet.nil?
@@ -258,7 +258,7 @@ module Learnosity
258
258
  hashed_users[k] = hash_value(k , @secret)
259
259
  end
260
260
  @request_packet['users'] = hashed_users
261
- when 'author', 'data'
261
+ when 'author', 'data', 'authoraide'
262
262
  @sign_request_data = true
263
263
  else
264
264
  raise Exception, "set_service_options() for #{@service} not implemented"
@@ -1,5 +1,5 @@
1
1
  module Learnosity
2
2
  module Sdk
3
- VERSION = "0.2.2"
3
+ VERSION = "0.3.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: learnosity-sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Mehani
8
8
  - learnosity
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2023-07-14 00:00:00.000000000 Z
12
+ date: 2024-07-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sys-uname
@@ -67,7 +67,7 @@ dependencies:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '3.0'
70
- description:
70
+ description:
71
71
  email:
72
72
  - olivier.mehani@learnosity.com
73
73
  - licenses@learnosity.com
@@ -114,6 +114,7 @@ files:
114
114
  - docs/quickstart/lrn-sdk-rails/app/channels/application_cable/connection.rb
115
115
  - docs/quickstart/lrn-sdk-rails/app/controllers/application_controller.rb
116
116
  - docs/quickstart/lrn-sdk-rails/app/controllers/author_controller.rb
117
+ - docs/quickstart/lrn-sdk-rails/app/controllers/authoraide_controller.rb
117
118
  - docs/quickstart/lrn-sdk-rails/app/controllers/concerns/.keep
118
119
  - docs/quickstart/lrn-sdk-rails/app/controllers/index_controller.rb
119
120
  - docs/quickstart/lrn-sdk-rails/app/controllers/items_controller.rb
@@ -126,6 +127,7 @@ files:
126
127
  - docs/quickstart/lrn-sdk-rails/app/models/application_record.rb
127
128
  - docs/quickstart/lrn-sdk-rails/app/models/concerns/.keep
128
129
  - docs/quickstart/lrn-sdk-rails/app/views/author/index.html.erb
130
+ - docs/quickstart/lrn-sdk-rails/app/views/authoraide/index.html.erb
129
131
  - docs/quickstart/lrn-sdk-rails/app/views/index/index.html.erb
130
132
  - docs/quickstart/lrn-sdk-rails/app/views/items/index.html.erb
131
133
  - docs/quickstart/lrn-sdk-rails/app/views/layouts/application.html.erb
@@ -200,7 +202,7 @@ licenses:
200
202
  - Apache-2.0
201
203
  metadata:
202
204
  allowed_push_host: https://rubygems.org
203
- post_install_message:
205
+ post_install_message:
204
206
  rdoc_options: []
205
207
  require_paths:
206
208
  - lib
@@ -215,8 +217,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
217
  - !ruby/object:Gem::Version
216
218
  version: '0'
217
219
  requirements: []
218
- rubygems_version: 3.0.3.1
219
- signing_key:
220
+ rubygems_version: 3.3.27
221
+ signing_key:
220
222
  specification_version: 4
221
223
  summary: SDK to interact with Learnosity APIs
222
224
  test_files: []