Sha256: 1144bdab1194f0382d3d33b429d2e5aa15a3746e3efec1e95ee99f90729c049d
Contents?: true
Size: 792 Bytes
Versions: 18
Compression:
Stored size: 792 Bytes
Contents
module PkgForge ## # Add patch methods to Forge class Forge attr_writer :patches Contract None => ArrayOf[String] def patches @patches ||= [] end Contract String => nil def run_patch(file) run_local "patch -d #{tmpdir(:build)} -p1 < patches/#{file}" end private Contract None => nil def patch_source! patches.each { |patch| run_patch(patch) } nil end end module DSL ## # Add patch methods to Forge DSL class Forge Contract String => nil def patch(file) @forge.patches << file nil end end ## # Add patch methods to Build DSL class Build Contract String => nil def patch(file) @forge.run_patch(file) end end end end
Version data entries
18 entries across 18 versions & 1 rubygems