修改版本库获取方式

This commit is contained in:
huang 2017-04-19 16:26:18 +08:00
parent 2cd0a10437
commit 1a25407a7a
4 changed files with 7 additions and 3 deletions

View File

@ -49,9 +49,9 @@ class GamesController < ApplicationController
logger.info("666666666666************languae ")
logger.info("path is666************#{@path} ")
logger.info("repository is666************#{@repository} ")
@content = @repository.cat(@path, @rev)
logger.info("contentdddd#{@content} ")
logger.info("666666666666************languae is #{@content}")
file_content = @g.files(@myshixun.gpid, @path, @rev).content
@content = Base64.decode64(file_content) unless file_content.blank?
logger.info("contentdddd#{@content.first(5)} ")
else
logger.info("77777************languae ")
logger.info("77777repository************#{@repository} ")

View File

@ -224,6 +224,7 @@ class Repository < ActiveRecord::Base
end
def cat(path, identifier=nil)
logger.info("cat content: path is #{path}, identifier is #{identifier}")
scm.cat(path, identifier)
end

View File

@ -12,6 +12,9 @@ class Gitlab::Client
end
alias_method :repo_files, :files
def file_blob(project, options={})
get("/projects/#{project}/repository/blobs", query: options)
end
# Gets a list of project repository tags.
#
# @example

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 25 KiB