Sha256: ebcdb89a7cbe278e945a314f6d3325bbcb8fa1b468417c80f6141d48672f966e
Contents?: true
Size: 882 Bytes
Versions: 13
Compression:
Stored size: 882 Bytes
Contents
require 'fileutils' require 'colorize' require 'active_support/core_ext/string' require 'thor' require 'bundler' class Lono::Sequence < Thor::Group include Thor::Actions def self.template_name ENV['TEMPLATE'] || 'skeleton' end def self.source_root starter_projects = File.expand_path("../starter_projects", File.dirname(__FILE__)) template_folder = "#{starter_projects}/#{template_name}" unless File.exist?(template_folder) templates = Dir.glob("#{starter_projects}/*") .select { |f| File.directory?(f) } .map { |f| " #{File.basename(f)}" } .sort puts "The TEMPLATE=#{ENV['TEMPLATE']} you specified does not exist.".colorize(:red) puts "The available templates are:\n#{templates.join("\n")}" exit end template_folder end private def git_installed? system("type git > /dev/null") end end
Version data entries
13 entries across 13 versions & 1 rubygems