domoscio_rails 0.3.6 → 0.3.7

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: 7089254584b320486a1c5791a61d4831e894a7d15865476edd927b0b6c26b10d
4
- data.tar.gz: 24bad35c6b24c8a87da9d9f61f3d56258ce33d74f7f1a12c8fe40c3aa780eebf
3
+ metadata.gz: 5a6ede945677291ef1b7b413edacef90ff3a034ffb948d4b5a48e2dfe6a821cd
4
+ data.tar.gz: 4cda4d1cd0c511238ca8eb12611e0457f99bcca2ea9f7c2d7b4fab2f266b2ff0
5
5
  SHA512:
6
- metadata.gz: bca18d4b3107390472ab74e91482b064c3f281da971066ac2c20f46771207b4062e3fe2de83fa2358ab3385700c8a4f41346ab71382782d58413958ac5fa78f2
7
- data.tar.gz: 63d7d44e90b63f62715d213f636a17fc024aebcbcef001c27331fc03b40b8bf8ca46e8e14aeae93d7b0d1d02626030593d5f34987fb2209a2e90d871d887804a
6
+ metadata.gz: 4c4e6fabcc01564dcec6f42d71d63cc45be20eb51d88f23b912ddb1f6bf4043e60b4e331489d9ca482cea7aa7db2a1b9a8b66c733b209cf383197322a876d1f9
7
+ data.tar.gz: 7a4e192e653f1014d435c1cae554c8a2d5412c30c8bb36ca25b45d95e2819da5d3037771ad068cde95ca292acfb5c539119c1f45783c39f0e1484cf9cf46194a
@@ -13,6 +13,7 @@ require 'domoscio_rails/resource'
13
13
  require 'domoscio_rails/data/content.rb'
14
14
  require 'domoscio_rails/data/event.rb'
15
15
  require 'domoscio_rails/data/instance.rb'
16
+ require 'domoscio_rails/data/recommendation.rb'
16
17
  require 'domoscio_rails/data/learning_session.rb'
17
18
  require 'domoscio_rails/data/student.rb'
18
19
  require 'domoscio_rails/knowledge/knowledge_edge.rb'
@@ -130,7 +131,7 @@ module DomoscioRails
130
131
  if response.blank?
131
132
  raise ResponseError.new(uri, 500, {error: {status: 500, message: 'AdaptiveEngine not available'}}, {}, params)
132
133
  else
133
- body = DomoscioRails::JSON.load((response.body.nil? ? '' : response.body), :symbolize_keys => true)
134
+ body = {error: {status: response.code, message: DomoscioRails::JSON.load((response.body.nil? ? '' : response.body), :symbolize_keys => true)}}
134
135
  raise ResponseError.new(uri, response.code.to_i, body, response.body, params)
135
136
  end
136
137
  end
@@ -1,10 +1,11 @@
1
1
  module DomoscioRails
2
- # A Content.
3
2
  class Content < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Create
5
5
  include DomoscioRails::HTTPCalls::Fetch
6
6
  include DomoscioRails::HTTPCalls::Update
7
7
  include DomoscioRails::HTTPCalls::Destroy
8
8
  include DomoscioRails::HTTPCalls::Util
9
+
9
10
  end
10
11
  end
@@ -1,5 +1,4 @@
1
1
  module DomoscioRails
2
- # A Student Result on a KnowledgeNode.
3
2
  class Event < Resource
4
3
 
5
4
  include DomoscioRails::HTTPCalls::Create
@@ -1,9 +1,10 @@
1
1
  module DomoscioRails
2
- # A company.
3
2
  class Instance < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Create
5
5
  include DomoscioRails::HTTPCalls::Fetch
6
6
  include DomoscioRails::HTTPCalls::UpdateSelf
7
7
  include DomoscioRails::HTTPCalls::Destroy
8
+
8
9
  end
9
10
  end
@@ -1,5 +1,4 @@
1
1
  module DomoscioRails
2
- # A LearningSession is basicly a group of events.
3
2
  class LearningSession < Resource
4
3
 
5
4
  include DomoscioRails::HTTPCalls::Create
@@ -0,0 +1,7 @@
1
+ module DomoscioRails
2
+ class Recommendation < Resource
3
+
4
+ include DomoscioRails::HTTPCalls::Fetch
5
+
6
+ end
7
+ end
@@ -1,9 +1,10 @@
1
1
  module DomoscioRails
2
- # A company.
3
2
  class Student < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Create
5
5
  include DomoscioRails::HTTPCalls::Fetch
6
6
  include DomoscioRails::HTTPCalls::Update
7
7
  include DomoscioRails::HTTPCalls::Destroy
8
+
8
9
  end
9
10
  end
@@ -10,7 +10,7 @@ module DomoscioRails
10
10
  @request_url, @code, @details, @body, @request_params = request_url, code, details, body, request_params
11
11
  super(message) if message
12
12
  end
13
- def message; @details.is_a?(Hash) ? @details.dig(:error, :message) : @details; end
13
+ def message; (@details.is_a?(Hash) && @details[:error].is_a?(Hash)) ? @details.dig(:error, :message) : @details; end
14
14
  end
15
15
 
16
16
  # ProcessingError from DomoscioRails
@@ -1,5 +1,4 @@
1
1
  module DomoscioRails
2
- # A Knowledge Edge.
3
2
  class KnowledgeEdge < Resource
4
3
 
5
4
  include DomoscioRails::HTTPCalls::Create
@@ -1,5 +1,4 @@
1
1
  module DomoscioRails
2
- # A Knowledge Graph.
3
2
  class KnowledgeGraph < Resource
4
3
 
5
4
  include DomoscioRails::HTTPCalls::Create
@@ -1,5 +1,4 @@
1
1
  module DomoscioRails
2
- # A Knowledge Node.
3
2
  class KnowledgeNode < Resource
4
3
 
5
4
  include DomoscioRails::HTTPCalls::Create
@@ -1,9 +1,10 @@
1
1
  module DomoscioRails
2
- # A KnowledgeNodeContent.
3
2
  class KnowledgeNodeContent < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Create
5
5
  include DomoscioRails::HTTPCalls::Fetch
6
6
  include DomoscioRails::HTTPCalls::Update
7
7
  include DomoscioRails::HTTPCalls::Destroy
8
+
8
9
  end
9
10
  end
@@ -1,5 +1,4 @@
1
1
  module DomoscioRails
2
- # A Knowledge Edge.
3
2
  class KnowledgeNodeStudent < Resource
4
3
 
5
4
  include DomoscioRails::HTTPCalls::Create
@@ -1,9 +1,10 @@
1
1
  module DomoscioRails
2
- # An objective.
3
2
  class Objective < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Create
5
5
  include DomoscioRails::HTTPCalls::Fetch
6
6
  include DomoscioRails::HTTPCalls::Update
7
7
  include DomoscioRails::HTTPCalls::Destroy
8
+
8
9
  end
9
10
  end
@@ -1,6 +1,7 @@
1
1
  module DomoscioRails
2
- # An objective knowledge node.
3
- class ObjectiveKnowledgeNode < Resource
4
- include DomoscioRails::HTTPCalls::Fetch
5
- end
2
+ class ObjectiveKnowledgeNode < Resource
3
+
4
+ include DomoscioRails::HTTPCalls::Fetch
5
+
6
6
  end
7
+ end
@@ -1,6 +1,8 @@
1
1
  module DomoscioRails
2
- class ObjectiveKnowledgeNodeStudent < Resource
3
- include DomoscioRails::HTTPCalls::Fetch
4
- include DomoscioRails::HTTPCalls::Update
5
- end
6
- end
2
+ class ObjectiveKnowledgeNodeStudent < Resource
3
+
4
+ include DomoscioRails::HTTPCalls::Fetch
5
+ include DomoscioRails::HTTPCalls::Update
6
+
7
+ end
8
+ end
@@ -1,10 +1,11 @@
1
1
  module DomoscioRails
2
- # An objective student.
3
2
  class ObjectiveStudent < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Create
5
5
  include DomoscioRails::HTTPCalls::Fetch
6
6
  include DomoscioRails::HTTPCalls::Update
7
7
  include DomoscioRails::HTTPCalls::Destroy
8
8
  include DomoscioRails::HTTPCalls::Util
9
+
9
10
  end
10
11
  end
@@ -1,9 +1,10 @@
1
1
  module DomoscioRails
2
- # A Tag.
3
2
  class Tag < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Create
5
5
  include DomoscioRails::HTTPCalls::Fetch
6
6
  include DomoscioRails::HTTPCalls::Update
7
7
  include DomoscioRails::HTTPCalls::Destroy
8
+
8
9
  end
9
10
  end
@@ -1,9 +1,10 @@
1
1
  module DomoscioRails
2
- # A TagEdge.
3
2
  class TagEdge < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Create
5
5
  include DomoscioRails::HTTPCalls::Fetch
6
6
  include DomoscioRails::HTTPCalls::Update
7
7
  include DomoscioRails::HTTPCalls::Destroy
8
+
8
9
  end
9
10
  end
@@ -1,9 +1,10 @@
1
1
  module DomoscioRails
2
- # A TagSet.
3
2
  class TagSet < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Create
5
5
  include DomoscioRails::HTTPCalls::Fetch
6
6
  include DomoscioRails::HTTPCalls::Update
7
7
  include DomoscioRails::HTTPCalls::Destroy
8
+
8
9
  end
9
10
  end
@@ -1,9 +1,10 @@
1
1
  module DomoscioRails
2
- # A Tagging.
3
2
  class Tagging < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Create
5
5
  include DomoscioRails::HTTPCalls::Fetch
6
6
  include DomoscioRails::HTTPCalls::Update
7
7
  include DomoscioRails::HTTPCalls::Destroy
8
+
8
9
  end
9
10
  end
@@ -1,6 +1,7 @@
1
1
  module DomoscioRails
2
- # A company.
3
2
  class GameplayUtil < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Util
5
+
5
6
  end
6
7
  end
@@ -1,6 +1,7 @@
1
1
  module DomoscioRails
2
- # A company.
3
- class RecommendationUtil < Resource
4
- include DomoscioRails::HTTPCalls::Util
5
- end
6
- end
2
+ class RecommendationUtil < Resource
3
+
4
+ include DomoscioRails::HTTPCalls::Util
5
+
6
+ end
7
+ end
@@ -1,6 +1,7 @@
1
1
  module DomoscioRails
2
- # A company.
3
2
  class ReviewUtil < Resource
3
+
4
4
  include DomoscioRails::HTTPCalls::Util
5
+
5
6
  end
6
7
  end
@@ -1,3 +1,3 @@
1
1
  module DomoscioRails
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
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.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoit Praly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-03-22 00:00:00.000000000 Z
11
+ date: 2021-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -41,6 +41,7 @@ files:
41
41
  - lib/domoscio_rails/data/event.rb
42
42
  - lib/domoscio_rails/data/instance.rb
43
43
  - lib/domoscio_rails/data/learning_session.rb
44
+ - lib/domoscio_rails/data/recommendation.rb
44
45
  - lib/domoscio_rails/data/student.rb
45
46
  - lib/domoscio_rails/errors.rb
46
47
  - lib/domoscio_rails/http_calls.rb