No release in over 3 years
Low commit activity in last 3 years
Target versions supported: 1.1, 1.2, 1.3; Thin 1.2, 1.3
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.8
= 0.58.2
~> 0.16

Runtime

 Project Readme

multi_version_common_cartridge

A gem for writing different versions of Common Cartridges.

It supports Common Cartridge version 1.1, 1.2, 1.3 and Thin CC version 1.2 and 1.3.

Usage

# Create a Common Cartridge
cartridge = MultiVersionCommonCartridge::Cartridge.new
cartridge.manifest.set_title('My cartridge')
cartridge.items = [
  MultiVersionCommonCartridge::Item.new.tap do |item|
    item.title = 'My activity'
    item.identifier = 'Some identifier'
    item.resource = MultiVersionCommonCartridge::Resources::BasicLtiLink::BasicLtiLink.new.tap do |lti|
      lti.title = 'My activity title'
      lti.identiier = 'My activity identifier'
      lti.scure_launch_url = 'https://example.com/lti'
    end
  end
]

# Create a Common Cartridge writer for version 1.2.0
writer = MultiVersionCommonCartridge::Writers::CartridgeWriter.new(
  cartridge, '1.2.0'
end

# Finalize the Common Cartridge for the specified version.
writer.finalize

# Check for error
return if writer.errors?

# Write the Common Cartridge
writer.write_to_zip('cartridge.imscc')