8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# File 'lib/iron_hammer/deliverables/configuration_file.rb', line 8
def self.list params={}
path = params[:path] || raise(ArgumentError.new('must inform a path'))
environment = params[:environment]
suffix = environment ? ('.' + environment) : ''
pattern = PATTERN + suffix
Dir[File.join(path, pattern)].collect do |file|
Deliverable.new(
:path_on_package => '',
:actual_path => path,
:actual_name => original_name = file.split('/').last,
:name_on_package => original_name.sub(suffix, '')
)
end
end
|