diff options
-rwxr-xr-x | chef/bin/chef-client | 10 | ||||
-rw-r--r-- | chefserverslice/app/controllers/nodes.rb | 2 | ||||
-rw-r--r-- | chefserverslice/lib/chefserverslice.rb | 4 |
3 files changed, 7 insertions, 9 deletions
diff --git a/chef/bin/chef-client b/chef/bin/chef-client index 88a1d2f11a..4503c76ecb 100755 --- a/chef/bin/chef-client +++ b/chef/bin/chef-client @@ -30,7 +30,7 @@ config = { } opts = OptionParser.new do |opts| opts.banner = "Usage: #{$0} [-d DIR|-r FILE] (options)" - { + client_option_hash = { :config_file=> { :short=>"-c CONFIG", :long=>"--config CONFIG", :description=>"The Chef Config file to use", :proc=>nil }, :user=> { :short=>"-u USER", :long=>"--user USER", :description=>"User to change uid to before daemonizing", :proc=>nil }, :group=> { :short=>"-g GROUP", :long=>"--group GROUP", :description=>"Group to change gid to before daemonizing", :proc=>nil }, @@ -43,9 +43,11 @@ opts = OptionParser.new do |opts| :log_location=>{ :short=>"-L LOGLOCATION", :long=>"--logfile LOGLOCATION", :description=>"Set the log file location, defaults to STDOUT - recommended for daemonizing", :proc=>nil }, :validation_token=>{ :short=>"-t TOKEN", :long=>"--token TOKEN", :description=>"Set the openid validation token", :proc=>nil }, } - - opts.on(val[:short],val[:long],val[:description]) do |c| - config[key] = (val[:proc] && val[:proc].call) || c + + client_option_hash.each do |opt_key, opt_val| + opts.on(opt_val[:short],opt_val[:long],opt_val[:description]) do |c| + config[opt_key] = (opt_val[:proc] && opt_val[:proc].call) || c + end end opts.on_tail("-h", "--help", "Show this message") do diff --git a/chefserverslice/app/controllers/nodes.rb b/chefserverslice/app/controllers/nodes.rb index b6b08ccab9..c9eb04df41 100644 --- a/chefserverslice/app/controllers/nodes.rb +++ b/chefserverslice/app/controllers/nodes.rb @@ -87,7 +87,7 @@ class Chefserverslice::Nodes < Chefserverslice::Application @status = 202 display @node else - redirect(url(:nodes), {:message => { :notice => "Node #{params[:id]} deleted succesfully" }, :permanent => true}) + redirect(slice_url(:nodes), {:message => { :notice => "Node #{params[:id]} deleted succesfully" }, :permanent => true}) end end diff --git a/chefserverslice/lib/chefserverslice.rb b/chefserverslice/lib/chefserverslice.rb index ffcaefd4cc..4ed536b684 100644 --- a/chefserverslice/lib/chefserverslice.rb +++ b/chefserverslice/lib/chefserverslice.rb @@ -110,10 +110,6 @@ if defined?(Merb::Plugins) scope.match('/openid/consumer/complete').to(:controller => 'openid_consumer', :action => 'complete').name(:openid_consumer_complete) scope.match('/openid/consumer/logout').to(:controller => 'openid_consumer', :action => 'logout').name(:openid_consumer_logout) - scope.resources :nodes - scope.resources :searches, :path=>"search", :controller=>"search" do - scope.resources :entries, :controller=>"search_entries" - end # the slice is mounted at /chefserverslice - note that it comes before default_routes scope.match('/').to(:controller => 'nodes', :action =>'index').name(:top) # enable slice-level default routes by default |