32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/umwelt/cli/commands/convey.rb', line 32
def call(phase:, semantic:, **options)
puts "Buildung phase: #{phase} with semantic #{semantic}..."
if phase.to_i.zero?
puts 'Error: Phase must be an integer'
return
end
@convey = Umwelt::Command::Convey.new.call(
phase_id: phase.to_i,
semantic: classify(semantic).to_sym,
source: Pathname.new(options.fetch(:source)),
target: Pathname.new(options.fetch(:target))
)
if @convey.success?
@convey.result.each_pair do |key, value|
puts "#{key} => (#{value})"
end
puts "#{@convey.result.keys.count} files written succesfully"
else
@convey.errors.each { |e| puts "Error: #{e}" }
end
end
|