1
0
mirror of https://github.com/projekteuler/projekteuler.git synced 2025-12-10 08:46:41 +01:00
Go to file
dependabot[bot] 3e44391794
Bump rails from 6.1.4.1 to 6.1.4.6
Bumps [rails](https://github.com/rails/rails) from 6.1.4.1 to 6.1.4.6.
- [Release notes](https://github.com/rails/rails/releases)
- [Commits](https://github.com/rails/rails/compare/v6.1.4.1...v6.1.4.6)

---
updated-dependencies:
- dependency-name: rails
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-14 15:00:39 +00:00
.github Update Ruby version and Node action for CI 2021-05-20 09:53:13 +02:00
app Update HTML for Bootstrap 5 2021-05-23 13:48:23 +02:00
bin Update files for Rails 6.1 2021-01-13 21:13:14 +01:00
config Fix uglifier config 2021-05-23 17:42:38 +02:00
db Prefill original title and content from projecteuler.net 2020-05-02 20:18:04 +02:00
lib Project setup 2014-11-30 16:38:53 +01:00
log Project setup 2014-11-30 16:38:53 +01:00
public Project setup 2014-11-30 16:38:53 +01:00
test Update HTML for Bootstrap 5 2021-05-23 13:48:23 +02:00
vendor/assets Update codemirror, stop using codemirror-rails gem 2019-09-22 20:42:48 +02:00
.gitignore Add authentication via GitHub 2019-02-04 16:06:09 +01:00
config.ru Update files for Rails 6.1 2021-01-13 21:13:14 +01:00
Gemfile Bump rails from 6.1.4.1 to 6.1.4.6 2022-02-14 15:00:39 +00:00
Gemfile.lock Bump rails from 6.1.4.1 to 6.1.4.6 2022-02-14 15:00:39 +00:00
LICENSE Create LICENSE 2019-02-02 20:05:33 +01:00
Rakefile Project setup 2014-11-30 16:38:53 +01:00
README.md Remove codacy, add puma 2021-05-19 22:13:32 +02:00

Projekt Euler

Build Status

This is the Ruby on Rails web-app powering projekteuler.de. It allows visitors to view and suggest German translations of the maths puzzles found on projecteuler.net.

Getting started

  1. Download this repository, e.g., with git clone.

  2. Make sure NodeJS is installed.

  3. Navigate inside the repository folder.

  4. Use bundler to install all required gems.

     $ bundle install
    
  5. Setup the database:

     $ bin/rails db:setup
    
  6. Start the server:

     $ bin/rails server
    
  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. 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.

Contributing

Do you have a suggestion for an improvement for the web app? Please create an issue for it.

Do you want to implement this improvement yourself? Follow these steps:

  1. Fork this repository on GitHub.
  2. Create a new branch for your improvement
  3. Implement your improvement, and create tests for it if applicable.
  4. Submit a pull request.

Deployment

  1. Make sure NodeJS is installed.
  2. Set up a MySQL database.
  3. Copy all files from this repository.
  4. Make sure the Rails environment is set to production.
  5. Set up the following environment variables:
    • RAILS_MASTER_KEY: The master key for decryption of the Rails credentials
    • DATABASE_NAME: The name of the MySQL database
    • DATABASE_USERNAME: The username 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_SECRET: The client secret of the GitHub OAuth App
  6. Install all required gems with bundle install.
  7. Load the database schema with bin/rails db:schema:load.
  8. Precompile all assets with bin/rails assets:precompile.
  9. Start the server, e.g., with bin/rails 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

This project is released under the MIT License.