#!/home/jhonnymoreira/.rbenv/shims/ruby
require 'fileutils'

EXTENSIONS = {
  crystal: '.cr',
  javascript: '.js',
  python: '.py',
  ruby: '.rb'
}

project_name, *project_langs = ARGV

filename = project_name.downcase.gsub(/^\d+../, '').strip.gsub(/\s/, '_')

files = project_langs.map do |lang|
  "#{project_name}/#{lang}-lang/#{filename}#{EXTENSIONS[lang.to_sym]}"
end

langs_directories = project_langs.map { |lang| "#{project_name}/#{lang}-lang" }

FileUtils.mkdir(project_name)
langs_directories.each { |directory| FileUtils.mkdir(directory) }
files.each { |file| FileUtils.touch(file) }

#!/usr/bin/env ruby
require 'fileutils'

EXTENSIONS = {
  crystal: '.cr',
  javascript: '.js',
  python: '.py',
  ruby: '.rb'
}

project_name, *project_langs = ARGV

filename = project_name.downcase.gsub(/^\d+../, '').strip.gsub(/\s/, '_')

files = project_langs.map do |lang|
  "#{project_name}/#{lang}-lang/#{filename}#{EXTENSIONS[lang.to_sym]}"
end

langs_directories = project_langs.map { |lang| "#{project_name}/#{lang}-lang" }

FileUtils.mkdir(project_name)
langs_directories.each { |directory| FileUtils.mkdir(directory) }
files.each { |file| FileUtils.touch(file) }

Change the reference for ruby executable
Change the reference for ruby executable