lib/gitlab_git/blob.rb in gitlab_git-5.1.0 vs lib/gitlab_git/blob.rb in gitlab_git-5.2.0
- old
+ new
@@ -1,9 +1,10 @@
module Gitlab
module Git
class Blob
include Linguist::BlobHelper
+ include EncodingHelper
attr_accessor :name, :path, :size, :data, :mode, :id, :commit_id
class << self
def find(repository, sha, path)
@@ -81,9 +82,17 @@
end
end
def empty?
!data || data == ''
+ end
+
+ def data
+ encode! @data
+ end
+
+ def name
+ encode! @name
end
end
end
end