class RBT::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
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/rbt/utility_scripts/create_recipe.rb, line 127 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: |'+N _ << ' '+short_desc?.to_s+N unless binaries?.empty? _ << ' binaries: '+binaries?.join(',')+N end _ << ' configure_options: |'+N+ remove_leading_hyphens(configure_options?)+N+N # ======================================================================= # # Add the description next: # ======================================================================= # _ << ' description: |'+N use_this_for_the_description = word_wrap(description?) if use_this_for_the_description.include? N use_this_for_the_description = use_this_for_the_description.split(N).map {|entry| entry.prepend(' ') } use_this_for_the_description[0] = use_this_for_the_description[0].to_s.lstrip use_this_for_the_description = use_this_for_the_description.join(N) end _ << ' '+use_this_for_the_description.chomp+N _ << ' extra_information: |'+N # ======================================================================= # # Add the prefix next: # ======================================================================= # _ << ' prefix: '+prefix?.to_s+N if prefix?.include? programs_dir? _ << ' symlink_pkgconfig_files: t'+N end _ << ' # postinstall: '+N _ << ' url1: '+url1?.to_s+N _ << ' url2: '+url2?.to_s+N _ << ' homepage: '+N _ << ' required_deps_on: '+required_deps?+N _ << ' - '+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
prefix?()
click to toggle source
program?()
click to toggle source
#¶ ↑
program?¶ ↑
#¶ ↑
# File lib/rbt/utility_scripts/create_recipe.rb, line 99 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
¶ ↑
This method will set to the two instance variables @original_input and @program.
#¶ ↑
# File lib/rbt/utility_scripts/create_recipe.rb, line 77 def set_program( i = DEFAULT_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/rbt/utility_scripts/create_recipe.rb, line 276 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