domoscio_rails 0.4.24 → 0.4.26
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/lib/domoscio_rails/data/account.rb +7 -0
- data/lib/domoscio_rails/data/content.rb +2 -1
- data/lib/domoscio_rails/data/device.rb +2 -1
- data/lib/domoscio_rails/data/event.rb +2 -1
- data/lib/domoscio_rails/data/instance_parameter.rb +2 -1
- data/lib/domoscio_rails/data/learning_session.rb +2 -1
- data/lib/domoscio_rails/data/learning_session_knowledge_node.rb +2 -1
- data/lib/domoscio_rails/data/learning_session_recommendation.rb +2 -1
- data/lib/domoscio_rails/data/question.rb +2 -1
- data/lib/domoscio_rails/data/recommendation.rb +2 -1
- data/lib/domoscio_rails/data/role.rb +13 -0
- data/lib/domoscio_rails/data/scorm.rb +2 -1
- data/lib/domoscio_rails/data/student.rb +2 -1
- data/lib/domoscio_rails/data/student_group.rb +9 -1
- data/lib/domoscio_rails/data/supervisor.rb +12 -0
- data/lib/domoscio_rails/data/user.rb +22 -1
- data/lib/domoscio_rails/http_calls.rb +6 -17
- data/lib/domoscio_rails/knowledge/knowledge_edge.rb +2 -1
- data/lib/domoscio_rails/knowledge/knowledge_graph.rb +2 -1
- data/lib/domoscio_rails/knowledge/knowledge_graph_node.rb +2 -1
- data/lib/domoscio_rails/knowledge/knowledge_graph_scale.rb +2 -1
- data/lib/domoscio_rails/knowledge/knowledge_node.rb +2 -1
- data/lib/domoscio_rails/knowledge/knowledge_node_content.rb +2 -1
- data/lib/domoscio_rails/knowledge/knowledge_node_student.rb +2 -1
- data/lib/domoscio_rails/knowledge/scale.rb +2 -1
- data/lib/domoscio_rails/objective/learning_program.rb +2 -1
- data/lib/domoscio_rails/objective/learning_program_student.rb +2 -1
- data/lib/domoscio_rails/objective/objective.rb +2 -1
- data/lib/domoscio_rails/objective/objective_knowledge_node.rb +2 -1
- data/lib/domoscio_rails/objective/objective_knowledge_node_student.rb +2 -1
- data/lib/domoscio_rails/objective/objective_student.rb +2 -1
- data/lib/domoscio_rails/objective/subscription.rb +2 -1
- data/lib/domoscio_rails/resource.rb +20 -3
- data/lib/domoscio_rails/tag/tag.rb +2 -1
- data/lib/domoscio_rails/tag/tag_edge.rb +2 -1
- data/lib/domoscio_rails/tag/tag_set.rb +2 -1
- data/lib/domoscio_rails/tag/tagging.rb +2 -1
- data/lib/domoscio_rails/utils/analytic.rb +2 -1
- data/lib/domoscio_rails/utils/export.rb +2 -1
- data/lib/domoscio_rails/utils/export_request.rb +2 -1
- data/lib/domoscio_rails/utils/gameplay_util.rb +2 -1
- data/lib/domoscio_rails/utils/kpi_log.rb +2 -1
- data/lib/domoscio_rails/utils/lxp.rb +2 -1
- data/lib/domoscio_rails/utils/recommendation_util.rb +2 -1
- data/lib/domoscio_rails/utils/review_util.rb +2 -1
- data/lib/domoscio_rails/utils/stats_util.rb +2 -1
- data/lib/domoscio_rails/version.rb +1 -1
- data/lib/domoscio_rails.rb +3 -1
- metadata +5 -3
- data/lib/domoscio_rails/data/instance.rb +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 690cab13ee564cf0b93654cd476a82816d84e19fa502b1e6c41a65c50ba1fc28
|
4
|
+
data.tar.gz: f7d558e66031601cdcf4b97971137b9cc3c242fafd4df3068d83ddabe7194d38
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be90244c21d70f09b22cdf846a5747e0281b5ec18fc286c47a8cdb0b02b87b07e1b6417bb2ce3d5da64b40d3275dcfb7465151e9ccde0e82a466fa27975855d1
|
7
|
+
data.tar.gz: 0adcb4c3f4624d7ee5a9671100c0a597a3e7701200e9aefa5c720699b7f7d785cd8e1c0361ca30ac145b0d6e88a9c0fd3244218f7f95f1b0c6c9117dbc91e0dc
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module DomoscioRails
|
2
|
+
class Role
|
3
|
+
include DomoscioRails::Resource
|
4
|
+
include DomoscioRails::HTTPCalls::Fetch
|
5
|
+
|
6
|
+
class User
|
7
|
+
include DomoscioRails::Resource
|
8
|
+
include DomoscioRails::HTTPCalls::Create
|
9
|
+
include DomoscioRails::HTTPCalls::Fetch
|
10
|
+
include DomoscioRails::HTTPCalls::Destroy
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -1,8 +1,16 @@
|
|
1
1
|
module DomoscioRails
|
2
|
-
class StudentGroup
|
2
|
+
class StudentGroup
|
3
|
+
include DomoscioRails::Resource
|
3
4
|
include DomoscioRails::HTTPCalls::Create
|
4
5
|
include DomoscioRails::HTTPCalls::Fetch
|
5
6
|
include DomoscioRails::HTTPCalls::Destroy
|
6
7
|
include DomoscioRails::HTTPCalls::Update
|
8
|
+
|
9
|
+
class User
|
10
|
+
include DomoscioRails::Resource
|
11
|
+
include DomoscioRails::HTTPCalls::Create
|
12
|
+
include DomoscioRails::HTTPCalls::Fetch
|
13
|
+
include DomoscioRails::HTTPCalls::Destroy
|
14
|
+
end
|
7
15
|
end
|
8
16
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module DomoscioRails
|
2
|
+
class Supervisor
|
3
|
+
include DomoscioRails::Resource
|
4
|
+
|
5
|
+
class LearningProgram
|
6
|
+
include DomoscioRails::Resource
|
7
|
+
include DomoscioRails::HTTPCalls::Create
|
8
|
+
include DomoscioRails::HTTPCalls::Fetch
|
9
|
+
include DomoscioRails::HTTPCalls::Destroy
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -1,8 +1,29 @@
|
|
1
1
|
module DomoscioRails
|
2
|
-
class User
|
2
|
+
class User
|
3
|
+
include DomoscioRails::Resource
|
3
4
|
include DomoscioRails::HTTPCalls::Create
|
4
5
|
include DomoscioRails::HTTPCalls::Fetch
|
5
6
|
include DomoscioRails::HTTPCalls::Destroy
|
6
7
|
include DomoscioRails::HTTPCalls::Update
|
8
|
+
|
9
|
+
class UserParameter
|
10
|
+
include DomoscioRails::Resource
|
11
|
+
include DomoscioRails::HTTPCalls::Fetch
|
12
|
+
include DomoscioRails::HTTPCalls::Update
|
13
|
+
end
|
14
|
+
|
15
|
+
class Role
|
16
|
+
include DomoscioRails::Resource
|
17
|
+
include DomoscioRails::HTTPCalls::Create
|
18
|
+
include DomoscioRails::HTTPCalls::Fetch
|
19
|
+
include DomoscioRails::HTTPCalls::Destroy
|
20
|
+
end
|
21
|
+
|
22
|
+
class StudentGroup
|
23
|
+
include DomoscioRails::Resource
|
24
|
+
include DomoscioRails::HTTPCalls::Create
|
25
|
+
include DomoscioRails::HTTPCalls::Fetch
|
26
|
+
include DomoscioRails::HTTPCalls::Destroy
|
27
|
+
end
|
7
28
|
end
|
8
29
|
end
|
@@ -5,7 +5,7 @@ module DomoscioRails
|
|
5
5
|
module ClassMethods
|
6
6
|
def create(*id, params)
|
7
7
|
id = id.empty? ? nil : id[0]
|
8
|
-
DomoscioRails.request(:post, url(id), params)
|
8
|
+
DomoscioRails.request(:post, url(id, nil, params), params)
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
@@ -17,7 +17,7 @@ module DomoscioRails
|
|
17
17
|
module Update
|
18
18
|
module ClassMethods
|
19
19
|
def update(id = nil, params = {})
|
20
|
-
DomoscioRails.request(:put, url(id), params)
|
20
|
+
DomoscioRails.request(:put, url(id, nil, params), params)
|
21
21
|
end
|
22
22
|
end
|
23
23
|
|
@@ -26,21 +26,10 @@ module DomoscioRails
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
module UpdateSelf
|
30
|
-
module ClassMethods
|
31
|
-
def update_self(params = {})
|
32
|
-
DomoscioRails.request(:put, url(nil, nil, true), params)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
def self.included(base)
|
36
|
-
base.extend(ClassMethods)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
29
|
module Fetch
|
41
30
|
module ClassMethods
|
42
31
|
def fetch(id = nil, params = {})
|
43
|
-
DomoscioRails.request(:get, url(id), params)
|
32
|
+
DomoscioRails.request(:get, url(id, nil, params), params)
|
44
33
|
end
|
45
34
|
end
|
46
35
|
|
@@ -52,7 +41,7 @@ module DomoscioRails
|
|
52
41
|
module Destroy
|
53
42
|
module ClassMethods
|
54
43
|
def destroy(id = nil, params = {})
|
55
|
-
DomoscioRails.request(:delete, url(id), params)
|
44
|
+
DomoscioRails.request(:delete, url(id, nil, params), params)
|
56
45
|
end
|
57
46
|
end
|
58
47
|
|
@@ -64,11 +53,11 @@ module DomoscioRails
|
|
64
53
|
module Util
|
65
54
|
module ClassMethods
|
66
55
|
def util(id = nil, util_name = nil, params = {})
|
67
|
-
DomoscioRails.request(:get, url(id, util_name), params)
|
56
|
+
DomoscioRails.request(:get, url(id, util_name, params), params)
|
68
57
|
end
|
69
58
|
|
70
59
|
def util_post(id = nil, util_name = nil, params = {})
|
71
|
-
DomoscioRails.request(:post, url(id, util_name), params)
|
60
|
+
DomoscioRails.request(:post, url(id, util_name, params), params)
|
72
61
|
end
|
73
62
|
end
|
74
63
|
|
@@ -1,5 +1,6 @@
|
|
1
1
|
module DomoscioRails
|
2
|
-
class ObjectiveKnowledgeNodeStudent
|
2
|
+
class ObjectiveKnowledgeNodeStudent
|
3
|
+
include DomoscioRails::Resource
|
3
4
|
include DomoscioRails::HTTPCalls::Create
|
4
5
|
include DomoscioRails::HTTPCalls::Fetch
|
5
6
|
include DomoscioRails::HTTPCalls::Destroy
|
@@ -1,14 +1,31 @@
|
|
1
1
|
module DomoscioRails
|
2
|
-
|
3
|
-
|
2
|
+
module Resource
|
3
|
+
def self.included(base)
|
4
|
+
base.extend ClassMethods
|
5
|
+
end
|
6
|
+
|
7
|
+
module ClassMethods
|
4
8
|
def class_name
|
5
9
|
name.split('::')[-1]
|
6
10
|
end
|
7
11
|
|
8
|
-
def
|
12
|
+
def parent_class
|
13
|
+
name.split('::')[-2]
|
14
|
+
end
|
15
|
+
|
16
|
+
def nesting?
|
17
|
+
name.split('::').size > 2
|
18
|
+
end
|
19
|
+
|
20
|
+
def url(id, util_name, params)
|
9
21
|
raise NotImplementedError, 'Resource is an abstract class. Do not use it directly.' if self == Resource
|
10
22
|
|
11
23
|
build_url = "/v#{DomoscioRails.configuration.version}/instances/#{DomoscioRails.configuration.client_id}"
|
24
|
+
if nesting?
|
25
|
+
parent = underscore(parent_class)
|
26
|
+
build_url << "/#{parent}s"
|
27
|
+
build_url << "/#{CGI.escape(params[(parent + '_id').to_sym].to_s)}"
|
28
|
+
end
|
12
29
|
build_url << "/#{underscore(class_name)}s"
|
13
30
|
build_url << "/#{util_name}" if util_name
|
14
31
|
build_url << "/#{CGI.escape(id.to_s)}" if id
|
data/lib/domoscio_rails.rb
CHANGED
@@ -12,7 +12,6 @@ require 'domoscio_rails/resource'
|
|
12
12
|
require 'domoscio_rails/data/content'
|
13
13
|
require 'domoscio_rails/data/device'
|
14
14
|
require 'domoscio_rails/data/event'
|
15
|
-
require 'domoscio_rails/data/instance'
|
16
15
|
require 'domoscio_rails/data/instance_parameter'
|
17
16
|
require 'domoscio_rails/data/recommendation'
|
18
17
|
require 'domoscio_rails/data/learning_session_recommendation'
|
@@ -23,6 +22,9 @@ require 'domoscio_rails/data/student'
|
|
23
22
|
require 'domoscio_rails/data/student_group'
|
24
23
|
require 'domoscio_rails/data/question'
|
25
24
|
require 'domoscio_rails/data/user'
|
25
|
+
require 'domoscio_rails/data/account'
|
26
|
+
require 'domoscio_rails/data/role'
|
27
|
+
require 'domoscio_rails/data/supervisor'
|
26
28
|
require 'domoscio_rails/knowledge/knowledge_edge'
|
27
29
|
require 'domoscio_rails/knowledge/knowledge_graph'
|
28
30
|
require 'domoscio_rails/knowledge/scale'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: domoscio_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.26
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benoit Praly
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -51,19 +51,21 @@ files:
|
|
51
51
|
- lib/domoscio_rails.rb
|
52
52
|
- lib/domoscio_rails.tbz
|
53
53
|
- lib/domoscio_rails/authorization_token.rb
|
54
|
+
- lib/domoscio_rails/data/account.rb
|
54
55
|
- lib/domoscio_rails/data/content.rb
|
55
56
|
- lib/domoscio_rails/data/device.rb
|
56
57
|
- lib/domoscio_rails/data/event.rb
|
57
|
-
- lib/domoscio_rails/data/instance.rb
|
58
58
|
- lib/domoscio_rails/data/instance_parameter.rb
|
59
59
|
- lib/domoscio_rails/data/learning_session.rb
|
60
60
|
- lib/domoscio_rails/data/learning_session_knowledge_node.rb
|
61
61
|
- lib/domoscio_rails/data/learning_session_recommendation.rb
|
62
62
|
- lib/domoscio_rails/data/question.rb
|
63
63
|
- lib/domoscio_rails/data/recommendation.rb
|
64
|
+
- lib/domoscio_rails/data/role.rb
|
64
65
|
- lib/domoscio_rails/data/scorm.rb
|
65
66
|
- lib/domoscio_rails/data/student.rb
|
66
67
|
- lib/domoscio_rails/data/student_group.rb
|
68
|
+
- lib/domoscio_rails/data/supervisor.rb
|
67
69
|
- lib/domoscio_rails/data/user.rb
|
68
70
|
- lib/domoscio_rails/errors.rb
|
69
71
|
- lib/domoscio_rails/http_calls.rb
|