Merge branch 'grit_ext'
This commit is contained in:
commit
d34904b86c
10 changed files with 31 additions and 29 deletions
|
@ -1,6 +1,5 @@
|
|||
require 'digest/md5'
|
||||
module ApplicationHelper
|
||||
include Utils::CharEncode
|
||||
|
||||
def gravatar_icon(user_email, size = 40)
|
||||
gravatar_host = request.ssl? ? "https://secure.gravatar.com" : "http://www.gravatar.com"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
class Commit
|
||||
include Utils::CharEncode
|
||||
|
||||
attr_accessor :commit
|
||||
attr_accessor :head
|
||||
|
@ -22,7 +21,7 @@ class Commit
|
|||
end
|
||||
|
||||
def safe_message
|
||||
encode(message)
|
||||
message
|
||||
end
|
||||
|
||||
def created_at
|
||||
|
@ -30,11 +29,11 @@ class Commit
|
|||
end
|
||||
|
||||
def author_email
|
||||
encode(author.email)
|
||||
author.email
|
||||
end
|
||||
|
||||
def author_name
|
||||
encode(author.name)
|
||||
author.name
|
||||
end
|
||||
|
||||
def prev_commit
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%table
|
||||
- line_old = 0
|
||||
- line_new = 0
|
||||
- diff_str = encode(diff.diff)
|
||||
- diff_str = diff.diff
|
||||
- lines_arr = diff_str.lines.to_a
|
||||
- lines_arr.each do |line|
|
||||
- next if line.match(/^--- \/dev\/null/)
|
||||
|
|
|
@ -40,9 +40,9 @@
|
|||
%h3= content.name
|
||||
.readme
|
||||
- if content.name =~ /\.(md|markdown)$/i
|
||||
= markdown(encode content.data)
|
||||
= markdown(content.data)
|
||||
- else
|
||||
= simple_format(encode content.data)
|
||||
= simple_format(content.data)
|
||||
|
||||
:javascript
|
||||
$(function(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue