Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
icyleaf committed May 28, 2024
2 parents d578dc1 + 69bd892 commit 98670cd
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 16 deletions.
11 changes: 8 additions & 3 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
version: "2"
version: '2'
plugins:
bundler-audit:
enabled: true
rubocop:
enabled: true
eslint:
enabled: true
csslint:
enabled: true
rubocop:
markdownlint:
enabled: true
fixme:
enabled: true
channel: "rubocop-1-31-0"
6 changes: 3 additions & 3 deletions .devcontainer/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,17 @@ RUN git clone --quiet https://github.com/asdf-vm/asdf.git ${ASDF_DIR} && \

RUN asdf plugin add nodejs && \
asdf install nodejs $NODEJS_VERSION && \
asdf global nodejs $NODEJS_VERSION
asdf global nodejs ${NODEJS_VERSION}

# Enable YJIT *NEED* RUST 1.58.0+
# Enable YJIT *NEED* Rust 1.58.0+
RUN asdf plugin add rust && \
asdf install rust latest && \
asdf global rust latest

RUN export RUBY_CONFIGURE_OPTS="--enable-yjit" && \
asdf plugin add ruby && \
asdf install ruby $RUBY_VERSION && \
asdf global ruby $RUBY_VERSION
asdf global ruby ${RUBY_VERSION}

WORKDIR /workspace

Expand Down
7 changes: 4 additions & 3 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,12 @@

文件名 | 说明
---|---
`devcontainer.json` | VSCode devcontainer 配置文件
`Dockerfile.base` | 镜像核心,变更会自动推送到不同 registry 仓库
`Dockerfile` | 间接镜像,主要是节省编译时间
`devcontainer.json` | vscode devcontainer 配置文件
`Dockerfile.base` | 基础镜像
`Dockerfile` | 运行时镜像,主要是节省编译时间
`docker-compose.yml` | 项目服务依赖
`create-db-user.sql` | 用于初始化 Postgres 默认用户及权限
`extensions` | vscode 扩展相关服务

## 镜像

Expand Down
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Layout/LineLength:
Max: 120
Exclude:
- 'config/**/*.rb'
- 'spec/**/*.rb'
- 'lib/zealot/backup/manager.rb'

Metrics/MethodLength:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ARG BUILD_DATE
ARG VCS_REF
ARG TAG

ARG ZEALOT_VERSION="5.2.3"
ARG ZEALOT_VERSION="5.3.0"
ARG REPLACE_CHINA_MIRROR="true"
ARG ORIGINAL_REPO_URL="dl-cdn.alpinelinux.org"
ARG MIRROR_REPO_URL="mirrors.ustc.edu.cn"
Expand Down
2 changes: 1 addition & 1 deletion config/locales/zealot/api.en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ en:
```json
{
"version": "5.2.3",
"version": "5.3.0",
"vcs_ref": "effe99c25b79fd55d3e1959ea3af0bcb6b75ba1d",
"build_date": "2024-05-23T06:04:48.989Z"
}
Expand Down
2 changes: 1 addition & 1 deletion config/locales/zealot/api.zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ zh-CN:
```json
{
"version": "5.2.3",
"version": "5.3.0",
"vcs_ref": "effe99c25b79fd55d3e1959ea3af0bcb6b75ba1d",
"build_date": "2024-05-23T06:04:48.989Z"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zealot",
"version": "5.2.3",
"version": "5.3.0",
"private": true,
"license": "MIT",
"dependencies": {
Expand Down
2 changes: 2 additions & 0 deletions spec/factories/user.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

FactoryBot.define do
factory :user do
token { Digest::MD5.hexdigest(SecureRandom.uuid) }
Expand Down
2 changes: 2 additions & 0 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

# This file was generated by the `rails generate rspec:install` command. Conventionally, all
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
# The generated `.rspec` file contains `--require spec_helper` which will cause
Expand Down
4 changes: 2 additions & 2 deletions swagger/v1/swagger_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Zealot API",
"version": "v1.3",
"description": "This documentation doesn't provide a way to test our API. In order to facilitate testing, we recommend the following tools:\n\n- [cURL](https://curl.se/) (recommended, command-line)\n- [Bruno](https://www.usebruno.com/)\n- [Postman](https://www.postman.com/downloads/)\n- Your web browser, if you don't need to send headers or a request body\n\nOnce you have a working client, you can test that it works by making a GET request to {host}/version:\n\n```json\n{\n \"version\": \"5.2.3\",\n \"vcs_ref\": \"effe99c25b79fd55d3e1959ea3af0bcb6b75ba1d\",\n \"build_date\": \"2024-05-23T06:04:48.989Z\"\n}\n```\n\n## Authentication\n\nThis API only accepts one options for authentication: Personal access tokens.\nAll tokens are tied to a Zealot user and use the `token` query of the request.\n\nExample:\n\n```\nhttps://tryzealot.ews.im/api/users?token={token}\n```\n\n### Personal access tokens\n\nPersonal access tokens (PATs) can be found in from the [user settings](/docs/user-guide/user_settings).\n"
"description": "This documentation doesn't provide a way to test our API. In order to facilitate testing, we recommend the following tools:\n\n- [cURL](https://curl.se/) (recommended, command-line)\n- [Bruno](https://www.usebruno.com/)\n- [Postman](https://www.postman.com/downloads/)\n- Your web browser, if you don't need to send headers or a request body\n\nOnce you have a working client, you can test that it works by making a GET request to {host}/version:\n\n```json\n{\n \"version\": \"5.3.0\",\n \"vcs_ref\": \"effe99c25b79fd55d3e1959ea3af0bcb6b75ba1d\",\n \"build_date\": \"2024-05-23T06:04:48.989Z\"\n}\n```\n\n## Authentication\n\nThis API only accepts one options for authentication: Personal access tokens.\nAll tokens are tied to a Zealot user and use the `token` query of the request.\n\nExample:\n\n```\nhttps://tryzealot.ews.im/api/users?token={token}\n```\n\n### Personal access tokens\n\nPersonal access tokens (PATs) can be found in from the [user settings](/docs/user-guide/user_settings).\n"
},
"servers": [
{
Expand Down Expand Up @@ -3015,4 +3015,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion swagger/v1/swagger_zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"info": {
"title": "Zealot API",
"version": "v1.3",
"description": "文档可能提供或没有提供测试接口的工具,便于快速测试,你还可以使用如下工具:\n\n- [cURL](https://curl.se/) (推荐,命令行工具)\n- [Bruno](https://www.usebruno.com/)\n- [Postman](https://www.postman.com/downloads/)\n- 任意浏览器,如果你不需要设置 headers 或请求主体\n\n准备好工具,你可以通过 `GET` 请求 {host}/version 可看到 Zealot 版本信息:\n\n```json\n{\n \"version\": \"5.2.3\",\n \"vcs_ref\": \"effe99c25b79fd55d3e1959ea3af0bcb6b75ba1d\",\n \"build_date\": \"2024-05-23T06:04:48.989Z\"\n}\n```\n\n## 接口认证\n\n接口目前仅提供在用户密钥认证方式,参数是 `token`,请求接口时可在接口 query 或表单字段中传递此字段。\n\n```\nhttps://tryzealot.ews.im/api/users?token={token}\n```\n\n### 用户密钥\n\n用户密钥在[用户详情](/docs/user-guide/user_settings)最底部找到。\n"
"description": "文档可能提供或没有提供测试接口的工具,便于快速测试,你还可以使用如下工具:\n\n- [cURL](https://curl.se/) (推荐,命令行工具)\n- [Bruno](https://www.usebruno.com/)\n- [Postman](https://www.postman.com/downloads/)\n- 任意浏览器,如果你不需要设置 headers 或请求主体\n\n准备好工具,你可以通过 `GET` 请求 {host}/version 可看到 Zealot 版本信息:\n\n```json\n{\n \"version\": \"5.3.0\",\n \"vcs_ref\": \"effe99c25b79fd55d3e1959ea3af0bcb6b75ba1d\",\n \"build_date\": \"2024-05-23T06:04:48.989Z\"\n}\n```\n\n## 接口认证\n\n接口目前仅提供在用户密钥认证方式,参数是 `token`,请求接口时可在接口 query 或表单字段中传递此字段。\n\n```\nhttps://tryzealot.ews.im/api/users?token={token}\n```\n\n### 用户密钥\n\n用户密钥在[用户详情](/docs/user-guide/user_settings)最底部找到。\n"
},
"servers": [
{
Expand Down

0 comments on commit 98670cd

Please sign in to comment.