Sha256: b9bd8fbdc0e5e996d45ac6f56f83017621c489fac8929dd4b8e3d47991e2a4e7

Contents?: true

Size: 764 Bytes

Versions: 1

Compression:

Stored size: 764 Bytes

Contents

# frozen_string_literal: true

require "thor"
require "fileutils"

# CLI provides command line interface functionality
# for creating and managing umbrella projects for data management.
class CLI < Thor
  desc "new_umbrella NAME", "Generate a new umbrella project for data management"
  def new_umbrella(name)
    directory_path = "./#{name}/projects"
    FileUtils.mkdir_p(directory_path)
    puts "Created umbrella project '#{name}' with a projects directory."
    # Generate Gemfile inside the new umbrella project
    File.open("./#{name}/Gemfile", "w") do |file|
      file.puts "source 'https://rubygems.org'"
      file.puts "gem 'thor'"
    end
    puts "Generated Gemfile for the umbrella project."
  end
end

CLI.start(ARGV) if __FILE__ == $PROGRAM_NAME

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
manifolds-0.0.1 lib/manifolds/cli.rb