Skip to content

Commit

Permalink
sort by the project names before displaying list or status
Browse files Browse the repository at this point in the history
  • Loading branch information
iconoclast authored and cpjolicoeur committed Apr 24, 2010
1 parent 66a0c17 commit c0b1604
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cerberus/manager.rb
Expand Up @@ -221,7 +221,7 @@ def run
else
puts "List of active projects:"

projects.each do |fn|
projects.sort.each do |fn|
fn =~ %r{#{HOME}/config/(.*).yml}

puts " * #{$1}"
Expand All @@ -237,7 +237,7 @@ def initialize(cli_options = {})
end

def run
projects = Dir["#{HOME}/config/*.yml"].map { |fn| fn.gsub(/.*\/(.*).yml$/, '\1') }
projects = Dir["#{HOME}/config/*.yml"].sort.map { |fn| fn.gsub(/.*\/(.*).yml$/, '\1') }
if projects.empty?
puts "There are not any active projects"
else
Expand Down

0 comments on commit c0b1604

Please sign in to comment.