
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
= scorm2004-manifest
== Description
+scorm2004-manifest+ is a Ruby gem that provides a manifest file parser for SCORM 2004 4th edition. It parses and validates the manifest file according to SCORM 2004 4th Edition Content Aggregation Model (CAM) Version 1.1. After parsing and validating, it builds an object tree that captures XML's hierarchical structure.
== Installation
To install scorm2004-manifest, use the following command:
$ gem install scorm2004-manifest
== Requirements
== Synopsis
require 'scorm2004-manifest'
begin manifest = Scorm2004::Manifest(open('imsmanifest.xml')) rescue Scorm2004::Manifest::Error => e # An exception will be raised if validation fails. # The exception 'e' will be an instance of # Scorm2004::Manifest::Error's subclass. end
manifest.identifier # => "LMSTestPackage_CM-01" manifest.version # => "1.1.1" organizations = manifest.organizations organization = organizations.organizations[0] organization.identifier # => "CM-01" organization.title.content # => "LMS Test Content Package CM-01 " item_0 = organization.items[0] item_0.title.content # => "Activity 1" item_0.identifier # => "activity_1" item_0.identifierref # => "SEQ01" item_0.parameters # => "?tc=CM-01&act=1" item_0.sequencing.limit_conditions.attempt_absolute_duration_limit
item_0.presentation.navigation_interface.hide_lmsuis.map(&:content)
For every XML element in a manifest file, XML attributes and child elements defined in Content Aggregation Model can be accessed using accessor methods whose names are underscored. Namespace prefixes are omitted from the accessor methods, except for either +adlseq_objectives+, +adlseq_objective+, or +adlseq_map_info+. If an element may have multiple child elements, the accessor method for the child elements will be pluralized. For example, element has one or more elements.
organizations = manifest.organizations
organization_0 = organizations.organizations[0]
Each parsed element also responds to the +to_hash+ method. Using this method, you can convert your manifest file into Hash or more useful forms.
json_manifest = Scorm2004::Manifest(open('imsmanifest.xml')).to_hash.to_json
== Documentation
To generate scorm2004-manifest's document set, use the following command:
$ git clone git://github.com/tnoda/scorm2004-manifest.git
$ cd scorm2004-manifest
$ rake yard
The document set will be generated under the +doc+ directory.
== Contributing to scorm2004-manifest
== Copyright
Copyright (c) 2012 Takahiro Noda. See LICENSE.txt for further details.
FAQs
Unknown package
We found that scorm2004-manifest demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.