learnosity-sdk 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/PULL_REQUEST_TEMPLATE.md +13 -0
- data/.gitignore +1 -0
- data/.travis.yml +15 -5
- data/CONTRIBUTING.md +14 -0
- data/ChangeLog.md +14 -0
- data/LICENSE.md +141 -0
- data/Makefile +69 -0
- data/README.md +230 -186
- data/REFERENCE.md +249 -0
- data/Rakefile +9 -0
- data/docs/images/apache-license.svg +20 -0
- data/docs/images/downloads.svg +20 -0
- data/docs/images/image-assessment-retrieval.png +0 -0
- data/docs/images/image-concept-overview.png +0 -0
- data/docs/images/image-logo-graphic.png +0 -0
- data/docs/images/image-quickstart-examples-assessment.png +0 -0
- data/docs/images/image-quickstart-index.png +0 -0
- data/docs/images/image-signed-request-creation.png +0 -0
- data/docs/quickstart/css/style.css +113 -0
- data/{examples → docs/quickstart}/lrn-sdk-rails/Gemfile +2 -2
- data/docs/quickstart/lrn-sdk-rails/app/controllers/author_controller.rb +179 -0
- data/docs/quickstart/lrn-sdk-rails/app/controllers/index_controller.rb +9 -0
- data/docs/quickstart/lrn-sdk-rails/app/controllers/items_controller.rb +33 -0
- data/docs/quickstart/lrn-sdk-rails/app/controllers/questions_controller.rb +44 -0
- data/docs/quickstart/lrn-sdk-rails/app/controllers/reports_controller.rb +32 -0
- data/docs/quickstart/lrn-sdk-rails/app/views/author/index.html.erb +14 -0
- data/docs/quickstart/lrn-sdk-rails/app/views/index/index.html.erb +34 -0
- data/{examples/lrn-sdk-rails/app/views/index → docs/quickstart/lrn-sdk-rails/app/views/items}/index.html.erb +2 -5
- data/docs/quickstart/lrn-sdk-rails/app/views/questions/index.html.erb +6 -0
- data/docs/quickstart/lrn-sdk-rails/app/views/reports/index.html.erb +14 -0
- data/docs/quickstart/lrn-sdk-rails/config/application.rb +24 -0
- data/docs/quickstart/lrn-sdk-rails/config/routes.rb +11 -0
- data/examples/simple/init_data.rb +6 -4
- data/examples/simple/init_items.rb +6 -4
- data/learnosity-sdk.gemspec +14 -14
- data/lib/learnosity/sdk/request/init.rb +10 -9
- data/lib/learnosity/sdk/version.rb +1 -1
- metadata +116 -97
- data/LICENSE +0 -201
- data/examples/lrn-sdk-rails/README.md +0 -24
- data/examples/lrn-sdk-rails/app/controllers/index_controller.rb +0 -106
- data/examples/lrn-sdk-rails/config/application.rb +0 -15
- data/examples/lrn-sdk-rails/config/routes.rb +0 -5
- /data/{examples → docs/quickstart}/lrn-sdk-rails/.gitignore +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/Rakefile +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/config/manifest.js +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/images/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/javascripts/application.js +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/javascripts/cable.js +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/javascripts/channels/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/javascripts/index.coffee +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/stylesheets/application.css +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/assets/stylesheets/index.scss +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/channels/application_cable/channel.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/channels/application_cable/connection.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/controllers/application_controller.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/controllers/concerns/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/helpers/application_helper.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/helpers/index_helper.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/jobs/application_job.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/mailers/application_mailer.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/models/application_record.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/models/concerns/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/views/layouts/application.html.erb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/views/layouts/mailer.html.erb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/app/views/layouts/mailer.text.erb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/bundle +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/rails +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/rake +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/setup +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/spring +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/bin/update +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/boot.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/cable.yml +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/database.yml +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/environment.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/environments/development.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/environments/production.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/environments/test.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/application_controller_renderer.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/assets.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/backtrace_silencers.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/cookies_serializer.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/filter_parameter_logging.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/inflections.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/mime_types.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/new_framework_defaults.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/session_store.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/initializers/wrap_parameters.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/locales/en.yml +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/puma.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/secrets.yml +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config/spring.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/config.ru +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/db/seeds.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/lib/assets/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/lib/tasks/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/log/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/public/404.html +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/public/422.html +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/public/500.html +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/public/apple-touch-icon-precomposed.png +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/public/apple-touch-icon.png +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/public/favicon.ico +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/public/robots.txt +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/test/controllers/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/test/controllers/index_controller_test.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/test/fixtures/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/test/fixtures/files/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/test/helpers/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/test/integration/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/test/mailers/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/test/models/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/test/test_helper.rb +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/tmp/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/vendor/assets/javascripts/.keep +0 -0
- /data/{examples → docs/quickstart}/lrn-sdk-rails/vendor/assets/stylesheets/.keep +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: e1b27ed22a689e2e1f36aa33f042acb3562919089628503575ad67a2b919c4a8
|
4
|
+
data.tar.gz: a35af7e9fa7b838322f7751efe2f942e9599a785fece6813e475bd9c9b4cac54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5ed2d8fc9dba2277ca2232b9d8d5fb30bd38cd2d6bd3b4fee732e09981f7df3f2fc3600a16b1324c4d5c49c5734b82fa2615fbe28faf7224b5373f8d11618a2
|
7
|
+
data.tar.gz: d3fbaa32870101f42837bc38d5fceeca2acaab7d3228e618de349b8ca9f4dbf79de8f15794cdc9c59dae8ad601a094662c02ea5d814a83d797a024b0feb61405
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
@@ -1,8 +1,18 @@
|
|
1
1
|
sudo: false
|
2
|
+
dist: focal
|
2
3
|
language: ruby
|
3
4
|
rvm:
|
4
|
-
- 2.
|
5
|
-
- 2.
|
6
|
-
-
|
7
|
-
-
|
8
|
-
before_install:
|
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,26 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [v0.2.2] - 2023-06-29
|
11
|
+
### Security
|
12
|
+
- Upgraded signature to match the security standard.
|
13
|
+
|
14
|
+
### Added
|
15
|
+
|
16
|
+
- Improved Makefile and tests
|
17
|
+
- PR template
|
18
|
+
|
19
|
+
### Security
|
20
|
+
- Updated vendor libraries to fix security issues
|
21
|
+
|
10
22
|
## [v0.2.1] - 2019-01-08
|
11
23
|
### Added
|
24
|
+
|
12
25
|
- Updated version range of `sys-uname` to include versions `1.0` and above
|
13
26
|
|
14
27
|
## [v0.2.0] - 2019-08-12
|
15
28
|
### Added
|
29
|
+
|
16
30
|
- This ChangeLog!
|
17
31
|
- 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
32
|
|
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
|