Sha256: d67b96e0e750fd81ce8249007cc9374a59777e7c18730d7001e09b977c1a8dd3
Contents?: true
Size: 887 Bytes
Versions: 3
Compression:
Stored size: 887 Bytes
Contents
# frozen_string_literal: true module Roro # Where all the generation, configuration, greenfielding happens. class CLI < Thor desc 'generate:containers', 'Generate containers.' map 'generate:containers' => 'generate_containers' method_options :containers => :array def generate_containers(*containers) mise = Roro::CLI.mise containers = options['containers'] || containers.empty? ? %w[frontend backend database] : containers # siblings = Dir.glob('./*').select do |f| # File.directory?(f) # !f.match?(mise) # end # siblings = options[:containers] ? options[:containers] : default_containers containers.each { |s| s.split('/').last }.each do |container| create_file("#{mise}/containers/#{container}/scripts/.keep") create_file("#{mise}/containers/#{container}/env/.keep") end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
roro-0.3.25 | lib/roro/cli/generate/generate_containers.rb |
roro-0.3.24 | lib/roro/cli/generate/generate_containers.rb |
roro-0.3.23 | lib/roro/cli/generate/generate_containers.rb |