Sha256: e6aa482dc6da3720da2a99c8fc344f02db1524c964011c0bccf427bfef679686
Contents?: true
Size: 606 Bytes
Versions: 7
Compression:
Stored size: 606 Bytes
Contents
projects = [] Dir.foreach(Hubbard::PROJECTS_PATH) do |project| next if project == "." || project == ".." if is_authorized(project, 'read') project_path = File.join(Hubbard::PROJECTS_PATH, project) vis = File.read(File.join(project_path, ".visibility")).strip desc = File.read(File.join(project_path, ".description")).strip projects << { :name => project, :visibility => vis, :description => desc } end end if OPTIONS[:format] == :yaml puts YAML::dump(projects) else projects.each do |p| puts "#{p[:name].ljust(16)} #{p[:visibility].ljust(10)} #{p[:description]}" end end
Version data entries
7 entries across 7 versions & 1 rubygems