ims_caliper 0.1.1 → 0.1.2

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.
Files changed (131) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +37 -0
  3. data/.idea/caliper-ruby.iml +98 -0
  4. data/.idea/encodings.xml +5 -0
  5. data/.idea/misc.xml +5 -0
  6. data/.idea/modules.xml +9 -0
  7. data/.idea/scopes/scope_settings.xml +5 -0
  8. data/.idea/vcs.xml +7 -0
  9. data/Gemfile +12 -1
  10. data/Gemfile.lock +42 -1
  11. data/LICENSE +67 -0
  12. data/NOTICE +15 -0
  13. data/README.md +13 -5
  14. data/caliper.gemspec +2 -8
  15. data/lib/caliper/defaults.rb +4 -4
  16. data/lib/caliper/entities/annotation/annotation.rb +14 -4
  17. data/lib/caliper/entities/annotation/bookmark_annotation.rb +14 -4
  18. data/lib/caliper/entities/annotation/highlight_annotation.rb +14 -3
  19. data/lib/caliper/entities/annotation/shared_annotation.rb +12 -3
  20. data/lib/caliper/entities/annotation/tag_annotation.rb +13 -3
  21. data/lib/caliper/entities/assessment/assessment.rb +27 -0
  22. data/lib/caliper/entities/assessment/assessment_item.rb +26 -0
  23. data/lib/caliper/entities/assignable/assignable_digital_resource.rb +47 -0
  24. data/lib/caliper/entities/assignable/attempt.rb +32 -0
  25. data/lib/caliper/entities/digital_resource.rb +36 -35
  26. data/lib/caliper/entities/entity.rb +50 -36
  27. data/lib/caliper/entities/foaf/agent.rb +1 -1
  28. data/lib/caliper/entities/jsonable.rb +56 -0
  29. data/lib/caliper/entities/learning_objective.rb +26 -0
  30. data/lib/caliper/entities/lis/course_offering.rb +30 -0
  31. data/lib/caliper/entities/lis/course_section.rb +27 -15
  32. data/lib/caliper/entities/lis/group.rb +27 -0
  33. data/lib/caliper/entities/lis/membership.rb +32 -0
  34. data/lib/caliper/entities/lis/organization.rb +20 -17
  35. data/lib/caliper/entities/lis/person.rb +23 -10
  36. data/lib/caliper/entities/lis/roles.rb +77 -0
  37. data/lib/caliper/entities/lis/status.rb +19 -0
  38. data/lib/caliper/entities/media/audio_object.rb +21 -0
  39. data/lib/caliper/entities/media/image_object.rb +21 -0
  40. data/lib/caliper/entities/media/media_location.rb +23 -0
  41. data/lib/caliper/entities/media/media_object.rb +38 -0
  42. data/lib/caliper/entities/media/video_object.rb +21 -0
  43. data/lib/caliper/entities/reading/epub_volume.rb +15 -7
  44. data/lib/caliper/entities/reading/frame.rb +7 -15
  45. data/lib/caliper/entities/response/fillin_blank_response.rb +20 -0
  46. data/lib/caliper/entities/response/multiple_choice_response.rb +20 -0
  47. data/lib/caliper/entities/response/multiple_response_response.rb +20 -0
  48. data/lib/caliper/entities/response/response.rb +23 -0
  49. data/lib/caliper/entities/response/response_type.rb +13 -0
  50. data/lib/caliper/entities/response/select_type_response.rb +20 -0
  51. data/lib/caliper/entities/response/true_false_response.rb +21 -0
  52. data/lib/caliper/entities/schemadotorg/software_application.rb +8 -8
  53. data/lib/caliper/entities/session.rb +25 -17
  54. data/lib/caliper/entities/software_application.rb +16 -7
  55. data/lib/caliper/entities/web_page.rb +2 -0
  56. data/lib/caliper/entity_envelope.rb +21 -0
  57. data/lib/caliper/event/annotation_event.rb +10 -6
  58. data/lib/caliper/event/assessment_event.rb +19 -0
  59. data/lib/caliper/event/assessment_item_event.rb +19 -0
  60. data/lib/caliper/event/assignable_event.rb +19 -0
  61. data/lib/caliper/event/event.rb +70 -50
  62. data/lib/caliper/event/jsonable.rb +55 -0
  63. data/lib/caliper/event/navigation_event.rb +2 -7
  64. data/lib/caliper/event/outcome_event.rb +1 -1
  65. data/lib/caliper/event/session_event.rb +13 -14
  66. data/lib/caliper/event/view_event.rb +6 -7
  67. data/lib/caliper/event_envelope.rb +22 -0
  68. data/lib/caliper/jsonable.rb +53 -0
  69. data/lib/caliper/profiles/annotation_profile.rb +56 -53
  70. data/lib/caliper/profiles/assessment_profile.rb +48 -0
  71. data/lib/caliper/profiles/assignable_profile.rb +44 -0
  72. data/lib/caliper/profiles/media_profile.rb +54 -0
  73. data/lib/caliper/profiles/profile.rb +38 -38
  74. data/lib/caliper/profiles/reading_profile.rb +31 -28
  75. data/lib/caliper/profiles/session_profile.rb +17 -18
  76. data/lib/caliper/request/event_store_requestor.rb +26 -26
  77. data/lib/caliper/sensor.rb +46 -35
  78. data/lib/caliper/version.rb +1 -1
  79. data/spec/lib/entities/entity.json +9 -0
  80. data/spec/lib/entities/entity_spec.rb +37 -0
  81. data/spec/lib/entities/lis/person_spec.rb +37 -0
  82. data/spec/lib/entities/lis/student.json +11 -0
  83. data/spec/lib/event/annotation_event_bookmark_spec.rb +159 -0
  84. data/spec/lib/event/annotation_event_highlight_spec.rb +160 -0
  85. data/spec/lib/event/annotation_event_shared_spec.rb +172 -0
  86. data/spec/lib/event/annotation_event_tag_spec.rb +159 -0
  87. data/spec/lib/event/assessment_event_spec.rb +207 -0
  88. data/spec/lib/event/assessment_item_completed_event_spec.rb +223 -0
  89. data/spec/lib/event/assessment_item_started_event_spec.rb +207 -0
  90. data/spec/lib/event/media_event_spec.rb +157 -0
  91. data/spec/lib/event/navigated_event_spec.rb +160 -0
  92. data/spec/lib/event/session_event_login_spec.rb +160 -0
  93. data/spec/lib/event/session_event_logout_spec.rb +145 -0
  94. data/spec/lib/event/session_event_timeout_spec.rb +145 -0
  95. data/spec/lib/event/viewed_event_spec.rb +149 -0
  96. data/spec/lib/event_helper.rb +145 -0
  97. data/spec/lib/sensor_spec.rb +30 -0
  98. data/spec/spec_helper.rb +3 -2
  99. metadata +84 -61
  100. data/lib/caliper/client.rb +0 -33
  101. data/lib/caliper/consumer/base.rb +0 -46
  102. data/lib/caliper/consumer/queue.rb +0 -40
  103. data/lib/caliper/consumer/socket.rb +0 -132
  104. data/lib/caliper/entities/annotation/text_position_selector.rb +0 -14
  105. data/lib/caliper/entities/schemadotorg/audio_object.rb +0 -15
  106. data/lib/caliper/entities/schemadotorg/image_object.rb +0 -15
  107. data/lib/caliper/entities/schemadotorg/media_object.rb +0 -19
  108. data/lib/caliper/entities/schemadotorg/video_object.rb +0 -15
  109. data/lib/caliper/event/.shared.rb.swp +0 -0
  110. data/spec/lib/client_spec.rb +0 -35
  111. data/spec/lib/consumer/base_spec.rb +0 -28
  112. data/spec/lib/consumer/queue_spec.rb +0 -16
  113. data/spec/lib/event/annotation_spec.rb +0 -12
  114. data/spec/lib/event/bookmarked_spec.rb +0 -17
  115. data/spec/lib/event/commented_spec.rb +0 -19
  116. data/spec/lib/event/highlighted_spec.rb +0 -18
  117. data/spec/lib/event/navigation_spec.rb +0 -15
  118. data/spec/lib/event/shared_spec.rb +0 -18
  119. data/spec/lib/event/tagged_spec.rb +0 -17
  120. data/spec/lib/event/used_spec.rb +0 -15
  121. data/spec/lib/event/viewed_spec.rb +0 -15
  122. data/test/caliper/events/session_login_event_test.rb +0 -58
  123. data/test/caliper/events/session_logout_event_test.rb +0 -55
  124. data/test/caliper/events/session_timeout_event_test.rb +0 -55
  125. data/test/caliper/request/http_requestor_test.rb +0 -59
  126. data/test/caliper/test_event.rb +0 -53
  127. data/test/caliper/test_utils.rb +0 -198
  128. data/test/fixtures/caliper_session_login_event.json +0 -71
  129. data/test/fixtures/caliper_session_logout_event.json +0 -52
  130. data/test/fixtures/caliper_session_timeout_event.json +0 -52
  131. data/test/fixtures/event_store_payload.json +0 -85
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDI0ZGY4YjFhMTE3M2NkYWMxNGNiMDA5OGViMWMzZjcwYzNmZTdkNQ==
4
+ Y2QyM2ZmMWYwMjZjNWE3NGI5MGI0OTIyZGI0YzU0NDQxOWNiOGZkZA==
5
5
  data.tar.gz: !binary |-
6
- ODk5NGZlMTBiZjdjZTM0N2U0ZjZhMDFhY2VlZWFjYWNhNDNjMjE2MQ==
6
+ NmViZGI2ZTM0MjIzNzlhZWQ0ZjMxNjgxOTIyOGE2MWViNDcyNjAzMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTA3OTY1NjE2ZTMxNTQ1ODFiYzI4MWYzMmQ3ODJiZjM5MGRiN2FkZjRiMTQ3
10
- OTUzNDJjZjMwMzUyNGRiNDY3MGViN2UwMWM5OGJlMjg0YTNjNmI5NTBlMzAx
11
- ODg1ODVlZWIyZWY5NjUwNzMwZTJjMGI2YmM5ODA5OGU4OTUxMTI=
9
+ MTE5NzI4ODQ1MzUxZDBiNjhjZTEzNTI0YjViM2MwMzkzMWYzM2ViNzE3Njgw
10
+ ODVhYTIwY2U4MzQyMjg3NTQ1MmEzZDIzZWJjYjAwZDc2ZjFmNzYyYWU2MjAw
11
+ MjFiODg0OWNmOTAyOWFjODkxNzU2NDYyMDQ4YTcxYTcwMDgwMTQ=
12
12
  data.tar.gz: !binary |-
13
- ZjNmNzBjZjg3ZTYwYjQ3YWZhODNiM2RlMWNhOGM0N2Y1ZTY0MzJlMTA4NmUz
14
- NmFmNWEwNWVmOTAzZTVlZWYwYmIyZDNiNDc2NDlkMDlkNDdhNDc5OGZmYTA0
15
- ZmQ4YWNlNDVjOGUyNDJkOTNlYzU0NWU1NGZiOThmZTUxZWRkNWM=
13
+ ZmQ0MWViMzM5NGNmMmNlZDdiYmRhMWJmYzczZjE1ZjUyYTM0YzUwNzM2Nzg5
14
+ NjcxOGRmOGY1YTBlNjQyZDNiNjJjN2MwMTUzN2RmYWZiYTcxZmU1ODhmMjgx
15
+ YTNiNzJjNmQzMmNjZmZmYjZiMzY0MTU2ZWIzYzI0Njk0ZmYzODc=
data/.gitignore ADDED
@@ -0,0 +1,37 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /test/tmp/
9
+ /test/version_tmp/
10
+ /tmp/
11
+ spec/fixtures
12
+ coverage
13
+
14
+ ## Specific to RubyMotion:
15
+ .dat*
16
+ .repl_history
17
+ build/
18
+
19
+ ## Documentation cache and generated files:
20
+ /.yardoc/
21
+ /_yardoc/
22
+ /doc/
23
+ /rdoc/
24
+
25
+ ## Environment normalisation:
26
+ /.bundle/
27
+ /vendor/bundle
28
+ /lib/bundler/man/
29
+
30
+ # for a library or gem, you might want to ignore these files since the code is
31
+ # intended to run in multiple environments; otherwise, check them in:
32
+ # Gemfile.lock
33
+ # .ruby-version
34
+ # .ruby-gemset
35
+
36
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
37
+ .rvmrc
@@ -0,0 +1,98 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="RUBY_MODULE" version="4">
3
+ <component name="CompassSettings">
4
+ <option name="compassSupportEnabled" value="true" />
5
+ </component>
6
+ <component name="FacetManager">
7
+ <facet type="gem" name="Ruby Gem">
8
+ <configuration>
9
+ <option name="GEM_APP_ROOT_PATH" value="$MODULE_DIR$" />
10
+ <option name="GEM_APP_TEST_PATH" value="" />
11
+ <option name="GEM_APP_LIB_PATH" value="$MODULE_DIR$/lib" />
12
+ </configuration>
13
+ </facet>
14
+ </component>
15
+ <component name="ModuleRunConfigurationManager">
16
+ <configuration default="false" name="Run spec 'navigated_event_spec': caliper-ruby" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
17
+ <predefined_log_file id="RUBY_RSPEC" enabled="true" />
18
+ <module name="caliper-ruby" />
19
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
20
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
21
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
22
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
23
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
24
+ <envs>
25
+ <env name="JRUBY_OPTS" value="-X+O" />
26
+ </envs>
27
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
28
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
29
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
30
+ <COVERAGE_PATTERN ENABLED="true">
31
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
32
+ </COVERAGE_PATTERN>
33
+ </EXTENSION>
34
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
35
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
36
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/lib/event/navigated_event_spec.rb" />
37
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
38
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
39
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
40
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
41
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
42
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
43
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
44
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
45
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
46
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
47
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
48
+ <RunnerSettings RunnerId="RubyRunner" />
49
+ <ConfigurationWrapper RunnerId="RubyRunner" />
50
+ <method />
51
+ </configuration>
52
+ <configuration default="false" name="Run spec 'assessment_item_completed_event_spec': caliper-ruby" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
53
+ <predefined_log_file id="RUBY_RSPEC" enabled="true" />
54
+ <module name="caliper-ruby" />
55
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
56
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$MODULE_DIR$" />
57
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
58
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
59
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
60
+ <envs>
61
+ <env name="JRUBY_OPTS" value="-X+O" />
62
+ </envs>
63
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
64
+ <EXTENSION ID="JRubyRunConfigurationExtension" NailgunExecEnabled="false" />
65
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
66
+ <COVERAGE_PATTERN ENABLED="true">
67
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
68
+ </COVERAGE_PATTERN>
69
+ </EXTENSION>
70
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
71
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
72
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$MODULE_DIR$/spec/lib/event/assessment_item_completed_event_spec.rb" />
73
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
74
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
75
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
76
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
77
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
78
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
79
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
80
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
81
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ZEUS" VALUE="false" />
82
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPRING" VALUE="false" />
83
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
84
+ <RunnerSettings RunnerId="RubyRunner" />
85
+ <ConfigurationWrapper RunnerId="RubyRunner" />
86
+ <method />
87
+ </configuration>
88
+ </component>
89
+ <component name="NewModuleRootManager">
90
+ <content url="file://$MODULE_DIR$" />
91
+ <orderEntry type="inheritedJdk" />
92
+ <orderEntry type="sourceFolder" forTests="false" />
93
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.7.3, rbenv: 1.9.3-p547) [gem]" level="application" />
94
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.2.5, rbenv: 1.9.3-p547) [gem]" level="application" />
95
+ <orderEntry type="library" scope="PROVIDED" name="multi_json (v1.10.1, rbenv: 1.9.3-p547) [gem]" level="application" />
96
+ </component>
97
+ </module>
98
+
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Encoding" useUTFGuessing="true" native2AsciiForPropertiesFiles="false" />
4
+ </project>
5
+
data/.idea/misc.xml ADDED
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="rbenv: 1.9.3-p547" project-jdk-type="RUBY_SDK" />
4
+ </project>
5
+
data/.idea/modules.xml ADDED
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/caliper-ruby.iml" filepath="$PROJECT_DIR$/.idea/caliper-ruby.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
9
+
@@ -0,0 +1,5 @@
1
+ <component name="DependencyValidationManager">
2
+ <state>
3
+ <option name="SKIP_IMPORT_STATEMENTS" value="false" />
4
+ </state>
5
+ </component>
data/.idea/vcs.xml ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
+ </component>
6
+ </project>
7
+
data/Gemfile CHANGED
@@ -4,10 +4,21 @@ source "https://rubygems.org"
4
4
  # Bundler will treat runtime dependencies like base dependencies, and
5
5
  # development dependencies will be added by default to the :development group.
6
6
 
7
+ # require_all utility
8
+ gem 'require_all'
9
+
7
10
  # the atomic lib
8
11
  gem 'atomic', '~> 1.1.99'
9
12
 
10
13
  # translation and localization
11
14
  gem 'i18n'
12
15
 
13
- gem 'test-unit'
16
+ # REST client
17
+ gem 'rest-client', '~> 1.7.3'
18
+
19
+ # Gems for Testing
20
+ gem 'test-unit'
21
+ gem 'simplecov', :require => false, :group => :test
22
+ gem 'simplecov-rcov', :require => false, :group => :test
23
+ gem 'mocha', '~> 1.1.0'
24
+ gem 'json_spec'
data/Gemfile.lock CHANGED
@@ -2,8 +2,43 @@ GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
4
  atomic (1.1.99)
5
+ diff-lcs (1.2.5)
6
+ docile (1.1.5)
5
7
  i18n (0.7.0)
6
- power_assert (0.2.2)
8
+ json_spec (1.1.4)
9
+ multi_json (~> 1.0)
10
+ rspec (>= 2.0, < 4.0)
11
+ metaclass (0.0.4)
12
+ mime-types (2.4.3)
13
+ mocha (1.1.0)
14
+ metaclass (~> 0.0.1)
15
+ multi_json (1.10.1)
16
+ netrc (0.10.3)
17
+ power_assert (0.2.3)
18
+ require_all (1.3.2)
19
+ rest-client (1.7.3)
20
+ mime-types (>= 1.16, < 3.0)
21
+ netrc (~> 0.7)
22
+ rspec (3.2.0)
23
+ rspec-core (~> 3.2.0)
24
+ rspec-expectations (~> 3.2.0)
25
+ rspec-mocks (~> 3.2.0)
26
+ rspec-core (3.2.2)
27
+ rspec-support (~> 3.2.0)
28
+ rspec-expectations (3.2.0)
29
+ diff-lcs (>= 1.2.0, < 2.0)
30
+ rspec-support (~> 3.2.0)
31
+ rspec-mocks (3.2.1)
32
+ diff-lcs (>= 1.2.0, < 2.0)
33
+ rspec-support (~> 3.2.0)
34
+ rspec-support (3.2.2)
35
+ simplecov (0.9.2)
36
+ docile (~> 1.1.0)
37
+ multi_json (~> 1.0)
38
+ simplecov-html (~> 0.9.0)
39
+ simplecov-html (0.9.0)
40
+ simplecov-rcov (0.2.3)
41
+ simplecov (>= 0.4.1)
7
42
  test-unit (3.0.9)
8
43
  power_assert
9
44
 
@@ -13,4 +48,10 @@ PLATFORMS
13
48
  DEPENDENCIES
14
49
  atomic (~> 1.1.99)
15
50
  i18n
51
+ json_spec
52
+ mocha (~> 1.1.0)
53
+ require_all
54
+ rest-client (~> 1.7.3)
55
+ simplecov
56
+ simplecov-rcov
16
57
  test-unit
data/LICENSE ADDED
@@ -0,0 +1,67 @@
1
+
2
+ GNU LESSER GENERAL PUBLIC LICENSE
3
+
4
+ Version 3, 29 June 2007
5
+
6
+ Copyright � 2007 Free Software Foundation, Inc. <http://fsf.org/>
7
+
8
+ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.
9
+
10
+ This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below.
11
+ 0. Additional Definitions.
12
+
13
+ As used herein, �this License� refers to version 3 of the GNU Lesser General Public License, and the �GNU GPL� refers to version 3 of the GNU General Public License.
14
+
15
+ �The Library� refers to a covered work governed by this License, other than an Application or a Combined Work as defined below.
16
+
17
+ An �Application� is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library.
18
+
19
+ A �Combined Work� is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the �Linked Version�.
20
+
21
+ The �Minimal Corresponding Source� for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version.
22
+
23
+ The �Corresponding Application Code� for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work.
24
+ 1. Exception to Section 3 of the GNU GPL.
25
+
26
+ You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL.
27
+ 2. Conveying Modified Versions.
28
+
29
+ If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version:
30
+
31
+ a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or
32
+ b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy.
33
+
34
+ 3. Object Code Incorporating Material from Library Header Files.
35
+
36
+ The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following:
37
+
38
+ a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License.
39
+ b) Accompany the object code with a copy of the GNU GPL and this license document.
40
+
41
+ 4. Combined Works.
42
+
43
+ You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
44
+
45
+ a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License.
46
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license document.
47
+ c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document.
48
+ d) Do one of the following:
49
+ 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.
50
+ 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version.
51
+ e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.)
52
+
53
+ 5. Combined Libraries.
54
+
55
+ You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following:
56
+
57
+ a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License.
58
+ b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work.
59
+
60
+ 6. Revised Versions of the GNU Lesser General Public License.
61
+
62
+ The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns.
63
+
64
+ Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License �or any later version� applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation.
65
+
66
+ If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.
67
+
data/NOTICE ADDED
@@ -0,0 +1,15 @@
1
+ ©2015 IMS Global Learning Consortium, Inc. All Rights Reserved.
2
+
3
+ Trademark Information- http://www.imsglobal.org/copyright.html
4
+
5
+ IMS Global Caliper Analytics™ APIs are publicly licensed as Open Source Software via GNU Lesser General Public License. LGPL v3. Use of these APIs and/or code libraries does not signify achievement of IMS conformance certification. The official list of conformance certifications is available at http://www.imscert.org
6
+
7
+ IMS Global also makes available an Alternative License based on the Apache 2.0 license.
8
+ Licensees (via the Alternative License) are required to be IMS Global members. Membership in IMS is a commitment by a supplier to the IMS community for ongoing support for achieving "plug and play" integration. IMS Membership dues pay for ongoing maintenance for the Alternative License to be applicable to updates to the Caliper Analytics APIs and code libraries. The rationale for this dual-license approach and membership component is to help assure a requisite level of ongoing development, project management, and support for the software.
9
+
10
+ Licensees of IMS Global Caliper Analytics APIs and code libraries are strongly encouraged to become active contributors to the Caliper Analytics project and other projects within IMS Global. Prospective licensees should understand that their initial base contribution and ongoing membership fees are insufficient to fully fund the ongoing development and maintenance of Caliper APIs/code libraries and that voluntary contributions are the primary "fuel" ensuring any open source project's viability. Contributions can include development, bug fixing, bug reporting, performance analysis, and other aspects of the overall development process.
11
+
12
+ Contributor status at the "github" level will be individual-based. Contributors will need to sign an IMS Global Contributor License Agreement (CLA) that grants IMS Global a license to contributions.
13
+
14
+ If you are interested in licensing the IMS Global Caliper Analytics APIs/code libraries please email licenses@imsglobal.org
15
+
data/README.md CHANGED
@@ -3,14 +3,22 @@ caliper-ruby
3
3
 
4
4
  caliper-ruby is a Ruby client for [Caliper](http://www.imsglobal.org) that provides a Ruby implementation of the Caliper Sensor API
5
5
 
6
- ## generate the Ruby Gem
6
+ ## development notes
7
+ To set up dev environment and run specs
8
+ * git clone <this repo>
9
+ * ensure you have ruby, bundler, rspec installed
10
+ * bundle install
11
+ * rspec spec # runs all specs
7
12
 
8
- gem build caliper.gemspec
13
+ #### _Note_
14
+ To run specs, you need to clone caliper-common-fixtures at the same level as caliper-ruby. Then please create a symlink similar to
15
+
16
+ ➜ caliper-ruby git:(master) ln -s ../caliper-common-fixtures/src/test/resources/fixtures ./spec/fixtures
9
17
 
10
- =============
11
- Use Ruby Style Guide:
18
+ ## generate the Ruby Gem
12
19
 
20
+ gem build caliper.gemspec
13
21
 
22
+ ### Use Ruby Style Guide:
14
23
  https://github.com/styleguide/ruby
15
-
16
24
  https://github.com/bbatsov/ruby-style-guide
data/caliper.gemspec CHANGED
@@ -4,8 +4,8 @@ require 'caliper/version'
4
4
  Gem::Specification.new do |g|
5
5
  g.name = "ims_caliper"
6
6
  g.version = Caliper::VERSION
7
- g.authors = ["Anthus Williams", "Zhen Qian"]
8
- g.email = ["aj@instructure.com", "zqian@umich.edu"]
7
+ g.authors = ["Caliper Dev Group"]
8
+ g.email = ["lisa@imsglobal.org"]
9
9
  g.homepage = "https://github.com/IMSGlobal/caliper-ruby"
10
10
  g.summary = "Caliper Sensor API"
11
11
  g.description = "This is the implementation of IMSGlobal Caliper in Ruby"
@@ -17,10 +17,4 @@ Gem::Specification.new do |g|
17
17
  g.test_files = g.files.grep(%r{^(test|spec|features)/})
18
18
  g.require_path = 'lib'
19
19
 
20
- #g.add_dependency "activesupport", '~> 0'
21
- #g.add_development_dependency "rspec", '~> 0'
22
- #g.add_development_dependency "simplecov", '~> 0'
23
- #g.add_development_dependency "simplecov-rcov", '~> 0'
24
- #g.add_development_dependency "mocha", '~> 0'
25
- #g.add_development_dependency 'atomic', '~> 1.1.99'
26
20
  end
@@ -1,8 +1,8 @@
1
1
  module Caliper
2
2
  class Defaults
3
- HOST = "http://dev-null.comt"
4
- CONNECTION_TIMEOUT = 10000
5
- SO_TIMEOUT = 10000
6
- CONNECTION_REQUEST_TIMEOUT = 10000
3
+ HOST = "http://dev-null.comt"
4
+ CONNECTION_TIMEOUT = 10000
5
+ SO_TIMEOUT = 10000
6
+ CONNECTION_REQUEST_TIMEOUT = 10000
7
7
  end
8
8
  end
@@ -1,9 +1,18 @@
1
1
  require_relative '../../entities/entity'
2
2
  require_relative '../../entities/schemadotorg/thing'
3
3
 
4
+ #
5
+ #
6
+ # @copyright @copyright ©2013 IMS Global Learning Consortium, Inc. All Rights Reserved.
7
+ # @license For license information contact, info@imsglobal.org
8
+ #
9
+ #
10
+ # Annotation Entity
11
+ #
4
12
  module Caliper
5
13
  module Entities
6
14
  module Annotation
15
+
7
16
  module AnnotationType
8
17
  ANNOTATION = "http://purl.imsglobal.org/caliper/v1/Annotation"
9
18
  BOOKMARK_ANNOTATION = "http://purl.imsglobal.org/caliper/v1/BookmarkAnnotation"
@@ -15,15 +24,16 @@ module Caliper
15
24
  ## implement the interface Thing
16
25
  class Annotation < Entity
17
26
  include Caliper::Entities::SchemaDotOrg::Thing
18
- attr_accessor :target,
19
- :type
27
+
28
+ attr_accessor :annotated
20
29
 
21
30
  def initialize
22
31
  super
23
- type = AnnotationType::ANNOTATION
24
- target = ''
32
+ @type = AnnotationType::ANNOTATION
33
+ @annotated = nil
25
34
  end
26
35
  end
36
+
27
37
  end
28
38
  end
29
39
  end