mirror of
https://github.com/projekteuler/projekteuler.git
synced 2025-12-10 08:46:41 +01:00
Update Node to 18
This commit is contained in:
parent
4037724380
commit
5838a2f9a1
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -17,9 +17,9 @@ jobs:
|
|||||||
ruby-version: ${{ matrix.ruby }}
|
ruby-version: ${{ matrix.ruby }}
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "14"
|
node-version: "18"
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: bundle install --without production
|
run: bundle install --without production
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
|
|||||||
25
README.md
25
README.md
@ -1,5 +1,4 @@
|
|||||||
Projekt Euler
|
# Projekt Euler
|
||||||
=============
|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
@ -7,13 +6,12 @@ This is the Ruby on Rails web-app powering [projekteuler.de](https://projekteule
|
|||||||
It allows visitors to view and suggest German translations of the maths puzzles found on [projecteuler.net](https://projecteuler.net).
|
It allows visitors to view and suggest German translations of the maths puzzles found on [projecteuler.net](https://projecteuler.net).
|
||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
1. Download this repository, e.g., with `git clone`.
|
1. Download this repository, e.g., with `git clone`.
|
||||||
2. Make sure [NodeJS](https://nodejs.org) is installed.
|
2. Make sure [NodeJS >= 18](https://nodejs.org) is installed.
|
||||||
3. Navigate inside the repository folder.
|
3. Navigate inside the repository folder.
|
||||||
4. Use bundler to install all required gems.
|
4. Use bundler to install all required gems.
|
||||||
|
|
||||||
$ bundle install
|
$ bundle install
|
||||||
|
|
||||||
5. Setup the database:
|
5. Setup the database:
|
||||||
|
|
||||||
$ bin/rails db:setup
|
$ bin/rails db:setup
|
||||||
@ -24,13 +22,15 @@ It allows visitors to view and suggest German translations of the maths puzzles
|
|||||||
|
|
||||||
7. Open `http://localhost:3000` in your browser. You should see the web app up and running!
|
7. Open `http://localhost:3000` in your browser. You should see the web app up and running!
|
||||||
8. Start playing with the web app. By default, the database will contain some users and translations. The user `admin` can review translations, while the user `translator` has submitted some translations.
|
8. Start playing with the web app. By default, the database will contain some users and translations. The user `admin` can review translations, while the user `translator` has submitted some translations.
|
||||||
You can login as any user by clicking the Login button and entering their name. This is simply a mock OAuth login; in production mode, GitHub is used for login.
|
You can login as any user by clicking the Login button and entering their name. This is simply a mock OAuth login; in production mode, GitHub is used for login.
|
||||||
9. If you ever want to reset the database to the original state, run `rails db:reset`.
|
9. If you ever want to reset the database to the original state, run `rails db:reset`.
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Do you have a suggestion for an improvement for the web app? Please create an [issue](https://github.com/projekteuler/projekteuler/issues) for it.
|
Do you have a suggestion for an improvement for the web app? Please create an [issue](https://github.com/projekteuler/projekteuler/issues) for it.
|
||||||
|
|
||||||
Do you want to implement this improvement yourself? Follow these steps:
|
Do you want to implement this improvement yourself? Follow these steps:
|
||||||
|
|
||||||
1. Fork this repository on GitHub.
|
1. Fork this repository on GitHub.
|
||||||
2. Create a new branch for your improvement
|
2. Create a new branch for your improvement
|
||||||
3. Implement your improvement, and create tests for it if applicable.
|
3. Implement your improvement, and create tests for it if applicable.
|
||||||
@ -43,12 +43,12 @@ Do you want to implement this improvement yourself? Follow these steps:
|
|||||||
3. Copy all files from this repository.
|
3. Copy all files from this repository.
|
||||||
4. Make sure the Rails environment is set to `production`.
|
4. Make sure the Rails environment is set to `production`.
|
||||||
5. Set up the following environment variables:
|
5. Set up the following environment variables:
|
||||||
* `RAILS_MASTER_KEY`: The master key for decryption of the Rails credentials
|
- `RAILS_MASTER_KEY`: The master key for decryption of the Rails credentials
|
||||||
* `DATABASE_NAME`: The name of the MySQL database
|
- `DATABASE_NAME`: The name of the MySQL database
|
||||||
* `DATABASE_USERNAME`: The username for the MYSQL database
|
- `DATABASE_USERNAME`: The username for the MYSQL database
|
||||||
* `DATABASE_PASSWORD`: The password for the MYSQL database
|
- `DATABASE_PASSWORD`: The password for the MYSQL database
|
||||||
* `GITHUB_CLIENT_ID`: The client ID of your GitHub OAuth App (that you will need to create)
|
- `GITHUB_CLIENT_ID`: The client ID of your GitHub OAuth App (that you will need to create)
|
||||||
* `GITHUB_CLIENT_SECRET`: The client secret of the GitHub OAuth App
|
- `GITHUB_CLIENT_SECRET`: The client secret of the GitHub OAuth App
|
||||||
6. Install all required gems with `bundle install`.
|
6. Install all required gems with `bundle install`.
|
||||||
7. Load the database schema with `bin/rails db:schema:load`.
|
7. Load the database schema with `bin/rails db:schema:load`.
|
||||||
8. Precompile all assets with `bin/rails assets:precompile`.
|
8. Precompile all assets with `bin/rails assets:precompile`.
|
||||||
@ -57,4 +57,5 @@ Do you want to implement this improvement yourself? Follow these steps:
|
|||||||
Anytime you update the files, you should run `bin/rails db:migrate`, `bin/rails log:clear tmp:clear`, `bin/rails assets:precompile` and then restart the server.
|
Anytime you update the files, you should run `bin/rails db:migrate`, `bin/rails log:clear tmp:clear`, `bin/rails assets:precompile` and then restart the server.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is released under the [MIT License](https://opensource.org/licenses/MIT).
|
This project is released under the [MIT License](https://opensource.org/licenses/MIT).
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user