Sha256: cf55ca3f4de93044782fda35bcb7643feef322243d397484195faee8d11ae513

Contents?: true

Size: 642 Bytes

Versions: 7

Compression:

Stored size: 642 Bytes

Contents

require 'fileutils'

project_name = read_project_name
description = next_arg "Please specify a project description"
dir = find_project_dir(project_name)
if File.exist?(dir)
  $stderr.puts "Project already exists with that name"
  exit 4
end
unless Dir.mkdir(dir)
  $stderr.puts "Unable to create directory: #{dir}"
end
visibility = OPTIONS[:private] ? "private" : "public"
if @username != 'admin'
  File.open(File.join(dir, ".permissions"), "w") { |f| f << "#{@username}=admin\n" }
end
File.open(File.join(dir, ".visibility"), "w") { |f| f << "#{visibility}\n" }
File.open(File.join(dir, ".description"), "w") { |f| f << "#{description}\n" }

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hubbard-0.0.16 commands/create-project.rb
hubbard-0.0.15 commands/create-project.rb
hubbard-0.0.14 commands/create-project.rb
hubbard-0.0.13 commands/create-project.rb
hubbard-0.0.12 commands/create-project.rb
hubbard-0.0.11 commands/create-project.rb
hubbard-0.0.10 commands/create-project.rb