lib/hyla/commands/create.rb in hyla-1.0.2 vs lib/hyla/commands/create.rb in hyla-1.0.3

- old
+ new

@@ -1,13 +1,13 @@ module Hyla module Commands class Create < Command def self.process(args, options) - destination = options[:destination] if check_mandatory_option?('--d / --destination', options[:destination]) - artefact_type = options[:artefact_type] if check_mandatory_option?('--a / --artefact_type', options[:artefact_type]) - type = options[:type] if check_mandatory_option?('--t / --type', options[:type]) + destination = options[:destination] if check_mandatory_option?('-d / --destination', options[:destination]) + artefact_type = options[:artefact_type] if check_mandatory_option?('-a / --artefact_type', options[:artefact_type]) + type = options[:type] if check_mandatory_option?('-t / --type', options[:type]) copy_artefact(type, artefact_type, destination) end # @@ -21,10 +21,10 @@ FileUtils.cp(source, destination) Hyla::logger.info ">> Artefact #{artefact_file_name} added to project #{destination}" case artefact_type - when 'image','audio','video' + when 'image','audio','video','source' source_dir = [Configuration::samples, artefact_type] * '/' FileUtils.cp_r(source_dir,destination) end end \ No newline at end of file