Skip to content

Commit 0018deb

Browse files
committed
cli shorthand for applying a package to a server with the same name
1 parent 4db8331 commit 0018deb

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ So here are some examples (assuming you have a package called "app" and a node c
7676

7777
orca apply app server
7878
orca remove app server
79+
orca validate app server
80+
81+
If you have a package with the same name as a group or server you can abreviate this to...
82+
83+
orca apply server
84+
orca remove server
85+
orca validate server
7986

8087
You can also directly trigger actions from the CLI like so...
8188

lib/orca/cli.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@ class Orca::Cli < Thor
1010
class_option :verbose, :type => :boolean, :desc => "print all SSH output, useful for debugging"
1111
class_option :'skip-dependancies', :type => :boolean, :desc => "Don't validate and run dependancies."
1212

13-
desc "apply PACKAGE_NAME GROUP_OR_NODE_NAME", "apply the given package onto the given named group"
14-
def apply(package, group)
13+
desc "apply PACKAGE_NAME [GROUP_OR_NODE_NAME]", "apply the given package onto the given named group"
14+
def apply(package, group=package)
1515
run_command(package, group, :apply)
1616
end
1717

18-
desc "remove PACKAGE_NAME GROUP_OR_NODE_NAME", "remove the given package onto the given named group"
19-
def remove(package, group)
18+
desc "remove PACKAGE_NAME [GROUP_OR_NODE_NAME]", "remove the given package onto the given named group"
19+
def remove(package, group=package)
2020
run_command(package, group, :remove)
2121
end
2222

23-
desc "validate PACKAGE_NAME GROUP_OR_NODE_NAME", "run validation steps on the given named group"
24-
def validate(package, group)
23+
desc "validate PACKAGE_NAME [GROUP_OR_NODE_NAME]", "run validation steps on the given named group"
24+
def validate(package, group=package)
2525
run_command(package, group, :validate)
2626
end
2727

0 commit comments

Comments
 (0)