I ended up giving up with using a gem to manipulate the tar archives, and just doing it by shelling out to the commandline.
`cd #{container} && tar xvfz sdk.tar.gz`
`cd #{container} && tar xvfz Wizard.tar.gz`
#update the framework packaged with the wizard
FileUtils.rm_rf(container + "/Wizard.app/Contents/Resources/SDK.bundle")
FileUtils.rm_rf(container + "/Wizard.app/Contents/Resources/SDK.framework")
FileUtils.mv(container + "/resources/SDK.bundle", container + "/Wizard.app/Contents/Resources/")
FileUtils.mv(container + "/resources/SDK.framework", container + "/Wizard.app/Contents/Resources/")
config_plist = render_to_string({
file: 'site/_wizard_config',
layout: false,
locals: { app_id: @version.app.id },
formats: 'xml'
})
File.open(container + "/Wizard.app/Contents/Resources/Configuration.plist", 'w') { |file| file.write( config_plist ) }
`cd #{container} && rm Wizard.tar.gz`
`cd #{container} && tar -cvf Wizard.tar 'Wizard.app'`
`cd #{container} && gzip Wizard.tar`
All these backticks make me feel like I'm writing Perl again.