learnosity-sdk 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (120) hide show
  1. checksums.yaml +5 -5
  2. data/.github/PULL_REQUEST_TEMPLATE.md +13 -0
  3. data/.gitignore +1 -0
  4. data/.travis.yml +15 -5
  5. data/CONTRIBUTING.md +14 -0
  6. data/ChangeLog.md +18 -0
  7. data/LICENSE.md +141 -0
  8. data/Makefile +69 -0
  9. data/README.md +230 -186
  10. data/REFERENCE.md +249 -0
  11. data/Rakefile +9 -0
  12. data/docs/images/apache-license.svg +20 -0
  13. data/docs/images/downloads.svg +20 -0
  14. data/docs/images/image-assessment-retrieval.png +0 -0
  15. data/docs/images/image-concept-overview.png +0 -0
  16. data/docs/images/image-logo-graphic.png +0 -0
  17. data/docs/images/image-quickstart-examples-assessment.png +0 -0
  18. data/docs/images/image-quickstart-index.png +0 -0
  19. data/docs/images/image-signed-request-creation.png +0 -0
  20. data/docs/quickstart/css/style.css +113 -0
  21. data/{examples → docs/quickstart}/lrn-sdk-rails/Gemfile +2 -2
  22. data/docs/quickstart/lrn-sdk-rails/app/controllers/author_controller.rb +179 -0
  23. data/docs/quickstart/lrn-sdk-rails/app/controllers/authoraide_controller.rb +32 -0
  24. data/docs/quickstart/lrn-sdk-rails/app/controllers/index_controller.rb +9 -0
  25. data/docs/quickstart/lrn-sdk-rails/app/controllers/items_controller.rb +33 -0
  26. data/docs/quickstart/lrn-sdk-rails/app/controllers/questions_controller.rb +44 -0
  27. data/docs/quickstart/lrn-sdk-rails/app/controllers/reports_controller.rb +32 -0
  28. data/docs/quickstart/lrn-sdk-rails/app/views/author/index.html.erb +14 -0
  29. data/docs/quickstart/lrn-sdk-rails/app/views/authoraide/index.html.erb +6 -0
  30. data/docs/quickstart/lrn-sdk-rails/app/views/index/index.html.erb +38 -0
  31. data/{examples/lrn-sdk-rails/app/views/index → docs/quickstart/lrn-sdk-rails/app/views/items}/index.html.erb +2 -5
  32. data/docs/quickstart/lrn-sdk-rails/app/views/questions/index.html.erb +6 -0
  33. data/docs/quickstart/lrn-sdk-rails/app/views/reports/index.html.erb +14 -0
  34. data/docs/quickstart/lrn-sdk-rails/config/application.rb +24 -0
  35. data/docs/quickstart/lrn-sdk-rails/config/routes.rb +12 -0
  36. data/examples/simple/init_data.rb +6 -4
  37. data/examples/simple/init_items.rb +6 -4
  38. data/learnosity-sdk.gemspec +14 -14
  39. data/lib/learnosity/sdk/request/init.rb +13 -12
  40. data/lib/learnosity/sdk/version.rb +1 -1
  41. metadata +122 -101
  42. data/LICENSE +0 -201
  43. data/examples/lrn-sdk-rails/README.md +0 -24
  44. data/examples/lrn-sdk-rails/app/controllers/index_controller.rb +0 -106
  45. data/examples/lrn-sdk-rails/config/application.rb +0 -15
  46. data/examples/lrn-sdk-rails/config/routes.rb +0 -5
  47. /data/{examples → docs/quickstart}/lrn-sdk-rails/.gitignore +0 -0
  48. /data/{examples → docs/quickstart}/lrn-sdk-rails/Rakefile +0 -0
  49. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/config/manifest.js +0 -0
  50. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/images/.keep +0 -0
  51. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/javascripts/application.js +0 -0
  52. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/javascripts/cable.js +0 -0
  53. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/javascripts/channels/.keep +0 -0
  54. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/javascripts/index.coffee +0 -0
  55. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/stylesheets/application.css +0 -0
  56. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/stylesheets/index.scss +0 -0
  57. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/channels/application_cable/channel.rb +0 -0
  58. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/channels/application_cable/connection.rb +0 -0
  59. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/controllers/application_controller.rb +0 -0
  60. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/controllers/concerns/.keep +0 -0
  61. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/helpers/application_helper.rb +0 -0
  62. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/helpers/index_helper.rb +0 -0
  63. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/jobs/application_job.rb +0 -0
  64. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/mailers/application_mailer.rb +0 -0
  65. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/models/application_record.rb +0 -0
  66. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/models/concerns/.keep +0 -0
  67. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/views/layouts/application.html.erb +0 -0
  68. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/views/layouts/mailer.html.erb +0 -0
  69. /data/{examples → docs/quickstart}/lrn-sdk-rails/app/views/layouts/mailer.text.erb +0 -0
  70. /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/bundle +0 -0
  71. /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/rails +0 -0
  72. /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/rake +0 -0
  73. /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/setup +0 -0
  74. /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/spring +0 -0
  75. /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/update +0 -0
  76. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/boot.rb +0 -0
  77. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/cable.yml +0 -0
  78. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/database.yml +0 -0
  79. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/environment.rb +0 -0
  80. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/environments/development.rb +0 -0
  81. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/environments/production.rb +0 -0
  82. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/environments/test.rb +0 -0
  83. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/application_controller_renderer.rb +0 -0
  84. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/assets.rb +0 -0
  85. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/backtrace_silencers.rb +0 -0
  86. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/cookies_serializer.rb +0 -0
  87. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/filter_parameter_logging.rb +0 -0
  88. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/inflections.rb +0 -0
  89. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/mime_types.rb +0 -0
  90. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/new_framework_defaults.rb +0 -0
  91. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/session_store.rb +0 -0
  92. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/wrap_parameters.rb +0 -0
  93. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/locales/en.yml +0 -0
  94. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/puma.rb +0 -0
  95. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/secrets.yml +0 -0
  96. /data/{examples → docs/quickstart}/lrn-sdk-rails/config/spring.rb +0 -0
  97. /data/{examples → docs/quickstart}/lrn-sdk-rails/config.ru +0 -0
  98. /data/{examples → docs/quickstart}/lrn-sdk-rails/db/seeds.rb +0 -0
  99. /data/{examples → docs/quickstart}/lrn-sdk-rails/lib/assets/.keep +0 -0
  100. /data/{examples → docs/quickstart}/lrn-sdk-rails/lib/tasks/.keep +0 -0
  101. /data/{examples → docs/quickstart}/lrn-sdk-rails/log/.keep +0 -0
  102. /data/{examples → docs/quickstart}/lrn-sdk-rails/public/404.html +0 -0
  103. /data/{examples → docs/quickstart}/lrn-sdk-rails/public/422.html +0 -0
  104. /data/{examples → docs/quickstart}/lrn-sdk-rails/public/500.html +0 -0
  105. /data/{examples → docs/quickstart}/lrn-sdk-rails/public/apple-touch-icon-precomposed.png +0 -0
  106. /data/{examples → docs/quickstart}/lrn-sdk-rails/public/apple-touch-icon.png +0 -0
  107. /data/{examples → docs/quickstart}/lrn-sdk-rails/public/favicon.ico +0 -0
  108. /data/{examples → docs/quickstart}/lrn-sdk-rails/public/robots.txt +0 -0
  109. /data/{examples → docs/quickstart}/lrn-sdk-rails/test/controllers/.keep +0 -0
  110. /data/{examples → docs/quickstart}/lrn-sdk-rails/test/controllers/index_controller_test.rb +0 -0
  111. /data/{examples → docs/quickstart}/lrn-sdk-rails/test/fixtures/.keep +0 -0
  112. /data/{examples → docs/quickstart}/lrn-sdk-rails/test/fixtures/files/.keep +0 -0
  113. /data/{examples → docs/quickstart}/lrn-sdk-rails/test/helpers/.keep +0 -0
  114. /data/{examples → docs/quickstart}/lrn-sdk-rails/test/integration/.keep +0 -0
  115. /data/{examples → docs/quickstart}/lrn-sdk-rails/test/mailers/.keep +0 -0
  116. /data/{examples → docs/quickstart}/lrn-sdk-rails/test/models/.keep +0 -0
  117. /data/{examples → docs/quickstart}/lrn-sdk-rails/test/test_helper.rb +0 -0
  118. /data/{examples → docs/quickstart}/lrn-sdk-rails/tmp/.keep +0 -0
  119. /data/{examples → docs/quickstart}/lrn-sdk-rails/vendor/assets/javascripts/.keep +0 -0
  120. /data/{examples → docs/quickstart}/lrn-sdk-rails/vendor/assets/stylesheets/.keep +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8bfa4fc85edf64c282551d79d30046b9a80ec7cf
4
- data.tar.gz: 8cae13bc71cdeecb93d0fb420774e0e9734ee8ad
2
+ SHA256:
3
+ metadata.gz: 6d90f14540c688f96421e9cf91925e65868d316ada287955fa74083f0798db05
4
+ data.tar.gz: c5a79a3bb3e1a2610c79210b65abbe0c83b5a25134cc5e60d9e6dedb98277953
5
5
  SHA512:
6
- metadata.gz: 22614284a947b7349699bb81d30230edb93842673152329e665c6ef7f000e1d868de917333f8a5a935b5e9e21903287962866667f80cc482b14a167aa364b943
7
- data.tar.gz: 9fefeedeb4788fe7981ea6cd2647f89b42457167d772a7422d5f94b8b5230812a17f34f7ce72b2524b6bcde01c4fed6867d5e633526173fc02efcd208d2a600b
6
+ metadata.gz: ffa6fa9e7c1b1e1b8ebe549eb1e7e0e9e7f192bea5b76a96bd03f50561796461f1a946bde865271b3a36ab45d3eefa0ba5387636222e8cfa8690569ad117b196
7
+ data.tar.gz: 36fd5d5a4787652eeae1916eac9d7b91a763ce2d543cb82dbd744577727cf7408a66057b805d5def84b26730dcadb96845943a181eab80fc202e8e82903403fc
@@ -0,0 +1,13 @@
1
+
2
+
3
+ ## Checklist
4
+
5
+ - [ ] Feature
6
+ - [ ] Bug
7
+ - [ ] Security
8
+ - [ ] Documentation
9
+
10
+ - [ ] ChangeLog.md updated
11
+
12
+ - [ ] Tests added
13
+ - [ ] All testsuites passed
data/.gitignore CHANGED
@@ -17,3 +17,4 @@
17
17
 
18
18
  # lock file
19
19
  Gemfile.lock
20
+ .DS_Store
data/.travis.yml CHANGED
@@ -1,8 +1,18 @@
1
1
  sudo: false
2
+ dist: focal
2
3
  language: ruby
3
4
  rvm:
4
- - 2.3
5
- - 2.4
6
- - 2.5
7
- - 2.6
8
- before_install: gem install bundler -v 2.0.2
5
+ - '2.6'
6
+ - '2.7'
7
+ - '3.0'
8
+ - '3.1'
9
+ before_install:
10
+ # Login to docker hub
11
+ - echo "$DOCKERHUB_PASSWORD" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
12
+ - gem install bundler
13
+
14
+ notifications:
15
+ slack:
16
+ rooms:
17
+ secure: Yt+hj5JObFI/yHvrWMsBM/jOHhiMtkISEkb1Zw/9VulNdjvP5mYcQ+9AI79HsWClS05qvs59BkU7rbEITO30Gjeuk4AYfUqvXbDF7urMAZK6mNhIz+kOWrUGMNvYOvQ2zoW9gLQMVyI7w2QVeanGlYcXzoLpXu1yTnpOOedldU25ur7qK4K/on+syL931g+HBnrYUN8tHL5Rj+c41syPRp/biE6p+3F403jEm/pLpzmo+PhP5Gc6jEsmwt+wStAe5ldrnvJ5iGcVpn/g7w6i1lOPZL7lpje0KlVrCkP+biklmg2jR4WgvDsPwxHJZ4vXGRxIKoX1wiXrk9kL/fOyz30TP1txMD6K9ja8nnpgk0RW8mcJOnUuoLN1p/FRt5R1D5cJV/eeh6veRxTha3nO/Kbcy5sBjwe3douDAVdJJGPchq3WgXkkx1q682/WztyZ6cEjteZpKYzrjIqHkPqDojuyV1kkp819DTty7U9OTf899od6+z0kP6+KnR5HnqiLHXpRCaLKEk/ggEJpu1z9VMK8Yfp5MKMTU0nREz6nFZQBhSPOe+laBeOty84YRge6ny8FYARmTvKZ5UgOxGXCqV5lYT6sg+E3Sep0WmKYeyve/ss8EGR04oEpJ0ZyDpQxDgjeCbJb1EE3F9crQGpyssHteVx8++HyEyG3uQCvq9A=
18
+ on_success: change
data/CONTRIBUTING.md ADDED
@@ -0,0 +1,14 @@
1
+ # Contributing
2
+
3
+ Contribution in the form of [Issues] and [PRs] are welcome.
4
+
5
+ ## Testing
6
+
7
+ Just run
8
+
9
+ rake spec
10
+
11
+ to exercise the testsuite.
12
+
13
+ [Issues]: https://github.com/Learnosity/learnosity-sdk-ruby/issues/new
14
+ [PRs]: https://github.com/Learnosity/learnosity-sdk-ruby/compare
data/ChangeLog.md CHANGED
@@ -7,12 +7,30 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [v0.3.0] - 2024-07-12
11
+ ### Added
12
+ - Add support for api-authoraide.
13
+
14
+ ## [v0.2.2] - 2023-06-29
15
+ ### Security
16
+ - Upgraded signature to match the security standard.
17
+
18
+ ### Added
19
+
20
+ - Improved Makefile and tests
21
+ - PR template
22
+
23
+ ### Security
24
+ - Updated vendor libraries to fix security issues
25
+
10
26
  ## [v0.2.1] - 2019-01-08
11
27
  ### Added
28
+
12
29
  - Updated version range of `sys-uname` to include versions `1.0` and above
13
30
 
14
31
  ## [v0.2.0] - 2019-08-12
15
32
  ### Added
33
+
16
34
  - This ChangeLog!
17
35
  - Telemetry data (basic information about the execution environment) is now added to the request objects being signed which is later read and logged internally by our APIs when the request is received. This allows us to better support our various SDKs and does not send any additional network requests. More information can be found in README.md.
18
36
 
data/LICENSE.md ADDED
@@ -0,0 +1,141 @@
1
+ # Apache License
2
+ Version 2.0, January 2004
3
+
4
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
5
+
6
+ ## 1. Definitions.
7
+
8
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1
9
+ through 9 of this document.
10
+
11
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the
12
+ License.
13
+
14
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled
15
+ by, or are under common control with that entity. For the purposes of this definition, "control" means
16
+ (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract
17
+ or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial
18
+ ownership of such entity.
19
+
20
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
21
+
22
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software
23
+ source code, documentation source, and configuration files.
24
+
25
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form,
26
+ including but not limited to compiled object code, generated documentation, and conversions to other media
27
+ types.
28
+
29
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License,
30
+ as indicated by a copyright notice that is included in or attached to the work (an example is provided in the
31
+ Appendix below).
32
+
33
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from)
34
+ the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent,
35
+ as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not
36
+ include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work
37
+ and Derivative Works thereof.
38
+
39
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any
40
+ modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to
41
+ Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to
42
+ submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of
43
+ electronic, verbal, or written communication sent to the Licensor or its representatives, including but not
44
+ limited to communication on electronic mailing lists, source code control systems, and issue tracking systems
45
+ that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but
46
+ excluding communication that is conspicuously marked or otherwise designated in writing by the copyright
47
+ owner as "Not a Contribution."
48
+
49
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been
50
+ received by Licensor and subsequently incorporated within the Work.
51
+
52
+ ## 2. Grant of Copyright License.
53
+
54
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual,
55
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare
56
+ Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such
57
+ Derivative Works in Source or Object form.
58
+
59
+ ## 3. Grant of Patent License.
60
+
61
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual,
62
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent
63
+ license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such
64
+ license applies only to those patent claims licensable by such Contributor that are necessarily infringed by
65
+ their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such
66
+ Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim
67
+ or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work
68
+ constitutes direct or contributory patent infringement, then any patent licenses granted to You under this
69
+ License for that Work shall terminate as of the date such litigation is filed.
70
+
71
+ ## 4. Redistribution.
72
+
73
+ You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without
74
+ modifications, and in Source or Object form, provided that You meet the following conditions:
75
+
76
+ 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
77
+
78
+ 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
79
+
80
+ 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent,
81
+ trademark, and attribution notices from the Source form of the Work, excluding those notices that do
82
+ not pertain to any part of the Derivative Works; and
83
+
84
+ 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that
85
+ You distribute must include a readable copy of the attribution notices contained within such NOTICE
86
+ file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one
87
+ of the following places: within a NOTICE text file distributed as part of the Derivative Works; within
88
+ the Source form or documentation, if provided along with the Derivative Works; or, within a display
89
+ generated by the Derivative Works, if and wherever such third-party notices normally appear. The
90
+ contents of the NOTICE file are for informational purposes only and do not modify the License. You may
91
+ add Your own attribution notices within Derivative Works that You distribute, alongside or as an
92
+ addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be
93
+ construed as modifying the License.
94
+
95
+ You may add Your own copyright statement to Your modifications and may provide additional or different license
96
+ terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative
97
+ Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the
98
+ conditions stated in this License.
99
+
100
+ ## 5. Submission of Contributions.
101
+
102
+ Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by
103
+ You to the Licensor shall be under the terms and conditions of this License, without any additional terms or
104
+ conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate
105
+ license agreement you may have executed with Licensor regarding such Contributions.
106
+
107
+ ## 6. Trademarks.
108
+
109
+ This License does not grant permission to use the trade names, trademarks, service marks, or product names of
110
+ the Licensor, except as required for reasonable and customary use in describing the origin of the Work and
111
+ reproducing the content of the NOTICE file.
112
+
113
+ ## 7. Disclaimer of Warranty.
114
+
115
+ Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor
116
+ provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
117
+ or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
118
+ MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the
119
+ appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of
120
+ permissions under this License.
121
+
122
+ ## 8. Limitation of Liability.
123
+
124
+ In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless
125
+ required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any
126
+ Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential
127
+ damages of any character arising as a result of this License or out of the use or inability to use the Work
128
+ (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or
129
+ any and all other commercial damages or losses), even if such Contributor has been advised of the possibility
130
+ of such damages.
131
+
132
+ ## 9. Accepting Warranty or Additional Liability.
133
+
134
+ While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for,
135
+ acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this
136
+ License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole
137
+ responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold
138
+ each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason
139
+ of your accepting any such warranty or additional liability.
140
+
141
+ END OF TERMS AND CONDITIONS
data/Makefile ADDED
@@ -0,0 +1,69 @@
1
+ DOCKER := $(if $(LRN_SDK_NO_DOCKER),,$(shell which docker))
2
+ RUBY_VERSION ?= 3.1
3
+
4
+ TARGETS = all install-deps build devbuild prodbuild \
5
+ test test-unit test-integration-env \
6
+ dist \
7
+ version-check version-check-message \
8
+ clean
9
+ .PHONY: $(TARGETS)
10
+ .default: all
11
+
12
+ ifneq (,$(DOCKER))
13
+ # Re-run make command in a container
14
+ DKR = docker container run -t --rm \
15
+ -v $(CURDIR):/srv/sdk/ruby:z,delegated \
16
+ -v lrn-sdk-ruby_cache:/srv/sdk/ruby/vendor/cache \
17
+ -w /srv/sdk/ruby \
18
+ -e LRN_SDK_NO_DOCKER=1 \
19
+ -e ENV -e REGION -e VER \
20
+ $(if $(findstring dev,$(ENV)),--net host) \
21
+ ruby:$(value RUBY_VERSION)
22
+
23
+ $(TARGETS):
24
+ $(DKR) make -e MAKEFLAGS="$(MAKEFLAGS)" $@
25
+
26
+ else
27
+ # Data API settings
28
+ ENV = prod
29
+ REGION = .learnosity.com
30
+ VER = v1
31
+
32
+ all: build test
33
+
34
+ build: install-deps
35
+ bundle exec rake build
36
+
37
+ test: test-unit test-integration-env
38
+
39
+ install-deps:
40
+ gem install bundler
41
+ bundle install
42
+
43
+ test-unit: install-deps
44
+ bundle exec rake spec SPEC=spec/learnosity/*
45
+
46
+ test-integration-env:
47
+ ENV=$(ENV) REGION=$(REGION) VER=$(VER) bundle exec rake spec SPEC=spec/integration/*
48
+
49
+ clean:
50
+ -bundle exec rake clean
51
+ -rm -f Gemfile.lock .rspec_status
52
+
53
+ dist: build version-check test
54
+
55
+ PROJECT_VERSION_CMD = bundle exec rake version
56
+ PKG_VER = v$(shell $(PROJECT_VERSION_CMD))
57
+ GIT_TAG = $(shell git describe --tags)
58
+ VERSION_MISMATCH = For a release build, the package version number $(PKG_VER) must match the git tag $(GIT_TAG).
59
+
60
+ version-check-message:
61
+ @echo Checking git and project versions ...
62
+
63
+ version-check: version-check-message
64
+ @echo $(GIT_TAG) | grep -qw "$(PKG_VER)" || (echo $(VERSION_MISMATCH); exit 1)
65
+
66
+ # Some target aliases
67
+ prodbuild: dist
68
+ devbuild: build
69
+ endif