ims_caliper 0.9.3.14 → 0.9.3.15
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 +5 -13
- data/lib/caliper/defaults.rb +2 -2
- data/lib/caliper/entities/agent/organization.rb +3 -3
- data/lib/caliper/entities/assessment/assessment.rb +0 -2
- data/lib/caliper/entities/entity.rb +0 -1
- data/lib/caliper/entities/foaf/agent.rb +1 -1
- data/lib/caliper/entities/lis/course_offering.rb +0 -1
- data/lib/caliper/entities/lis/group.rb +1 -2
- data/lib/caliper/entities/lis/{roles.rb → role.rb} +1 -1
- data/lib/caliper/entities/outcome/result.rb +3 -3
- data/lib/caliper/entities/response/fillin_blank_response.rb +1 -0
- data/lib/caliper/entities/response/multiple_choice_response.rb +1 -0
- data/lib/caliper/entities/response/multiple_response_response.rb +1 -0
- data/lib/caliper/entities/response/response.rb +1 -0
- data/lib/caliper/entities/response/select_type_response.rb +1 -0
- data/lib/caliper/entities/response/true_false_response.rb +1 -0
- data/lib/caliper/event/annotation_event.rb +1 -0
- data/lib/caliper/event/event.rb +28 -26
- data/lib/caliper/event/view_event.rb +1 -0
- data/lib/caliper/jsonable.rb +2 -1
- data/lib/caliper/options.rb +11 -11
- data/lib/caliper/profiles/assessment_profile.rb +0 -1
- data/lib/caliper/{event/grade_predict_event.rb → request/envelope.rb} +21 -11
- data/lib/caliper/request/envelope_jsonable.rb +69 -0
- data/lib/caliper/request/event_store_requestor.rb +16 -27
- data/lib/caliper/request/http_requestor.rb +8 -27
- data/lib/caliper/sensor.rb +12 -23
- data/lib/caliper/version.rb +1 -1
- data/spec/lib/entities/agent/person_spec.rb +1 -1
- data/spec/lib/entities/entity_spec.rb +1 -1
- data/spec/lib/event/annotation_event_bookmark_spec.rb +81 -98
- data/spec/lib/event/annotation_event_highlight_spec.rb +81 -98
- data/spec/lib/event/annotation_event_shared_spec.rb +81 -100
- data/spec/lib/event/annotation_event_tag_spec.rb +81 -98
- data/spec/lib/event/assessment_event_spec.rb +64 -124
- data/spec/lib/event/assessment_item_completed_event_spec.rb +93 -138
- data/spec/lib/event/assessment_item_started_event_spec.rb +92 -139
- data/spec/lib/event/assignable_event_spec.rb +65 -129
- data/spec/lib/event/media_event_spec.rb +77 -94
- data/spec/lib/event/navigated_event_spec.rb +90 -108
- data/spec/lib/event/session_event_login_spec.rb +98 -108
- data/spec/lib/event/session_event_logout_spec.rb +66 -81
- data/spec/lib/event/session_event_timeout_spec.rb +62 -88
- data/spec/lib/event/viewed_event_spec.rb +74 -92
- data/spec/lib/event_helper.rb +89 -109
- data/spec/lib/request/http_requestor_spec.rb +170 -0
- data/spec/lib/sensor_spec.rb +9 -29
- metadata +10 -11
- data/lib/caliper/entities/outcome/predicted_grade.rb +0 -43
- data/lib/caliper/entity_envelope.rb +0 -33
- data/lib/caliper/event_envelope.rb +0 -33
- data/lib/caliper/request/event_store_envelope.rb +0 -27
@@ -0,0 +1,170 @@
|
|
1
|
+
##
|
2
|
+
# This file is part of IMS Caliper Analytics™ and is licensed to
|
3
|
+
# IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
|
4
|
+
# under one or more contributor license agreements. See the NOTICE
|
5
|
+
# file distributed with this work for additional information.
|
6
|
+
#
|
7
|
+
# IMS Caliper is free software: you can redistribute it and/or modify it under
|
8
|
+
# the terms of the GNU Lesser General Public License as published by the Free
|
9
|
+
# Software Foundation, version 3 of the License.
|
10
|
+
#
|
11
|
+
# IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
|
12
|
+
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
13
|
+
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public License along
|
16
|
+
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
|
+
|
18
|
+
require 'require_all'
|
19
|
+
require_all 'lib/caliper/entities/entity.rb'
|
20
|
+
require_all 'lib/caliper/entities/agent/software_application.rb'
|
21
|
+
require_all 'lib/caliper/entities/agent/person.rb'
|
22
|
+
require_all 'lib/caliper/entities/lis/membership.rb'
|
23
|
+
require_all 'lib/caliper/entities/lis/role.rb'
|
24
|
+
require_all 'lib/caliper/entities/lis/status.rb'
|
25
|
+
require_all 'lib/caliper/entities/lis/course_section.rb'
|
26
|
+
require_all 'lib/caliper/entities/lis/course_offering.rb'
|
27
|
+
require_all 'lib/caliper/entities/lis/group.rb'
|
28
|
+
require_all 'lib/caliper/entities/reading/epub_volume.rb'
|
29
|
+
require_all 'lib/caliper/entities/reading/web_page.rb'
|
30
|
+
require_all 'lib/caliper/event/navigation_event.rb'
|
31
|
+
require_all 'lib/caliper/profiles/reading_profile.rb'
|
32
|
+
require_all 'lib/caliper/options.rb'
|
33
|
+
require_all 'lib/caliper/request/http_requestor.rb'
|
34
|
+
require_all 'lib/caliper/sensor.rb'
|
35
|
+
|
36
|
+
require 'json_spec'
|
37
|
+
|
38
|
+
module Caliper
|
39
|
+
module Request
|
40
|
+
|
41
|
+
describe Envelope do
|
42
|
+
|
43
|
+
it 'should ensure that a Caliper envelope comprising a NavigationEvent is correctly created and serialized' do
|
44
|
+
|
45
|
+
# EdApp
|
46
|
+
ed_app = Caliper::Entities::Agent::SoftwareApplication.new
|
47
|
+
ed_app.id = 'https://github.com/readium/readium-js-viewer'
|
48
|
+
ed_app.name = 'Readium'
|
49
|
+
ed_app.dateCreated = '2015-08-01T06:00:00.000Z'
|
50
|
+
ed_app.dateModified = '2015-09-02T11:30:00.000Z'
|
51
|
+
|
52
|
+
# Actor
|
53
|
+
student = Caliper::Entities::Agent::Person.new
|
54
|
+
student.id = 'https://some-university.edu/user/554433'
|
55
|
+
student.dateCreated = '2015-08-01T06:00:00.000Z'
|
56
|
+
student.dateModified = '2015-09-02T11:30:00.000Z'
|
57
|
+
|
58
|
+
# Action
|
59
|
+
action = Caliper::Profiles::ProfileActions::NAVIGATED_TO
|
60
|
+
|
61
|
+
# Object
|
62
|
+
obj = Caliper::Entities::Reading::EPubVolume.new
|
63
|
+
obj.id = 'https://github.com/readium/readium-js-viewer/book/34843#epubcfi(/4/3)'
|
64
|
+
obj.name = 'The Glorious Cause: The American Revolution, 1763-1789 (Oxford History of the United States)'
|
65
|
+
obj.version = '2nd ed.'
|
66
|
+
obj.dateCreated = '2015-08-01T06:00:00.000Z'
|
67
|
+
obj.dateModified = '2015-09-02T11:30:00.000Z'
|
68
|
+
|
69
|
+
# Target frame
|
70
|
+
frame = Caliper::Entities::Reading::Frame.new
|
71
|
+
frame.id = 'https://github.com/readium/readium-js-viewer/book/34843#epubcfi(/4/3/1)'
|
72
|
+
frame.name = 'Key Figures: George Washington'
|
73
|
+
frame.isPartOf = obj
|
74
|
+
frame.version = obj.version
|
75
|
+
frame.index = 1
|
76
|
+
frame.dateCreated = '2015-08-01T06:00:00.000Z'
|
77
|
+
frame.dateModified = '2015-09-02T11:30:00.000Z'
|
78
|
+
|
79
|
+
# navigatedFrom property (specific to Navigation Event)
|
80
|
+
from = Caliper::Entities::Reading::WebPage.new
|
81
|
+
from.id = 'https://some-university.edu/politicalScience/2015/american-revolution-101/index.html'
|
82
|
+
from.name = 'American Revolution 101 Landing Page'
|
83
|
+
from.dateCreated = '2015-08-01T06:00:00.000Z'
|
84
|
+
from.dateModified = '2015-09-02T11:30:00.000Z'
|
85
|
+
from.isPartOf = nil
|
86
|
+
from.version = '1.0'
|
87
|
+
|
88
|
+
# LIS Course Offering
|
89
|
+
course = Caliper::Entities::LIS::CourseOffering.new
|
90
|
+
course.id = "https://some-university.edu/politicalScience/2015/american-revolution-101"
|
91
|
+
course.name = "Political Science 101: The American Revolution"
|
92
|
+
course.courseNumber = "POL101"
|
93
|
+
course.academicSession = "Fall-2015"
|
94
|
+
course.subOrganizationOf = nil
|
95
|
+
course.dateCreated = '2015-08-01T06:00:00.000Z'
|
96
|
+
course.dateModified = '2015-09-02T11:30:00.000Z'
|
97
|
+
|
98
|
+
# LIS Course Section
|
99
|
+
section = Caliper::Entities::LIS::CourseSection.new
|
100
|
+
section.id = 'https://some-university.edu/politicalScience/2015/american-revolution-101/section/001'
|
101
|
+
section.name = 'American Revolution 101'
|
102
|
+
section.courseNumber = "POL101"
|
103
|
+
section.academicSession = "Fall-2015"
|
104
|
+
section.category = nil
|
105
|
+
section.subOrganizationOf = course
|
106
|
+
section.dateCreated = '2015-08-01T06:00:00.000Z'
|
107
|
+
section.dateModified = '2015-09-02T11:30:00.000Z'
|
108
|
+
|
109
|
+
# LIS Group
|
110
|
+
group = Caliper::Entities::LIS::Group.new
|
111
|
+
group.id = "https://some-university.edu/politicalScience/2015/american-revolution-101/section/001/group/001"
|
112
|
+
group.name = "Discussion Group 001"
|
113
|
+
group.subOrganizationOf = section
|
114
|
+
group.dateCreated = '2015-08-01T06:00:00.000Z'
|
115
|
+
group.dateModified = nil
|
116
|
+
|
117
|
+
membership = Caliper::Entities::LIS::Membership.new
|
118
|
+
membership.id = "https://some-university.edu/politicalScience/2015/american-revolution-101/roster/554433"
|
119
|
+
membership.name = "American Revolution 101"
|
120
|
+
membership.description = "Roster entry"
|
121
|
+
membership.member = "https://some-university.edu/user/554433"
|
122
|
+
membership.organization = "https://some-university.edu/politicalScience/2015/american-revolution-101/section/001"
|
123
|
+
membership.roles = [Caliper::Entities::LIS::Role::LEARNER]
|
124
|
+
membership.status = Caliper::Entities::LIS::Status::ACTIVE
|
125
|
+
membership.dateCreated = "2015-08-01T06:00:00.000Z"
|
126
|
+
membership.dateModified = nil
|
127
|
+
|
128
|
+
# Create the Event
|
129
|
+
event = Caliper::Event::NavigationEvent.new
|
130
|
+
event.actor = student
|
131
|
+
event.action = action
|
132
|
+
event.object = obj
|
133
|
+
event.target = frame
|
134
|
+
event.generated = nil
|
135
|
+
event.navigatedFrom = from
|
136
|
+
event.startedAtTime = '2015-09-15T10:15:00.000Z'
|
137
|
+
event.endedAtTime = nil
|
138
|
+
event.duration = nil
|
139
|
+
event.edApp = ed_app
|
140
|
+
event.group = group
|
141
|
+
event.membership = membership
|
142
|
+
# puts "Event JSON = #{event.to_json}'"
|
143
|
+
|
144
|
+
# The Sensor
|
145
|
+
options = Caliper::Options.new
|
146
|
+
sensor = Caliper::Sensor.new("http://learning-app.some-university.edu/sensor", options)
|
147
|
+
requestor = Caliper::Request::HttpRequestor.new(options)
|
148
|
+
json_payload = requestor.generate_payload(sensor, event)
|
149
|
+
|
150
|
+
# Swap out sendTime=DateTime.now() in favor of fixture value (or test will most assuredly fail).
|
151
|
+
json_payload_sub = json_payload.sub(/\"sendTime\":\"[^\"]*\"/, "\"sendTime\":\"2015-09-15T11:05:01.000Z\"")
|
152
|
+
|
153
|
+
# Load JSON from caliper-common-fixtures for comparison
|
154
|
+
# NOTE - sym link to caliper-common-fixtures needs to exist under spec/fixtures
|
155
|
+
file = File.read('spec/fixtures/eventStorePayload.json')
|
156
|
+
data_hash = JSON.parse(file)
|
157
|
+
expected_json = data_hash.to_json # convert hash back to JSON string after parse
|
158
|
+
expect(json_payload_sub).to be_json_eql(expected_json)
|
159
|
+
|
160
|
+
# puts "JSON from file = #{data_hash}"
|
161
|
+
# deser_envelope = Caliper::Request::Envelope.new
|
162
|
+
# deser_envelope.from_json data_hash
|
163
|
+
# puts "Envelope from JSON = #{deser_envelope.to_json}"
|
164
|
+
|
165
|
+
# Ensure that the deserialized shared event object conforms
|
166
|
+
# expect(json_payload_sub).to eql(deser_envelope)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
data/spec/lib/sensor_spec.rb
CHANGED
@@ -18,10 +18,6 @@
|
|
18
18
|
require 'require_all'
|
19
19
|
require_all 'lib/caliper/sensor.rb'
|
20
20
|
require_relative './event_helper'
|
21
|
-
require_all 'lib/caliper/event/session_event.rb'
|
22
|
-
require_all 'lib/caliper/event/grade_predict_event.rb'
|
23
|
-
require_all 'lib/caliper/entities/outcome/predicted_grade.rb'
|
24
|
-
require_all 'lib/caliper/entities/outcome/result.rb'
|
25
21
|
|
26
22
|
module Caliper
|
27
23
|
|
@@ -30,36 +26,20 @@ module Caliper
|
|
30
26
|
|
31
27
|
it "should ensure that we can create and send an event" do
|
32
28
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
#'apiKey' => '_-kJMcjiSymICwhUaHULbg'
|
39
|
-
}
|
40
|
-
|
41
|
-
sensor = Sensor.new options
|
42
|
-
event = session_eventP
|
43
|
-
|
44
|
-
predictedEvent = Caliper::Entities::Outcome::PredictedGrade.new
|
45
|
-
|
46
|
-
outcome = Caliper::Entities::Outcome::Result.new
|
47
|
-
|
48
|
-
file = File.read('spec/fixtures/caliper_session_gradecraft.json')
|
49
|
-
data_hash = JSON.parse(file)
|
50
|
-
expected_json = data_hash.to_json # convert hash back to JSON string after parse
|
51
|
-
# puts "JSON from file = #{data_hash}"
|
52
|
-
deser_annotation_event = Caliper::Event::SessionEvent.new
|
53
|
-
deser_annotation_event.from_json data_hash
|
54
|
-
# puts "AnnotationEvent from JSON = #{deser_annotation_event.to_json}"
|
29
|
+
id = 'http://learning-app.some-university.edu/sensor'
|
30
|
+
options = {
|
31
|
+
'host' => 'http://requestb.in/1i7pr2i1',
|
32
|
+
'apiKey' => 'test_api_key'
|
33
|
+
}
|
55
34
|
|
35
|
+
sensor = Sensor.new id, options
|
36
|
+
event = session_event
|
56
37
|
|
57
38
|
# NOTE: To test sending events to an actual endpoint,
|
58
39
|
# for now, uncomment the line below after setting options.host above
|
59
40
|
# to a new/valid request bin or end point URL.
|
60
41
|
|
61
|
-
|
62
|
-
p response
|
42
|
+
# sensor.send event
|
63
43
|
end
|
64
44
|
end
|
65
|
-
end
|
45
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ims_caliper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.3.
|
4
|
+
version: 0.9.3.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Caliper Dev Group
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This is the implementation of IMSGlobal Caliper in Ruby
|
14
14
|
email:
|
@@ -50,14 +50,13 @@ files:
|
|
50
50
|
- lib/caliper/entities/lis/course_section.rb
|
51
51
|
- lib/caliper/entities/lis/group.rb
|
52
52
|
- lib/caliper/entities/lis/membership.rb
|
53
|
-
- lib/caliper/entities/lis/
|
53
|
+
- lib/caliper/entities/lis/role.rb
|
54
54
|
- lib/caliper/entities/lis/status.rb
|
55
55
|
- lib/caliper/entities/media/audio_object.rb
|
56
56
|
- lib/caliper/entities/media/image_object.rb
|
57
57
|
- lib/caliper/entities/media/media_location.rb
|
58
58
|
- lib/caliper/entities/media/media_object.rb
|
59
59
|
- lib/caliper/entities/media/video_object.rb
|
60
|
-
- lib/caliper/entities/outcome/predicted_grade.rb
|
61
60
|
- lib/caliper/entities/outcome/result.rb
|
62
61
|
- lib/caliper/entities/reading/epub_chapter.rb
|
63
62
|
- lib/caliper/entities/reading/epub_part.rb
|
@@ -80,20 +79,17 @@ files:
|
|
80
79
|
- lib/caliper/entities/targetable.rb
|
81
80
|
- lib/caliper/entities/w3c/membership.rb
|
82
81
|
- lib/caliper/entities/w3c/organization.rb
|
83
|
-
- lib/caliper/entity_envelope.rb
|
84
82
|
- lib/caliper/event/annotation_event.rb
|
85
83
|
- lib/caliper/event/assessment_event.rb
|
86
84
|
- lib/caliper/event/assessment_item_event.rb
|
87
85
|
- lib/caliper/event/assignable_event.rb
|
88
86
|
- lib/caliper/event/event.rb
|
89
|
-
- lib/caliper/event/grade_predict_event.rb
|
90
87
|
- lib/caliper/event/jsonable.rb
|
91
88
|
- lib/caliper/event/media_event.rb
|
92
89
|
- lib/caliper/event/navigation_event.rb
|
93
90
|
- lib/caliper/event/outcome_event.rb
|
94
91
|
- lib/caliper/event/session_event.rb
|
95
92
|
- lib/caliper/event/view_event.rb
|
96
|
-
- lib/caliper/event_envelope.rb
|
97
93
|
- lib/caliper/jsonable.rb
|
98
94
|
- lib/caliper/options.rb
|
99
95
|
- lib/caliper/profiles/annotation_profile.rb
|
@@ -104,7 +100,8 @@ files:
|
|
104
100
|
- lib/caliper/profiles/profile.rb
|
105
101
|
- lib/caliper/profiles/reading_profile.rb
|
106
102
|
- lib/caliper/profiles/session_profile.rb
|
107
|
-
- lib/caliper/request/
|
103
|
+
- lib/caliper/request/envelope.rb
|
104
|
+
- lib/caliper/request/envelope_jsonable.rb
|
108
105
|
- lib/caliper/request/event_store_requestor.rb
|
109
106
|
- lib/caliper/request/http_requestor.rb
|
110
107
|
- lib/caliper/sensor.rb
|
@@ -139,6 +136,7 @@ files:
|
|
139
136
|
- spec/lib/event/session_event_timeout_spec.rb
|
140
137
|
- spec/lib/event/viewed_event_spec.rb
|
141
138
|
- spec/lib/event_helper.rb
|
139
|
+
- spec/lib/request/http_requestor_spec.rb
|
142
140
|
- spec/lib/sensor_spec.rb
|
143
141
|
- spec/spec_helper.rb
|
144
142
|
homepage: https://github.com/IMSGlobal/caliper-ruby
|
@@ -151,17 +149,17 @@ require_paths:
|
|
151
149
|
- lib
|
152
150
|
required_ruby_version: !ruby/object:Gem::Requirement
|
153
151
|
requirements:
|
154
|
-
- -
|
152
|
+
- - '>='
|
155
153
|
- !ruby/object:Gem::Version
|
156
154
|
version: '0'
|
157
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
158
156
|
requirements:
|
159
|
-
- -
|
157
|
+
- - '>='
|
160
158
|
- !ruby/object:Gem::Version
|
161
159
|
version: '0'
|
162
160
|
requirements: []
|
163
161
|
rubyforge_project:
|
164
|
-
rubygems_version: 2.
|
162
|
+
rubygems_version: 2.4.6
|
165
163
|
signing_key:
|
166
164
|
specification_version: 4
|
167
165
|
summary: Caliper Sensor API
|
@@ -185,5 +183,6 @@ test_files:
|
|
185
183
|
- spec/lib/event/session_event_timeout_spec.rb
|
186
184
|
- spec/lib/event/viewed_event_spec.rb
|
187
185
|
- spec/lib/event_helper.rb
|
186
|
+
- spec/lib/request/http_requestor_spec.rb
|
188
187
|
- spec/lib/sensor_spec.rb
|
189
188
|
- spec/spec_helper.rb
|
@@ -1,43 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This file is part of IMS Caliper Analytics™ and is licensed to
|
3
|
-
# IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
|
4
|
-
# under one or more contributor license agreements. See the NOTICE
|
5
|
-
# file distributed with this work for additional information.
|
6
|
-
#
|
7
|
-
# IMS Caliper is free software: you can redistribute it and/or modify it under
|
8
|
-
# the terms of the GNU Lesser General Public License as published by the Free
|
9
|
-
# Software Foundation, version 3 of the License.
|
10
|
-
#
|
11
|
-
# IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
|
12
|
-
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
13
|
-
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU Lesser General Public License along
|
16
|
-
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
|
-
|
18
|
-
require_relative '../entity'
|
19
|
-
require_relative '../generatable'
|
20
|
-
|
21
|
-
#
|
22
|
-
# LIS Result
|
23
|
-
#
|
24
|
-
module Caliper
|
25
|
-
module Entities
|
26
|
-
class PredictedGrade < Entity
|
27
|
-
include Caliper::Entities::Generatable
|
28
|
-
|
29
|
-
attr_accessor :type, # String
|
30
|
-
:course_id,
|
31
|
-
:scored_by,
|
32
|
-
:student_id,
|
33
|
-
:user_role,
|
34
|
-
:assignment_id,
|
35
|
-
:predicted_score,
|
36
|
-
:possible_score
|
37
|
-
|
38
|
-
def initialize
|
39
|
-
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This file is part of IMS Caliper Analytics™ and is licensed to
|
3
|
-
# IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
|
4
|
-
# under one or more contributor license agreements. See the NOTICE
|
5
|
-
# file distributed with this work for additional information.
|
6
|
-
#
|
7
|
-
# IMS Caliper is free software: you can redistribute it and/or modify it under
|
8
|
-
# the terms of the GNU Lesser General Public License as published by the Free
|
9
|
-
# Software Foundation, version 3 of the License.
|
10
|
-
#
|
11
|
-
# IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
|
12
|
-
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
13
|
-
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU Lesser General Public License along
|
16
|
-
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
|
-
|
18
|
-
require 'rest_client'
|
19
|
-
require_relative "./options"
|
20
|
-
require_relative './jsonable'
|
21
|
-
|
22
|
-
#
|
23
|
-
# Caliper Sensor Entity Envelope.
|
24
|
-
#
|
25
|
-
module Caliper
|
26
|
-
class EntityEnvelope
|
27
|
-
include Caliper::Jsonable
|
28
|
-
|
29
|
-
attr_accessor :apiKey,
|
30
|
-
:sensorId,
|
31
|
-
:entity
|
32
|
-
end
|
33
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This file is part of IMS Caliper Analytics™ and is licensed to
|
3
|
-
# IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
|
4
|
-
# under one or more contributor license agreements. See the NOTICE
|
5
|
-
# file distributed with this work for additional information.
|
6
|
-
#
|
7
|
-
# IMS Caliper is free software: you can redistribute it and/or modify it under
|
8
|
-
# the terms of the GNU Lesser General Public License as published by the Free
|
9
|
-
# Software Foundation, version 3 of the License.
|
10
|
-
#
|
11
|
-
# IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
|
12
|
-
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
13
|
-
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU Lesser General Public License along
|
16
|
-
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
|
-
|
18
|
-
require 'rest_client'
|
19
|
-
require_relative "./options"
|
20
|
-
require_relative './jsonable'
|
21
|
-
|
22
|
-
#
|
23
|
-
# Caliper Sensor Event Envelope.
|
24
|
-
#
|
25
|
-
module Caliper
|
26
|
-
class EventEnvelope
|
27
|
-
include Caliper::Jsonable
|
28
|
-
|
29
|
-
attr_accessor :apiKey,
|
30
|
-
:sensorId,
|
31
|
-
:event
|
32
|
-
end
|
33
|
-
end
|
@@ -1,27 +0,0 @@
|
|
1
|
-
##
|
2
|
-
# This file is part of IMS Caliper Analytics™ and is licensed to
|
3
|
-
# IMS Global Learning Consortium, Inc. (http://www.imsglobal.org)
|
4
|
-
# under one or more contributor license agreements. See the NOTICE
|
5
|
-
# file distributed with this work for additional information.
|
6
|
-
#
|
7
|
-
# IMS Caliper is free software: you can redistribute it and/or modify it under
|
8
|
-
# the terms of the GNU Lesser General Public License as published by the Free
|
9
|
-
# Software Foundation, version 3 of the License.
|
10
|
-
#
|
11
|
-
# IMS Caliper is distributed in the hope that it will be useful, but WITHOUT
|
12
|
-
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
|
13
|
-
# A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
14
|
-
#
|
15
|
-
# You should have received a copy of the GNU Lesser General Public License along
|
16
|
-
# with this program. If not, see http://www.gnu.org/licenses/.
|
17
|
-
|
18
|
-
#
|
19
|
-
# Event store envelope. Contains event info.
|
20
|
-
#
|
21
|
-
module Caliper
|
22
|
-
module Request
|
23
|
-
class EventStoreEnvelope
|
24
|
-
attr_accessor :id, :type, :time, :data
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|