lcms-engine 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +1 -1
- data/.dockerignore +25 -0
- data/.env.docker +1 -1
- data/.eslintignore +2 -1
- data/.eslintrc +23 -73
- data/.nvmrc +1 -1
- data/.overcommit.yml +8 -2
- data/.prettierrc +7 -0
- data/.rubocop.yml +12 -8
- data/.ruby-version +1 -1
- data/.stylelintignore +9 -0
- data/.stylelintrc +8 -0
- data/CHANGELOG.md +50 -1
- data/Dockerfile +3 -3
- data/Gemfile.lock +408 -322
- data/README.md +20 -17
- data/app/assets/config/lcms_engine_manifest.js +4 -2
- data/app/assets/javascripts/lcms/engine/admin/{application.js → lcms_engine_application.js} +1 -3
- data/app/assets/javascripts/lcms/engine/initializers/foundation.js +1 -1
- data/app/assets/javascripts/lcms/engine/{application.js → lcms_engine_application.js} +0 -0
- data/app/assets/stylesheets/lcms/engine/admin/collections.scss +2 -1
- data/app/assets/stylesheets/lcms/engine/admin/components.scss +60 -19
- data/app/assets/stylesheets/lcms/engine/admin/curriculums.scss +12 -10
- data/app/assets/stylesheets/lcms/engine/admin/lessons.scss +21 -15
- data/app/assets/stylesheets/lcms/engine/admin/materials.scss +25 -17
- data/app/assets/stylesheets/lcms/engine/admin/resources.scss +8 -7
- data/app/assets/stylesheets/lcms/engine/admin/standards.scss +4 -1
- data/app/assets/stylesheets/lcms/engine/admin/users.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/base/_colors.scss +8 -10
- data/app/assets/stylesheets/lcms/engine/base/_ld-colors.scss +10 -10
- data/app/assets/stylesheets/lcms/engine/components/_assoc-picker.scss +4 -5
- data/app/assets/stylesheets/lcms/engine/components/lesson/_activity.scss +6 -2
- data/app/assets/stylesheets/lcms/engine/components/lesson/_callout.scss +19 -5
- data/app/assets/stylesheets/lcms/engine/components/lesson/_columns.scss +4 -3
- data/app/assets/stylesheets/lcms/engine/components/lesson/_curriculum-map.scss +16 -7
- data/app/assets/stylesheets/lcms/engine/components/lesson/_def.scss +2 -2
- data/app/assets/stylesheets/lcms/engine/components/lesson/_expand.scss +9 -9
- data/app/assets/stylesheets/lcms/engine/components/lesson/_foundational-divider.scss +0 -1
- data/app/assets/stylesheets/lcms/engine/components/lesson/_group.scss +3 -1
- data/app/assets/stylesheets/lcms/engine/components/lesson/_icons.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/components/lesson/_image-wrap.scss +2 -2
- data/app/assets/stylesheets/lcms/engine/components/lesson/_inset.scss +7 -2
- data/app/assets/stylesheets/lcms/engine/components/lesson/_materials.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/components/lesson/_multiple-choice.scss +4 -1
- data/app/assets/stylesheets/lcms/engine/components/lesson/_override.scss +28 -9
- data/app/assets/stylesheets/lcms/engine/components/lesson/_pd.scss +7 -7
- data/app/assets/stylesheets/lcms/engine/components/lesson/_pv.scss +5 -4
- data/app/assets/stylesheets/lcms/engine/components/lesson/_section.scss +10 -3
- data/app/assets/stylesheets/lcms/engine/components/lesson/_selection-control.scss +14 -8
- data/app/assets/stylesheets/lcms/engine/components/lesson/_sidebar.scss +25 -10
- data/app/assets/stylesheets/lcms/engine/components/lesson/_title.scss +3 -1
- data/app/assets/stylesheets/lcms/engine/components/lesson/_unit-map.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/components/material/_material.scss +3 -3
- data/app/assets/stylesheets/lcms/engine/components/material/_overlay.scss +12 -4
- data/app/assets/stylesheets/lcms/engine/components/material/_preview.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/components/support/_survey.scss +3 -1
- data/app/assets/stylesheets/lcms/engine/layout/_footer.scss +29 -11
- data/app/assets/stylesheets/lcms/engine/layout/_header.scss +5 -5
- data/app/assets/stylesheets/lcms/engine/layout/_navigation.scss +4 -6
- data/app/assets/stylesheets/lcms/engine/layout/_page.scss +2 -2
- data/app/assets/stylesheets/lcms/engine/{admin.scss → lcms_engine_admin.scss} +26 -15
- data/app/assets/stylesheets/lcms/engine/lcms_engine_application.scss +9 -0
- data/app/assets/stylesheets/lcms/engine/pdf.scss +5 -26
- data/app/assets/stylesheets/lcms/engine/pdf_plain.scss +5 -23
- data/app/assets/stylesheets/lcms/engine/print/_base.scss +41 -12
- data/app/assets/stylesheets/lcms/engine/print/_cover.scss +12 -12
- data/app/assets/stylesheets/lcms/engine/print/_footer.scss +8 -3
- data/app/assets/stylesheets/lcms/engine/print/_gdoc-base.scss +10 -37
- data/app/assets/stylesheets/lcms/engine/print/_helpers.scss +5 -2
- data/app/assets/stylesheets/lcms/engine/print/_lesson-base.scss +2 -14
- data/app/assets/stylesheets/lcms/engine/print/_material-base.scss +1 -3
- data/app/assets/stylesheets/lcms/engine/print/_print.scss +15 -8
- data/app/assets/stylesheets/lcms/engine/print/_toc.scss +24 -9
- data/app/assets/stylesheets/lcms/engine/print/gdoc/_base-typography.scss +24 -6
- data/app/assets/stylesheets/lcms/engine/print/gdoc/_base.scss +10 -3
- data/app/assets/stylesheets/lcms/engine/print/gdoc/_colors.scss +3 -3
- data/app/assets/stylesheets/lcms/engine/print/gdoc/_header.scss +2 -2
- data/app/assets/stylesheets/lcms/engine/print/gdoc/_helpers.scss +1 -0
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_activity.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_agenda.scss +8 -2
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_callout.scss +16 -6
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_def.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_dialogue.scss +3 -1
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_expand.scss +5 -2
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_image-wrap.scss +5 -3
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_image.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_optbreak.scss +1 -0
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_section.scss +4 -1
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_smp.scss +1 -0
- data/app/assets/stylesheets/lcms/engine/print/gdoc/lesson/_tables.scss +11 -3
- data/app/assets/stylesheets/lcms/engine/print/gdoc/material/_header.scss +5 -2
- data/app/assets/stylesheets/lcms/engine/print/lesson/_base-typography.scss +33 -9
- data/app/assets/stylesheets/lcms/engine/print/lesson/_group.scss +3 -1
- data/app/assets/stylesheets/lcms/engine/print/lesson/_image.scss +3 -1
- data/app/assets/stylesheets/lcms/engine/print/lesson/_materials.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/print/lesson/_pd.scss +8 -4
- data/app/assets/stylesheets/lcms/engine/print/lesson/_section.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/print/material/_header.scss +4 -1
- data/app/assets/stylesheets/lcms/engine/themes/_material.scss +11 -11
- data/app/assets/stylesheets/lcms/engine/utils/_colorcodes.scss +15 -5
- data/app/assets/stylesheets/lcms/engine/utils/_functions.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/utils/_helpers.scss +23 -11
- data/app/assets/stylesheets/lcms/engine/utils/_placeholders.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/utils/_variables.scss +11 -11
- data/app/assets/stylesheets/lcms/engine/vendors/{mathjax.css → mathjax.scss} +0 -0
- data/app/assets/stylesheets/lcms/engine/vendors/react-tagsinput.css +48 -0
- data/app/controllers/concerns/lcms/engine/reimportable.rb +12 -2
- data/app/controllers/lcms/engine/admin/access_codes_controller.rb +8 -3
- data/app/controllers/lcms/engine/admin/admin_controller.rb +6 -40
- data/app/controllers/lcms/engine/admin/association_picker_controller.rb +4 -1
- data/app/controllers/lcms/engine/admin/batch_reimports_controller.rb +2 -2
- data/app/controllers/lcms/engine/admin/curriculums_controller.rb +21 -2
- data/app/controllers/lcms/engine/admin/documents_controller.rb +41 -14
- data/app/controllers/lcms/engine/admin/materials_controller.rb +32 -13
- data/app/controllers/lcms/engine/admin/resource_bulk_edits_controller.rb +2 -2
- data/app/controllers/lcms/engine/admin/resources_controller.rb +9 -7
- data/app/controllers/lcms/engine/admin/settings_controller.rb +1 -1
- data/app/controllers/lcms/engine/admin/standards_controller.rb +7 -2
- data/app/controllers/lcms/engine/admin/users_controller.rb +15 -7
- data/app/controllers/lcms/engine/application_controller.rb +1 -1
- data/app/controllers/lcms/engine/resources_controller.rb +5 -5
- data/app/controllers/lcms/engine/welcome_controller.rb +11 -0
- data/app/entities/lcms/engine/grades.rb +17 -6
- data/app/entities/lcms/engine/hierarchical_position.rb +1 -2
- data/app/entities/lcms/engine/media_embed.rb +2 -2
- data/app/entities/lcms/engine/pagination.rb +14 -10
- data/app/entities/lcms/engine/roman_numerals.rb +2 -2
- data/app/exceptions/lcms/engine/document_error.rb +8 -0
- data/app/exceptions/lcms/engine/material_error.rb +8 -0
- data/app/forms/lcms/engine/document_form.rb +19 -14
- data/app/forms/lcms/engine/material_form.rb +3 -2
- data/app/helpers/admin/components_helper.rb +3 -3
- data/app/helpers/lcms/engine/path_helper.rb +32 -0
- data/app/helpers/lcms/engine/resource_helper.rb +1 -1
- data/app/helpers/lcms/engine/view_helper.rb +1 -9
- data/app/interactors/lcms/engine/explore_curriculum_interactor.rb +2 -2
- data/app/javascript/components/admin/ImportStatus.jsx +90 -56
- data/app/javascript/components/admin/Initializer.jsx +33 -35
- data/app/javascript/components/admin/MultiSelectedOperation.jsx +43 -18
- data/app/javascript/components/admin/association-picker/AssociationPicker.jsx +68 -47
- data/app/javascript/components/admin/association-picker/AssociationPickerItem.jsx +18 -7
- data/app/javascript/components/admin/association-picker/AssociationPickerResults.jsx +42 -17
- data/app/javascript/components/admin/association-picker/AssociationPickerWindow.jsx +47 -27
- data/app/javascript/components/admin/curriculum/CurriculumEditor.jsx +54 -32
- data/app/javascript/components/admin/curriculum/DirectoryPicker.jsx +80 -53
- data/app/javascript/components/admin/picker/PickerButton.jsx +16 -11
- data/app/javascript/components/admin/picker/pickerModal.jsx +6 -6
- data/app/javascript/components/admin/picker/pickerWindowWrapper.jsx +61 -40
- data/app/javascript/components/admin/resource-picker/ResourcePicker.jsx +54 -39
- data/app/javascript/components/admin/resource-picker/ResourcePickerResource.jsx +14 -3
- data/app/javascript/components/admin/resource-picker/ResourcePickerWindow.jsx +50 -21
- data/app/javascript/components/paginate/PageView.jsx +20 -8
- data/app/javascript/components/paginate/PaginationBoxView.jsx +78 -66
- data/app/javascript/components/paginate/PaginationListView.jsx +59 -45
- data/app/javascript/packs/lcms_engine_admin.js +15 -0
- data/app/javascript/packs/{application.js → lcms_engine_application.js} +5 -4
- data/app/javascript/packs/server_rendering.js +1 -0
- data/app/javascript/vendor/jstree/jstree.min.js +6 -0
- data/app/javascript/vendor/jstree/themes/default/32px.png +0 -0
- data/app/javascript/vendor/jstree/themes/default/40px.png +0 -0
- data/app/javascript/vendor/jstree/themes/default/style.css +1106 -0
- data/app/javascript/vendor/jstree/themes/default/style.min.css +1 -0
- data/app/javascript/vendor/jstree/themes/default/throbber.gif +0 -0
- data/app/javascript/vendor/jstree/themes/default-dark/32px.png +0 -0
- data/app/javascript/vendor/jstree/themes/default-dark/40px.png +0 -0
- data/app/javascript/vendor/jstree/themes/default-dark/style.css +1150 -0
- data/app/javascript/vendor/jstree/themes/default-dark/style.min.css +1 -0
- data/app/javascript/vendor/jstree/themes/default-dark/throbber.gif +0 -0
- data/app/jobs/concerns/lcms/engine/nested_resque_job.rb +1 -4
- data/app/jobs/lcms/engine/document_generate_gdoc_job.rb +2 -2
- data/app/jobs/lcms/engine/document_generate_job.rb +2 -2
- data/app/jobs/lcms/engine/document_generate_pdf_job.rb +5 -5
- data/app/jobs/lcms/engine/document_parse_job.rb +1 -1
- data/app/jobs/lcms/engine/material_generate_pdf_job.rb +4 -4
- data/app/models/concerns/lcms/engine/navigable.rb +6 -10
- data/app/models/concerns/lcms/engine/searchable.rb +7 -0
- data/app/models/lcms/engine/document.rb +1 -1
- data/app/models/lcms/engine/download.rb +1 -1
- data/app/models/lcms/engine/resource.rb +1 -1
- data/app/models/lcms/engine/search/document.rb +4 -3
- data/app/models/lcms/engine/search/repository.rb +1 -1
- data/app/presenters/lcms/engine/content_presenter.rb +1 -1
- data/app/presenters/lcms/engine/curriculum_presenter.rb +21 -18
- data/app/presenters/lcms/engine/document_presenter.rb +5 -3
- data/app/presenters/lcms/engine/resource_presenter.rb +6 -3
- data/app/queries/lcms/engine/admin_documents_query.rb +2 -2
- data/app/queries/lcms/engine/admin_materials_query.rb +11 -2
- data/app/queries/lcms/engine/base_query.rb +1 -1
- data/app/serializers/lcms/engine/previews_material_serializer.rb +1 -0
- data/app/services/lcms/engine/document_build_service.rb +6 -0
- data/app/services/lcms/engine/document_generator.rb +2 -2
- data/app/services/lcms/engine/google/drive_service.rb +7 -15
- data/app/services/lcms/engine/google/script_service.rb +7 -3
- data/app/services/lcms/engine/html_sanitizer.rb +6 -6
- data/app/services/lcms/engine/lessons_gdoc_bundler.rb +1 -1
- data/app/services/lcms/engine/lti_exporter.rb +1 -1
- data/app/services/lcms/engine/material_build_service.rb +6 -2
- data/app/services/lcms/engine/material_preview_generator.rb +3 -3
- data/app/services/lcms/engine/react_materials_resolver.rb +3 -2
- data/app/services/lcms/engine/s3_service.rb +14 -2
- data/app/tasks/resource_tasks.rb +2 -2
- data/app/views/layouts/lcms/engine/admin.html.erb +3 -3
- data/app/views/layouts/lcms/engine/application.html.erb +2 -2
- data/app/views/layouts/lcms/engine/lti.html.erb +1 -1
- data/app/views/lcms/engine/admin/access_codes/_form.html.erb +1 -1
- data/app/views/lcms/engine/admin/access_codes/index.html.erb +3 -3
- data/app/views/lcms/engine/admin/batch_reimports/_search_form.html.erb +2 -2
- data/app/views/lcms/engine/admin/curriculums/edit.html.erb +5 -5
- data/app/views/lcms/engine/admin/documents/_materials_links.html.erb +2 -2
- data/app/views/lcms/engine/admin/documents/_reimport.html.erb +1 -1
- data/app/views/lcms/engine/admin/documents/_search_form.html.erb +2 -2
- data/app/views/lcms/engine/admin/documents/import.html.erb +1 -1
- data/app/views/lcms/engine/admin/documents/index.html.erb +7 -5
- data/app/views/lcms/engine/admin/documents/new.html.erb +6 -2
- data/app/views/lcms/engine/admin/materials/_reimport.html.erb +1 -1
- data/app/views/lcms/engine/admin/materials/_search_form.html.erb +2 -2
- data/app/views/lcms/engine/admin/materials/import.html.erb +1 -1
- data/app/views/lcms/engine/admin/materials/index.html.erb +26 -22
- data/app/views/lcms/engine/admin/materials/new.html.erb +5 -1
- data/app/views/lcms/engine/admin/resource_bulk_edits/new.html.erb +2 -2
- data/app/views/lcms/engine/admin/resources/_fields.html.erb +4 -0
- data/app/views/lcms/engine/admin/resources/_form.html.erb +1 -1
- data/app/views/lcms/engine/admin/resources/_search_form.html.erb +2 -2
- data/app/views/lcms/engine/admin/resources/index.html.erb +7 -5
- data/app/views/lcms/engine/admin/shared/_header.html.erb +12 -12
- data/app/views/lcms/engine/admin/standards/_form.html.erb +3 -1
- data/app/views/lcms/engine/admin/standards/_search_form.html.erb +1 -1
- data/app/views/lcms/engine/admin/users/_form.html.erb +1 -1
- data/app/views/lcms/engine/admin/users/_search_form.html.erb +1 -1
- data/app/views/lcms/engine/admin/users/index.html.erb +6 -6
- data/app/views/lcms/engine/documents/gdoc/_agenda.html.erb +1 -1
- data/app/views/lcms/engine/documents/show.html.erb +1 -1
- data/app/views/lcms/engine/materials/show.html.erb +1 -1
- data/app/views/lcms/engine/pages/not_found.html.erb +5 -0
- data/app/views/lcms/engine/resources/_download.html.erb +2 -2
- data/app/views/lcms/engine/resources/_unit_bundles.html.erb +2 -2
- data/app/views/lcms/engine/resources/generic.html.erb +0 -4
- data/app/views/lcms/engine/resources/media.html.erb +0 -4
- data/app/views/lcms/engine/resources/show.html.erb +0 -2
- data/config/initializers/airbrake.rb +62 -10
- data/config/initializers/bitly.rb +1 -1
- data/config/initializers/carrier_wave.rb +6 -4
- data/config/initializers/ckeditor.rb +6 -0
- data/config/initializers/elasticsearch.rb +1 -1
- data/config/initializers/resque.rb +2 -2
- data/config/locales/admin/en.yml +1 -2
- data/config/locales/ui/en.yml +1 -0
- data/config/routes.rb +5 -2
- data/db/migrate/.keep +0 -0
- data/db/schema.rb +280 -312
- data/db/seeds.rb +0 -1
- data/docker-compose.ror4.yml +32 -0
- data/docker-compose.yml +6 -3
- data/docs/env-variables.md +40 -40
- data/docs/google-cloud-platform-setup.md +45 -17
- data/docs/how-to-build-and-publish.md +1 -0
- data/lcms-engine.gemspec +28 -20
- data/lib/doc_template/document.rb +3 -4
- data/lib/doc_template/document_toc.rb +2 -2
- data/lib/doc_template/objects/activity_metadata.rb +1 -1
- data/lib/doc_template/objects/agenda_metadata.rb +1 -1
- data/lib/doc_template/objects/metadata_helpers.rb +1 -1
- data/lib/doc_template/objects/toc_helpers.rb +4 -4
- data/lib/doc_template/objects/toc_metadata.rb +4 -6
- data/lib/doc_template/tables/base.rb +3 -2
- data/lib/doc_template/tags/activity_metadata_type_tag.rb +1 -1
- data/lib/doc_template/tags/answer_space_tag.rb +2 -2
- data/lib/doc_template/tags/base_tag.rb +5 -5
- data/lib/doc_template/tags/block_tag.rb +1 -1
- data/lib/doc_template/tags/columns_tag.rb +1 -1
- data/lib/doc_template/tags/def_tag.rb +1 -1
- data/lib/doc_template/tags/expand_tag.rb +1 -0
- data/lib/doc_template/tags/heading_tag.rb +1 -1
- data/lib/doc_template/tags/inset_tag.rb +2 -2
- data/lib/doc_template/tags/latex_tag.rb +1 -1
- data/lib/doc_template/tags/page_break_tag.rb +1 -1
- data/lib/doc_template/tags/pd_tag.rb +4 -4
- data/lib/doc_template/tags/section_tag.rb +2 -2
- data/lib/doc_template/tags/standard_tag.rb +3 -3
- data/lib/doc_template/tags/table_preserve_alignment_tag.rb +1 -1
- data/lib/doc_template/tags/table_tag.rb +1 -1
- data/lib/doc_template/template.rb +1 -1
- data/lib/doc_template.rb +9 -9
- data/lib/document_exporter/gdoc/base.rb +6 -3
- data/lib/document_exporter/pdf/base.rb +1 -1
- data/lib/document_exporter/pdf/document.rb +2 -2
- data/lib/document_exporter/pdf/material.rb +2 -2
- data/lib/document_exporter/pdf/student_material.rb +2 -2
- data/lib/document_exporter/pdf/teacher_material.rb +2 -2
- data/lib/document_renderer/part.rb +4 -6
- data/lib/elasticsearch/persistence/repository/response/results.rb +1 -1
- data/lib/lcms/engine/engine.rb +10 -9
- data/lib/lcms/engine/version.rb +1 -1
- data/lib/lcms/engine.rb +0 -1
- data/lib/lt/lcms/metadata/base_service.rb +2 -1
- data/lib/lt/lcms/metadata/context.rb +58 -54
- data/lib/lt/lcms/metadata/service.rb +6 -3
- data/lib/resque_job.rb +3 -6
- data/lib/standard_importer.rb +4 -4
- data/lib/tasks/cloud66.rake +8 -6
- data/lib/tasks/document.rake +7 -7
- data/lib/tasks/google.rake +29 -14
- data/lib/tasks/lcms/engine_tasks.rake +1 -1
- data/package.json +31 -9
- data/postcss.config.js +12 -0
- data/spec/controllers/admin/association_picker_controller_spec.rb +6 -8
- data/spec/controllers/admin/curriculums_controller_spec.rb +23 -0
- data/spec/controllers/admin/documents_controller_spec.rb +25 -3
- data/spec/controllers/admin/materials_controller_spec.rb +17 -4
- data/spec/controllers/admin/resource_bulk_edit_controller_spec.rb +1 -1
- data/spec/controllers/admin/resources_controller_spec.rb +3 -3
- data/spec/controllers/admin/settings_controller_spec.rb +1 -1
- data/spec/controllers/admin/standards_controller_spec.rb +1 -1
- data/spec/controllers/admin/welcome_controller_spec.rb +12 -10
- data/spec/controllers/resources_controller_spec.rb +3 -3
- data/spec/controllers/welcome_controller_spec.rb +38 -0
- data/spec/dummy/.env.docker +5 -0
- data/spec/dummy/.traceroute.yaml +0 -2
- data/spec/dummy/bin/webpack +18 -0
- data/spec/dummy/bin/webpack-dev-server +18 -0
- data/spec/dummy/config/application.rb +1 -1
- data/spec/dummy/config/environments/production.rb +1 -1
- data/spec/dummy/config/environments/test.rb +1 -1
- data/spec/dummy/config/initializers/assets.rb +6 -0
- data/spec/dummy/config/lcms-admin.yml +3 -7
- data/spec/dummy/config/puma.rb +3 -3
- data/spec/dummy/config/routes.rb +6 -0
- data/spec/dummy/db/schema.rb +5 -5
- data/spec/entities/grades_spec.rb +12 -0
- data/spec/factories/documents.rb +1 -0
- data/spec/factories/downloads.rb +1 -1
- data/spec/factories/resources.rb +2 -2
- data/spec/features/admin/lessons/add_lesson_spec.rb +3 -3
- data/spec/features/admin/materials/add_material_spec.rb +5 -3
- data/spec/features/admin/users_spec.rb +2 -2
- data/spec/forms/document_form_spec.rb +11 -1
- data/spec/{controllers/admin/admin_controller_spec.rb → helpers/path_helper_spec.rb} +6 -6
- data/spec/lib/doc_template/objects/activity_metadata_spec.rb +1 -1
- data/spec/lib/doc_template/objects/agenda_metadata_spec.rb +2 -0
- data/spec/lib/doc_template/objects/toc_metadata_spec.rb +1 -1
- data/spec/lib/doc_template/tables/shared_examples/remove_table.rb +1 -1
- data/spec/lib/doc_template/tags/page_break_tag_spec.rb +1 -1
- data/spec/lib/doc_template/tags/pd_tag_spec.rb +1 -1
- data/spec/models/document_spec.rb +1 -1
- data/spec/models/standard_spec.rb +2 -0
- data/spec/queries/lcms/engine/admin_materials_query_spec.rb +34 -0
- data/spec/rails_helper.rb +8 -2
- data/spec/services/document_build_service_spec.rb +4 -11
- data/spec/services/s3_service_spec.rb +31 -0
- data/spec/support/concerns/navigable.rb +2 -0
- data/spec/support/routes.rb +4 -0
- data/spec/support/shared_examples/content_tag.rb +4 -4
- data/templates/routes.rb +0 -1
- data/yarn.lock +3447 -2993
- metadata +208 -303
- data/app/assets/stylesheets/lcms/engine/application.scss +0 -36
- data/app/assets/stylesheets/lcms/engine/vendors/jquery.tagsinput.css +0 -1
- data/app/exceptions/components_api_error.rb +0 -4
- data/app/exceptions/document_error.rb +0 -4
- data/app/exceptions/material_error.rb +0 -4
- data/app/javascript/packs/admin.js +0 -14
- data/app/models/lcms/engine/component.rb +0 -88
- data/app/presenters/lcms/engine/social_media_presenter.rb +0 -83
- data/app/views/lcms/engine/shared/_social_sharing.html.erb +0 -22
- data/db/migrate/20200217160930_change_document_parts_to_polymorphic.rb +0 -36
- data/db/migrate/20200218144849_drop_material_parts_table.rb +0 -7
- data/db/migrate/20200422130652_add_reimported_at_to_documents.rb +0 -7
- data/db/migrate/20200429130353_drop_pages.rb +0 -13
- data/db/seeds/pages.seeds.rb +0 -26
- data/lib/document_exporter.rb +0 -6
- data/lib/lcms/engine/migration.rb +0 -16
- data/spec/models/component_spec.rb +0 -60
- data/vendor/assets/javascripts/jquery.tagsinput.js +0 -1
@@ -13,36 +13,36 @@
|
|
13
13
|
<div class="o-top-bar__item c-header__menu">
|
14
14
|
<ul class="dropdown menu" data-dropdown-menu>
|
15
15
|
<li class="c-header__link">
|
16
|
-
<%= link_to t('lcms.engine.admin.nav.curriculum'), edit_admin_curriculum_path %>
|
16
|
+
<%= link_to t('lcms.engine.admin.nav.curriculum'), lcms_engine.edit_admin_curriculum_path %>
|
17
17
|
</li>
|
18
18
|
|
19
19
|
<li class="dropdown c-header__link">
|
20
|
-
<%= link_to t('lcms.engine.admin.nav.resources'), admin_resources_path %>
|
20
|
+
<%= link_to t('lcms.engine.admin.nav.resources'), lcms_engine.admin_resources_path %>
|
21
21
|
<ul class="menu vertical">
|
22
|
-
<%= nav_link t('lcms.engine.admin.nav.resources'), admin_resources_path %>
|
23
|
-
<%= nav_link t('lcms.engine.admin.nav.add_resource'), new_admin_resource_path %>
|
22
|
+
<%= nav_link t('lcms.engine.admin.nav.resources'), lcms_engine.admin_resources_path %>
|
23
|
+
<%= nav_link t('lcms.engine.admin.nav.add_resource'), lcms_engine.new_admin_resource_path %>
|
24
24
|
<%#= nav_link t('lcms.engine.admin.nav.sketch_compilation', version: 'v1'), new_admin_sketch_compiler_path(:v1) %>
|
25
25
|
<%#= nav_link t('lcms.engine.admin.nav.sketch_compilation', version: 'v2'), new_admin_sketch_compiler_path(:v2) %>
|
26
|
-
<%= nav_link t('lcms.engine.admin.nav.lessons'), admin_documents_path %>
|
27
|
-
<%= nav_link t('lcms.engine.admin.nav.materials'), admin_materials_path %>
|
28
|
-
<%= nav_link t('lcms.engine.admin.nav.batch_reimport'), new_admin_batch_reimport_path %>
|
26
|
+
<%= nav_link t('lcms.engine.admin.nav.lessons'), lcms_engine.admin_documents_path %>
|
27
|
+
<%= nav_link t('lcms.engine.admin.nav.materials'), lcms_engine.admin_materials_path %>
|
28
|
+
<%= nav_link t('lcms.engine.admin.nav.batch_reimport'), lcms_engine.new_admin_batch_reimport_path %>
|
29
29
|
</ul>
|
30
30
|
</li>
|
31
31
|
|
32
32
|
<li class="c-header__link">
|
33
|
-
<%= link_to t('lcms.engine.admin.nav.standards'), admin_standards_path %>
|
33
|
+
<%= link_to t('lcms.engine.admin.nav.standards'), lcms_engine.admin_standards_path %>
|
34
34
|
</li>
|
35
35
|
|
36
36
|
<li class="dropdown c-header__link">
|
37
|
-
<%= link_to t('lcms.engine.admin.nav.users'), admin_users_path %>
|
37
|
+
<%= link_to t('lcms.engine.admin.nav.users'), lcms_engine.admin_users_path %>
|
38
38
|
<ul class="menu vertical">
|
39
|
-
<%= nav_link t('lcms.engine.admin.nav.users'), admin_users_path %>
|
40
|
-
<%= nav_link t('lcms.engine.admin.nav.access_codes'), admin_access_codes_path %>
|
39
|
+
<%= nav_link t('lcms.engine.admin.nav.users'), lcms_engine.admin_users_path %>
|
40
|
+
<%= nav_link t('lcms.engine.admin.nav.access_codes'), lcms_engine.admin_access_codes_path %>
|
41
41
|
</ul>
|
42
42
|
</li>
|
43
43
|
|
44
44
|
<li class="c-header__link">
|
45
|
-
<%= link_to t('lcms.engine.admin.nav.sign_out'), destroy_user_session_path %>
|
45
|
+
<%= link_to t('lcms.engine.admin.nav.sign_out'), lcms_engine.destroy_user_session_path %>
|
46
46
|
</li>
|
47
47
|
</ul>
|
48
48
|
</div>
|
@@ -1,4 +1,6 @@
|
|
1
|
-
<%=
|
1
|
+
<%= javascript_include_tag Ckeditor.cdn_url %>
|
2
|
+
|
3
|
+
<%= simple_form_for @standard, as: :standard, url: lcms_engine.admin_standard_path(@standard), html: { class: 'o-standard-form' } do |f| %>
|
2
4
|
|
3
5
|
<div class="row o-admin-standard-readonly">
|
4
6
|
<label>Name: </label>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= simple_form_for :query, url:
|
1
|
+
<%= simple_form_for :query, url: lcms_engine.admin_standards_path, html: { class: 'form-inline well o-admin-standards-search', method: :get } do |f| %>
|
2
2
|
|
3
3
|
<div class='row align-bottom align-justify'>
|
4
4
|
<%= f.input :name, label: 'Name', required: false, wrapper_html: { class: 'resource-search-title' } %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= simple_form_for
|
1
|
+
<%= simple_form_for @user, url: @url.presence || lcms_engine.admin_users_path, html: { id: 'user_form' } do |f| %>
|
2
2
|
<%= f.input :id, disabled: true %>
|
3
3
|
<%= f.input :name %>
|
4
4
|
<%= f.input :email %>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<%= simple_form_for :query, url:
|
1
|
+
<%= simple_form_for :query, url: lcms_engine.admin_users_path, html: { class: 'form-inline well o-admin-users-search', method: :get } do |f| %>
|
2
2
|
|
3
3
|
<div class='row align-bottom align-justify'>
|
4
4
|
<%= f.input :email, label: false, required: false, placeholder: 'Search by E-mail', wrapper_html: { class: 'o-admin-search-term' } %>
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<div class="row">
|
9
9
|
<div class="flex-pull-right">
|
10
|
-
<%= link_to t('.new_user'),
|
10
|
+
<%= link_to t('.new_user'), lcms_engine.new_admin_user_path, class: 'button success' %>
|
11
11
|
</div>
|
12
12
|
<table class="table">
|
13
13
|
<tr>
|
@@ -27,17 +27,17 @@
|
|
27
27
|
<% @users.each do |user| %>
|
28
28
|
<% cache user do %>
|
29
29
|
<tr id="user_<%= user.id %>">
|
30
|
-
<td><%= link_to user.id, edit_admin_user_path(user) %>
|
31
|
-
<td><%= link_to user.survey&.fetch('first_name', nil) || user.name, edit_admin_user_path(user) %>
|
30
|
+
<td><%= link_to user.id, lcms_engine.edit_admin_user_path(user) %>
|
31
|
+
<td><%= link_to user.survey&.fetch('first_name', nil) || user.name, lcms_engine.edit_admin_user_path(user) %>
|
32
32
|
<td><%= raw user.survey&.fetch('last_name', nil) %>
|
33
33
|
<td><%= user.email %>
|
34
34
|
<td><%= user.role %>
|
35
35
|
<td><%= user.access_code.presence || '-' %>
|
36
36
|
<td><%= user.confirmed? ? 'YES' : 'NO' %>
|
37
37
|
<td class="u-txt--small"><%= user.created_at.to_s %>
|
38
|
-
<td><%= link_to content_tag(:i, nil, class: 'fas fa-pencil-alt').html_safe, edit_admin_user_path(user), class: 'button small primary' %>
|
39
|
-
<td><%= button_to t('.reset_password_btn'), reset_password_admin_user_path(user), class: 'button small', data: { confirm: t('ui.are_you_sure') }, form_class: 'inline', method: :post %>
|
40
|
-
<td><%= button_to t('ui.delete'), admin_user_path(user), class: 'button small alert', data: { confirm: t('ui.are_you_sure') }, form_class: 'inline', method: :delete %></td>
|
38
|
+
<td><%= link_to content_tag(:i, nil, class: 'fas fa-pencil-alt').html_safe, lcms_engine.edit_admin_user_path(user), class: 'button small primary' %>
|
39
|
+
<td><%= button_to t('.reset_password_btn'), lcms_engine.reset_password_admin_user_path(user), class: 'button small', data: { confirm: t('ui.are_you_sure') }, form_class: 'inline', method: :post %>
|
40
|
+
<td><%= button_to t('ui.delete'), lcms_engine.admin_user_path(user), class: 'button small alert', data: { confirm: t('ui.are_you_sure') }, form_class: 'inline', method: :delete %></td>
|
41
41
|
</tr>
|
42
42
|
<% end %>
|
43
43
|
<% end %>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<td class="u-text--right o-agenda__item"><p>TIME</p></td>
|
12
12
|
</tr>
|
13
13
|
<% document.toc.children.each do |l1| %>
|
14
|
-
<% l1_excluded = l1.excluded?(excludes, document.ela?) %>
|
14
|
+
<% l1_excluded = l1.excluded?(excludes, ela: document.ela?) %>
|
15
15
|
<% l1_time = l1_excluded ? l1.time : l1.time_with(excludes) %>
|
16
16
|
<tr class="<%= 'u-text--strikethrough' if l1_excluded %>">
|
17
17
|
<td colspan="3" class="u-txt--agenda-l1-title o-agenda__item">
|
@@ -14,7 +14,7 @@
|
|
14
14
|
Go to Lessons Admin
|
15
15
|
<% end %>
|
16
16
|
<%= link_to @document.file_url, class: 'o-ub-ld-btn o-ub-ld-btn--bordered', target: '_blank' do %>
|
17
|
-
<i class="
|
17
|
+
<i class="fab fa-google"></i> Google Doc
|
18
18
|
<% end %>
|
19
19
|
<%= render partial: 'lcms/engine/admin/documents/reimport', locals: { lesson: @document, btn_class: 'o-ub-ld-btn o-ub-ld-btn--bordered' } %>
|
20
20
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<div>
|
7
7
|
<%= link_to 'Go to Materials Admin', admin_materials_path(request.query_parameters), class: 'button primary u-margin-right--base' %>
|
8
8
|
<%= link_to @material.file_url, class: 'button primary u-margin-right--base', target: '_blank' do %>
|
9
|
-
|
9
|
+
<i class="fab fa-google"></i> Google Doc
|
10
10
|
<% end %>
|
11
11
|
<%= render partial: 'lcms/engine/admin/materials/reimport', locals: { material: @material, btn_size: 'default' } %>
|
12
12
|
</div>
|
@@ -3,14 +3,14 @@
|
|
3
3
|
<span>
|
4
4
|
<%= link_to preview_download_path(id: download, slug: resource.slug), class: 'resource-attachment',
|
5
5
|
data: { no_turbolink: true }, target: '_blank' do %>
|
6
|
-
<i class="
|
6
|
+
<i class="fas fa-eye" aria-hidden="true"></i>
|
7
7
|
<% end %>
|
8
8
|
</span>
|
9
9
|
<% end %>
|
10
10
|
<% id = SecureRandom.hex(4) %>
|
11
11
|
<span data-toggle="<%= id %>">
|
12
12
|
<%= link_to download_path(download, slug: resource.slug), class: 'resource-attachment', data: { no_turbolink: true } do %>
|
13
|
-
<i class="
|
13
|
+
<i class="far fa-file-<%= "#{file_icon(download.download.attachment_content_type)} #{indent}" %>"></i>
|
14
14
|
<%= download.download.title %>
|
15
15
|
<% end %>
|
16
16
|
</span>
|
@@ -9,12 +9,12 @@
|
|
9
9
|
<li class="o-unit-bundles__item">
|
10
10
|
<div class="o-unit-bundles__item--links">
|
11
11
|
<%= link_to bundle.file&.url, data: { no_turbolink: true } do %>
|
12
|
-
<i class="
|
12
|
+
<i class="far fa-file-archive"></i>
|
13
13
|
<% end %>
|
14
14
|
<% if (gdoc_bundle = resource.document_bundles.detect { |b| b.content_type == 'gdoc' }) %>
|
15
15
|
<% if cat == 'full' %>
|
16
16
|
<%= link_to gdoc_bundle.url, target: '_blank', data: { no_turbolink: true } do %>
|
17
|
-
<i class="
|
17
|
+
<i class="fab fa-google"></i>
|
18
18
|
<% end %>
|
19
19
|
<% else %>
|
20
20
|
<span class="o-unit-bundles__item--placeholder"></span>
|
@@ -1,5 +1,4 @@
|
|
1
1
|
<% set_page_title @resource.title %>
|
2
|
-
<% set_social_media_sharing @resource %>
|
3
2
|
|
4
3
|
<div class="o-page o-page--margin-to-bottom">
|
5
4
|
<div class="o-page__module u-margin-bottom--gutter">
|
@@ -30,9 +29,6 @@
|
|
30
29
|
</div>
|
31
30
|
<hr class="o-resource-hr">
|
32
31
|
<div class="o-resource-summary u-padding-bottom--gutter">
|
33
|
-
<div class="o-resource-summary__map">
|
34
|
-
<%= render partial: 'lcms/engine/shared/social_sharing', locals: { resource: @resource, cl: '' } %>
|
35
|
-
</div>
|
36
32
|
<div class="o-resource-summary__content">
|
37
33
|
<% if @resource.preview? %>
|
38
34
|
<div class="o-generic-preview">
|
@@ -1,5 +1,4 @@
|
|
1
1
|
<% set_page_title @resource.title %>
|
2
|
-
<% set_social_media_sharing @resource %>
|
3
2
|
|
4
3
|
<div class="o-page o-page--margin-to-bottom">
|
5
4
|
<div class="o-page__module u-margin-bottom--gutter">
|
@@ -26,9 +25,6 @@
|
|
26
25
|
</div>
|
27
26
|
<hr class="o-resource-hr">
|
28
27
|
<div class="o-resource-summary u-padding-bottom--gutter">
|
29
|
-
<div class="o-resource-summary__map">
|
30
|
-
<%= render partial: 'lcms/engine/shared/social_sharing', locals: { resource: @resource, cl: '' } %>
|
31
|
-
</div>
|
32
28
|
<div class="o-resource-summary__content">
|
33
29
|
<div class="o-resource__item o-resource-summary__content--media">
|
34
30
|
<div class="o-media-<%= @resource.resource_type %>">
|
@@ -1,5 +1,4 @@
|
|
1
1
|
<% set_page_title @resource.page_title %>
|
2
|
-
<% set_social_media_sharing @resource %>
|
3
2
|
|
4
3
|
<% set_canonical_url(show_with_slug_path @resource.slug) if @resource.slug %>
|
5
4
|
|
@@ -65,7 +64,6 @@
|
|
65
64
|
<strong><%= @resource.subject_and_grade_title %> Curriculum Map</strong>
|
66
65
|
</div>
|
67
66
|
<%= react_component('CurriculumMap', @props.merge(mapType: 'cs')) %>
|
68
|
-
<%= render partial: 'lcms/engine/shared/social_sharing', locals: { resource: @resource, cl: 'u-margin-top--base' } %>
|
69
67
|
</div>
|
70
68
|
<div class="o-resource-summary__content">
|
71
69
|
<div class="o-resource__item o-resource__item--description">
|
@@ -1,27 +1,79 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
project_id = ENV
|
4
|
-
project_key = ENV
|
3
|
+
project_id = ENV.fetch('AIR_BRAKE_PROJECT_ID', nil)
|
4
|
+
project_key = ENV.fetch('AIR_BRAKE_PROJECT_KEY', nil)
|
5
5
|
|
6
6
|
AIRBRAKE_ENABLED = project_id.present? && project_key.present?
|
7
7
|
|
8
|
+
# Airbrake is an online tool that provides robust exception tracking in your
|
9
|
+
# Rails applications. In doing so, it allows you to easily review errors, tie an
|
10
|
+
# error to an individual piece of code, and trace the cause back to recent
|
11
|
+
# changes. Airbrake enables for easy categorization, searching, and
|
12
|
+
# prioritization of exceptions so that when errors occur, your team can quickly
|
13
|
+
# determine the root cause.
|
14
|
+
#
|
15
|
+
# Configuration details:
|
16
|
+
# https://github.com/airbrake/airbrake-ruby#configuration
|
8
17
|
if AIRBRAKE_ENABLED
|
9
18
|
require 'airbrake'
|
10
19
|
|
11
20
|
Airbrake.configure do |c|
|
21
|
+
# You must set both project_id & project_key. To find your project_id and
|
22
|
+
# project_key navigate to your project's General Settings and copy the
|
23
|
+
# values from the right sidebar.
|
24
|
+
# https://github.com/airbrake/airbrake-ruby#project_id--project_key
|
12
25
|
c.project_id = project_id
|
13
26
|
c.project_key = project_key
|
14
27
|
|
28
|
+
# Configures the root directory of your project. Expects a String or a
|
29
|
+
# Pathname, which represents the path to your project. Providing this option
|
30
|
+
# helps us to filter out repetitive data from backtrace frames and link to
|
31
|
+
# GitHub files from our dashboard.
|
32
|
+
# https://github.com/airbrake/airbrake-ruby#root_directory
|
15
33
|
c.root_directory = Rails.root
|
16
|
-
|
34
|
+
|
35
|
+
# By default, Airbrake Ruby outputs to STDOUT. In Rails apps it makes sense
|
36
|
+
# to use the Rails' logger.
|
37
|
+
# https://github.com/airbrake/airbrake-ruby#logger
|
38
|
+
c.logger = Airbrake::Rails.logger
|
39
|
+
|
40
|
+
# Configures the environment the application is running in. Helps the
|
41
|
+
# Airbrake dashboard to distinguish between exceptions occurring in
|
42
|
+
# different environments.
|
43
|
+
# NOTE: This option must be set in order to make the 'ignore_environments'
|
44
|
+
# option work.
|
45
|
+
# https://github.com/airbrake/airbrake-ruby#environment
|
17
46
|
c.environment = Rails.env
|
18
|
-
c.blacklist_keys = Rails.application.config.filter_parameters
|
19
47
|
|
48
|
+
# Setting this option allows Airbrake to filter exceptions occurring in
|
49
|
+
# unwanted environments such as :test. NOTE: This option *does not* work if
|
50
|
+
# you don't set the 'environment' option.
|
51
|
+
# https://github.com/airbrake/airbrake-ruby#ignore_environments
|
20
52
|
c.ignore_environments = %w(test)
|
21
53
|
|
22
|
-
|
54
|
+
# A list of parameters that should be filtered out of what is sent to
|
55
|
+
# Airbrake. By default, all "password" attributes will have their contents
|
56
|
+
# replaced.
|
57
|
+
# https://github.com/airbrake/airbrake-ruby#blocklist_keys
|
58
|
+
c.blocklist_keys = [/password/i, /authorization/i]
|
59
|
+
|
60
|
+
# Alternatively, you can integrate with Rails' filter_parameters.
|
61
|
+
# Read more: https://goo.gl/gqQ1xS
|
62
|
+
# c.blocklist_keys = Rails.application.config.filter_parameters
|
23
63
|
end
|
24
64
|
|
65
|
+
# A filter that collects request body information. Enable it if you are sure you
|
66
|
+
# don't send sensitive information to Airbrake in your body (such as passwords).
|
67
|
+
# https://github.com/airbrake/airbrake#requestbodyfilter
|
68
|
+
# Airbrake.add_filter(Airbrake::Rack::RequestBodyFilter.new)
|
69
|
+
|
70
|
+
# Attaches thread & fiber local variables along with general thread information.
|
71
|
+
# Airbrake.add_filter(Airbrake::Filters::ThreadFilter.new)
|
72
|
+
|
73
|
+
# Attaches loaded dependencies to the notice object
|
74
|
+
# (under context/versions/dependencies).
|
75
|
+
# Airbrake.add_filter(Airbrake::Filters::DependencyFilter.new)
|
76
|
+
|
25
77
|
ignore_errors = %w(
|
26
78
|
AbstractController::ActionNotFound
|
27
79
|
ActiveRecord::RecordNotFound
|
@@ -31,9 +83,9 @@ if AIRBRAKE_ENABLED
|
|
31
83
|
Airbrake.add_filter do |notice|
|
32
84
|
notice.ignore! if notice[:errors].any? { |error| ignore_errors.include?(error[:type]) }
|
33
85
|
end
|
34
|
-
end
|
35
86
|
|
36
|
-
# If
|
37
|
-
#
|
38
|
-
#
|
39
|
-
#
|
87
|
+
# If you want to convert your log messages to Airbrake errors, we offer an
|
88
|
+
# integration with the Logger class from stdlib.
|
89
|
+
# https://github.com/airbrake/airbrake#logger
|
90
|
+
# Rails.logger = Airbrake::AirbrakeLogger.new(Rails.logger)
|
91
|
+
end
|
@@ -1,16 +1,18 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'fog/aws'
|
4
|
+
|
3
5
|
CarrierWave.configure do |config|
|
4
6
|
if (Rails.env.development? && ENV['AWS_ACCESS_KEY_ID'].blank?) || Rails.env.test?
|
5
7
|
config.storage = :file
|
6
8
|
else
|
7
9
|
config.fog_credentials = {
|
8
10
|
provider: 'AWS',
|
9
|
-
aws_access_key_id: ENV
|
10
|
-
aws_secret_access_key: ENV
|
11
|
-
region: ENV
|
11
|
+
aws_access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID', nil),
|
12
|
+
aws_secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY', nil),
|
13
|
+
region: ENV.fetch('AWS_REGION', nil)
|
12
14
|
}
|
13
|
-
config.fog_directory = ENV
|
15
|
+
config.fog_directory = ENV.fetch('AWS_S3_BUCKET_NAME', nil)
|
14
16
|
config.fog_public = true
|
15
17
|
config.storage = :fog
|
16
18
|
end
|
@@ -3,8 +3,8 @@
|
|
3
3
|
Resque.redis = ENV.fetch('REDIS_URL', 'redis://localhost:6379')
|
4
4
|
Resque.redis.namespace = ENV.fetch('RESQUE_NAMESPACE', 'resque:development')
|
5
5
|
|
6
|
-
project_id = ENV
|
7
|
-
project_key = ENV
|
6
|
+
project_id = ENV.fetch('AIR_BRAKE_PROJECT_ID', nil)
|
7
|
+
project_key = ENV.fetch('AIR_BRAKE_PROJECT_KEY', nil)
|
8
8
|
|
9
9
|
if project_id.present? && project_key.present?
|
10
10
|
require 'airbrake/resque'
|
data/config/locales/admin/en.yml
CHANGED
@@ -216,7 +216,7 @@ en:
|
|
216
216
|
unit_bundles: Generate Unit Bundles
|
217
217
|
create:
|
218
218
|
error: Error
|
219
|
-
success: Lesson %{name} parsed successfully.
|
219
|
+
success: Lesson %{name} parsed successfully. %{errors}
|
220
220
|
new:
|
221
221
|
page_title: Add a lesson
|
222
222
|
submit: Parse
|
@@ -268,7 +268,6 @@ en:
|
|
268
268
|
import_glossary: Import Glossary
|
269
269
|
sign_out: Sign out
|
270
270
|
standards: Standards
|
271
|
-
component_search: Search Component
|
272
271
|
sketch_compilation: Compile lesson sketch %{version}
|
273
272
|
import_lesson: Import Lesson
|
274
273
|
lessons: Lessons
|
data/config/locales/ui/en.yml
CHANGED
data/config/routes.rb
CHANGED
@@ -32,7 +32,6 @@ Lcms::Engine::Engine.routes.draw do
|
|
32
32
|
|
33
33
|
namespace :admin do
|
34
34
|
get '/' => 'welcome#index'
|
35
|
-
get '/whoami' => 'admin#whoami'
|
36
35
|
get '/association_picker' => 'association_picker#index'
|
37
36
|
resource :resource_bulk_edits, only: %i(new create)
|
38
37
|
get '/resource_picker' => 'resource_picker#index'
|
@@ -69,11 +68,15 @@ Lcms::Engine::Engine.routes.draw do
|
|
69
68
|
get :import_status, to: 'materials#import_status'
|
70
69
|
end
|
71
70
|
end
|
72
|
-
resource :curriculum, only: %i(edit update)
|
71
|
+
resource :curriculum, only: %i(edit update) do
|
72
|
+
get :children
|
73
|
+
end
|
73
74
|
resources :access_codes, except: :show
|
74
75
|
resource :batch_reimport, only: %i(new create)
|
75
76
|
end
|
76
77
|
|
78
|
+
get '/oauth2callback' => 'welcome#oauth2callback'
|
79
|
+
|
77
80
|
get '/*slug' => 'resources#show', as: :show_with_slug
|
78
81
|
|
79
82
|
root to: 'welcome#index'
|
data/db/migrate/.keep
ADDED
File without changes
|