enlight 0.1.0
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 +7 -0
- data/.gitignore +141 -0
- data/.travis.yml +5 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +71 -0
- data/Guardfile +22 -0
- data/README.md +35 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/enlight.gemspec +29 -0
- data/get_club_membership_pool.rb +6 -0
- data/lib/enlight.rb +25 -0
- data/lib/enlight/models.rb +10 -0
- data/lib/enlight/models/activity_type.rb +9 -0
- data/lib/enlight/models/announcement.rb +12 -0
- data/lib/enlight/models/class.rb +67 -0
- data/lib/enlight/models/class_enrollment.rb +18 -0
- data/lib/enlight/models/club.rb +16 -0
- data/lib/enlight/models/club_associated_course.rb +11 -0
- data/lib/enlight/models/club_membership.rb +12 -0
- data/lib/enlight/models/club_membership_pool.rb +16 -0
- data/lib/enlight/models/company.rb +26 -0
- data/lib/enlight/models/completion_status.rb +8 -0
- data/lib/enlight/models/course.rb +38 -0
- data/lib/enlight/models/course_activity.rb +25 -0
- data/lib/enlight/models/course_assignment.rb +27 -0
- data/lib/enlight/models/course_catalog_search_history.rb +26 -0
- data/lib/enlight/models/course_external_activity_launch.rb +17 -0
- data/lib/enlight/models/course_feedback.rb +20 -0
- data/lib/enlight/models/course_tag_group.rb +17 -0
- data/lib/enlight/models/custom_field.rb +7 -0
- data/lib/enlight/models/enrollment_status.rb +9 -0
- data/lib/enlight/models/lab_instance.rb +22 -0
- data/lib/enlight/models/location_type.rb +6 -0
- data/lib/enlight/models/model.rb +11 -0
- data/lib/enlight/models/organization.rb +16 -0
- data/lib/enlight/models/public_class.rb +18 -0
- data/lib/enlight/models/question_and_response.rb +7 -0
- data/lib/enlight/models/session_time.rb +7 -0
- data/lib/enlight/models/sign_in_history.rb +16 -0
- data/lib/enlight/models/survey_response.rb +25 -0
- data/lib/enlight/models/tag.rb +7 -0
- data/lib/enlight/models/user.rb +29 -0
- data/lib/enlight/models/user_activity.rb +24 -0
- data/lib/enlight/requests.rb +13 -0
- data/lib/enlight/requests/add_organization_management_to_user.rb +8 -0
- data/lib/enlight/requests/add_user_to_role.rb +8 -0
- data/lib/enlight/requests/create_club_membership.rb +13 -0
- data/lib/enlight/requests/create_club_membership_pool.rb +16 -0
- data/lib/enlight/requests/create_company.rb +26 -0
- data/lib/enlight/requests/create_course_assignment.rb +14 -0
- data/lib/enlight/requests/create_organization.rb +14 -0
- data/lib/enlight/requests/create_user.rb +31 -0
- data/lib/enlight/requests/delete_class_enrollment.rb +6 -0
- data/lib/enlight/requests/delete_club_membership.rb +6 -0
- data/lib/enlight/requests/delete_club_membership_pool.rb +6 -0
- data/lib/enlight/requests/delete_company.rb +6 -0
- data/lib/enlight/requests/delete_course_assignment.rb +6 -0
- data/lib/enlight/requests/delete_organization.rb +6 -0
- data/lib/enlight/requests/delete_user.rb +6 -0
- data/lib/enlight/requests/export_survey_responses.rb +6 -0
- data/lib/enlight/requests/get_active_system_announcements.rb +7 -0
- data/lib/enlight/requests/get_class.rb +6 -0
- data/lib/enlight/requests/get_class_by_class_training_key.rb +6 -0
- data/lib/enlight/requests/get_class_enrollment.rb +17 -0
- data/lib/enlight/requests/get_class_enrollment_by_class_and_user.rb +8 -0
- data/lib/enlight/requests/get_class_enrollment_by_external_id.rb +7 -0
- data/lib/enlight/requests/get_club_membership.rb +6 -0
- data/lib/enlight/requests/get_club_membership_by_external_id.rb +6 -0
- data/lib/enlight/requests/get_company.rb +6 -0
- data/lib/enlight/requests/get_course.rb +6 -0
- data/lib/enlight/requests/get_course_assignment.rb +6 -0
- data/lib/enlight/requests/get_course_assignment_by_external_id.rb +6 -0
- data/lib/enlight/requests/get_organization.rb +6 -0
- data/lib/enlight/requests/get_organization_by_external_id.rb +6 -0
- data/lib/enlight/requests/get_sso_redirect_url.rb +8 -0
- data/lib/enlight/requests/get_user.rb +6 -0
- data/lib/enlight/requests/get_user_by_email.rb +7 -0
- data/lib/enlight/requests/get_user_by_external_id.rb +6 -0
- data/lib/enlight/requests/get_user_roles.rb +6 -0
- data/lib/enlight/requests/remove_organization_management_from_user.rb +8 -0
- data/lib/enlight/requests/remove_user_from_role.rb +8 -0
- data/lib/enlight/requests/request.rb +51 -0
- data/lib/enlight/requests/search_class_enrollments.rb +12 -0
- data/lib/enlight/requests/search_classes.rb +15 -0
- data/lib/enlight/requests/search_club_membership_pools.rb +17 -0
- data/lib/enlight/requests/search_clubs.rb +12 -0
- data/lib/enlight/requests/search_course_assignments.rb +20 -0
- data/lib/enlight/requests/search_course_catalog_search_history.rb +12 -0
- data/lib/enlight/requests/search_course_external_activity_launches.rb +14 -0
- data/lib/enlight/requests/search_course_feedback.rb +12 -0
- data/lib/enlight/requests/search_course_tag_groups.rb +9 -0
- data/lib/enlight/requests/search_courses.rb +17 -0
- data/lib/enlight/requests/search_lab_instances.rb +17 -0
- data/lib/enlight/requests/search_public_class_schedule.rb +11 -0
- data/lib/enlight/requests/search_sign_in_history.rb +12 -0
- data/lib/enlight/requests/search_user_activity.rb +12 -0
- data/lib/enlight/requests/searchable.rb +10 -0
- data/lib/enlight/requests/update_class_enrollment.rb +17 -0
- data/lib/enlight/requests/update_club_membership.rb +13 -0
- data/lib/enlight/requests/update_club_membership_pool.rb +16 -0
- data/lib/enlight/requests/update_company.rb +26 -0
- data/lib/enlight/requests/update_course_assignment.rb +14 -0
- data/lib/enlight/requests/update_organization.rb +14 -0
- data/lib/enlight/requests/update_user.rb +31 -0
- data/lib/enlight/requests/update_user_password.rb +9 -0
- data/lib/enlight/responses.rb +15 -0
- data/lib/enlight/responses/add_organization_management_to_user.rb +6 -0
- data/lib/enlight/responses/add_user_to_role.rb +6 -0
- data/lib/enlight/responses/class_attributable.rb +15 -0
- data/lib/enlight/responses/class_enrollment_attributable.rb +15 -0
- data/lib/enlight/responses/club_membership_attributable.rb +15 -0
- data/lib/enlight/responses/club_membership_pool_attributable.rb +15 -0
- data/lib/enlight/responses/company_attributable.rb +15 -0
- data/lib/enlight/responses/course_assignment_attributable.rb +15 -0
- data/lib/enlight/responses/course_attributable.rb +15 -0
- data/lib/enlight/responses/create_class_enrollment.rb +7 -0
- data/lib/enlight/responses/create_club_membership.rb +7 -0
- data/lib/enlight/responses/create_club_membership_pool.rb +8 -0
- data/lib/enlight/responses/create_company.rb +7 -0
- data/lib/enlight/responses/create_course_assignment.rb +7 -0
- data/lib/enlight/responses/create_organization.rb +7 -0
- data/lib/enlight/responses/create_user.rb +7 -0
- data/lib/enlight/responses/delete_class_enrollment.rb +6 -0
- data/lib/enlight/responses/delete_club_membership.rb +6 -0
- data/lib/enlight/responses/delete_club_membership_pool.rb +6 -0
- data/lib/enlight/responses/delete_company.rb +6 -0
- data/lib/enlight/responses/delete_course_assignment.rb +6 -0
- data/lib/enlight/responses/delete_organization.rb +6 -0
- data/lib/enlight/responses/delete_user.rb +6 -0
- data/lib/enlight/responses/export_survey_responses.rb +19 -0
- data/lib/enlight/responses/get_active_system_announcements.rb +7 -0
- data/lib/enlight/responses/get_class.rb +7 -0
- data/lib/enlight/responses/get_class_by_class_training_key.rb +7 -0
- data/lib/enlight/responses/get_class_enrollment.rb +7 -0
- data/lib/enlight/responses/get_class_enrollment_by_class_and_user.rb +7 -0
- data/lib/enlight/responses/get_class_enrollment_by_external_id.rb +7 -0
- data/lib/enlight/responses/get_club_membership.rb +7 -0
- data/lib/enlight/responses/get_club_membership_by_external_id.rb +7 -0
- data/lib/enlight/responses/get_club_membership_pool.rb +7 -0
- data/lib/enlight/responses/get_company.rb +7 -0
- data/lib/enlight/responses/get_course.rb +7 -0
- data/lib/enlight/responses/get_course_assignment.rb +7 -0
- data/lib/enlight/responses/get_course_assignment_by_external_id.rb +7 -0
- data/lib/enlight/responses/get_organization.rb +7 -0
- data/lib/enlight/responses/get_organization_by_external_id.rb +7 -0
- data/lib/enlight/responses/get_sso_redirect_url.rb +7 -0
- data/lib/enlight/responses/get_user.rb +11 -0
- data/lib/enlight/responses/get_user_by_email.rb +11 -0
- data/lib/enlight/responses/get_user_by_external_id.rb +10 -0
- data/lib/enlight/responses/get_user_roles.rb +7 -0
- data/lib/enlight/responses/organization_attributable.rb +15 -0
- data/lib/enlight/responses/pageable.rb +13 -0
- data/lib/enlight/responses/remove_organization_management_from_user.rb +6 -0
- data/lib/enlight/responses/remove_user_from_role.rb +6 -0
- data/lib/enlight/responses/response.rb +17 -0
- data/lib/enlight/responses/search_class_enrollments.rb +21 -0
- data/lib/enlight/responses/search_classes.rb +16 -0
- data/lib/enlight/responses/search_club_membership_pools.rb +16 -0
- data/lib/enlight/responses/search_clubs.rb +16 -0
- data/lib/enlight/responses/search_course_assignments.rb +16 -0
- data/lib/enlight/responses/search_course_catalog_search_history.rb +16 -0
- data/lib/enlight/responses/search_course_external_activity_launches.rb +16 -0
- data/lib/enlight/responses/search_course_feedback.rb +16 -0
- data/lib/enlight/responses/search_course_tag_groups.rb +16 -0
- data/lib/enlight/responses/search_courses.rb +16 -0
- data/lib/enlight/responses/search_lab_instances.rb +16 -0
- data/lib/enlight/responses/search_public_class_schedule.rb +6 -0
- data/lib/enlight/responses/search_sign_in_history.rb +16 -0
- data/lib/enlight/responses/search_user_activity.rb +16 -0
- data/lib/enlight/responses/status.rb +10 -0
- data/lib/enlight/responses/update_class_enrollment.rb +6 -0
- data/lib/enlight/responses/update_club_membership.rb +6 -0
- data/lib/enlight/responses/update_club_membership_pool.rb +6 -0
- data/lib/enlight/responses/update_company.rb +6 -0
- data/lib/enlight/responses/update_course_assignment.rb +6 -0
- data/lib/enlight/responses/update_organization.rb +6 -0
- data/lib/enlight/responses/update_user.rb +6 -0
- data/lib/enlight/responses/update_user_password.rb +6 -0
- data/lib/enlight/responses/user_attributable.rb +15 -0
- data/lib/enlight/version.rb +3 -0
- metadata +312 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 0c9bbc7d761384b5dbe2e51b3d42732bb8371125
|
|
4
|
+
data.tar.gz: 7bed107610c66cc5c5169117da715d7d28c8a8d0
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 8b668303412e1d195685cc01eae2a2e7466c04e794053b6d9443d48862f4b00257b0faec38042f2bd6807b597c3847b712e63ed7681da708142f3d38bd6a1f41
|
|
7
|
+
data.tar.gz: fbadc7eadf89fa0ee253d3a69a19267eb91eb7a38ce565814135d5ccddca2e1154dc857de475359084f36c237e5ffb726dd291a3e3b1728c407ce8bd3a4e1a0a
|
data/.gitignore
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/.bundle/
|
|
2
|
+
/.yardoc
|
|
3
|
+
/_yardoc/
|
|
4
|
+
/coverage/
|
|
5
|
+
/doc/
|
|
6
|
+
/pkg/
|
|
7
|
+
/spec/reports/
|
|
8
|
+
/tmp/
|
|
9
|
+
|
|
10
|
+
# Created by https://www.gitignore.io/api/rubymine
|
|
11
|
+
|
|
12
|
+
### RubyMine ###
|
|
13
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
|
14
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
15
|
+
|
|
16
|
+
# User-specific stuff:
|
|
17
|
+
.idea/**/workspace.xml
|
|
18
|
+
.idea/**/tasks.xml
|
|
19
|
+
.idea/dictionaries
|
|
20
|
+
|
|
21
|
+
# Sensitive or high-churn files:
|
|
22
|
+
.idea/**/dataSources/
|
|
23
|
+
.idea/**/dataSources.ids
|
|
24
|
+
.idea/**/dataSources.xml
|
|
25
|
+
.idea/**/dataSources.local.xml
|
|
26
|
+
.idea/**/sqlDataSources.xml
|
|
27
|
+
.idea/**/dynamic.xml
|
|
28
|
+
.idea/**/uiDesigner.xml
|
|
29
|
+
|
|
30
|
+
# Gradle:
|
|
31
|
+
.idea/**/gradle.xml
|
|
32
|
+
.idea/**/libraries
|
|
33
|
+
|
|
34
|
+
# CMake
|
|
35
|
+
cmake-build-debug/
|
|
36
|
+
|
|
37
|
+
# Mongo Explorer plugin:
|
|
38
|
+
.idea/**/mongoSettings.xml
|
|
39
|
+
|
|
40
|
+
## File-based project format:
|
|
41
|
+
*.iws
|
|
42
|
+
|
|
43
|
+
## Plugin-specific files:
|
|
44
|
+
|
|
45
|
+
# IntelliJ
|
|
46
|
+
/out/
|
|
47
|
+
|
|
48
|
+
# mpeltonen/sbt-idea plugin
|
|
49
|
+
.idea_modules/
|
|
50
|
+
|
|
51
|
+
# JIRA plugin
|
|
52
|
+
atlassian-ide-plugin.xml
|
|
53
|
+
|
|
54
|
+
# Cursive Clojure plugin
|
|
55
|
+
.idea/replstate.xml
|
|
56
|
+
|
|
57
|
+
# Ruby plugin and RubyMine
|
|
58
|
+
/.rakeTasks
|
|
59
|
+
|
|
60
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
61
|
+
com_crashlytics_export_strings.xml
|
|
62
|
+
crashlytics.properties
|
|
63
|
+
crashlytics-build.properties
|
|
64
|
+
fabric.properties
|
|
65
|
+
|
|
66
|
+
### RubyMine Patch ###
|
|
67
|
+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
|
68
|
+
|
|
69
|
+
# *.iml
|
|
70
|
+
# modules.xml
|
|
71
|
+
# .idea/misc.xml
|
|
72
|
+
# *.ipr
|
|
73
|
+
|
|
74
|
+
# Sonarlint plugin
|
|
75
|
+
.idea/sonarlint
|
|
76
|
+
|
|
77
|
+
# Created by https://www.gitignore.io/api/rubymine+all
|
|
78
|
+
|
|
79
|
+
### RubyMine+all ###
|
|
80
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
|
|
81
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
82
|
+
|
|
83
|
+
# User-specific stuff:
|
|
84
|
+
.idea/**/workspace.xml
|
|
85
|
+
.idea/**/tasks.xml
|
|
86
|
+
.idea/dictionaries
|
|
87
|
+
|
|
88
|
+
# Sensitive or high-churn files:
|
|
89
|
+
.idea/**/dataSources/
|
|
90
|
+
.idea/**/dataSources.ids
|
|
91
|
+
.idea/**/dataSources.xml
|
|
92
|
+
.idea/**/dataSources.local.xml
|
|
93
|
+
.idea/**/sqlDataSources.xml
|
|
94
|
+
.idea/**/dynamic.xml
|
|
95
|
+
.idea/**/uiDesigner.xml
|
|
96
|
+
|
|
97
|
+
# Gradle:
|
|
98
|
+
.idea/**/gradle.xml
|
|
99
|
+
.idea/**/libraries
|
|
100
|
+
|
|
101
|
+
# CMake
|
|
102
|
+
cmake-build-debug/
|
|
103
|
+
|
|
104
|
+
# Mongo Explorer plugin:
|
|
105
|
+
.idea/**/mongoSettings.xml
|
|
106
|
+
|
|
107
|
+
## File-based project format:
|
|
108
|
+
*.iws
|
|
109
|
+
|
|
110
|
+
## Plugin-specific files:
|
|
111
|
+
|
|
112
|
+
# IntelliJ
|
|
113
|
+
/out/
|
|
114
|
+
|
|
115
|
+
# mpeltonen/sbt-idea plugin
|
|
116
|
+
.idea_modules/
|
|
117
|
+
|
|
118
|
+
# JIRA plugin
|
|
119
|
+
atlassian-ide-plugin.xml
|
|
120
|
+
|
|
121
|
+
# Cursive Clojure plugin
|
|
122
|
+
.idea/replstate.xml
|
|
123
|
+
|
|
124
|
+
# Ruby plugin and RubyMine
|
|
125
|
+
/.rakeTasks
|
|
126
|
+
|
|
127
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
128
|
+
com_crashlytics_export_strings.xml
|
|
129
|
+
crashlytics.properties
|
|
130
|
+
crashlytics-build.properties
|
|
131
|
+
fabric.properties
|
|
132
|
+
|
|
133
|
+
### RubyMine+all Patch ###
|
|
134
|
+
# Ignores the whole idea folder
|
|
135
|
+
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
|
|
136
|
+
|
|
137
|
+
.idea/
|
|
138
|
+
|
|
139
|
+
*.gem
|
|
140
|
+
|
|
141
|
+
.idea/workspace.xml
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
enlight (0.1.0)
|
|
5
|
+
activesupport (~> 5.1)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
activesupport (5.1.4)
|
|
11
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
12
|
+
i18n (~> 0.7)
|
|
13
|
+
minitest (~> 5.1)
|
|
14
|
+
tzinfo (~> 1.1)
|
|
15
|
+
coderay (1.1.2)
|
|
16
|
+
concurrent-ruby (1.0.5)
|
|
17
|
+
ffi (1.9.18)
|
|
18
|
+
formatador (0.2.5)
|
|
19
|
+
guard (2.14.1)
|
|
20
|
+
formatador (>= 0.2.4)
|
|
21
|
+
listen (>= 2.7, < 4.0)
|
|
22
|
+
lumberjack (~> 1.0)
|
|
23
|
+
nenv (~> 0.1)
|
|
24
|
+
notiffany (~> 0.0)
|
|
25
|
+
pry (>= 0.9.12)
|
|
26
|
+
shellany (~> 0.0)
|
|
27
|
+
thor (>= 0.18.1)
|
|
28
|
+
guard-compat (1.2.1)
|
|
29
|
+
guard-minitest (2.4.6)
|
|
30
|
+
guard-compat (~> 1.2)
|
|
31
|
+
minitest (>= 3.0)
|
|
32
|
+
i18n (0.9.1)
|
|
33
|
+
concurrent-ruby (~> 1.0)
|
|
34
|
+
listen (3.0.8)
|
|
35
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
|
36
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
|
37
|
+
lumberjack (1.0.11)
|
|
38
|
+
method_source (0.8.2)
|
|
39
|
+
minitest (5.10.3)
|
|
40
|
+
nenv (0.3.0)
|
|
41
|
+
notiffany (0.1.1)
|
|
42
|
+
nenv (~> 0.1)
|
|
43
|
+
shellany (~> 0.0)
|
|
44
|
+
pry (0.10.4)
|
|
45
|
+
coderay (~> 1.1.0)
|
|
46
|
+
method_source (~> 0.8.1)
|
|
47
|
+
slop (~> 3.4)
|
|
48
|
+
rake (10.4.2)
|
|
49
|
+
rb-fsevent (0.10.2)
|
|
50
|
+
rb-inotify (0.9.10)
|
|
51
|
+
ffi (>= 0.5.0, < 2)
|
|
52
|
+
shellany (0.0.1)
|
|
53
|
+
slop (3.6.0)
|
|
54
|
+
thor (0.20.0)
|
|
55
|
+
thread_safe (0.3.6)
|
|
56
|
+
tzinfo (1.2.4)
|
|
57
|
+
thread_safe (~> 0.1)
|
|
58
|
+
|
|
59
|
+
PLATFORMS
|
|
60
|
+
ruby
|
|
61
|
+
|
|
62
|
+
DEPENDENCIES
|
|
63
|
+
bundler (~> 1.16)
|
|
64
|
+
enlight!
|
|
65
|
+
guard (~> 2.14)
|
|
66
|
+
guard-minitest (~> 2.4)
|
|
67
|
+
minitest (~> 5.0)
|
|
68
|
+
rake (~> 10.0)
|
|
69
|
+
|
|
70
|
+
BUNDLED WITH
|
|
71
|
+
1.16.0
|
data/Guardfile
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# A sample Guardfile
|
|
2
|
+
# More info at https://github.com/guard/guard#readme
|
|
3
|
+
|
|
4
|
+
## Uncomment and set this to only include directories you want to watch
|
|
5
|
+
# directories %w(app lib config test spec features) \
|
|
6
|
+
# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}
|
|
7
|
+
|
|
8
|
+
## Note: if you are using the `directories` clause above and you are not
|
|
9
|
+
## watching the project directory ('.'), then you will want to move
|
|
10
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
|
11
|
+
#
|
|
12
|
+
# $ mkdir config
|
|
13
|
+
# $ mv Guardfile config/
|
|
14
|
+
# $ ln -s config/Guardfile .
|
|
15
|
+
#
|
|
16
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
|
17
|
+
|
|
18
|
+
guard :minitest do
|
|
19
|
+
watch(%r{^test/(.*)\/?test_(.*)\.rb$})
|
|
20
|
+
watch(%r{^lib/(.*/)?([^/]+)\.rb$}) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
|
|
21
|
+
watch(%r{^test/test_helper\.rb$}) { 'test' }
|
|
22
|
+
end
|
data/README.md
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Enlight
|
|
2
|
+
|
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/enlight`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
+
|
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Add this line to your application's Gemfile:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
gem 'enlight'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
And then execute:
|
|
16
|
+
|
|
17
|
+
$ bundle
|
|
18
|
+
|
|
19
|
+
Or install it yourself as:
|
|
20
|
+
|
|
21
|
+
$ gem install enlight
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
TODO: Write usage instructions here
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
30
|
+
|
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
32
|
+
|
|
33
|
+
## Contributing
|
|
34
|
+
|
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/enlight.
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "enlight"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/enlight.gemspec
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require "enlight/version"
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "enlight"
|
|
8
|
+
spec.version = Enlight::VERSION
|
|
9
|
+
spec.authors = ["Matt Orahood"]
|
|
10
|
+
spec.email = ["morahood@gmail.com"]
|
|
11
|
+
spec.homepage = 'https://github.com/pyrabbit/enlight'
|
|
12
|
+
spec.summary = 'Ruby wrapper for Enlight API'
|
|
13
|
+
spec.description = 'This is an alpha version, use at your own risk.'
|
|
14
|
+
spec.licenses = ['MIT']
|
|
15
|
+
|
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
17
|
+
f.match(%r{^(test|spec|features)/})
|
|
18
|
+
end
|
|
19
|
+
spec.bindir = "exe"
|
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
21
|
+
spec.require_paths = ["lib"]
|
|
22
|
+
|
|
23
|
+
spec.add_runtime_dependency "activesupport", "~> 5.0"
|
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
|
26
|
+
spec.add_development_dependency "minitest", "~> 5.0"
|
|
27
|
+
spec.add_development_dependency "guard", "~> 2.14"
|
|
28
|
+
spec.add_development_dependency "guard-minitest", "~> 2.4"
|
|
29
|
+
end
|
data/lib/enlight.rb
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
require 'enlight/version'
|
|
2
|
+
require 'enlight/requests'
|
|
3
|
+
require 'enlight/responses'
|
|
4
|
+
require 'enlight/models'
|
|
5
|
+
|
|
6
|
+
module Enlight
|
|
7
|
+
class << self
|
|
8
|
+
attr_accessor :configuration
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def self.configure
|
|
12
|
+
self.configuration ||= Configuration.new
|
|
13
|
+
yield(configuration)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
class Configuration
|
|
17
|
+
attr_accessor :url
|
|
18
|
+
attr_accessor :integration_key
|
|
19
|
+
attr_accessor :organization_id
|
|
20
|
+
|
|
21
|
+
def initialize
|
|
22
|
+
@url = 'https://lmsacc.learnondemand.net/api/1.0'
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
module Enlight
|
|
2
|
+
module Models
|
|
3
|
+
class Class < Enlight::Models::Model
|
|
4
|
+
attr_accessor :external_id
|
|
5
|
+
attr_accessor :name
|
|
6
|
+
attr_accessor :description
|
|
7
|
+
attr_accessor :html_description
|
|
8
|
+
attr_accessor :enabled
|
|
9
|
+
attr_accessor :confirmation_status_id
|
|
10
|
+
attr_accessor :course_id
|
|
11
|
+
attr_accessor :organization_id
|
|
12
|
+
attr_accessor :company_id
|
|
13
|
+
attr_accessor :delivery_type_id
|
|
14
|
+
attr_accessor :virtual_meeting_host_id
|
|
15
|
+
attr_accessor :virtual_meeting_id
|
|
16
|
+
attr_accessor :primary_instructor_id
|
|
17
|
+
attr_accessor :primary_classroom_id
|
|
18
|
+
attr_accessor :materials_list_id
|
|
19
|
+
attr_accessor :start
|
|
20
|
+
attr_accessor :end
|
|
21
|
+
attr_accessor :min_students
|
|
22
|
+
attr_accessor :max_students
|
|
23
|
+
attr_accessor :allow_self_enrollment
|
|
24
|
+
attr_accessor :available_to_all_organizations
|
|
25
|
+
attr_accessor :is_public
|
|
26
|
+
attr_accessor :disable_labs
|
|
27
|
+
attr_accessor :enable_enrollment_notifications
|
|
28
|
+
attr_accessor :is_unique_delivery
|
|
29
|
+
attr_accessor :recording_mode_id
|
|
30
|
+
attr_accessor :custom_text_1
|
|
31
|
+
attr_accessor :custom_text_2
|
|
32
|
+
attr_accessor :custom_text_3
|
|
33
|
+
attr_accessor :custom_text_4
|
|
34
|
+
attr_accessor :custom_text_5
|
|
35
|
+
attr_accessor :custom_bool_1
|
|
36
|
+
attr_accessor :custom_bool_2
|
|
37
|
+
attr_accessor :custom_bool_3
|
|
38
|
+
attr_accessor :custom_bool_4
|
|
39
|
+
attr_accessor :custom_bool_5
|
|
40
|
+
attr_accessor :custom_dropdown_1
|
|
41
|
+
attr_accessor :custom_dropdown_2
|
|
42
|
+
attr_accessor :survey_id
|
|
43
|
+
attr_accessor :survey_availability_start_hours
|
|
44
|
+
attr_accessor :survey_availability_end_days
|
|
45
|
+
attr_accessor :instructor_survey_id
|
|
46
|
+
attr_accessor :organization_survey_id
|
|
47
|
+
attr_accessor :organization_survey_response_id
|
|
48
|
+
attr_accessor :classroom_address_1
|
|
49
|
+
attr_accessor :classroom_address_2
|
|
50
|
+
attr_accessor :classroom_city
|
|
51
|
+
attr_accessor :classroom_state
|
|
52
|
+
attr_accessor :classroom_country
|
|
53
|
+
attr_accessor :classroom_zip
|
|
54
|
+
attr_accessor :custom_fields
|
|
55
|
+
attr_accessor :session_times
|
|
56
|
+
|
|
57
|
+
def session_times=(value)
|
|
58
|
+
if value.instance_of?(Array) && value.any?
|
|
59
|
+
@session_times = []
|
|
60
|
+
value.each {|v| Enlight::Models::SessionTime.new(v)}
|
|
61
|
+
else
|
|
62
|
+
@session_times = nil
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|