Class: LogicalConstruct::UnpackTarballs
- Inherits:
-
Mattock::Tasklib
- Object
- Mattock::Tasklib
- LogicalConstruct::UnpackTarballs
show all
- Defined in:
- lib/logical-construct/archive-tasks.rb
Defined Under Namespace
Classes: RemoveFilesNotInArchives
Instance Method Summary
collapse
Instance Method Details
#define ⇒ Object
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
|
# File 'lib/logical-construct/archive-tasks.rb', line 279
def define
in_namespace do
archive_paths.each do |archive|
UnpackTarballTask.define_task(archive) do |unpack|
copy_settings_to(unpack)
unpack.archive_path.absolute_path = archive
end
end
if file_list.empty?
task :unpack => archive_paths
else
RemoveFilesNotInArchives.define_task(:remove_strays => archive_paths) do |remove_strays|
copy_settings_to(remove_strays)
end
task :unpack => file_list
file_list.each do |path|
file path => :remove_strays
end
end
end
task namespace_name => self[:unpack]
end
|
#resolve_configuration ⇒ Object
267
268
269
270
271
272
273
274
275
276
277
|
# File 'lib/logical-construct/archive-tasks.rb', line 267
def resolve_configuration
unless archive_path.nil?
archive_paths << archive_path
end
resolve_paths
self.file_list ||= FileList[File::join(File::expand_path(target_dir),target_pattern)]
super
end
|