domoscio_rails 0.4.6 → 0.4.8
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/{scorm → data}/scorm.rb +0 -0
- data/lib/domoscio_rails/http_calls.rb +17 -0
- data/lib/domoscio_rails/knowledge/knowledge_graph_node.rb +8 -0
- data/lib/domoscio_rails/resource.rb +21 -6
- data/lib/domoscio_rails/utils/analytic.rb +5 -0
- data/lib/domoscio_rails/utils/lxp.rb +6 -0
- data/lib/domoscio_rails/version.rb +1 -1
- data/lib/domoscio_rails.rb +4 -1
- metadata +9 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8dea61bf2ec4bf182cd358c43bf19e19ca87b3c0d51b83f71e06387b2dcbe1e0
|
4
|
+
data.tar.gz: 7fb3a4630734a839b200f0a4511d3868ef7f95769b72f13b02472ce40fce39cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8fdc5778ed8b817d94fa6b4c69165006e12ed2aae8543d4f55a3c60f9494794f8a336d83261ed0d80e84fb01da2157ad819b3c8fd884e512bde23a644553bc3
|
7
|
+
data.tar.gz: f3dc7d00e1e5efaaa0d0bfd62e3a1c3f139a0383a9ce53fe1a01fdaf2ba6218a58b60edb61273579534d6c93d19620251aeadc20eaa110066d12b591b1298675
|
File without changes
|
@@ -76,5 +76,22 @@ module DomoscioRails
|
|
76
76
|
base.extend(ClassMethods)
|
77
77
|
end
|
78
78
|
end
|
79
|
+
|
80
|
+
# Raw module allow calls not to be scoped by instance
|
81
|
+
module Raw
|
82
|
+
module ClassMethods
|
83
|
+
def raw_util(util_name = nil, params = {})
|
84
|
+
DomoscioRails.request(:get, raw_url(util_name), raw_params(params))
|
85
|
+
end
|
86
|
+
|
87
|
+
def raw_util_post(util_name = nil, params = {})
|
88
|
+
DomoscioRails.request(:post, raw_url(util_name), raw_params(params))
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.included(base)
|
93
|
+
base.extend(ClassMethods)
|
94
|
+
end
|
95
|
+
end
|
79
96
|
end
|
80
97
|
end
|
@@ -5,18 +5,33 @@ module DomoscioRails
|
|
5
5
|
name.split('::')[-1]
|
6
6
|
end
|
7
7
|
|
8
|
-
def url(id = nil, util_name = nil
|
8
|
+
def url(id = nil, util_name = nil)
|
9
9
|
raise NotImplementedError, 'Resource is an abstract class. Do not use it directly.' if self == Resource
|
10
10
|
|
11
11
|
build_url = "/v#{DomoscioRails.configuration.version}/instances/#{DomoscioRails.configuration.client_id}"
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
end
|
12
|
+
build_url << "/#{underscore(class_name)}s"
|
13
|
+
build_url << "/#{util_name}" if util_name
|
14
|
+
build_url << "/#{CGI.escape(id.to_s)}" if id
|
15
|
+
|
17
16
|
build_url
|
18
17
|
end
|
19
18
|
|
19
|
+
def raw_url(util_name)
|
20
|
+
raise NotImplementedError, 'Resource is an abstract class. Do not use it directly.' if self == Resource
|
21
|
+
|
22
|
+
build_url = "/v#{DomoscioRails.configuration.version}"
|
23
|
+
build_url << "/#{underscore(class_name)}s"
|
24
|
+
build_url << "/#{util_name}" if util_name
|
25
|
+
|
26
|
+
build_url
|
27
|
+
end
|
28
|
+
|
29
|
+
def raw_params(params = {})
|
30
|
+
params.merge({
|
31
|
+
instance_id: DomoscioRails.configuration.client_id
|
32
|
+
})
|
33
|
+
end
|
34
|
+
|
20
35
|
def underscore(string)
|
21
36
|
string.gsub(/::/, '/')
|
22
37
|
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
data/lib/domoscio_rails.rb
CHANGED
@@ -14,12 +14,14 @@ require 'domoscio_rails/data/event'
|
|
14
14
|
require 'domoscio_rails/data/instance'
|
15
15
|
require 'domoscio_rails/data/recommendation'
|
16
16
|
require 'domoscio_rails/data/learning_session'
|
17
|
+
require 'domoscio_rails/data/scorm'
|
17
18
|
require 'domoscio_rails/data/student'
|
18
19
|
require 'domoscio_rails/data/student_group'
|
19
20
|
require 'domoscio_rails/knowledge/knowledge_edge'
|
20
21
|
require 'domoscio_rails/knowledge/knowledge_graph'
|
21
22
|
require 'domoscio_rails/knowledge/scale'
|
22
23
|
require 'domoscio_rails/knowledge/knowledge_graph_scale'
|
24
|
+
require 'domoscio_rails/knowledge/knowledge_graph_node'
|
23
25
|
require 'domoscio_rails/knowledge/knowledge_node_content'
|
24
26
|
require 'domoscio_rails/knowledge/knowledge_node_student'
|
25
27
|
require 'domoscio_rails/knowledge/knowledge_node'
|
@@ -34,11 +36,12 @@ require 'domoscio_rails/tag/tag_edge'
|
|
34
36
|
require 'domoscio_rails/tag/tag_set'
|
35
37
|
require 'domoscio_rails/tag/tag'
|
36
38
|
require 'domoscio_rails/tag/tagging'
|
39
|
+
require 'domoscio_rails/utils/analytic'
|
37
40
|
require 'domoscio_rails/utils/gameplay_util'
|
38
41
|
require 'domoscio_rails/utils/recommendation_util'
|
39
42
|
require 'domoscio_rails/utils/review_util'
|
40
43
|
require 'domoscio_rails/utils/stats_util'
|
41
|
-
require 'domoscio_rails/
|
44
|
+
require 'domoscio_rails/utils/lxp'
|
42
45
|
|
43
46
|
module DomoscioRails
|
44
47
|
# Configurable attributes and default values
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Benoit Praly
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- lib/domoscio_rails/data/instance.rb
|
57
57
|
- lib/domoscio_rails/data/learning_session.rb
|
58
58
|
- lib/domoscio_rails/data/recommendation.rb
|
59
|
+
- lib/domoscio_rails/data/scorm.rb
|
59
60
|
- lib/domoscio_rails/data/student.rb
|
60
61
|
- lib/domoscio_rails/data/student_group.rb
|
61
62
|
- lib/domoscio_rails/errors.rb
|
@@ -63,6 +64,7 @@ files:
|
|
63
64
|
- lib/domoscio_rails/json.rb
|
64
65
|
- lib/domoscio_rails/knowledge/knowledge_edge.rb
|
65
66
|
- lib/domoscio_rails/knowledge/knowledge_graph.rb
|
67
|
+
- lib/domoscio_rails/knowledge/knowledge_graph_node.rb
|
66
68
|
- lib/domoscio_rails/knowledge/knowledge_graph_scale.rb
|
67
69
|
- lib/domoscio_rails/knowledge/knowledge_node.rb
|
68
70
|
- lib/domoscio_rails/knowledge/knowledge_node_content.rb
|
@@ -76,12 +78,13 @@ files:
|
|
76
78
|
- lib/domoscio_rails/objective/objective_student.rb
|
77
79
|
- lib/domoscio_rails/objective/subscription.rb
|
78
80
|
- lib/domoscio_rails/resource.rb
|
79
|
-
- lib/domoscio_rails/scorm/scorm.rb
|
80
81
|
- lib/domoscio_rails/tag/tag.rb
|
81
82
|
- lib/domoscio_rails/tag/tag_edge.rb
|
82
83
|
- lib/domoscio_rails/tag/tag_set.rb
|
83
84
|
- lib/domoscio_rails/tag/tagging.rb
|
85
|
+
- lib/domoscio_rails/utils/analytic.rb
|
84
86
|
- lib/domoscio_rails/utils/gameplay_util.rb
|
87
|
+
- lib/domoscio_rails/utils/lxp.rb
|
85
88
|
- lib/domoscio_rails/utils/recommendation_util.rb
|
86
89
|
- lib/domoscio_rails/utils/review_util.rb
|
87
90
|
- lib/domoscio_rails/utils/stats_util.rb
|
@@ -90,7 +93,7 @@ homepage: http://www.domoscio.com
|
|
90
93
|
licenses:
|
91
94
|
- MIT
|
92
95
|
metadata: {}
|
93
|
-
post_install_message:
|
96
|
+
post_install_message:
|
94
97
|
rdoc_options: []
|
95
98
|
require_paths:
|
96
99
|
- lib
|
@@ -106,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
109
|
version: '0'
|
107
110
|
requirements: []
|
108
111
|
rubygems_version: 3.2.22
|
109
|
-
signing_key:
|
112
|
+
signing_key:
|
110
113
|
specification_version: 4
|
111
114
|
summary: Summary of DomoscioRailspec.
|
112
115
|
test_files: []
|