Skip to content

Commit

Permalink
gitosis.rb: Fixed Ruby strangenesses.
Browse files Browse the repository at this point in the history
  • Loading branch information
tokkee committed Feb 16, 2011
1 parent 2b9f79e commit e5d6aca
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/gitosis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,15 @@ def self.update_repositories(projects)
conf["group #{name}"]['members'] = write_users.map{|u| u.gitosis_public_keys.active}.flatten.map{ |key| "#{key.identifier}" }.join(' ')

# git-daemon support for read-only anonymous access
if Setting.plugin_redmine_gitosis['enableGitdaemon']
and User.anonymous.allowed_to?( :view_changesets, project )
if Setting.plugin_redmine_gitosis['enableGitdaemon'] and
User.anonymous.allowed_to?( :view_changesets, project )
conf["repo #{name}"]['daemon'] = 'yes'
else
conf["repo #{name}"]['daemon'] = 'no'
end
# Enable/disable gitweb
if Setting.plugin_redmine_gitosis['enableGitweb']
and User.anonymous.allowed_to?( :view_changesets, project )
if Setting.plugin_redmine_gitosis['enableGitweb'] and
User.anonymous.allowed_to?( :view_changesets, project )
conf["repo #{name}"]['gitweb'] = 'yes'
else
conf["repo #{name}"]['gitweb'] = 'no'
Expand All @@ -147,8 +147,8 @@ def self.update_repositories(projects)
File.chmod(0755, git_push_file)

# add, commit, push, and remove local tmp dir
if (Setting.plugin_redmine_gitosis['gitosisLogFile'] != nil)
and (Setting.plugin_redmine_gitosis['gitosisLogFile'].length > 0)
if (Setting.plugin_redmine_gitosis['gitosisLogFile'] != nil) and
(Setting.plugin_redmine_gitosis['gitosisLogFile'].length > 0)
`#{git_push_file} >> #{Setting.plugin_redmine_gitosis['gitosisLogFile']}`
else
`#{git_push_file}`
Expand Down

0 comments on commit e5d6aca

Please sign in to comment.