domoscio_rails 0.4.2 → 0.4.6

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d84d18d926ff49fafe9bf5e48907f7e5ad5379660d1846f695e73b2f3b958029
4
- data.tar.gz: 1fbc96e7c54dba8c7676a1933d35638f9767dcf9cb38f5df3b61fd5350f6b489
3
+ metadata.gz: 154d7d867e08c73e376f69ce18743c51cb67ef9b77670996b4905c41ba386be9
4
+ data.tar.gz: cd794f1d6b7745883ce34ebf0107da4a1ca1809bfc845f791108815eacb5c164
5
5
  SHA512:
6
- metadata.gz: a69b023608cf340083931858b547b74ee9c3da3f481a28d27f8dac638834b32372fb2856d57d1df0f002f255379649f985fcee907152084f044388ff09323b0d
7
- data.tar.gz: f48ca74ee109d995e27f9c26d0567a3d4e1c92858fd65e62bd448a6c5ffef09903c5ad2bbcd05f79cfa2bf5b2e4e87e6313b4148ab36494e03d59453d5102bb8
6
+ metadata.gz: 07af1245f733e97ff325029682899dd0833406b9b635800ecb542ad76decd07c04c4dd8bdc2af6fa33ba434c4717ce46f1f2644d32204fab2e54a27d5a789f8e
7
+ data.tar.gz: 99f01fa87b10843eb354ccb5c336cf1540727be4d4c52ca45c9965457e8cedaacc3b8dbf4fdc8c9577ef12a57a63228559a8eb88408fab024e10af9a4e95a3c0
@@ -0,0 +1,8 @@
1
+ module DomoscioRails
2
+ class KnowledgeGraphScale < Resource
3
+ include DomoscioRails::HTTPCalls::Create
4
+ include DomoscioRails::HTTPCalls::Fetch
5
+ include DomoscioRails::HTTPCalls::Destroy
6
+ include DomoscioRails::HTTPCalls::Update
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module DomoscioRails
2
+ class Scale < Resource
3
+ include DomoscioRails::HTTPCalls::Create
4
+ include DomoscioRails::HTTPCalls::Fetch
5
+ include DomoscioRails::HTTPCalls::Destroy
6
+ include DomoscioRails::HTTPCalls::Update
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module DomoscioRails
2
+ class LearningProgram < Resource
3
+ include DomoscioRails::HTTPCalls::Create
4
+ include DomoscioRails::HTTPCalls::Fetch
5
+ include DomoscioRails::HTTPCalls::Destroy
6
+ include DomoscioRails::HTTPCalls::Update
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module DomoscioRails
2
+ class LearningProgramStudent < Resource
3
+ include DomoscioRails::HTTPCalls::Create
4
+ include DomoscioRails::HTTPCalls::Fetch
5
+ include DomoscioRails::HTTPCalls::Destroy
6
+ include DomoscioRails::HTTPCalls::Update
7
+ end
8
+ end
@@ -4,5 +4,6 @@ module DomoscioRails
4
4
  include DomoscioRails::HTTPCalls::Fetch
5
5
  include DomoscioRails::HTTPCalls::Destroy
6
6
  include DomoscioRails::HTTPCalls::Update
7
+ include DomoscioRails::HTTPCalls::Util
7
8
  end
8
9
  end
@@ -0,0 +1,8 @@
1
+ module DomoscioRails
2
+ class Subscription < Resource
3
+ include DomoscioRails::HTTPCalls::Create
4
+ include DomoscioRails::HTTPCalls::Fetch
5
+ include DomoscioRails::HTTPCalls::Destroy
6
+ include DomoscioRails::HTTPCalls::Util
7
+ end
8
+ end
@@ -0,0 +1,5 @@
1
+ module DomoscioRails
2
+ class Scorm < Resource
3
+ include DomoscioRails::HTTPCalls::Create
4
+ end
5
+ end
@@ -1,3 +1,3 @@
1
1
  module DomoscioRails
2
- VERSION = '0.4.2'.freeze
2
+ VERSION = '0.4.6'.freeze
3
3
  end
@@ -18,13 +18,18 @@ require 'domoscio_rails/data/student'
18
18
  require 'domoscio_rails/data/student_group'
19
19
  require 'domoscio_rails/knowledge/knowledge_edge'
20
20
  require 'domoscio_rails/knowledge/knowledge_graph'
21
+ require 'domoscio_rails/knowledge/scale'
22
+ require 'domoscio_rails/knowledge/knowledge_graph_scale'
21
23
  require 'domoscio_rails/knowledge/knowledge_node_content'
22
24
  require 'domoscio_rails/knowledge/knowledge_node_student'
23
25
  require 'domoscio_rails/knowledge/knowledge_node'
26
+ require 'domoscio_rails/objective/learning_program_student'
27
+ require 'domoscio_rails/objective/learning_program'
24
28
  require 'domoscio_rails/objective/objective_knowledge_node_student'
25
29
  require 'domoscio_rails/objective/objective_knowledge_node'
26
30
  require 'domoscio_rails/objective/objective_student'
27
31
  require 'domoscio_rails/objective/objective'
32
+ require 'domoscio_rails/objective/subscription'
28
33
  require 'domoscio_rails/tag/tag_edge'
29
34
  require 'domoscio_rails/tag/tag_set'
30
35
  require 'domoscio_rails/tag/tag'
@@ -33,6 +38,7 @@ require 'domoscio_rails/utils/gameplay_util'
33
38
  require 'domoscio_rails/utils/recommendation_util'
34
39
  require 'domoscio_rails/utils/review_util'
35
40
  require 'domoscio_rails/utils/stats_util'
41
+ require 'domoscio_rails/scorm/scorm'
36
42
 
37
43
  module DomoscioRails
38
44
  # Configurable attributes and default values
@@ -71,7 +77,8 @@ module DomoscioRails
71
77
  # Raises DomoscioRails::ResponseError on Adaptive Error Status
72
78
  # Raises DomoscioRails::ProcessingError on Internal Error
73
79
  #
74
- def self.request(method, url, params={})
80
+ def self.request(method, url, params = {})
81
+ params ||= {}
75
82
  store_tokens, headers = request_headers
76
83
  params.merge!({ 'per_page': 1000 }) unless params[:per_page]
77
84
  uri = api_uri(url)
@@ -80,7 +87,13 @@ module DomoscioRails
80
87
 
81
88
  begin
82
89
  raise_http_failure(uri, response, params)
83
- data = DomoscioRails::JSON.load(response.body.nil? ? '' : response.body)
90
+
91
+ if response['Content-Type'] == 'application/zip'
92
+ data = response
93
+ else
94
+ data = DomoscioRails::JSON.load(response.body.nil? ? '' : response.body)
95
+ end
96
+
84
97
  if store_tokens
85
98
  DomoscioRails::AuthorizationToken::Manager.storage.store({
86
99
  access_token: response['Accesstoken'],
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.2
4
+ version: 0.4.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoit Praly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-15 00:00:00.000000000 Z
11
+ date: 2022-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
@@ -63,14 +63,20 @@ files:
63
63
  - lib/domoscio_rails/json.rb
64
64
  - lib/domoscio_rails/knowledge/knowledge_edge.rb
65
65
  - lib/domoscio_rails/knowledge/knowledge_graph.rb
66
+ - lib/domoscio_rails/knowledge/knowledge_graph_scale.rb
66
67
  - lib/domoscio_rails/knowledge/knowledge_node.rb
67
68
  - lib/domoscio_rails/knowledge/knowledge_node_content.rb
68
69
  - lib/domoscio_rails/knowledge/knowledge_node_student.rb
70
+ - lib/domoscio_rails/knowledge/scale.rb
71
+ - lib/domoscio_rails/objective/learning_program.rb
72
+ - lib/domoscio_rails/objective/learning_program_student.rb
69
73
  - lib/domoscio_rails/objective/objective.rb
70
74
  - lib/domoscio_rails/objective/objective_knowledge_node.rb
71
75
  - lib/domoscio_rails/objective/objective_knowledge_node_student.rb
72
76
  - lib/domoscio_rails/objective/objective_student.rb
77
+ - lib/domoscio_rails/objective/subscription.rb
73
78
  - lib/domoscio_rails/resource.rb
79
+ - lib/domoscio_rails/scorm/scorm.rb
74
80
  - lib/domoscio_rails/tag/tag.rb
75
81
  - lib/domoscio_rails/tag/tag_edge.rb
76
82
  - lib/domoscio_rails/tag/tag_set.rb