class Cookbooks::CreateRecipe
Constants
- DEFAULT_PROGRAM
#¶ ↑
DEFAULT_PROGRAM¶ ↑
#¶ ↑
- NAMESPACE
#¶ ↑
NAMESPACE¶ ↑
#¶ ↑
- STORE_HERE
#¶ ↑
STORE_HERE¶ ↑
#¶ ↑
Public Class Methods
new( this_program = DEFAULT_PROGRAM, run_already = true )
click to toggle source
#¶ ↑
initialize¶ ↑
#¶ ↑
Calls superclass method
# File lib/cookbooks/utility_scripts/create_recipe.rb, line 45 def initialize( this_program = DEFAULT_PROGRAM, run_already = true ) super() reset set_program(this_program) case run_already when :dont_run_yet run_already = false end run if run_already end
Public Instance Methods
binaries?()
click to toggle source
configure_options?()
click to toggle source
create_the_recipe()
click to toggle source
#¶ ↑
#create_the_recipe¶ ↑
#¶ ↑
# File lib/cookbooks/utility_scripts/create_recipe.rb, line 106 def create_the_recipe try_to_initialize_the_dataset_via_sanitize_cookbook_dataset file_name = "#{@program}.yml" full_recipe_location = store_where?+file_name _ = full_recipe_location.dup create_directory(store_where?) if !File.exist?(store_where?) opnn; e 'Now creating a standalone recipe for '+sfancy(program?)+' at ' opnn; e sdir(store_where?)+sfile(file_name) remove_file(_) # Get rid of the file first. create_file(_) store_where = _ _ = "#{input?}:#{N}".dup _ << ' program_name: '+input?+N _ << ' short_description: '+short_desc?.to_s+N unless binaries?.empty? _ << ' binaries: '+binaries?.join(',')+N end _ << ' configure_options: "'+N+ remove_leading_hyphens(configure_options?)+N+N+' "'+N _ << ' description: |'+N _ << ' '+word_wrap(description?).chomp+N _ << ' extra_information: |'+N _ << ' prefix: '+prefix?+N if prefix?.include? programs_dir? _ << ' symlink_pkgconfig_files: t'+N end _ << ' # postinstall: '+N _ << ' url1: '+url1?.to_s+N _ << ' url2: '+url2?.to_s+N _ << ' required_deps_on: '+required_deps?+N _ << ' last_update: '+today?+N append_what_into(_, store_where) opnn; e 'Finished creating recipe at ' opnn; e ' `'+sfile(full_recipe_location)+'`.' end
dataset?()
click to toggle source
description?()
click to toggle source
opnn()
click to toggle source
prefix?()
click to toggle source
program?()
click to toggle source
#¶ ↑
program?¶ ↑
#¶ ↑
# File lib/cookbooks/utility_scripts/create_recipe.rb, line 78 def program? @program end
Also aliased as: input?
remove_leading_hyphens(i)
click to toggle source
required_deps?()
click to toggle source
reset()
click to toggle source
run()
click to toggle source
set_program(i = DEFAULT_PROGRAM)
click to toggle source
#¶ ↑
#set_program¶ ↑
#¶ ↑
# File lib/cookbooks/utility_scripts/create_recipe.rb, line 254 def set_program(i = DEFAULT_PROGRAM) # sets @program. i = DEFAULT_PROGRAM if i.nil? @original_input = i if i.include? '-' i = File.basename(i) i = ProgramInformation.return_real_short_name(i) end @program = i end
set_store_where(i = STORE_HERE+'IndividualCookbooks/')
click to toggle source
#¶ ↑
#set_store_where¶ ↑
Set the base directory, where to store, here.
#¶ ↑
# File lib/cookbooks/utility_scripts/create_recipe.rb, line 245 def set_store_where(i = STORE_HERE+'IndividualCookbooks/') # overrule for now i = i.dup i << '/' unless i.end_with? '/' @store_where = i end
Also aliased as: store_where
short_desc?()
click to toggle source
store_where?()
click to toggle source
try_to_initialize_the_dataset_via_sanitize_cookbook_dataset()
click to toggle source
url1?()
click to toggle source
url2?()
click to toggle source