lcms-engine 0.1.4 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +11 -15
- data/Dockerfile +0 -1
- data/README.md +13 -4
- data/app/assets/javascripts/lcms/engine/admin/application.js +2 -6
- data/app/assets/javascripts/lcms/engine/application.js +2 -2
- data/app/assets/javascripts/lcms/engine/initializers/{google_analytics.js → analytics.js} +0 -0
- data/app/assets/javascripts/lcms/engine/initializers/lessons.js +1 -1
- data/app/assets/stylesheets/lcms/engine/admin.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/application.scss +4 -3
- data/app/assets/stylesheets/lcms/engine/components/_curriculum-cards.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/components/_curriculum-map.scss +4 -4
- data/app/assets/stylesheets/lcms/engine/components/_media-resources.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/components/_panel-dsc.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/components/_resource.scss +6 -6
- data/app/assets/stylesheets/lcms/engine/pages/_home.scss +4 -4
- data/app/assets/stylesheets/lcms/engine/pdf.scss +1 -1
- data/app/assets/stylesheets/lcms/engine/themes/_settings.scss +419 -116
- data/app/assets/stylesheets/lcms/engine/utils/_mixins.scss +2 -2
- data/app/assets/stylesheets/lcms/engine/vendors/foundation_and_overrides-pdf.scss +0 -1
- data/app/assets/stylesheets/lcms/engine/vendors/foundation_and_overrides.scss +13 -2
- data/app/controllers/lcms/engine/admin/admin_controller.rb +0 -2
- data/app/controllers/lcms/engine/admin/association_picker_controller.rb +10 -9
- data/app/controllers/lcms/engine/admin/documents_controller.rb +17 -14
- data/app/controllers/lcms/engine/admin/materials_controller.rb +19 -23
- data/app/controllers/lcms/engine/admin/resource_picker_controller.rb +2 -2
- data/app/controllers/lcms/engine/admin/resources_controller.rb +45 -79
- data/app/controllers/lcms/engine/admin/sketch_compilers_controller.rb +2 -2
- data/app/controllers/lcms/engine/application_controller.rb +0 -15
- data/app/entities/lcms/engine/pagination.rb +14 -5
- data/app/forms/lcms/engine/material_form.rb +0 -1
- data/app/helpers/lcms/engine/application_helper.rb +2 -6
- data/app/helpers/lcms/engine/view_helper.rb +1 -3
- data/app/interactors/lcms/engine/explore_curriculum_interactor.rb +1 -1
- data/app/javascript/components/admin/ImportStatus.jsx +1 -1
- data/app/javascript/components/admin/association-picker/AssociationPickerResults.jsx +1 -1
- data/app/javascript/components/admin/picker/pickerWindowWrapper.jsx +0 -1
- data/app/models/lcms/engine/access_code.rb +1 -1
- data/app/models/lcms/engine/application_record.rb +9 -0
- data/app/models/lcms/engine/author.rb +1 -1
- data/app/models/lcms/engine/copyright_attribution.rb +1 -1
- data/app/models/lcms/engine/curriculum.rb +1 -1
- data/app/models/lcms/engine/document.rb +3 -3
- data/app/models/lcms/engine/document_bundle.rb +2 -2
- data/app/models/lcms/engine/document_part.rb +1 -1
- data/app/models/lcms/engine/download.rb +3 -3
- data/app/models/lcms/engine/download_category.rb +1 -1
- data/app/models/lcms/engine/leadership_post.rb +1 -1
- data/app/models/lcms/engine/material.rb +2 -2
- data/app/models/lcms/engine/material_part.rb +1 -1
- data/app/models/lcms/engine/page.rb +1 -1
- data/app/models/lcms/engine/reading_assignment_author.rb +1 -1
- data/app/models/lcms/engine/reading_assignment_text.rb +1 -1
- data/app/models/lcms/engine/resource.rb +4 -12
- data/app/models/lcms/engine/resource_additional_resource.rb +1 -1
- data/app/models/lcms/engine/resource_download.rb +1 -1
- data/app/models/lcms/engine/resource_reading_assignment.rb +1 -1
- data/app/models/lcms/engine/resource_related_resource.rb +1 -1
- data/app/models/lcms/engine/resource_standard.rb +1 -1
- data/app/models/lcms/engine/search/elastic_search_document.rb +1 -1
- data/app/models/lcms/engine/settings.rb +1 -1
- data/app/models/lcms/engine/social_thumbnail.rb +1 -1
- data/app/models/lcms/engine/staff_member.rb +1 -1
- data/app/models/lcms/engine/standard.rb +1 -1
- data/app/models/lcms/engine/standard_link.rb +1 -1
- data/app/models/lcms/engine/user.rb +3 -3
- data/app/presenters/lcms/engine/content_presenter.rb +1 -1
- data/app/queries/lcms/engine/admin_documents_query.rb +1 -1
- data/app/queries/lcms/engine/admin_materials_query.rb +1 -1
- data/app/serializers/lcms/engine/association_item_serializer.rb +0 -1
- data/app/serializers/lcms/engine/curriculum_resource_serializer.rb +0 -2
- data/app/serializers/lcms/engine/document_material_serializer.rb +0 -1
- data/app/serializers/lcms/engine/material_serializer.rb +0 -1
- data/app/serializers/lcms/engine/previews_material_serializer.rb +0 -1
- data/app/serializers/lcms/engine/resource_details_serializer.rb +0 -2
- data/app/serializers/lcms/engine/resource_instruction_serializer.rb +0 -2
- data/app/serializers/lcms/engine/resource_picker_serializer.rb +0 -2
- data/app/serializers/lcms/engine/resource_serializer.rb +0 -2
- data/app/serializers/lcms/engine/search_document_serializer.rb +0 -2
- data/app/services/lcms/engine/document_build_service.rb +1 -0
- data/app/services/lcms/engine/html_sanitizer.rb +2 -2
- data/app/services/lcms/engine/s3_service.rb +1 -1
- data/app/uploaders/social_thumbnail_uploader.rb +0 -4
- data/app/views/layouts/lcms/engine/admin.html.erb +1 -1
- data/app/views/lcms/engine/admin/access_codes/index.html.erb +10 -8
- data/app/views/lcms/engine/admin/documents/index.html.erb +2 -2
- data/app/views/lcms/engine/admin/materials/index.html.erb +2 -2
- data/app/views/lcms/engine/admin/pages/index.html.erb +3 -3
- data/app/views/lcms/engine/admin/standards/index.html.erb +9 -7
- data/app/views/lcms/engine/admin/users/index.html.erb +16 -14
- data/app/views/lcms/engine/resources/_children_list.html.erb +1 -1
- data/app/views/lcms/engine/shared/_social_sharing_menu.html.erb +4 -4
- data/config/initializers/carrier_wave.rb +0 -1
- data/config/locales/admin/en.yml +0 -2
- data/db/migrate/20200422130652_add_reimported_at_to_documents.rb +7 -0
- data/lcms-engine.gemspec +73 -87
- data/lib/doc_template/document.rb +2 -2
- data/lib/doc_template/tables/activity.rb +2 -1
- data/lib/doc_template/tables/base.rb +0 -4
- data/lib/doc_template/tables/section.rb +2 -1
- data/lib/doc_template/tags/link_tag.rb +1 -1
- data/lib/doc_template/xpath_functions.rb +1 -3
- data/lib/document_exporter/base.rb +1 -2
- data/lib/document_exporter/docx.rb +0 -1
- data/lib/generators/lcms/engine/install/install_generator.rb +1 -4
- data/lib/generators/lcms/engine/install/templates/config/lcms.yml +1 -1
- data/lib/lcms/engine/engine.rb +0 -16
- data/lib/lcms/engine/migration.rb +2 -0
- data/lib/lcms/engine/version.rb +1 -1
- data/lib/lt/lcms/metadata/context.rb +7 -5
- data/spec/controllers/admin/admin_controller_spec.rb +1 -1
- data/spec/controllers/admin/association_picker_controller_spec.rb +2 -2
- data/spec/controllers/admin/curriculums_controller_spec.rb +1 -2
- data/spec/controllers/admin/documents_controller_spec.rb +12 -41
- data/spec/controllers/admin/materials_controller_spec.rb +7 -67
- data/spec/controllers/admin/pages_controller_spec.rb +2 -2
- data/spec/controllers/admin/resource_bulk_edit_controller_spec.rb +3 -3
- data/spec/controllers/admin/sketch_compilers_controller_spec.rb +5 -4
- data/spec/controllers/admin/standards_controller_spec.rb +12 -9
- data/spec/controllers/admin/users_controller_spec.rb +2 -2
- data/spec/controllers/admin/welcome_controller_spec.rb +1 -1
- data/spec/controllers/documents_controller_spec.rb +3 -3
- data/spec/controllers/enhance_instruction_controller_spec.rb +1 -1
- data/spec/controllers/explore_curriculum_controller_spec.rb +2 -2
- data/spec/controllers/find_lessons_controller_spec.rb +1 -1
- data/spec/controllers/pages_controller_spec.rb +9 -12
- data/spec/controllers/resources_controller_spec.rb +2 -2
- data/spec/controllers/search_controller_spec.rb +1 -1
- data/spec/dummy/bin/spring +2 -2
- data/spec/dummy/config/application.rb +3 -3
- data/spec/dummy/config/environments/test.rb +2 -5
- data/spec/dummy/config/lcms-admin.yml +3 -3
- data/spec/dummy/config/webpack/development.js +5 -0
- data/spec/dummy/config/webpack/environment.js +3 -0
- data/spec/dummy/config/webpack/production.js +5 -0
- data/spec/dummy/config/webpack/test.js +5 -0
- data/spec/dummy/config/webpacker.yml +96 -0
- data/spec/dummy/db/schema.rb +251 -275
- data/spec/factories/document_bundles.rb +1 -1
- data/spec/factories/standard_links.rb +2 -0
- data/spec/factories/taggings.rb +1 -0
- data/spec/models/document_bundle_spec.rb +0 -6
- data/spec/models/resource_spec.rb +0 -33
- data/spec/rails_helper.rb +0 -1
- data/spec/requests/admin/curriculum_spec.rb +17 -0
- data/spec/services/document_build_service_spec.rb +76 -62
- data/spec/services/html_sanitizer_spec.rb +0 -34
- data/spec/support/capybara.rb +1 -3
- data/spec/support/concerns/searchable.rb +2 -0
- data/spec/support/database_cleaner.rb +5 -16
- data/spec/support/devise.rb +2 -0
- data/yarn.lock +442 -530
- metadata +183 -439
- data/Gemfile.lock +0 -752
- data/config/initializers/active_record.rb +0 -3
- data/spec/controllers/admin/resources_controller_spec.rb +0 -84
- data/spec/fixtures/tables/activity-metadata-3activities.html +0 -1
- data/spec/fixtures/tables/document-metadata-2paragpraphs.html +0 -97
- data/spec/fixtures/tables/document-metadata-2spans.html +0 -96
- data/spec/fixtures/tables/document-metadata.html +0 -96
- data/spec/lib/doc_template/tables/activity_spec.rb +0 -28
- data/spec/lib/doc_template/tables/metadata_spec.rb +0 -40
- data/spec/lib/doc_template/tables/shared_examples/remove_table.rb +0 -11
- data/spec/support/fixture_helper.rb +0 -16
@@ -1,11 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rails_helper'
|
4
|
-
|
5
|
-
shared_examples 'removes metadata table' do
|
6
|
-
it 'removes original table' do
|
7
|
-
table_html = %r{<span\s+[^.]*>\[?#{described_class::HEADER_LABEL}\]?<\/span>}im
|
8
|
-
subject
|
9
|
-
expect(fragment.to_html).to_not match(table_html)
|
10
|
-
end
|
11
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
module FixtureHelper
|
4
|
-
def file_fixture(fixture_name)
|
5
|
-
file_fixture_path = ::Rails.root.join('..', 'fixtures')
|
6
|
-
path = Pathname.new(File.join(file_fixture_path, fixture_name))
|
7
|
-
raise ArgumentError, "the directory '#{file_fixture_path}' does not contain a file named '#{fixture_name}'" \
|
8
|
-
unless path.exist?
|
9
|
-
|
10
|
-
path
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
RSpec.configure do |config|
|
15
|
-
config.include FixtureHelper
|
16
|
-
end
|