| @@ -1,6 +1,17 @@ | |||
| # Changelog | |||
| ## [v3.0.0](https://github.com/go-gitea/gitea/releases/tag/v1.13.1) - 2020-12-29 | |||
| ## [v3.0.1](https://forgeplus.trustie.net/projects/jasder/forgeplus/releases) - 2021-03-19 | |||
| * BUGFIXES | |||
| * Fix pull reqeust模块中用户头像显示问题 | |||
| * Fix 解决issue模块中,指派用户的问题 | |||
| * Fix 解决合并请求失败的后显示message信息不正确 | |||
| * Fix 代码目录页面,readme文件提供单独的api | |||
| * ENHANCEMENTS | |||
| * 重构项目详情页面 | |||
| ## [v3.0.0](https://forgeplus.trustie.net/projects/jasder/forgeplus/releases) - 2020-12-29 | |||
| * BUGFIXES | |||
| * Fix pull reqeust的访问权限问题 (#14156) (#14171) | |||
| @@ -11,13 +11,32 @@ Trustie (确实)是一个以大众化协同开发、开放式资源共享、 | |||
| ## 部署 | |||
| ### 1. 安装依赖包 | |||
| ### Depends Versions | |||
| * Ruby 2.4.5 | |||
| * Rails ~> 5.2 | |||
| * MySql ~> 5.6 | |||
| * Redis 5+ | |||
| * NodeJS > 13.0.0 | |||
| ### Steps | |||
| #### 1. 克隆稳定版本 | |||
| ``` | |||
| git clone -b standalone https://git.trustie.net/jasder/forgeplus.git | |||
| ``` | |||
| #### 2. 安装依赖包 | |||
| ```bash | |||
| bundle install | |||
| cd forgeplus && bundle install | |||
| ``` | |||
| ### 2. 配置初始化文件 | |||
| #### 3. 配置初始化文件 | |||
| 进入项目根目录执行一下命令: | |||
| ```bash | |||
| @@ -27,10 +46,24 @@ touch config/redis.yml | |||
| touch config/elasticsearch.yml | |||
| ``` | |||
| ### 3. 配置gitea服务(可选) | |||
| #### 4. 配置数据库 | |||
| 数据库配置信息请查看/config/database.yml文件, | |||
| 项目默认采用mysql数据库, 如需更改,请自行修改配置信息, | |||
| 默认配置如下: | |||
| ```bash | |||
| default: &default | |||
| adapter: mysql2 | |||
| host: 127.0.0.1 | |||
| encoding: utf8 | |||
| username: root | |||
| password: 123456 | |||
| ``` | |||
| #### 5. 配置gitea服务(可选) | |||
| **如需要部署自己的gitea平台,请参考gitea官方平台:https://docs.gitea.io/zh-cn/install-from-binary/** | |||
| **因目前gitea平台api受限,暂时推荐从forge平台获取gitea部署文件进行部署:https://forgeplus.trustie.net/projects/jasder/gitea-binary | |||
| **因目前gitea平台api受限,暂时推荐从forge平台获取gitea部署文件进行部署:https://forgeplus.trustie.net/projects/Trustie/gitea-binary** | |||
| #### 配置gitea服务步骤 | |||
| 1. 部署gitea服务,并注册root账户 | |||
| @@ -44,75 +77,89 @@ gitea: | |||
| base_url: '/api/v1' | |||
| ``` | |||
| ### 4. 安装redis环境 | |||
| #### 6. 安装redis环境 | |||
| **请自行搜索各平台如何安装部署redis环境** | |||
| ### 5. 创建数据库 | |||
| #### 7. 创建数据库 | |||
| **开发环境为development, 生成环境为production** | |||
| ```bash | |||
| rails db:create | |||
| rails db:create RAILS_ENV=development | |||
| ``` | |||
| ### 6. 导入数据表结构 | |||
| #### 8. 导入数据表结构 | |||
| ```bash | |||
| bundle exec rake sync_table_structure:import_csv | |||
| ``` | |||
| ### 7. 执行migrate迁移文件 | |||
| #### 9. 执行migrate迁移文件 | |||
| **开发环境为development, 生成环境为production** | |||
| ```bash | |||
| rails db:migrate RAILS_ENV=development | |||
| ``` | |||
| ### 8. 启动redis(此处已mac系统为例) | |||
| #### 10. clone前端代码 | |||
| **将前端代码克隆到public/react目录下,目录结构应该是: public/react/build** | |||
| ```bash | |||
| git clone -b standalone https://git.trustie.net/jasder/build.git | |||
| ``` | |||
| #### 11. 启动redis(此处已mac系统为例) | |||
| ```bash | |||
| redis-server& | |||
| ``` | |||
| ### 9. 启动sidekiq | |||
| #### 12. 启动sidekiq | |||
| **开发环境为development, 生成环境为production** | |||
| ```bash | |||
| bundle exec sidekiq -C config/sidekiq.yml -e production -d | |||
| ``` | |||
| ### 10. 启动rails服务 | |||
| #### 13. 启动rails服务 | |||
| ```bash | |||
| rails s | |||
| ``` | |||
| ### 11. 浏览器访问 | |||
| #### 14. 浏览器访问 | |||
| 在浏览器中输入如下地址访问: | |||
| ```bash | |||
| http://localhost:3000/ | |||
| ``` | |||
| #### 15. 浏览器访问 | |||
| 在浏览器中输入如下地址访问: | |||
| ```bash | |||
| http://localhost:3000/ | |||
| ``` | |||
| #### 15. 其他说明 | |||
| 通过页面注册都第一个用户为平台管理员用户 | |||
| ## 页面展示 | |||
| - 代码库 | |||
|  | |||
|  | |||
| - 任务管理 | |||
|  | |||
|  | |||
| - 任务查看 | |||
|  | |||
|  | |||
| - 任务指派 | |||
|  | |||
|  | |||
| - 里程碑 | |||
|  | |||
|  | |||
| ### API | |||
| - [API](api_document.md) | |||
| - [API文档](https://forgeplus.trustie.net/docs/api) | |||
| - [API](showdoc.com.cn) | |||
| 账号:forgeplus@admin.com 密码:forge123 | |||
| @@ -4,7 +4,7 @@ class Projects::ProjectUnitsController < Projects::BaseController | |||
| end | |||
| def create | |||
| if current_user.admin? || @project.owner?(current_user) | |||
| if current_user.admin? || @project.manager?(current_user) | |||
| ActiveRecord::Base.transaction do | |||
| ProjectUnit.update_by_unit_types!(@project, unit_types) | |||
| render_ok | |||
| @@ -17,7 +17,7 @@ class ProjectsController < ApplicationController | |||
| menu.append(menu_hash_by_name("devops")) if @project.has_menu_permission("devops") | |||
| menu.append(menu_hash_by_name("versions")) if @project.has_menu_permission("versions") | |||
| menu.append(menu_hash_by_name("activity")) | |||
| menu.append(menu_hash_by_name("setting")) if current_user.admin? || @project.owner?(current_user) | |||
| menu.append(menu_hash_by_name("setting")) if current_user.admin? || @project.manager?(current_user) | |||
| render json: menu | |||
| end | |||
| @@ -118,7 +118,7 @@ class ProjectsController < ApplicationController | |||
| end | |||
| def destroy | |||
| if current_user.admin? || @project.owner?(current_user) | |||
| if current_user.admin? || @project.manager?(current_user) | |||
| ActiveRecord::Base.transaction do | |||
| Gitea::Repository::DeleteService.new(@project.owner, @project.identifier).call | |||
| @project.destroy! | |||
| @@ -1,28 +1,57 @@ | |||
| class SettingsController < ApplicationController | |||
| def show | |||
| @old_projects_url = nil | |||
| @old_projects_url = "https://www.trustie.net/users/#{current_user.try(:login)}/projects" if User.current.logged? | |||
| get_add_menu | |||
| get_common_menu | |||
| get_personal_menu | |||
| @add = Site.add.select(:id, :name, :url, :key) | |||
| @personal = [] | |||
| if User.current.logged? | |||
| Site.personal.select(:id, :name, :url, :key).to_a.map(&:serializable_hash).each do |site| | |||
| end | |||
| private | |||
| def get_add_menu | |||
| @add = [] | |||
| Site.add.select(:id, :name, :url, :key).to_a.map(&:serializable_hash).each do |site| | |||
| hash = {} | |||
| site.each {|k, v| | |||
| hash.merge!("#{k}": v.to_s.include?("current_user") ? v.split('current_user').join(current_user&.login) : v) | |||
| hash.merge!("#{k}": get_site_url(k, v)) | |||
| } | |||
| @personal << hash | |||
| @add << hash | |||
| end | |||
| end | |||
| @common = [] | |||
| Site.common.select(:id, :name, :url, :key).to_a.map(&:serializable_hash).each do |site| | |||
| next if site["url"].to_s.include?("current_user") && !User.current.logged? | |||
| hash = {} | |||
| site.each {|k, v| | |||
| hash.merge!("#{k}": v.to_s.include?("current_user") ? v.split('current_user').join(current_user&.login) : v) | |||
| } | |||
| @common << hash | |||
| def get_common_menu | |||
| @common = {} | |||
| Site.common.select(:url, :key).each do |site| | |||
| next if site["url"].to_s.include?("current_user") && !User.current.logged? | |||
| @common.merge!("#{site["key"]}": append_http(reset_site_url(site["url"]))) | |||
| end | |||
| end | |||
| def get_personal_menu | |||
| @personal = [] | |||
| if User.current.logged? | |||
| Site.personal.select(:id, :name, :url, :key).to_a.map(&:serializable_hash).each do |site| | |||
| hash = {} | |||
| site.each {|k, v| | |||
| hash.merge!("#{k}": get_site_url(k, v)) | |||
| } | |||
| @personal << hash | |||
| end | |||
| end | |||
| end | |||
| def get_site_url(key, value) | |||
| key.to_s === "url" ? append_http(reset_site_url(value)) : reset_site_url(value) | |||
| end | |||
| def reset_site_url(url) | |||
| return url unless url.to_s.include?("current_user") | |||
| split_arr = url.split('current_user') | |||
| split_arr.length > 1 ? split_arr.join(current_user&.login) : (split_arr << current_user&.login).join('') | |||
| end | |||
| def append_http(url) | |||
| url.to_s.start_with?("http") ? url : [request.protocol, request.host_with_port, url].join('') | |||
| end | |||
| end | |||
| end | |||
| @@ -28,7 +28,7 @@ module RepositoriesHelper | |||
| def render_commit_author(author_json) | |||
| return nil if author_json.blank? | |||
| find_user_by_login author_json['login'] | |||
| find_user_by_login author_json['name'] | |||
| end | |||
| def readme_render_decode64_content(str, path) | |||
| @@ -37,6 +37,8 @@ | |||
| # rep_identifier :string(255) | |||
| # project_category_id :integer | |||
| # project_language_id :integer | |||
| # license_id :integer | |||
| # ignore_id :integer | |||
| # praises_count :integer default("0") | |||
| # watchers_count :integer default("0") | |||
| # issues_count :integer default("0") | |||
| @@ -50,8 +52,6 @@ | |||
| # open_devops_count :integer default("0") | |||
| # recommend :boolean default("0") | |||
| # platform :integer default("0") | |||
| # license_id :integer | |||
| # ignore_id :integer | |||
| # default_branch :string(255) default("master") | |||
| # website :string(255) | |||
| # | |||
| @@ -68,8 +68,7 @@ | |||
| # index_projects_on_rgt (rgt) | |||
| # index_projects_on_status (status) | |||
| # index_projects_on_updated_on (updated_on) | |||
| # | |||
| # | |||
| class Project < ApplicationRecord | |||
| include Matchable | |||
| @@ -99,7 +98,7 @@ class Project < ApplicationRecord | |||
| has_one :project_educoder, dependent: :destroy | |||
| has_one :project_score, dependent: :destroy | |||
| has_many :project_infos, :dependent => :destroy | |||
| has_many :project_infos, :dependent => :destroy | |||
| has_one :repository, dependent: :destroy | |||
| has_many :pull_requests, dependent: :destroy | |||
| has_many :issue_tags, -> { order("issue_tags.created_at DESC") }, dependent: :destroy | |||
| @@ -17,7 +17,56 @@ class Site < ApplicationRecord | |||
| # common: 普通链接 | |||
| enum site_type: { add: 0, personal: 1, common: 2 } | |||
| def self.set_default | |||
| def self.set_default_menu | |||
| set_add_menu! | |||
| set_personal_menu! | |||
| set_common_menu! | |||
| end | |||
| private | |||
| def self.set_add_menu! | |||
| adds= [ | |||
| {name: '新建镜像项目', key: 'add_mirror_project', url: '/projects/mirror/new'}, | |||
| {name: '新建托管项目', key: 'add_common', url: '/projects/deposit/new'}, | |||
| {name: '新建组织', key: 'add_r', url: '/organize/new'}] | |||
| adds.each { |ele| | |||
| Site.find_or_create_by(key: ele[:key]) do |site| | |||
| site.name = ele[:name] | |||
| site.url = ele[:url] | |||
| site.site_type = Site.site_types[:add] | |||
| end | |||
| } | |||
| end | |||
| def self.set_personal_menu! | |||
| personals = [ | |||
| {name: '个人中心', key: 'my_page', url: '/users/current_user'}, | |||
| {name: '我的组织', key: 'my_organizes', url: '/users/current_user/organizes'} | |||
| ] | |||
| personals.each { |ele| | |||
| Site.find_or_create_by(key: ele[:key]) do |site| | |||
| site.name = ele[:name] | |||
| site.url = ele[:url] | |||
| site.site_type = Site.site_types[:personal] | |||
| end | |||
| } | |||
| end | |||
| def self.set_common_menu! | |||
| commons = [ | |||
| {name: '通知', key: 'notice', url: '/users/current_user/user_messages'}, | |||
| {name: '找回密码', key: 'lost_password', url: '/account/lost_password'}, | |||
| {name: '注册', key: 'register', url: '/login?login=false'} | |||
| ] | |||
| commons.each { |ele| | |||
| Site.find_or_create_by(key: ele[:key]) do |site| | |||
| site.name = ele[:name] | |||
| site.url = ele[:url] | |||
| site.site_type = Site.site_types[:common] | |||
| end | |||
| } | |||
| end | |||
| end | |||
| @@ -1,12 +1,13 @@ | |||
| # Get a list of all commits from a repository | |||
| class Gitea::Versions::ListService < Gitea::ClientService | |||
| attr_reader :token, :user_name, :repo | |||
| attr_reader :token, :user_name, :repo, :args | |||
| # sha: SHA or branch to start listing commits from (usually 'master') | |||
| def initialize(token, user_name, repo) | |||
| def initialize(token, user_name, repo, args={}) | |||
| @token = token | |||
| @user_name = user_name | |||
| @repo = repo | |||
| @args = args | |||
| end | |||
| def call | |||
| @@ -16,7 +17,7 @@ class Gitea::Versions::ListService < Gitea::ClientService | |||
| private | |||
| def params | |||
| Hash.new.merge(token: token) | |||
| args.merge(token: token) | |||
| end | |||
| def url | |||
| @@ -37,7 +37,7 @@ class Repositories::DetailService < ApplicationService | |||
| end | |||
| def release_suitable | |||
| releases = Gitea::Versions::ListService.call(@owner.gitea_token, @owner.try(:login), @repo.try(:identifier)) | |||
| releases = Gitea::Versions::ListService.call(@owner.gitea_token, @owner.try(:login), @repo.try(:identifier), {page: 1, limit: 1}) | |||
| releases.is_a?(Hash) && releases[:status] == -1 ? [] : releases | |||
| end | |||
| @@ -1,5 +1,6 @@ | |||
| json.author do | |||
| if @project.forge? | |||
| json.id user.id | |||
| json.login user.login | |||
| json.type user&.type | |||
| json.name user.real_name | |||
| @@ -26,9 +26,9 @@ if @project.forge? | |||
| end | |||
| json.author do | |||
| json.partial! 'commit_author', user: render_commit_author(commit['author']) | |||
| json.partial! 'commit_author', user: render_commit_author(commit['commit']['author']), name: commit['commit']['author']['name'] | |||
| end | |||
| json.committer do | |||
| json.partial! 'commit_author', user: render_commit_author(commit['committer']) | |||
| json.partial! 'commit_author', user: render_commit_author(commit['commit']['committer']), name: commit['commit']['committer']['name'] | |||
| end | |||
| end | |||
| @@ -4,5 +4,8 @@ if user | |||
| json.name user.real_name | |||
| json.image_url url_to_avatar(user) | |||
| else | |||
| json.nil! | |||
| json.id nil | |||
| json.login name | |||
| json.name name | |||
| json.image_url File.join("avatars/User","b") | |||
| end | |||
| @@ -5,6 +5,7 @@ else | |||
| json.total_count @hash_commit[:total_count] | |||
| json.commits do | |||
| json.array! @hash_commit[:body] do |commit| | |||
| json.commit1 commit | |||
| commiter = commit['committer'] | |||
| if commiter.present? | |||
| commit_user_id = commiter['id'] | |||
| @@ -17,7 +18,13 @@ else | |||
| if forge_user | |||
| json.partial! 'author', user: forge_user | |||
| else | |||
| json.author nil | |||
| json.author do | |||
| json.id nil | |||
| json.login commit['commit']['author']['name'] | |||
| json.type nil | |||
| json.name commit['commit']['author']['name'] | |||
| json.image_url File.join("avatars/User","b") | |||
| end | |||
| end | |||
| end | |||
| end | |||
| @@ -61,7 +61,7 @@ json.release_versions do | |||
| json.tag_name release["tag_name"] | |||
| json.created_at format_time(release["created_at"].to_time) | |||
| end | |||
| json.total_count @result[:release].size | |||
| json.total_count @repository&.version_releases.size | |||
| end | |||
| json.branches do | |||
| json.list @result[:branch].each do |branch| | |||
| @@ -93,3 +93,5 @@ json.contributors do | |||
| json.total_count total_count | |||
| end | |||
| json.languages @result[:language] | |||
| json.partial! 'author', locals: { user: @project.owner } | |||
| @@ -45,18 +45,15 @@ json.setting do | |||
| json.main_site current_laboratory.main_site? | |||
| json.new_course default_course_links | |||
| json.old_projects_url @old_projects_url | |||
| json.add do | |||
| json.array! @add, :name, :url, :key | |||
| json.array! @add | |||
| end | |||
| json.personal do | |||
| json.array! @personal | |||
| end | |||
| json.common do | |||
| json.array! @common | |||
| end | |||
| json.common @common | |||
| end | |||
| @@ -11,6 +11,7 @@ | |||
| # | |||
| default: &default | |||
| adapter: mysql2 | |||
| host: 127.0.0.1 | |||
| encoding: utf8 | |||
| pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | |||
| username: root | |||
| @@ -51,5 +52,3 @@ test: | |||
| production: | |||
| <<: *default | |||
| database: forge_production | |||
| username: educoderplus | |||
| password: <%= ENV['EDUCODERPLUS_DATABASE_PASSWORD'] %> | |||
| @@ -8,5 +8,7 @@ class CreateSites < ActiveRecord::Migration[5.2] | |||
| t.timestamps | |||
| end | |||
| Site.set_default_menu | |||
| end | |||
| end | |||
| @@ -16,13 +16,18 @@ | |||
| ## Steps | |||
| ### 1. 安装依赖包 | |||
| ### 1. 克隆稳定版本仓库 | |||
| ``` | |||
| git clone -b standalone https://git.trustie.net/jasder/forgeplus.git | |||
| ``` | |||
| ### 2. 安装依赖包 | |||
| ```bash | |||
| bundle install | |||
| ``` | |||
| ### 2. 配置初始化文件 | |||
| ### 3. 配置初始化文件 | |||
| 进入项目根目录执行一下命令: | |||
| ```bash | |||
| @@ -32,10 +37,24 @@ touch config/redis.yml | |||
| touch config/elasticsearch.yml | |||
| ``` | |||
| ### 3. 配置gitea服务(可选) | |||
| ### 4. 配置数据库 | |||
| 数据库配置信息请查看/config/database.yml文件, | |||
| 项目默认采用mysql数据库, 如需更改,请自行修改配置信息, | |||
| 默认配置如下: | |||
| ```bash | |||
| default: &default | |||
| adapter: mysql2 | |||
| host: 127.0.0.1 | |||
| encoding: utf8 | |||
| username: root | |||
| password: 123456 | |||
| ``` | |||
| ### 4. 配置gitea服务(可选) | |||
| **如需要部署自己的gitea平台,请参考gitea官方平台:https://docs.gitea.io/zh-cn/install-from-binary/** | |||
| **因目前gitea平台api受限,暂时推荐从forge平台获取gitea部署文件进行部署:https://forgeplus.trustie.net/projects/jasder/gitea-binary** | |||
| **因目前gitea平台api受限,暂时推荐从forge平台获取gitea部署文件进行部署:https://forgeplus.trustie.net/projects/Trustie/gitea-binary** | |||
| #### 配置gitea服务步骤 | |||
| 1. 部署gitea服务,并注册root账户 | |||
| @@ -49,51 +68,51 @@ gitea: | |||
| base_url: '/api/v1' | |||
| ``` | |||
| ### 4. 安装redis环境 | |||
| ### 5. 安装redis环境 | |||
| **请自行搜索各平台如何安装部署redis环境** | |||
| ### 5. 创建数据库 | |||
| ### 6. 创建数据库 | |||
| ```bash | |||
| rails db:create | |||
| ``` | |||
| ### 6. 导入数据表结构 | |||
| ### 7. 导入数据表结构 | |||
| ```bash | |||
| bundle exec rake sync_table_structure:import_csv | |||
| ``` | |||
| ### 7. 执行migrate迁移文件 | |||
| ### 8. 执行migrate迁移文件 | |||
| **开发环境为development, 生成环境为production** | |||
| ```bash | |||
| rails db:migrate RAILS_ENV=development | |||
| ``` | |||
| ### 8. clone前端代码 | |||
| ### 9. clone前端代码 | |||
| **将前端代码克隆到public/react目录下,目录结构应该是: public/react/build** | |||
| ```bash | |||
| git clone -b dev_trustie https://git.trustie.net/jasder/build.git | |||
| git clone -b standalone https://git.trustie.net/jasder/build.git | |||
| ``` | |||
| ### 9. 启动redis(此处已mac系统为例) | |||
| ### 10. 启动redis(此处已mac系统为例) | |||
| ```bash | |||
| redis-server& | |||
| ``` | |||
| ### 10. 启动sidekiq | |||
| ### 11. 启动sidekiq | |||
| **开发环境为development, 生成环境为production** | |||
| ```bash | |||
| bundle exec sidekiq -C config/sidekiq.yml -e production -d | |||
| ``` | |||
| ### 1`. 启动rails服务 | |||
| ### 12. 启动rails服务 | |||
| ```bash | |||
| rails s | |||
| ``` | |||
| ### 12. 浏览器访问 | |||
| ### 13. 浏览器访问 | |||
| 在浏览器中输入如下地址访问: | |||
| ```bash | |||
| http://localhost:3000/ | |||
| @@ -0,0 +1,135 @@ | |||
| forgeplus | |||
| ├── app(应用目录) | |||
| │ ├── assets(应用静态资源目录) | |||
| │ ├── channels(actioncable的频道目录) | |||
| │ │ └── application_cable(父类) | |||
| │ ├── constraint | |||
| │ ├── controllers(应用控制器目录) | |||
| │ │ ├── admins(后台管理控制器) | |||
| │ │ ├── callbacks | |||
| │ │ ├── ci(工作流相关控制器) | |||
| │ │ ├── concerns(可反复使用的抽象方法) | |||
| │ │ │ ├── admins(对应后台管理模块) | |||
| │ │ │ ├── base(父类) | |||
| │ │ │ ├── ci(对应工作流模块) | |||
| │ │ │ └── repository(对应仓库模块) | |||
| │ │ ├── oauth(oauth验证控制器) | |||
| │ │ ├── organizations(组织模块控制器) | |||
| │ │ ├── projects(项目模块控制器) | |||
| │ │ └── users(用户模块控制器) | |||
| │ ├── decorators | |||
| │ ├── docs(api文档插件) | |||
| │ ├── forms(表单验证) | |||
| │ │ ├── ci(工作流模块) | |||
| │ │ ├── contents(仓库文件模块) | |||
| │ │ ├── gitea(gitea模块) | |||
| │ │ │ └── user(gitea用户模块) | |||
| │ │ ├── project_packages(竞标模块) | |||
| │ │ ├── projects(项目模块) | |||
| │ │ ├── protected_branches(保护分支模块) | |||
| │ │ ├── repositories(仓库模块) | |||
| │ │ ├── users(用户模块) | |||
| │ │ └── validate(公共模块) | |||
| │ ├── helpers(一些控制器帮助方法) | |||
| │ ├── imports(导入文件处理) | |||
| │ ├── interactors(流程处理器,和service类似,比如注册,创建项目) | |||
| │ ├── jobs(异步任务) | |||
| │ ├── libs(应用扩展目录) | |||
| │ │ ├── ci(工作流模块) | |||
| │ │ │ └── drone | |||
| │ │ ├── gitea | |||
| │ │ ├── limit_forbid_control | |||
| │ │ ├── omniauth | |||
| │ │ │ └── strategies | |||
| │ │ ├── trustie | |||
| │ │ ├── util | |||
| │ │ └── wechat_oauth | |||
| │ ├── mailers(用来存放实现发送邮件功能的文件) | |||
| │ ├── models(模型目录) | |||
| │ ├── queries(模型查询的封装) | |||
| │ │ ├── admins(后台管理模块) | |||
| │ │ ├── ci(工作流模块) | |||
| │ │ ├── projects(项目模块) | |||
| │ │ ├── statistic(统计模块) | |||
| │ │ └── users(用户模块) | |||
| │ ├── services(业务逻辑的封装) | |||
| │ │ ├── admins(后台管理模块) | |||
| │ │ ├── branches(仓库分支模块) | |||
| │ │ ├── concerns(可反复使用的抽象方法) | |||
| │ │ ├── educoder(educoder仓库模块) | |||
| │ │ │ └── repository(仓库) | |||
| │ │ │ ├── commits(提交) | |||
| │ │ │ └── entries(文件) | |||
| │ │ ├── gitea(gitea接口封装) | |||
| │ │ │ ├── activity(项目统计模块) | |||
| │ │ │ ├── chain | |||
| │ │ │ ├── hooks(webhook模块) | |||
| │ │ │ ├── labels | |||
| │ │ │ ├── oauth2 | |||
| │ │ │ ├── organization(组织模块) | |||
| │ │ │ │ ├── organization_user(组织成员) | |||
| │ │ │ │ ├── repository(组织仓库) | |||
| │ │ │ │ ├── team(组织团队) | |||
| │ │ │ │ ├── team_project(组织团队项目) | |||
| │ │ │ │ └── team_user(组织团队成员) | |||
| │ │ │ ├── pull_request(合并请求模块) | |||
| │ │ │ ├── repository(仓库模块) | |||
| │ │ │ │ ├── branches(分支) | |||
| │ │ │ │ ├── commits(提交) | |||
| │ │ │ │ ├── contributors(贡献数) | |||
| │ │ │ │ ├── entries(文件) | |||
| │ │ │ │ ├── files(所有文件) | |||
| │ │ │ │ ├── languages(语言) | |||
| │ │ │ │ ├── members(仓库成员) | |||
| │ │ │ │ ├── protected_branches(分支保护) | |||
| │ │ │ │ ├── readme | |||
| │ │ │ │ └── tags(标签) | |||
| │ │ │ ├── user(用户) | |||
| │ │ │ └── versions(发行版) | |||
| │ │ ├── issues(易修) | |||
| │ │ ├── libraries | |||
| │ │ ├── oauth | |||
| │ │ ├── organizations(组织) | |||
| │ │ │ └── teams(组织团队) | |||
| │ │ ├── private_messages | |||
| │ │ ├── project_packages(项目竞标) | |||
| │ │ ├── projects(项目) | |||
| │ │ ├── protected_branches(分支保护) | |||
| │ │ ├── pull_requests(合并请求) | |||
| │ │ ├── repositories(仓库) | |||
| │ │ └── users(用户) | |||
| │ ├── tasks(可执行任务目录) | |||
| │ └── views(控制器对应视图文件目录) | |||
| ├── bin(存放运行程序的 rails 脚本,以及其他用来部署或运行程序的脚本) | |||
| ├── cable(actioncable配置目录) | |||
| ├── config(配置的文件目录) | |||
| │ ├── admins(后台管理配置) | |||
| │ ├── environments(rails程序的不同运行环境的配置) | |||
| │ ├── harmonious_dictionary | |||
| │ ├── initializers(加载完gem后会自动加载此目录) | |||
| │ └── locales(i18n语言设置目录) | |||
| ├── db(存放当前数据库的模式,以及数据库迁移文件) | |||
| │ └── migrate(用来存放数据库的迁移文件) | |||
| ├── lib(程序的扩展模块) | |||
| │ ├── assets(通常是放置我们使用的插件中用到的assets) | |||
| │ ├── educoder | |||
| │ └── tasks(可执行任务目录) | |||
| ├── log(日志目录) | |||
| ├── public(唯一对外开放的文件夹,其他人可以直接访问这个目录中的东西) | |||
| │ ├── assets(编译好的静态资源目录) | |||
| │ ├── docs(api文档生成目录) | |||
| │ ├── echart(图表目录) | |||
| │ ├── editormd(富文本编辑器静态资源目录) | |||
| │ ├── fonts(字体目录) | |||
| │ ├── images(图片目录) | |||
| │ ├── javascripts(脚本目录) | |||
| │ ├── options(仓库许可证、gitignore、readme文件目录) | |||
| │ ├── react | |||
| │ │ └── build(前端编译好的文件目录) | |||
| │ └── stylesheets(层叠样式表目录) | |||
| ├── spec(spec测试目录) | |||
| ├── test(用于存放单元测试、功能测试及整合测试文件等测试文件) | |||
| ├── tmp(临时文件,例如缓存,PID,会话文件) | |||
| ├── vendor(存放第三方代码。经常用来放第三方 gem) | |||
| ├── └── assets(通常是放置一些我们从别的地方借用的assets) | |||