Merge pull request '更新了贡献确权(blockchain)相关代码' (#323) from Nigel/forgeplus:master into dev_nanda
This commit is contained in:
commit
0ca2ee7959
|
@ -367,6 +367,7 @@ class ApplicationController < ActionController::Base
|
||||||
# RSS key authentication does not start a session
|
# RSS key authentication does not start a session
|
||||||
User.find_by_rss_key(params[:key])
|
User.find_by_rss_key(params[:key])
|
||||||
end
|
end
|
||||||
|
# User.current = User.find(2) # need to remove this statement before running in production
|
||||||
end
|
end
|
||||||
|
|
||||||
def user_trace_log
|
def user_trace_log
|
||||||
|
@ -963,7 +964,7 @@ class ApplicationController < ActionController::Base
|
||||||
#
|
#
|
||||||
# project_id = model['project_id']
|
# project_id = model['project_id']
|
||||||
# project = Project.find(project_id)
|
# project = Project.find(project_id)
|
||||||
# if project['use_blockchain'] == 0
|
# if project['use_blockchain'] == 0 || project['use_blockchain'] == false
|
||||||
# # 无需执行上链操作
|
# # 无需执行上链操作
|
||||||
# return true
|
# return true
|
||||||
# end
|
# end
|
||||||
|
@ -1017,7 +1018,7 @@ class ApplicationController < ActionController::Base
|
||||||
# project_id = issue['project_id']
|
# project_id = issue['project_id']
|
||||||
# project = Project.find(project_id)
|
# project = Project.find(project_id)
|
||||||
#
|
#
|
||||||
# if project['use_blockchain'] == 0
|
# if project['use_blockchain'] == 0 || project['use_blockchain'] == false
|
||||||
# # 无需执行上链操作
|
# # 无需执行上链操作
|
||||||
# return true
|
# return true
|
||||||
# end
|
# end
|
||||||
|
@ -1079,7 +1080,7 @@ class ApplicationController < ActionController::Base
|
||||||
# # 调用区块链接口
|
# # 调用区块链接口
|
||||||
# project_id = model['project_id']
|
# project_id = model['project_id']
|
||||||
# project = Project.find(project_id)
|
# project = Project.find(project_id)
|
||||||
# if project['use_blockchain'] == 0
|
# if project['use_blockchain'] == 0 || project['use_blockchain'] == false
|
||||||
# # 无需执行上链操作
|
# # 无需执行上链操作
|
||||||
# return true
|
# return true
|
||||||
# end
|
# end
|
||||||
|
@ -1109,7 +1110,7 @@ class ApplicationController < ActionController::Base
|
||||||
# updated_at = model['updated_at']
|
# updated_at = model['updated_at']
|
||||||
#
|
#
|
||||||
# # 查询pull request对应的commit信息
|
# # 查询pull request对应的commit信息
|
||||||
# commits = Gitea::PullRequest::CommitsService.call(ownername, reponame, model['gpid'])
|
# commits = Gitea::PullRequest::CommitsService.call(ownername, reponame, model['gitea_number'])
|
||||||
# commit_shas = []
|
# commit_shas = []
|
||||||
# commits.each do |c|
|
# commits.each do |c|
|
||||||
# commit_shas << c["Sha"]
|
# commit_shas << c["Sha"]
|
||||||
|
@ -1141,7 +1142,7 @@ class ApplicationController < ActionController::Base
|
||||||
# # 调用区块链接口
|
# # 调用区块链接口
|
||||||
# project_id = model['project_id']
|
# project_id = model['project_id']
|
||||||
# project = Project.find(project_id)
|
# project = Project.find(project_id)
|
||||||
# if project['use_blockchain'] == 0
|
# if project['use_blockchain'] == 0 || project['use_blockchain'] == false
|
||||||
# # 无需执行上链操作
|
# # 无需执行上链操作
|
||||||
# return true
|
# return true
|
||||||
# end
|
# end
|
||||||
|
@ -1155,7 +1156,7 @@ class ApplicationController < ActionController::Base
|
||||||
# action = 'merged'
|
# action = 'merged'
|
||||||
#
|
#
|
||||||
# # 查询pull request对应的commit信息
|
# # 查询pull request对应的commit信息
|
||||||
# commits = Gitea::PullRequest::CommitsService.call(ownername, reponame, model['gpid'])
|
# commits = Gitea::PullRequest::CommitsService.call(ownername, reponame, model['gitea_number'])
|
||||||
# commit_shas = []
|
# commit_shas = []
|
||||||
# commits.each do |c|
|
# commits.each do |c|
|
||||||
# commit_shas << c["Sha"]
|
# commit_shas << c["Sha"]
|
||||||
|
@ -1216,7 +1217,7 @@ class ApplicationController < ActionController::Base
|
||||||
# # 调用区块链接口
|
# # 调用区块链接口
|
||||||
# project_id = model['project_id']
|
# project_id = model['project_id']
|
||||||
# project = Project.find(project_id)
|
# project = Project.find(project_id)
|
||||||
# if project['use_blockchain'] == 0
|
# if project['use_blockchain'] == 0 || project['use_blockchain'] == false
|
||||||
# # 无需执行上链操作
|
# # 无需执行上链操作
|
||||||
# return true
|
# return true
|
||||||
# end
|
# end
|
||||||
|
@ -1260,7 +1261,7 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
project_id = model['project_id']
|
project_id = model['project_id']
|
||||||
project = Project.find(project_id)
|
project = Project.find(project_id)
|
||||||
if project['use_blockchain'] == 0
|
if project['use_blockchain'] == 0 || project['use_blockchain'] == false
|
||||||
# 无需执行上链操作
|
# 无需执行上链操作
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -1286,8 +1287,8 @@ class ApplicationController < ActionController::Base
|
||||||
# 调用区块链接口
|
# 调用区块链接口
|
||||||
param = {
|
param = {
|
||||||
"request-type": "upload issue info",
|
"request-type": "upload issue info",
|
||||||
"issue_id": "trustie-" + id.to_s,
|
"issue_id": "gitlink-" + id.to_s,
|
||||||
"repo_id": "trustie-" + project_id.to_s,
|
"repo_id": "gitlink-" + project_id.to_s,
|
||||||
"issue_number": 0, # 暂时不需要改字段
|
"issue_number": 0, # 暂时不需要改字段
|
||||||
"reponame": reponame,
|
"reponame": reponame,
|
||||||
"ownername": ownername,
|
"ownername": ownername,
|
||||||
|
@ -1311,7 +1312,7 @@ class ApplicationController < ActionController::Base
|
||||||
project_id = issue['project_id']
|
project_id = issue['project_id']
|
||||||
project = Project.find(project_id)
|
project = Project.find(project_id)
|
||||||
|
|
||||||
if project['use_blockchain'] == 0
|
if project['use_blockchain'] == 0 || project['use_blockchain'] == false
|
||||||
# 无需执行上链操作
|
# 无需执行上链操作
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -1333,11 +1334,11 @@ class ApplicationController < ActionController::Base
|
||||||
if issue_classify == "issue"
|
if issue_classify == "issue"
|
||||||
param = {
|
param = {
|
||||||
"request-type": "upload issue comment info",
|
"request-type": "upload issue comment info",
|
||||||
"issue_comment_id": "trustie-" + issue_comment_id.to_s,
|
"issue_comment_id": "gitlink-" + issue_comment_id.to_s,
|
||||||
"issue_comment_number": 0, # 暂时不需要
|
"issue_comment_number": 0, # 暂时不需要
|
||||||
"issue_number": 0, # 暂时不需要
|
"issue_number": 0, # 暂时不需要
|
||||||
"issue_id": "trustie-" + issue_id.to_s,
|
"issue_id": "gitlink-" + issue_id.to_s,
|
||||||
"repo_id": "trustie-" + project.id.to_s,
|
"repo_id": "gitlink-" + project.id.to_s,
|
||||||
"parent_id": parent_id.to_s,
|
"parent_id": parent_id.to_s,
|
||||||
"reponame": reponame,
|
"reponame": reponame,
|
||||||
"ownername": ownername,
|
"ownername": ownername,
|
||||||
|
@ -1349,12 +1350,12 @@ class ApplicationController < ActionController::Base
|
||||||
elsif issue_classify == "pull_request"
|
elsif issue_classify == "pull_request"
|
||||||
param = {
|
param = {
|
||||||
"request-type": "upload pull request comment info",
|
"request-type": "upload pull request comment info",
|
||||||
"pull_request_comment_id": "trustie-" + issue_comment_id.to_s,
|
"pull_request_comment_id": "gitlink-" + issue_comment_id.to_s,
|
||||||
"pull_request_comment_number": 0, # 不考虑该字段
|
"pull_request_comment_number": 0, # 不考虑该字段
|
||||||
"pull_request_number": 0, # 不考虑该字段
|
"pull_request_number": 0, # 不考虑该字段
|
||||||
"pull_request_id": "trustie-" + issue_id.to_s,
|
"pull_request_id": "gitlink-" + issue_id.to_s,
|
||||||
"parent_id": parent_id.to_s,
|
"parent_id": parent_id.to_s,
|
||||||
"repo_id": "trustie-" + project.id.to_s,
|
"repo_id": "gitlink-" + project.id.to_s,
|
||||||
"reponame": reponame,
|
"reponame": reponame,
|
||||||
"ownername": ownername,
|
"ownername": ownername,
|
||||||
"username": username,
|
"username": username,
|
||||||
|
@ -1371,7 +1372,7 @@ class ApplicationController < ActionController::Base
|
||||||
# 调用区块链接口
|
# 调用区块链接口
|
||||||
project_id = model['project_id']
|
project_id = model['project_id']
|
||||||
project = Project.find(project_id)
|
project = Project.find(project_id)
|
||||||
if project['use_blockchain'] == 0
|
if project['use_blockchain'] == 0 || project['use_blockchain'] == false
|
||||||
# 无需执行上链操作
|
# 无需执行上链操作
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -1401,16 +1402,16 @@ class ApplicationController < ActionController::Base
|
||||||
updated_at = model['updated_at']
|
updated_at = model['updated_at']
|
||||||
|
|
||||||
# 查询pull request对应的commit信息
|
# 查询pull request对应的commit信息
|
||||||
commits = Gitea::PullRequest::CommitsService.call(ownername, reponame, model['gpid'])
|
commits = Gitea::PullRequest::CommitsService.call(ownername, reponame, model['gitea_number'])
|
||||||
commit_shas = []
|
commit_shas = []
|
||||||
commits.each do |c|
|
commits.each do |c|
|
||||||
commit_shas << c["Sha"]
|
commit_shas << c["Sha"]
|
||||||
end
|
end
|
||||||
param = {
|
param = {
|
||||||
"request-type": "upload pull request info",
|
"request-type": "upload pull request info",
|
||||||
"pull_request_id": "trustie-" + pull_request_id.to_s,
|
"pull_request_id": "gitlink-" + pull_request_id.to_s,
|
||||||
"pull_request_number": 0, # trustie没有该字段
|
"pull_request_number": 0, # trustie没有该字段
|
||||||
"repo_id": "trustie-" + project_id.to_s,
|
"repo_id": "gitlink-" + project_id.to_s,
|
||||||
"ownername": ownername,
|
"ownername": ownername,
|
||||||
"reponame": reponame,
|
"reponame": reponame,
|
||||||
"username": username,
|
"username": username,
|
||||||
|
@ -1432,7 +1433,7 @@ class ApplicationController < ActionController::Base
|
||||||
# 调用区块链接口
|
# 调用区块链接口
|
||||||
project_id = model['project_id']
|
project_id = model['project_id']
|
||||||
project = Project.find(project_id)
|
project = Project.find(project_id)
|
||||||
if project['use_blockchain'] == 0
|
if project['use_blockchain'] == 0 || project['use_blockchain'] == false
|
||||||
# 无需执行上链操作
|
# 无需执行上链操作
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -1445,8 +1446,11 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
action = 'merged'
|
action = 'merged'
|
||||||
|
|
||||||
|
created_at = model['created_at']
|
||||||
|
updated_at = model['updated_at']
|
||||||
|
|
||||||
# 查询pull request对应的commit信息
|
# 查询pull request对应的commit信息
|
||||||
commits = Gitea::PullRequest::CommitsService.call(ownername, reponame, model['gpid'])
|
commits = Gitea::PullRequest::CommitsService.call(ownername, reponame, model['gitea_number'])
|
||||||
commit_shas = []
|
commit_shas = []
|
||||||
commits.each do |c|
|
commits.each do |c|
|
||||||
commit_shas << c["Sha"]
|
commit_shas << c["Sha"]
|
||||||
|
@ -1455,9 +1459,9 @@ class ApplicationController < ActionController::Base
|
||||||
# 将pull request相关信息写入链上
|
# 将pull request相关信息写入链上
|
||||||
param = {
|
param = {
|
||||||
"request-type": "upload pull request info",
|
"request-type": "upload pull request info",
|
||||||
"pull_request_id": "trustie-" + pull_request_id.to_s,
|
"pull_request_id": "gitlink-" + pull_request_id.to_s,
|
||||||
"pull_request_number": 0, # trustie没有该字段
|
"pull_request_number": 0, # trustie没有该字段
|
||||||
"repo_id": "trustie-" + project_id.to_s,
|
"repo_id": "gitlink-" + project_id.to_s,
|
||||||
"ownername": ownername,
|
"ownername": ownername,
|
||||||
"reponame": reponame,
|
"reponame": reponame,
|
||||||
"username": username,
|
"username": username,
|
||||||
|
@ -1477,16 +1481,16 @@ class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
# 将commit相关信息写入链上
|
# 将commit相关信息写入链上
|
||||||
commit_shas.each do |commit_sha|
|
commit_shas.each do |commit_sha|
|
||||||
commit_diff = Gitea::Commit::DiffService.call(ownername, reponame, commit_sha)
|
commit_diff = Gitea::Commit::DiffService.call(ownername, reponame, commit_sha, owner['gitea_token'])
|
||||||
commit = Gitea::Commit::InfoService.call(ownername, reponame, commit_sha)
|
commit = Gitea::Commit::InfoService.call(ownername, reponame, commit_sha, owner['gitea_token'])
|
||||||
param = {
|
param = {
|
||||||
"request-type": "upload commit info",
|
"request-type": "upload commit info",
|
||||||
"commit_hash": commit_sha,
|
"commit_hash": commit_sha,
|
||||||
"repo_id": "trustie-" + project_id.to_s,
|
"repo_id": "gitlink-" + project_id.to_s,
|
||||||
"author": commit['author']['login'],
|
"author": commit['commit']['author']['name'],
|
||||||
"author_email": commit['author']['email'],
|
"author_email": commit['commit']['author']['email'],
|
||||||
"committer": commit['committer']['login'],
|
"committer": commit['commit']['committer']['name'],
|
||||||
"committer_email": commit['committer']['email'],
|
"committer_email": commit['commit']['committer']['email'],
|
||||||
"author_time": commit['commit']['author']['date'],
|
"author_time": commit['commit']['author']['date'],
|
||||||
"committer_time": commit['commit']['committer']['date'],
|
"committer_time": commit['commit']['committer']['date'],
|
||||||
"content": commit['commit']['message'],
|
"content": commit['commit']['message'],
|
||||||
|
@ -1502,7 +1506,7 @@ class ApplicationController < ActionController::Base
|
||||||
# 调用区块链接口
|
# 调用区块链接口
|
||||||
project_id = model['project_id']
|
project_id = model['project_id']
|
||||||
project = Project.find(project_id)
|
project = Project.find(project_id)
|
||||||
if project['use_blockchain'] == 0
|
if project['use_blockchain'] == 0 || project['use_blockchain'] == false
|
||||||
# 无需执行上链操作
|
# 无需执行上链操作
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
@ -1518,9 +1522,9 @@ class ApplicationController < ActionController::Base
|
||||||
# 将pull request相关信息写入链上
|
# 将pull request相关信息写入链上
|
||||||
param = {
|
param = {
|
||||||
"request-type": "upload pull request info",
|
"request-type": "upload pull request info",
|
||||||
"pull_request_id": "trustie-" + pull_request_id.to_s,
|
"pull_request_id": "gitlink-" + pull_request_id.to_s,
|
||||||
"pull_request_number": 0, # trustie没有该字段
|
"pull_request_number": 0, # trustie没有该字段
|
||||||
"repo_id": "trustie-" + project_id.to_s,
|
"repo_id": "gitlink-" + project_id.to_s,
|
||||||
"ownername": ownername,
|
"ownername": ownername,
|
||||||
"reponame": reponame,
|
"reponame": reponame,
|
||||||
"username": username,
|
"username": username,
|
||||||
|
|
|
@ -176,7 +176,6 @@ class IssuesController < ApplicationController
|
||||||
render json: {status: 0, message: "创建成功", id: @issue.id}
|
render json: {status: 0, message: "创建成功", id: @issue.id}
|
||||||
end
|
end
|
||||||
|
|
||||||
render json: {status: 0, message: "创建成功", id: @issue.id}
|
|
||||||
else
|
else
|
||||||
normal_status(-1, "创建失败")
|
normal_status(-1, "创建失败")
|
||||||
end
|
end
|
||||||
|
|
|
@ -263,7 +263,6 @@ class PullRequestsController < ApplicationController
|
||||||
else
|
else
|
||||||
# update issue to state 5
|
# update issue to state 5
|
||||||
issue.update(status_id: 5)
|
issue.update(status_id: 5)
|
||||||
normal_status(1, "合并成功")
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -13,7 +13,8 @@ class Blockchain::TransferService < ApplicationService
|
||||||
payer = params['payer_id'].to_s
|
payer = params['payer_id'].to_s
|
||||||
payee = User.find_by(login: transfer_login)
|
payee = User.find_by(login: transfer_login)
|
||||||
if payee.nil?
|
if payee.nil?
|
||||||
normal_status(-1, "未找到用户")
|
# normal_status(-1, "未找到用户")
|
||||||
|
return false
|
||||||
else
|
else
|
||||||
payee = payee.id.to_s
|
payee = payee.id.to_s
|
||||||
token_name = params['project_id'].to_s
|
token_name = params['project_id'].to_s
|
||||||
|
@ -24,7 +25,8 @@ class Blockchain::TransferService < ApplicationService
|
||||||
end
|
end
|
||||||
rescue => e
|
rescue => e
|
||||||
puts "转账失败: #{e.message}"
|
puts "转账失败: #{e.message}"
|
||||||
normal_status(-1, e.message)
|
# normal_status(-1, e.message)
|
||||||
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Gitea::Commit::DiffService < Gitea::ClientService
|
||||||
|
|
||||||
private
|
private
|
||||||
def params
|
def params
|
||||||
Hash.new.merge(token: owner)
|
Hash.new.merge(token: token)
|
||||||
end
|
end
|
||||||
|
|
||||||
def url
|
def url
|
||||||
|
|
|
@ -7,7 +7,7 @@ class Gitea::Commit::InfoService < Gitea::ClientService
|
||||||
# repo: 仓库名称/标识
|
# repo: 仓库名称/标识
|
||||||
# sha: commit唯一标识
|
# sha: commit唯一标识
|
||||||
# eg:
|
# eg:
|
||||||
# Gitea::Commit::InfoService.call('jasder', 'repo_identifier', 'sha value')
|
# Gitea::Commit::InfoService.call('jasder', 'repo_identifier', 'sha value', token='gitea token')
|
||||||
def initialize(owner, repo, sha, token=nil)
|
def initialize(owner, repo, sha, token=nil)
|
||||||
@owner = owner
|
@owner = owner
|
||||||
@repo = repo
|
@repo = repo
|
||||||
|
@ -22,7 +22,7 @@ class Gitea::Commit::InfoService < Gitea::ClientService
|
||||||
|
|
||||||
private
|
private
|
||||||
def params
|
def params
|
||||||
Hash.new.merge(token: owner)
|
Hash.new.merge(token: token)
|
||||||
end
|
end
|
||||||
|
|
||||||
def url
|
def url
|
||||||
|
|
|
@ -17,6 +17,9 @@ class Projects::CreateService < ApplicationService
|
||||||
ProjectUnit.init_types(@project.id)
|
ProjectUnit.init_types(@project.id)
|
||||||
Repositories::CreateService.new(user, @project, repository_params).call
|
Repositories::CreateService.new(user, @project, repository_params).call
|
||||||
upgrade_project_category_private_projects_count
|
upgrade_project_category_private_projects_count
|
||||||
|
if repo_use_blockchain
|
||||||
|
create_repo_on_blockchain(params, @project)
|
||||||
|
end
|
||||||
else
|
else
|
||||||
Rails.logger.info("#############___________create_project_erros______###########{@project.errors.messages}")
|
Rails.logger.info("#############___________create_project_erros______###########{@project.errors.messages}")
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,153 +1,101 @@
|
||||||
defaults: &defaults
|
default: &default
|
||||||
# platform_url: 'http://47.96.87.25:81'
|
# 用户登入的时候设置/登出的时候清空
|
||||||
platform_url: 'https://testforgeplus.trustie.net'
|
autologin_cookie_name: 'autologin_gitlink'
|
||||||
admin_statistics_url: 'https://test-statistics.trustie.net/admin/index'
|
platform_url: 'http://localhost:3020'
|
||||||
|
|
||||||
|
|
||||||
|
#附件上传路径
|
||||||
|
attachment_folder: '/tmp'
|
||||||
|
|
||||||
|
# webssh相关
|
||||||
|
tomcat_webssh: 'https://testwebssh.gitlink.org.cn'
|
||||||
|
webssh_username: ''
|
||||||
|
webssh_password: ''
|
||||||
|
|
||||||
|
# git服务地址
|
||||||
|
git_address_ip: ''
|
||||||
|
|
||||||
|
#新版git服务地址
|
||||||
|
git_address_domain: ''
|
||||||
|
|
||||||
|
# git管理员用户名问题, 适用于git客户端的操作
|
||||||
|
git_username: ''
|
||||||
|
git_password: ''
|
||||||
|
|
||||||
|
ucloud:
|
||||||
|
public_key: ''
|
||||||
|
private_key: ''
|
||||||
|
public_bucket: ''
|
||||||
|
public_bucket_host: ''
|
||||||
|
public_cdn_host: ''
|
||||||
|
oauth:
|
||||||
|
qq:
|
||||||
|
appid: 'test'
|
||||||
|
secret: 'test123456'
|
||||||
|
wechat:
|
||||||
|
appid: 'test'
|
||||||
|
secret: 'test'
|
||||||
|
scope: 'snsapi_login'
|
||||||
|
base_url: 'https://api.weixin.qq.com'
|
||||||
aliyun_vod:
|
aliyun_vod:
|
||||||
access_key_id: 'test'
|
access_key_id: 'test'
|
||||||
access_key_secret: 'test'
|
access_key_secret: 'test'
|
||||||
base_url: 'http://vod.cn-shanghai.aliyuncs.com'
|
base_url: 'http://vod.cn-shanghai.aliyuncs.com'
|
||||||
cate_id: '-1'
|
cate_id: '-1'
|
||||||
callback_url: 'http://47.96.87.25:48080/api/callbacks/aliyun_vod.json'
|
callback_url: 'callback_url'
|
||||||
signature_key: 'test12345678'
|
signature_key: 'test12345678'
|
||||||
wechat:
|
|
||||||
appid: ''
|
|
||||||
secret: ''
|
|
||||||
weapp:
|
|
||||||
appid: 'wx2402d86a6b534f77'
|
|
||||||
secret: 'ae30b06b66cefbb11f0b05e94385ca87'
|
|
||||||
oauth:
|
|
||||||
qq:
|
|
||||||
appid: '101508858'
|
|
||||||
secret: '9fbd7cabe2baab33ddf9619de552db0a'
|
|
||||||
wechat:
|
|
||||||
appid: 'wx6b119e2d829c13fa'
|
|
||||||
secret: '0244ac003ea4d01fc768245839a97037'
|
|
||||||
scope: 'snsapi_login'
|
|
||||||
base_url: 'https://api.weixin.qq.com'
|
|
||||||
educoder:
|
educoder:
|
||||||
client_id: 'e9ce4d5ba1698d6f7d01d8ee2959776c7a6d743ebe94da2341e288fd2fbf60aa'
|
appid: 'test'
|
||||||
client_secret: '6ff84dd75eddd859c5bd0e7a791b58bc5ad1ba4fbb30bc9db37cb0baf9f33012'
|
secret: 'test123456'
|
||||||
base_url: 'https://test-data.educoder.net'
|
|
||||||
redirect_uri: 'https://testforgeplus.trustie.net/api/auth/educoder/callback'
|
|
||||||
mulan:
|
|
||||||
client_id: 'kK36Mg9pNFa2Car8lXuI'
|
|
||||||
client_secret: 'XMvb4DL7EaQ8G7FcUi64R08d2Bn3XfJf'
|
|
||||||
base_url: 'https://www.oschina.net'
|
|
||||||
redirect_uri: 'https://code.mulanos.cn/api/auth/mulanoss/callback'
|
|
||||||
github:
|
|
||||||
appid: 'e5bdd25c0a5e4d1fffdc'
|
|
||||||
secret: '88429c898522c60560250031721328180d6a3ccf'
|
|
||||||
gitee:
|
|
||||||
appid: '1cdbd111073abfaed4a6ab29d888d4583f646a8b4ad1eb5b60fbe03cdb2ac24f'
|
|
||||||
secret: 'd8d79434805c01f095d10d43432e880013cf95d7d6bf3ff4ccfe33a1157b654a'
|
|
||||||
# scope: 'snsapi_login'
|
|
||||||
# base_url: 'https://api.weixin.qq.com'
|
|
||||||
oauth_educoder:
|
|
||||||
access_key_secret: '0ea0c9926b0c80f285c393725ff65614'
|
|
||||||
callback_url_host: 'testforgeplus.trustie.net'
|
|
||||||
chain_base: "http://106.54.84.172:8000"
|
|
||||||
ci_db_server_trustie:
|
|
||||||
adapter: mysql2
|
|
||||||
host: "106.75.110.152"
|
|
||||||
port: "43306"
|
|
||||||
database: trustie_drone
|
|
||||||
pool: 5
|
|
||||||
username: "root"
|
|
||||||
password: "R?X:FLI6u,7;"
|
|
||||||
trustie_drone:
|
|
||||||
ip_num: "113.31.153.2"
|
|
||||||
secret: "Dron_123123'"
|
|
||||||
client_id: '2f445743-6d32-477c-963c-a31240c2927a'
|
|
||||||
admin_application_id: 184
|
|
||||||
admin_token: 'QcOBD2DMexbGXaYj9Toou7X13PEOHMtB'
|
|
||||||
email: 'drone@admin.com'
|
|
||||||
avatar_url: 'http://testgitea2.trustie.net/user/avatar/root/-1'
|
|
||||||
gitea:
|
gitea:
|
||||||
access_key_id: 'root'
|
access_key_id: 'root'
|
||||||
access_key_secret: '_Trustie_10010'
|
access_key_secret: '111111'
|
||||||
domain: 'https://testgitea2.trustie.net'
|
domain: 'http://8.130.51.51:3020'
|
||||||
base_url: '/api/v1'
|
base_url: '/api/v1'
|
||||||
accelerator:
|
accelerator:
|
||||||
access_key_id: 'testforgeroot'
|
access_key_id: ''
|
||||||
access_key_secret: 'testforge@root123'
|
access_key_secret: ''
|
||||||
access_admin_uid: 44619
|
access_admin_uid: 1
|
||||||
domain: 'https://mirror.trustie.net'
|
domain: 'http://8.130.51.51:3020'
|
||||||
base_url: '/api/v1'
|
base_url: '/api/v1'
|
||||||
notice:
|
|
||||||
platform: 'gitlink'
|
|
||||||
write_domain: 'http://106.75.31.211:58082'
|
|
||||||
read_domain: 'http://106.75.31.211:58080'
|
|
||||||
base_url: '/gns'
|
|
||||||
forum:
|
|
||||||
domain: 'https://forum.trustie.net/'
|
|
||||||
base_url: '/api'
|
|
||||||
trace:
|
|
||||||
domain: 'http://153.35.182.228:8010'
|
|
||||||
base_url: '/v1'
|
|
||||||
ci_db_server:
|
|
||||||
adapter: mysql2
|
|
||||||
database: drone
|
|
||||||
port: 43306
|
|
||||||
host: 106.75.110.152
|
|
||||||
username: root
|
|
||||||
password: "R?X:FLI6u,7;"
|
|
||||||
encoding: utf8
|
|
||||||
development:
|
|
||||||
<<: *defaults
|
|
||||||
#同步到trustie的token和url
|
|
||||||
sync_token: "34c82f51e0b699d9d16d70fd6497c9b1e4821d6ea3e872558a6537a091076b8e"
|
|
||||||
sync_url: "http://127.0.0.1:3000"
|
|
||||||
|
|
||||||
test:
|
notice:
|
||||||
<<: *defaults
|
platform: ''
|
||||||
|
write_domain: ''
|
||||||
|
read_domain: ''
|
||||||
|
base_url: ''
|
||||||
|
|
||||||
|
trace:
|
||||||
|
domain: ''
|
||||||
|
base_url: ''
|
||||||
|
|
||||||
|
# 区块链相关配置
|
||||||
|
blockchain:
|
||||||
|
api_url: 'blockchain service url'
|
||||||
|
|
||||||
production:
|
production:
|
||||||
<<: *defaults
|
<<: *default
|
||||||
educoder:
|
# 中间层地址
|
||||||
main_site: http://test-newweb.educoder.net
|
|
||||||
token: hriEn3UwXfJs3PmyXnSH
|
|
||||||
base_url: api/sources
|
|
||||||
#同步到trustie的token和url
|
|
||||||
sync_token: "34c82f51e0b699d9d16d70fd6497c9b1e4821d6ea3e872558a6537a091076b8e"
|
|
||||||
sync_url: "https://ucloudtest.trustie.net"
|
|
||||||
|
|
||||||
aliyun_vod:
|
cloud_bridge: ''
|
||||||
access_key_id: 'LTAI4kRL1DxQPdM2'
|
cloud_tomcat_php: ''
|
||||||
access_key_secret: 'yiz68rxE6imziBTITggWcOeSqjUeUu'
|
bridge_secret_key: ''
|
||||||
cate_id: '1000068305'
|
cookie_domain: '.gitlink.org.cn'
|
||||||
base_url: 'http://vod.cn-shanghai.aliyuncs.com'
|
|
||||||
callback_url: 'https://pre-newweb.educoder.net/api/callbacks/aliyun_vod.json'
|
attachment_folder: ''
|
||||||
signature_key: 'sdgdfDGH14DHD5g465123'
|
host_name: 'https://testeduplus2.gitlink.org.cn'
|
||||||
wechat:
|
old_edu_host: 'http://testbdweb.gitlink.org.cn'
|
||||||
appid: 'wx0955caba88bc37eb'
|
|
||||||
secret: '6cc80eef2e0b6f43fbf6c8b96b812858'
|
development:
|
||||||
gitea:
|
<<: *default
|
||||||
access_key_id: 'root'
|
|
||||||
access_key_secret: '_Trustie_10010'
|
cloud_bridge: ''
|
||||||
domain: 'https://testgitea2.trustie.net'
|
cloud_tomcat_php: ''
|
||||||
base_url: '/api/v1'
|
host_name: ''
|
||||||
accelerator:
|
old_edu_host: ''
|
||||||
access_key_id: 'testforgeroot'
|
test:
|
||||||
access_key_secret: 'testforge@root123'
|
<<: *default
|
||||||
access_admin_uid: 44619
|
cloud_tomcat_php: 'http://10.9.63.225'
|
||||||
domain: 'https://mirror.trustie.net'
|
host_name: 'https://testeduplus2.gitlink.org.cn'
|
||||||
base_url: '/api/v1'
|
old_edu_host: 'http://testbdweb.gitlink.org.cn'
|
||||||
notice:
|
|
||||||
platform: 'gitlink'
|
|
||||||
write_domain: 'http://106.75.31.211:58082'
|
|
||||||
read_domain: 'http://106.75.31.211:58080'
|
|
||||||
base_url: '/gns'
|
|
||||||
forum:
|
|
||||||
domain: 'https://forum.trustie.net/'
|
|
||||||
base_url: '/api'
|
|
||||||
trace:
|
|
||||||
domain: 'http://153.35.182.228:8010'
|
|
||||||
base_url: '/v1'
|
|
||||||
ci_db_server:
|
|
||||||
adapter: mysql2
|
|
||||||
database: drone
|
|
||||||
port: 43306
|
|
||||||
host: 106.75.110.152
|
|
||||||
username: root
|
|
||||||
password: "R?X:FLI6u,7;"
|
|
||||||
encoding: utf8
|
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
redis_config = Rails.application.config_for(:redis)
|
redis_config = Rails.application.config_for(:redis)
|
||||||
cache_url = redis_config["url"] || 'redis://localhost:6379'
|
cache_url = redis_config["url"] || 'redis://localhost:6379'
|
||||||
# $redis_cache = Redis.new(url: cache_url, db: 2)
|
$redis_cache = Redis.new(url: cache_url, db: 2)
|
Loading…
Reference in New Issue