-
Notifications
You must be signed in to change notification settings - Fork 7
Card Content Type Maintenance Guide
Java dependency of ruby-jing
Please note, that he ruby-jing gem used for card XML validation has a dependency on server side Java runtime. Unfortunately (at least for Mac OSX) ruby-jing seems to require the legacy Java SE 6 runtime (https://support.apple.com/kb/DL1572?locale=en_US), and XML validation when run locally on Mac OSX will prompt for installation of Java, even if the latest version of the Java runtime is already installed (see https://www.java.com/en/download/faq/yosemite_java.xml).
- Update any information in the card xml schema /config/card.rnc) file.
Remember that you'll need
to use trang to create the card.rng file from the card.rnc.
Useful guide for relaxNG
schema: http://books.xmlschemata.org/relaxng/relax-PART-1.html
2. If you're making a new content type, you'll need to update the
validation information
for the card content value types in app/models/card_content.rb; check
the VALUE_TYPES_FOR_CONTENT hash.
3. Update the XmlCardLoader at /app/services/xml_card_loader.rb so
that information from the xml editor will get translated into
updated card content, and ideally update
spec/services/xml_card_loader_spec.rb too.
- Update the to_xml method of /app/models/card_content.rb
- Update /app/serializers/card_content_serializer.rb with new attributes
- Update client/app/models/card-content.js with new attributes that need to be recognized on the client side
- Make a new component if needed in the app/pods/components/card-content folder, also update /client/app/pods/components/card-content/component.js if need be.
- Update data.yml
- Update /lib/tasks/card_loading/configurations/nonstandard_configurations/card_configuration_sampler.rb