Merge branch 'dev_shixun_project' of https://git.trustie.net/jacknudt/trustieforge into dev_shixun_project
Conflicts: app/views/games/_game_show.html.erb
This commit is contained in:
commit
75b092f3c7
|
@ -20,6 +20,7 @@ class GamesController < ApplicationController
|
||||||
# 首次进入版本库自动打开文件
|
# 首次进入版本库自动打开文件
|
||||||
# path:"" && path: @game.path
|
# path:"" && path: @game.path
|
||||||
def show
|
def show
|
||||||
|
logger.info("*** ###############")
|
||||||
game_path = (@game.path.blank? ? @game.path : @game.path.strip)
|
game_path = (@game.path.blank? ? @game.path : @game.path.strip)
|
||||||
@rev = @rev.nil? ? "master" : @rev
|
@rev = @rev.nil? ? "master" : @rev
|
||||||
@git_url = git_repository_url(@myshixun, "Myshixun")
|
@git_url = git_repository_url(@myshixun, "Myshixun")
|
||||||
|
@ -29,8 +30,10 @@ class GamesController < ApplicationController
|
||||||
@path = game_path
|
@path = game_path
|
||||||
@file_open = true
|
@file_open = true
|
||||||
@content = @repository.cat(@path, @rev)
|
@content = @repository.cat(@path, @rev)
|
||||||
|
logger.info("content result is ###############{@content}")
|
||||||
else
|
else
|
||||||
@entries = @repository.entries(@path, @rev)
|
@entries = @repository.entries(@path, @rev)
|
||||||
|
logger.info("result is ###############{@entries.first.try(:path)}")
|
||||||
end
|
end
|
||||||
@latest_output = @game.latest_output.try(:out_put)
|
@latest_output = @game.latest_output.try(:out_put)
|
||||||
outputs = @game.outputs
|
outputs = @game.outputs
|
||||||
|
|
|
@ -51,8 +51,7 @@ class ShixunsController < ApplicationController
|
||||||
flash[:notice] = l(:notice_shixun_failed_exec)+ ":" + e.message
|
flash[:notice] = l(:notice_shixun_failed_exec)+ ":" + e.message
|
||||||
raise ActiveRecord::Rollback
|
raise ActiveRecord::Rollback
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html{
|
format.html{redirect_to shixun_path(@shixun)}
|
||||||
redirect_to shixun_path(@shixun)}
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue