From 0a8572eb1d3d2e5cced2a30e41dd234588e386a4 Mon Sep 17 00:00:00 2001 From: Niklaus Giger Date: Sun, 22 Apr 2012 22:39:42 +0200 Subject: [PATCH] Small fixes --- lib/buildrizpack/package.rb | 12 +----------- spec/buildrizpack/package_spec.rb | 2 +- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/buildrizpack/package.rb b/lib/buildrizpack/package.rb index 829ba96..d5906ad 100644 --- a/lib/buildrizpack/package.rb +++ b/lib/buildrizpack/package.rb @@ -60,17 +60,7 @@ class IzPackTask < Buildr::ArchiveTask attr_accessor :packaging, :properties, :variables, :dynamicvariables, :conditions, :installerrequirements,:resources, :listeners, :jar, :native - # Adds the filePaths to a given pack. - # - # * May be called several times for the same package - # - # * +packName+ - the name of the destination pack, if it is a Hash, then it must point to a hash of attributes for the pack - # * +filePaths+ - May be a single filename or an array of filenames - # * +description+ - Description of the pack - # * +destination+ - IzPack will copy the files at installation time to this directory/file. - # - def addToPack(packName, filePaths, description=packName, destination='') - end + # The ArchiveTask class delegates this method # so we can create the archive. # the file_map is the result of the computations of the include and exclude filters. diff --git a/spec/buildrizpack/package_spec.rb b/spec/buildrizpack/package_spec.rb index f3d15b7..502ac21 100644 --- a/spec/buildrizpack/package_spec.rb +++ b/spec/buildrizpack/package_spec.rb @@ -80,7 +80,7 @@ def writeSimpleInstaller(filename) @project.package(:izpack).invoke @instPath = File.join(@project.path_to(:target, :main), "#{@project.name}-#{@project.version}.izpack.jar") File.exists?(@instPath).should be_true - FileUtils.cp(@instPath, "/home/niklaus/tmp.jar", :verbose => true) if File.directory?('/home/niklaus') + FileUtils.cp(@instPath, "/home/niklaus/tmp.jar", :verbose => true) if File.directory?('/home/niklaus') && File.writable?('/home/niklaus') end it "must include at least one file" do