Skip to content
Snippets Groups Projects
Commit 89c6ebb7 authored by Eric Franz's avatar Eric Franz
Browse files

pass args through to command

parent 867de131
No related branches found
No related tags found
1 merge request!17Integrate rails application template into CLI
...@@ -4,15 +4,13 @@ module AweSim ...@@ -4,15 +4,13 @@ module AweSim
class RailsAppCreator < Thor class RailsAppCreator < Thor
desc "new", "create a new app" desc "new", "create a new app"
def newapp(app_path) def newapp(app_name, *args)
# TODO: add unit tests to make sure we pass everything in...
# TODO: make tpl location a class variable of Rails object # TODO: make tpl location a class variable of Rails object
# or instance variable (can we pass it in as we instantiate it? add # or instance variable (can we pass it in as we instantiate it? add
# default value so we can customize it later) # default value so we can customize it later)
tpl = "/nfs/17/efranz/dev/rails-application-template/awesim.rb" tpl = "/nfs/17/efranz/dev/rails-application-template/awesim.rb"
say "rails new #{app_path} -m #{tpl}" say "rails new #{app_name} -m #{tpl} #{args.join(" ")}\n"
end end
map "new" => "newapp" map "new" => "newapp"
end end
end end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment