Class: ChefServerSlice::Cookbooks
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
#attribute_files ⇒ Object
45
46
47
48
49
|
# File 'app/controllers/cookbooks.rb', line 45
def attribute_files
node = params.has_key?('node') ? params[:node] : nil
@attribute_files = load_all_files(:attributes, node)
display @attribute_files
end
|
#definition_files ⇒ Object
51
52
53
54
55
|
# File 'app/controllers/cookbooks.rb', line 51
def definition_files
node = params.has_key?('node') ? params[:node] : nil
@definition_files = load_all_files(:definitions, node)
display @definition_files
end
|
#index ⇒ Object
27
28
29
30
|
# File 'app/controllers/cookbooks.rb', line 27
def index
@cl = Chef::CookbookLoader.new
display @cl
end
|
#library_files ⇒ Object
57
58
59
60
61
|
# File 'app/controllers/cookbooks.rb', line 57
def library_files
node = params.has_key?('node') ? params[:node] : nil
@lib_files = load_all_files(:libraries, node)
display @lib_files
end
|
#recipe_files ⇒ Object
39
40
41
42
43
|
# File 'app/controllers/cookbooks.rb', line 39
def recipe_files
node = params.has_key?('node') ? params[:node] : nil
@recipe_files = load_all_files(:recipes, node)
display @recipe_files
end
|
#show ⇒ Object
32
33
34
35
36
37
|
# File 'app/controllers/cookbooks.rb', line 32
def show
@cl = Chef::CookbookLoader.new
@cookbook = @cl[params[:id]]
raise NotFound unless @cookbook
display @cookbook
end
|