golf 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/golf/cli.rb +7 -3
- data/lib/golf/version.rb +1 -1
- metadata +1 -1
data/lib/golf/cli.rb
CHANGED
|
@@ -11,9 +11,13 @@ module Golf
|
|
|
11
11
|
File.expand_path("../../../", __FILE__)
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
desc "new [NAME]", "Creates new golf app"
|
|
15
|
-
def new(name)
|
|
16
|
-
|
|
14
|
+
desc "new [NAME] (optional)[TEMPLATE]", "Creates new golf app, takes NAME and optionally TEMPLATE"
|
|
15
|
+
def new(name, template = false)
|
|
16
|
+
unless template
|
|
17
|
+
directory("templates/new", name)
|
|
18
|
+
else
|
|
19
|
+
directory("templates/#{template}", name)
|
|
20
|
+
end
|
|
17
21
|
end
|
|
18
22
|
|
|
19
23
|
desc "server", "Run the golf app"
|
data/lib/golf/version.rb
CHANGED