summaryrefslogtreecommitdiff
path: root/lib/chef/shell
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-07-02 10:25:16 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2018-07-02 10:25:16 -0700
commit35603c7ce1bd3ccf35334ed65152140f0ecaf080 (patch)
tree452c84ce196ce00d672c71a8fa65f86c5a074fac /lib/chef/shell
parenteda2808dce8146bfdb308dd658b1dd565df3562b (diff)
downloadchef-35603c7ce1bd3ccf35334ed65152140f0ecaf080.tar.gz
fix Style/HashSyntax
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'lib/chef/shell')
-rw-r--r--lib/chef/shell/ext.rb54
-rw-r--r--lib/chef/shell/shell_session.rb4
2 files changed, 29 insertions, 29 deletions
diff --git a/lib/chef/shell/ext.rb b/lib/chef/shell/ext.rb
index fb0733e96e..727eb6b344 100644
--- a/lib/chef/shell/ext.rb
+++ b/lib/chef/shell/ext.rb
@@ -239,10 +239,10 @@ module Shell
end
desc "returns an object to control a paused chef run"
- subcommands :resume => "resume the chef run",
- :step => "run only the next resource",
- :skip_back => "move back in the run list",
- :skip_forward => "move forward in the run list"
+ subcommands resume: "resume the chef run",
+ step: "run only the next resource",
+ skip_back: "move back in the run list",
+ skip_forward: "move forward in the run list"
def chef_run
Shell.session.resource_collection.iterator
end
@@ -393,18 +393,18 @@ module Shell
This will strip the admin privileges from any client named after borat.
E
- subcommands :all => "list all api clients",
- :show => "load an api client by name",
- :search => "search for API clients",
- :transform => "edit all api clients via a code block and save them"
+ subcommands all: "list all api clients",
+ show: "load an api client by name",
+ search: "search for API clients",
+ transform: "edit all api clients via a code block and save them"
def clients
@clients ||= Shell::ModelWrapper.new(Chef::ApiClient, :client)
end
desc "Find and edit cookbooks"
- subcommands :all => "list all cookbooks",
- :show => "load a cookbook by name",
- :transform => "edit all cookbooks via a code block and save them"
+ subcommands all: "list all cookbooks",
+ show: "load a cookbook by name",
+ transform: "edit all cookbooks via a code block and save them"
def cookbooks
@cookbooks ||= Shell::ModelWrapper.new(Chef::CookbookVersion)
end
@@ -455,10 +455,10 @@ module Shell
This will assign the attribute to every node with a FQDN matching the regex.
E
- subcommands :all => "list all nodes",
- :show => "load a node by name",
- :search => "search for nodes",
- :transform => "edit all nodes via a code block and save them"
+ subcommands all: "list all nodes",
+ show: "load a node by name",
+ search: "search for nodes",
+ transform: "edit all nodes via a code block and save them"
def nodes
@nodes ||= Shell::ModelWrapper.new(Chef::Node)
end
@@ -477,10 +477,10 @@ module Shell
## SEE ALSO ##
See the help for +nodes+ for more information about the subcommands.
E
- subcommands :all => "list all roles",
- :show => "load a role by name",
- :search => "search for roles",
- :transform => "edit all roles via a code block and save them"
+ subcommands all: "list all roles",
+ show: "load a role by name",
+ search: "search for roles",
+ transform: "edit all roles via a code block and save them"
def roles
@roles ||= Shell::ModelWrapper.new(Chef::Role)
end
@@ -503,10 +503,10 @@ module Shell
See the help for +nodes+ for more information about the subcommands.
E
- subcommands :all => "list all items in the data bag",
- :show => "load a data bag item by id",
- :search => "search for items in the data bag",
- :transform => "edit all items via a code block and save them"
+ subcommands all: "list all items in the data bag",
+ show: "load a data bag item by id",
+ search: "search for items in the data bag",
+ transform: "edit all items via a code block and save them"
def databags(databag_name)
@named_databags_wrappers ||= {}
@named_databags_wrappers[databag_name] ||= Shell::NamedDataBagWrapper.new(databag_name)
@@ -526,10 +526,10 @@ module Shell
## SEE ALSO ##
See the help for +nodes+ for more information about the subcommands.
E
- subcommands :all => "list all environments",
- :show => "load an environment by name",
- :search => "search for environments",
- :transform => "edit all environments via a code block and save them"
+ subcommands all: "list all environments",
+ show: "load an environment by name",
+ search: "search for environments",
+ transform: "edit all environments via a code block and save them"
def environments
@environments ||= Shell::ModelWrapper.new(Chef::Environment)
end
diff --git a/lib/chef/shell/shell_session.rb b/lib/chef/shell/shell_session.rb
index aec2152063..789a022b56 100644
--- a/lib/chef/shell/shell_session.rb
+++ b/lib/chef/shell/shell_session.rb
@@ -264,8 +264,8 @@ module Shell
end
def register
- @rest = Chef::ServerAPI.new(Chef::Config[:chef_server_url], :client_name => Chef::Config[:node_name],
- :signing_key_filename => Chef::Config[:client_key])
+ @rest = Chef::ServerAPI.new(Chef::Config[:chef_server_url], client_name: Chef::Config[:node_name],
+ signing_key_filename: Chef::Config[:client_key])
end
end