Project linguist integration
This commit is contained in:
parent
5b6019f357
commit
9c76bd9540
5 changed files with 20 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
|||
class Snippet < ActiveRecord::Base
|
||||
include Utils::Colorize
|
||||
include Linguist::BlobHelper
|
||||
|
||||
belongs_to :project
|
||||
belongs_to :author, :class_name => "User"
|
||||
|
@ -38,8 +38,20 @@ class Snippet < ActiveRecord::Base
|
|||
]
|
||||
end
|
||||
|
||||
def colorize
|
||||
system_colorize(content, file_name)
|
||||
def data
|
||||
content
|
||||
end
|
||||
|
||||
def size
|
||||
0
|
||||
end
|
||||
|
||||
def name
|
||||
file_name
|
||||
end
|
||||
|
||||
def mode
|
||||
nil
|
||||
end
|
||||
|
||||
def expired?
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
class Tree
|
||||
include Utils::FileHelper
|
||||
include Linguist::BlobHelper
|
||||
attr_accessor :path, :tree, :project, :ref
|
||||
|
||||
delegate :contents,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue