Skip to content

Commit

Permalink
[playframework#557] Ignore dot files when creating new applications o…
Browse files Browse the repository at this point in the history
…r modules
  • Loading branch information
erwan committed Mar 4, 2011
1 parent b7db6c6 commit dc9b541
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion framework/pym/play/commands/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def new(app, args, env, cmdloader=None):
application_name = raw_input("~ What is the application name? [%s] " % os.path.basename(app.path))
if application_name == "":
application_name = os.path.basename(app.path)
shutil.copytree(os.path.join(env["basedir"], 'resources/application-skel'), app.path)
copy_directory(os.path.join(env["basedir"], 'resources/application-skel'), app.path)
os.mkdir(os.path.join(app.path, 'app/models'))
os.mkdir(os.path.join(app.path, 'lib'))
app.check()
Expand Down
2 changes: 1 addition & 1 deletion framework/pym/play/commands/modulesrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def new(app, args, play_env):
print "~ The new module will be created in %s" % os.path.normpath(app.path)
print "~"
application_name = os.path.basename(app.path)
shutil.copytree(os.path.join(play_env["basedir"], 'resources/module-skel'), app.path)
copy_directory(os.path.join(play_env["basedir"], 'resources/module-skel'), app.path)
# check_application()
replaceAll(os.path.join(app.path, 'build.xml'), r'%MODULE%', application_name)
replaceAll(os.path.join(app.path, 'commands.py'), r'%MODULE%', application_name)
Expand Down
1 change: 1 addition & 0 deletions framework/pym/play/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ def delete(filename):
else:
os.remove(filename)

# Copy a directory, skipping dot-files
def copy_directory(source, target, exclude = []):
skip = None

Expand Down
2 changes: 0 additions & 2 deletions resources/application-skel/.gitignore

This file was deleted.

0 comments on commit dc9b541

Please sign in to comment.