尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證正在載入完整 README。 以下為已儲存的摘錄。
If you are not acquainted with Rails, it may help to go through the Getting Started with Rails tutorial for Rails 7.1.
If you wish to learn Ruby, try out the quickstart guide provided on their website, or if you are already acquainted with various programming languages, try the Learn X in Y minutes tutorial for Ruby.
This README mostly focuses on how to get started developing this project with Docker – in any environment with Docker installed you should be able to have the Glowfic server up and running.
sudo pacman -S git on Arch Linux檢視完整 README ↗If you are not acquainted with Rails, it may help to go through the Getting Started with Rails tutorial for Rails 7.1. If you wish to learn Ruby, try out the quickstart guide provided on their website, or if you are already acquainted with various programming languages, try the Learn X in Y minutes tutorial for Ruby.
This README mostly focuses on how to get started developing this project with Docker – in any environment with Docker installed you should be able to have the Glowfic server up and running.
Ensure you have Git installed:
sudo apt-get install git on Ubuntu
sudo pacman -S git on Arch Linux
Clone the repository
Enter a folder you want to clone the code to:
cd ~/Documents
Copy the code:
git clone https://github.com/glowfic-constellation/glowfic.git
(More specific details, such as if you have write permission and wish to use SSH instead of HTTPS, may be found on the GitHub site.)
If you haven't already, start by installing Docker and Docker Compose. If you are on Linux, make sure you have permission to run Docker as your Linux user.
Then run docker compose up within the glowfic directory.
This will set up a Postgres server, a Redis server, and a Glowfic app server which can talk to both of them.
There are some scripts for interacting with the Glowfic server in bin-docker.
You may want to add them to your PATH.
If you want, you can use direnv to ensure that they're on your path only when you're in the glowfic server.
In any case, you'll use the rake and rails commands in that directory to set up and start the server.
If you have added these scripts to your PATH you can leave off "bin-docker/" in any commands that follow.
Once you've taken these steps, you should be able to set up the contents of the glowfic database with some example data:
bin-docker/rake db:setupThis will set up the database and add some sample information – currently these are users, continuities, characters, galleries, icons and templates, and some posts and replies.
If you encounter an error involving the 'citext' extension:
docker compose up postgres &docker compose exec postgres psql, and then in the prompt that appears:CREATE EXTENSION IF NOT EXISTS citext;You will need to re-run bin-docker/rake db:migrate.
The server should have started itself when you ran docker compose up.
When it's started, go to http://localhost:3000/, where you should see a local copy of the Constellation.
To stop the server, either close the Terminal or use Ctrl+C to stop the process.
To run tests, go to the root of the directory (the 'glowfic' folder) and execute the command:
bin-docker/rake spec.This will go through the rspec tests.
If you encounter a PG::UndefinedTable error, mentioning that a relation doesn't exist, ensure you've also migrated your test database.
This can be done with:
docker compose run -e RAILS_ENV=test web rake db:migrateAfter this, you should be able to re-run the tests.
The code updates quite frequently. To make sure you're using and developing against the latest version, you'll need to download the updated copy, update the gems, and possibly even update your version of Ruby.
First, go to the glowfic folder and download the latest code:
git pullThen look at the Gemfile file, where it states the version of Ruby, to make sure it hasn't changed.
If it has changed, you can rebuild the glowfic image with:
docker compose stopdocker compose builddocker compose upNow, update the gems used for the project:
bin-docker/bundleAnd finally, run any database migrations that might have been added in the meantime:
bin-docker/rake db:migrateYou should now be able to execute the server, as before but now with the latest updates.
We use the following tools to make sure our code is clean and standards-ctompliant:
We run the following tools through github actions:
CodeClimate runs the following tools automatically:
Tools we do not currently use but are interested in evaluating:
We use BackstopJS to run regression tests on the UI + CSS.
Before each test, we automatically run script/before_backstop.rb to set up a consistent environment.
To perform a test:
# you may wish to recreate + reseed your database for consistent images:
# bin-docker/rails db:reset
# set the layout you want to validate
export LAYOUT=starrylight
# switch to the branch you want to use as a reference
git switch main
# create reference images and save them to backstop/
bin-docker/backstop reference $LAYOUT
# switch to the branch you want to test
git switch feature/update-css
# validate the layout against the reference images
bin-docker/backstop test $LAYOUT
# see a list of other commands you can run:
bin-docker/backstop --help
# view a report in your browser:
open backstop/reports/$LAYOUT/index.html
# promote the images to reference images if the changes are intentional:
bin-docker/backstop approve $LAYOUT
We make use of the famfamfam silk pack of icons, which is licensed under a Creative Commons Attribution license, including some icons that have been modified from the originals. These can be found in various locations, including in the dropdown menu in posts.
We use the free IPinfo Lite API to power our anti-bot geolocation system.