domoscio_rails 0.4.6 → 0.4.6.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89f4a573a069c4acbf2d5c7d3ae5d977ba13587fbcd7ce2def3f546d0db7acdd
|
4
|
+
data.tar.gz: d46161a1cddf1ff3fccc4282a32226c939dc50deaac62c1f73c917e77ee4b58d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 593431c7f5f4c4dd7710bf0a16e0203661304b74efd812ad482b021f25d7a4e1d95c2f9849afe95497cfef464bcc02772958029eb4c89d3f29e4ec7d208af752
|
7
|
+
data.tar.gz: '081da9e5e0bbc103795af2c7ae325ff32018b008d962fd082eed4342245fb5cf2615b31c685964bef64f5847a57780103aab4701821bc7bc3681e0e7769816d0'
|
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,6 +14,7 @@ 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'
|
@@ -38,7 +39,7 @@ require 'domoscio_rails/utils/gameplay_util'
|
|
38
39
|
require 'domoscio_rails/utils/recommendation_util'
|
39
40
|
require 'domoscio_rails/utils/review_util'
|
40
41
|
require 'domoscio_rails/utils/stats_util'
|
41
|
-
require 'domoscio_rails/
|
42
|
+
require 'domoscio_rails/utils/lxp'
|
42
43
|
|
43
44
|
module DomoscioRails
|
44
45
|
# 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.6
|
4
|
+
version: 0.4.6.2
|
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-05-
|
11
|
+
date: 2022-05-23 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
|
@@ -76,12 +77,12 @@ files:
|
|
76
77
|
- lib/domoscio_rails/objective/objective_student.rb
|
77
78
|
- lib/domoscio_rails/objective/subscription.rb
|
78
79
|
- lib/domoscio_rails/resource.rb
|
79
|
-
- lib/domoscio_rails/scorm/scorm.rb
|
80
80
|
- lib/domoscio_rails/tag/tag.rb
|
81
81
|
- lib/domoscio_rails/tag/tag_edge.rb
|
82
82
|
- lib/domoscio_rails/tag/tag_set.rb
|
83
83
|
- lib/domoscio_rails/tag/tagging.rb
|
84
84
|
- lib/domoscio_rails/utils/gameplay_util.rb
|
85
|
+
- lib/domoscio_rails/utils/lxp.rb
|
85
86
|
- lib/domoscio_rails/utils/recommendation_util.rb
|
86
87
|
- lib/domoscio_rails/utils/review_util.rb
|
87
88
|
- lib/domoscio_rails/utils/stats_util.rb
|
@@ -90,7 +91,7 @@ homepage: http://www.domoscio.com
|
|
90
91
|
licenses:
|
91
92
|
- MIT
|
92
93
|
metadata: {}
|
93
|
-
post_install_message:
|
94
|
+
post_install_message:
|
94
95
|
rdoc_options: []
|
95
96
|
require_paths:
|
96
97
|
- lib
|
@@ -106,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
107
|
version: '0'
|
107
108
|
requirements: []
|
108
109
|
rubygems_version: 3.2.22
|
109
|
-
signing_key:
|
110
|
+
signing_key:
|
110
111
|
specification_version: 4
|
111
112
|
summary: Summary of DomoscioRailspec.
|
112
113
|
test_files: []
|