Class: ChefServerSlice::Cookbooks

Inherits:
Application
  • Object
show all
Defined in:
app/controllers/cookbooks.rb

Instance Method Summary collapse

Methods inherited from Application

#absolute_slice_url, #access_denied, #authorized_node, #escape_node_id, #expand_cookbook_deps, #fix_up_node_id, #get_available_recipes, #load_all_files, #load_cookbook_segment, #login_required, #redirect_back_or_default, #segment_files, #specific_cookbooks, #store_location

Instance Method Details

#filesObject



40
41
42
# File 'app/controllers/cookbooks.rb', line 40

def files
  display load_all_files(params[:type], params[:node])
end

#indexObject



28
29
30
31
# File 'app/controllers/cookbooks.rb', line 28

def index
  @cl = Chef::CookbookLoader.new
  display @cl
end

#showObject

Raises:

  • (NotFound)


33
34
35
36
37
38
# File 'app/controllers/cookbooks.rb', line 33

def show
  @cl = Chef::CookbookLoader.new
  @cookbook = @cl[params[:id]]
  raise NotFound unless @cookbook
  display @cookbook
end