lib/coderunner/class_methods.rb in coderunner-0.12.17 vs lib/coderunner/class_methods.rb in coderunner-0.12.18
- old
+ new
@@ -38,11 +38,10 @@
# List the available defaults files for the given code (copts[:C] or -C on the command line).
def self.available_defaults_files(copts={})
process_command_options(copts)
- puts "\nAvailable defaults files for #{copts[:C]}:"
entries = []
#begin
##entries += Dir.entries(SCRIPT_FOLDER + "/code_modules/#{copts[:C]}/my_defaults_files")
#entries +=
#rescue
@@ -53,9 +52,10 @@
entries = [rc.rcp.user_defaults_location, rc.rcp.code_module_folder + "/defaults_files"].map{|folder| Dir.entries(folder).grep(/_defaults\.rb$/) rescue []}.sum
#entries += Dir.entries(SCRIPT_FOLDER + "/code_modules/#{copts[:C]}/defaults_files")
#entries += Dir.entries(SCRIPT_FOLDER + "/code_modules/#{copts[:C]}/defaults_files")
#rescue
#end
+ puts "\nAvailable defaults files for #{copts[:C]}:"
entries.each do |defaults_file|
#puts "\t" + File.basename(defaults_file, '.rb').sub(/_defaults/, '') unless ['.', '..', '.svn', '.directory'].include? defaults_file
puts "\t" + File.basename(defaults_file, '.rb').sub(/_defaults/, '')
end
end