Skip to content

Instantly share code, notes, and snippets.

@joseluistorres
Last active December 20, 2015 20:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save joseluistorres/6190320 to your computer and use it in GitHub Desktop.
Resuelve el acertijo de @hackergil
#! /usr/bin/env ruby
require 'thor'
class Test < Thor
desc "create", "Creates an empty git repository"
def create(dirname)
puts "Creating git repository"
FileUtils.mkdir dirname
FileUtils.pwd
`cd #{dirname}`
`git init .`
puts "Git repository has been created"
end
end
Test.start
@hackergil
Copy link

Falta por ahí al final un Test.start fuera de la clase (línea 18). El problema que tuvimos en la línea 12 funciona tanto en Mac OSX Lion como en CentOS 6... jeje saludos!

@joseluistorres
Copy link
Author

¡Listo Gil, muchas gracias!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment