Sha256: 7042f7fea1c860b1a4fba81a0a7bab676b2c8aa608f3276ce77849e2c84f323e
Contents?: true
Size: 1.23 KB
Versions: 30
Compression:
Stored size: 1.23 KB
Contents
module Ufo class Tasks::Builder # ship: build and registers task definitions together def self.ship(task_definition, options) # When handling task definitions in with the ship command and class, we always want to # build and register task definitions. There is little point of running them independently # This method helps us do that. Tasks::Builder.new(options).build Tasks::Register.register(task_definition, options) end def initialize(options={}) @options = options end def build puts "Building Task Definitions...".green unless @options[:mute] check_templates_definitions_path dsl = DSL.new(template_definitions_path, @options.merge(quiet: false, mute: true)) dsl.run puts "Task Definitions built in .ufo/output" unless @options[:mute] end def check_templates_definitions_path unless File.exist?(template_definitions_path) pretty_path = template_definitions_path.sub("#{Ufo.root}/", '') puts "ERROR: #{pretty_path} does not exist. Run: `ufo init` to create a starter file" unless @options[:mute] exit 1 end end def template_definitions_path "#{Ufo.root}/.ufo/task_definitions.rb" end end end
Version data entries
30 entries across 30 versions & 1 rubygems