File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -80,7 +80,8 @@ def self.setup_router(scope)
8080 scope . match ( "/cookbooks/:cookbook_id/libraries" ) . to ( :controller => "cookbook_libraries" , :action => "index" )
8181 scope . match ( "/cookbooks/:cookbook_id/definitions" ) . to ( :controller => "cookbook_definitions" , :action => "index" )
8282 scope . match ( "/cookbooks/:cookbook_id/recipes" ) . to ( :controller => "cookbook_recipes" , :action => "index" )
83- scope . match ( "/cookbooks/:cookbook_id/attributes" ) . to ( :controller => "cookbook_attributes" , :action => "index" )
83+ scope . match ( "/cookbooks/:cookbook_id/attributes" ) . to ( :controller => "cookbook_attributes" , :action => "index" )
84+ scope . match ( "/cookbooks/:cookbook_id/files" ) . to ( :controller => "cookbook_files" , :action => "index" )
8485
8586 scope . resources :cookbooks
8687 scope . resources :registrations , :controller => "openid_register"
Original file line number Diff line number Diff line change @@ -88,14 +88,16 @@ def do_remote_file(source, path)
8888 end
8989
9090 def get_from_uri ( source )
91- uri = URI . parse ( source )
92- if uri . absolute
93- r = Chef ::REST . new ( source )
94- Chef ::Log . debug ( "Downloading from absolute URI: #{ source } " )
95- r . get_rest ( source , true ) . open
91+ begin
92+ uri = URI . parse ( source )
93+ if uri . absolute
94+ r = Chef ::REST . new ( source )
95+ Chef ::Log . debug ( "Downloading from absolute URI: #{ source } " )
96+ r . get_rest ( source , true ) . open
97+ end
98+ rescue URI ::InvalidURIError
99+ nil
96100 end
97- rescue URI ::InvalidURIError
98- nil
99101 end
100102
101103 def get_from_server ( source , current_checksum )
You can’t perform that action at this time.
0 commit comments