Commit 1b2068ea authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Gem updates & githost logger

* Grit gem updated
* gitolite-client updated
* logger added
* few fixes
parent 09831488
......@@ -11,8 +11,8 @@ gem "kaminari"
gem "haml", "3.1.4"
gem "haml-rails"
gem "jquery-rails"
gem "grit", :git => "https://github.com/gitlabhq/grit.git"
gem "gitolite", :git => "https://github.com/gitlabhq/gitolite-client.git"
gem "grit", :git => "https://github.com/gitlabhq/grit.git", :ref => "810e3c11787e9d84c5925a7edc3264db0f04bb49"
gem "gitolite", :git => "https://github.com/gitlabhq/gitolite-client.git", :ref => "9b715ca8bab6529f6c92204a25f84d12f25a6eb0"
gem "carrierwave"
gem "six"
gem "therubyracer"
......
......@@ -6,17 +6,19 @@ GIT
GIT
remote: https://github.com/gitlabhq/gitolite-client.git
revision: 36dabd226caa40ff052677719adaacbfe667b36c
revision: 9b715ca8bab6529f6c92204a25f84d12f25a6eb0
ref: 9b715ca8bab6529f6c92204a25f84d12f25a6eb0
specs:
gitolite (0.0.3.alpha)
grit (~> 2.4.1)
gitolite (0.0.4.alpha)
grit (>= 2.4.1)
hashery (~> 1.4.0)
GIT
remote: https://github.com/gitlabhq/grit.git
revision: 3fc864f3c637e06e2fa7a81f6b48a5df58a9bc5b
revision: 810e3c11787e9d84c5925a7edc3264db0f04bb49
ref: 810e3c11787e9d84c5925a7edc3264db0f04bb49
specs:
grit (2.4.1)
grit (2.5.0)
diff-lcs (~> 1.1)
mime-types (~> 1.15)
posix-spawn (~> 0.3.6)
......
......@@ -15,6 +15,7 @@ class CommitsController < ApplicationController
def index
@repo = project.repo
@limit, @offset = (params[:limit] || 40), (params[:offset] || 0)
@commits = @project.commits(@ref, params[:path], @limit, @offset)
respond_to do |format|
......
......@@ -2,6 +2,7 @@ require 'digest/md5'
module ApplicationHelper
def gravatar_icon(user_email = '', size = 40)
return unless user_email
gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com"
user_email.strip!
"#{gravatar_host}/avatar/#{Digest::MD5.hexdigest(user_email.downcase)}?s=#{size}&d=identicon"
......
......@@ -73,7 +73,7 @@ class Commit
repo.commits(ref, limit, offset)
else
repo.commits(ref)
end.map{ |c| Commit.new(c) }
end.map{ |c| Commit.new(c) }
end
def commits_between(repo, from, to)
......
......@@ -3,6 +3,8 @@ module Gitlabhq
extend self
def utf8 message
return nil unless message
hash = CharlockHolmes::EncodingDetector.detect(message) rescue {}
if hash[:encoding]
CharlockHolmes::Converter.convert(message, hash[:encoding], 'UTF-8')
......
......@@ -46,6 +46,7 @@ module Gitlabhq
end
end
rescue Exception => ex
Gitlabhq::Logger.error(ex.message)
raise Gitolite::AccessDenied.new("gitolite timeout")
end
......
module Gitlabhq
class Logger
def self.error(message)
@@logger ||= ::Logger.new(File.join(Rails.root, "log/githost.log"))
@@logger.error(message)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment