Permalink
Browse files

Run sort and uniq after adding users. Add gl_name attribute

  • Loading branch information...
1 parent ba0048f commit c1a7a4ef216c38bf0ba2a3f9cae09afd876f1642 @wingrunr21 wingrunr21 committed Sep 27, 2011
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/gitolite/config/group.rb
View
7 lib/gitolite/config/group.rb
@@ -3,11 +3,11 @@ class Config
#Represents a group inside the gitolite configuration. The name and users
#options are all encapsulated in this class
class Group
-
- attr_accessor :name, :users
+ attr_accessor :name, :gl_name, :users
def initialize(name)
@name = name
+ @gl_name = "@#{name}"
@users = []
end
@@ -16,9 +16,10 @@ def clean_users
end
def add_users(*users)
- users.flatten.sort.uniq.each do |user|
+ users.flatten.each do |user|
@users << user
end
+ @users.sort!.uniq!
end
def remove_user(user)

0 comments on commit c1a7a4e

Please sign in to comment.