Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: CI
on:
pull_request:
push:
branches: [main]
branches:
- main
- development

jobs:
build:
Expand All @@ -23,7 +25,9 @@ jobs:
run: npm run format:check
- name: Vale
run: |
sudo apt update
sudo apt install snapd
sudo snap install vale --edge
curl -L -o vale.tar.gz "https://github.com/errata-ai/vale/releases/download/v3.13.0/vale_3.13.0_Linux_64-bit.tar.gz"
tar -xzf vale.tar.gz
sudo mv vale /usr/local/bin/vale
rm vale.tar.gz
vale --version
npm run prose:check
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"astro": "astro",
"format": "prettier --write \"**/*.md\" && prettier --write \"**/*.mdx\"",
"format:check": "prettier --check \"**/*.md\" && prettier --check \"**/*.mdx\"",
"prose:check": "vale --minAlertLevel error --output=.vale/vale.tmpl docs",
"prose:check": "vale src/content/docs --minAlertLevel error",
"lint": "npm run format:check && npm run prose:check"
},
"dependencies": {
Expand Down
5 changes: 3 additions & 2 deletions src/content/docs/Feedback/feedback-form.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ suits your preference:

### Option 1: Fill Out Our Online Form

Complete our detailed feedback form at [Our Feedback Form](/feedbackform.html). It only takes a few
minutes and helps us understand your perspective.
Open an issue in our
[GitHub repository](https://github.com/thoth-tech/ThothTech-Documentation-Website/issues). It only
takes a few minutes and helps us understand your perspective.

### Option 2: Contact Your Team Leader or Senior Students

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ google-api-client gem, challenges encountered, and a proposal for a new approach
google-authenticator library available here the goal is to establish a secure, robust, and efficient
authentication system within a Ruby on Rails application.

<!-- TODO: Fix Alt Text below and missing image -->

<!-- ![](Aspose.Words.c43d72fd-87a7-4c94-8fb6-36b8e9a45b16.001.png) -->

## What Was Tried and Why It Didn't Work

### Previous Implementation Steps
Expand All @@ -29,10 +25,6 @@ authentication system within a Ruby on Rails application.
- **Session Management:** Temporary tokens generated lacked proper integration with the
application's session flow.

<!-- TODO: Fix Alt Text below and missing image -->

<!-- ![](Aspose.Words.c43d72fd-87a7-4c94-8fb6-36b8e9a45b16.002.png) -->

## Proposed Approach: Using google-authenticator

The [Google-authenticator](https://github.com/jaredonline/google-authenticator) library offers a
Expand All @@ -45,10 +37,6 @@ token validation and user data retrieval.
- Minimal configuration with a focus on token validation and secure user onboarding.
- Lightweight and developer-friendly, reducing overhead.

<!-- TODO: Fix Alt Text below and missing image -->

<!-- ![](Aspose.Words.c43d72fd-87a7-4c94-8fb6-36b8e9a45b16.003.png) -->

### Implementation Plan Using google-authenticator

1. **Gem Installation**
Expand All @@ -62,62 +50,52 @@ token validation and user data retrieval.
Run bundle install to install the gem.

2. **Environment Setup**
<!-- TODO: Fix strange formatting to use proper snippet format (as above) -->

Set up environment variables for secure management of credentials: **export
GOOGLE_CLIENT_ID="your-client-id"**
Set up environment variables for secure management of credentials:

**export GOOGLE_CLIENT_SECRET="your-client -secret"**
```shell
export GOOGLE_CLIENT_ID="your-client-id"
export GOOGLE_CLIENT_SECRET="your-client -secret"
```

3. **Refactor authentication_api.rb**
<!-- TODO: Fix strange formatting to use proper snippet format (as above) -->

Update the authentication_api.rb file to use the new library:

**desc 'Google authentication'**

**params do**

``**requires :id_token, type: String, desc: 'Google ID token' end**

**post '/auth/google' do**

**# Initialize the GoogleAuthenticator**
```ruby
desc 'Google authentication'

``**authenticator = GoogleAuthenticator.new(**
params do
requires :id_token, type: String, desc: 'Google ID token'
end

``**client_id: ENV['GOOGLE\_CLIENT\_ID'],**
post '/auth/google' do

``**client_secret: ENV['GOOGLE\_CLIENT\_SECRET']**
# Initialize the GoogleAuthenticator
authenticator = GoogleAuthenticator.new(
client_id: ENV['GOOGLE_CLIENT_ID'],
client_secret: ENV['GOOGLE_CLIENT_SECRET']
)

``**)**
idinfo = authenticator.verify(params[:id\_token])
error!({ error: 'Invalid Google ID token.' }, 401) unless idinfo

``**idinfo = authenticator.verify(params[:id\_token])**
email = idinfo['email']
logger.info "Authenticate #{email} from #{request.ip}"
user = User.find_or_create_by(email: email) do |new_user|
new_user.first_name = idinfo['given_name'] || 'First'
new_user.last_name = idinfo['family_name'] || 'Last'
new_user.username = email.split('@').first
new_user.role_id = Role.student.id

``**error!({ error: 'Invalid Google ID token.' }, 401) unless idinfo**
end

``**email = idinfo['email']**
onetime_token = user.generate_temporary_authentication_token!
present :user, user, with: Entities::UserEntity
present :auth_token, onetime_token.authentication_token
end

``**logger.info "Authenticate #{email} from #{request.ip}"**

``**user = User.find_or_create_by(email: email) do |new_user| new_user.first_name =
idinfo['given\_name'] || 'First'**

``**new_user.last_name = idinfo['family\_name'] || 'Last'**

``**new_user.username = email.split('@').first**

``**new_user.role_id = Role.student.id**

``**end**

``**onetime_token = user.generate_temporary_authentication_token!**

``**present :user, user, with: Entities::UserEntity**

``**present :auth_token, onetime_token.authentication_token**

**end**
```

4. **Testing**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Unit Test
---

```js
```javascript
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { NotFoundComponent } from './not-found.component';
Expand Down Expand Up @@ -36,7 +36,7 @@ npm install
npm test
```

![unit test terminal output](./images/unit_test_terminal_output.png)
![unit test terminal output](/src/assets/migration-unit-test/unit_test_terminal_output.png)

```shell
git add .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ the same process.

Research for this spike was conducted by reviewing Sidekiq's official documentation, community
forums, and GitHub issues. Additionally, a prototype was created in a development environment to
test the integration points and monitor the behavior of Sidekiq within the context of our
test the integration points and monitor the behaviour of Sidekiq within the context of our
application.

## Findings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The front-end seemed to run fine, but the back-end was not working as expected.
was not running, and the database was not connected. The following error was displayed in the
terminal:

```bash
```shell
ERROR: ActionDispatch::HostAuthorization::DefaultResponseApp Blocked host: <github codespace host name>
```

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
title: Below the Surface Enemy Colors
title: Below the Surface Enemy Colours
---

## Improvement Suggestion Description

The color scheme of the cockroach enemy should be changed to a brighter colour. The colour scheme of
the giant rat final boss should also be reconsidered.
The colour scheme of the cockroach enemy should be changed to a brighter colour. The colour scheme
of the giant rat final boss should also be reconsidered.

## Reasoning

Currently, the cockroach emeny has a dark brown color scheme, which makes it difficult to identify
Currently, the cockroach emeny has a dark brown colour scheme, which makes it difficult to identify
because the background is a combination of a dark grey bottom half and a somewhat lighter shad of
grey for the top half. The dark brown colour of the cockroach has very little contrast with the dark
grey of the background and is thus extremely difficult to spot.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ opened game.

### Test Hello World Script

Below is a test script that will create a file containing the words HELLO WORLD, the #! /bin/bash
line gives the script elevated permissions.
Below is a test script that will create a file containing the words HELLO WORLD, the `#!/bin/bash`
line, known as a "shebang", gives the script elevated permissions.

```bash
```shell
#!/bin/bash

FILE="YOUR-FILEPATH-HERE"
Expand All @@ -44,10 +44,9 @@ echo after

## Useful Links

<https://unix.stackexchange.com/questions/94322/is-it-possible-for-a-daemon-i-e-background-process-to-look-for-key-presses-fr>
This
is a stack exchange question looking into detecting inputs on a linux/unix device. The answers talk
about the file paths for devices and gives a sample code using C.
<https://unix.stackexchange.com/questions/94322/is-it-possible-for-a-daemon-i-e-background-process-to-look-for-key-presses-fr>
This is a stack exchange question looking into detecting inputs on a linux/unix device. The answers
talk about the file paths for devices and gives a sample code using C.

<https://retropie.org.uk/forum/topic/26927/emulation-game-start-scripts-folder>
A forum post asking about some issues regarding a game-start script.
<https://retropie.org.uk/forum/topic/26927/emulation-game-start-scripts-folder> A forum post asking
about some issues regarding a game-start script.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ potential solutions.

- The primary objective of testing was to assess the gameplay experience of the arcade game "Below
the Surface" when played with two players simultaneously.
- The focus was on evaluating the game's screen movement behavior on the arcade machine and
- The focus was on evaluating the game's screen movement behaviour on the arcade machine and
identifying any issues that arise as a result.

## Testing Environment
Expand Down Expand Up @@ -55,8 +55,8 @@ unplayable.
because of the movement of two players when playing. This ensures the core gameplay and fun of the
game.

- Improved Dual-Screen Mode: Modify the game's screen behavior to split into two distinct views when
two players move in opposite directions. This would allow each player to move independently
- Improved Dual-Screen Mode: Modify the game's screen behaviour to split into two distinct views
when two players move in opposite directions. This would allow each player to move independently
without affecting the other's gameplay. However, this solution may require significant technical
adjustments and testing.
- Player Respawning Mechanism: Implement a respawning mechanism that triggers when a player moves
Expand All @@ -69,10 +69,13 @@ game.
## Suggestions and Feedback

To address this issue and provide a seamless multiplayer experience, the following potential
solutions are recommended: -When the player reaches full health, he cannot pick up heart-shaped
items to increase health, but can instead increase score. -The color of the cockroach shaped monster
is too dim, and the dark background is easy to cause the player to lose sight of it -The jump rate
is too fast, making the player's countermeasures against the monsters too difficult
solutions are recommended:

- When the player reaches full health, he cannot pick up heart-shaped items to increase health, but
can instead increase score.
- The colour of the cockroach shaped monster is too dim, and the dark background is easy to cause
the player to lose sight of it.
- The jump rate is too fast, making the player's countermeasures against the monsters too difficult.

## Conclusion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Date of Testing: [20/08/2023]

## Executive Summary

This report outlines the findings from the testing of the Asteroids,The testing process aimed to
This report outlines the findings from the testing of the Asteroids. The testing process aimed to
identify and address potential issues affecting gameplay, graphics, performance, user interface, and
overall user experience. One significant issue identified is the excessive speed of meteorites,
which has a notable impact on the game's difficulty and player engagement.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ The events can be listened to by attaching with `addEventListener(event, callbac
- `FS` - the filesystem(s) the change occurred in.
- `accept` - a function that can be called to announce that the change was successful -
**currently unused**.
- `folderUploadRequest` - The 'add file' button was clicked on on a directory. Members:
- `folderUploadRequest` - The 'add file' button was clicked on a directory. Members:
- `treeView` - the TreeView object
- `path` - path to the directory
- `FS` - the filesystem(s) the directory exists in.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ We originally used the WebIDL Binder tool to accomplish this, but it had several
- It did not support arrays of arrays (e.g `matrix_2d` could not be represented)
- It would allocate memory for structs on the C++ side using malloc and only provide a pointer on
the JavaScript side. As JavaScript has no concept of a destructor, this completely ruined value
semantics and required manual freeing of even basic SplashKit types, such as color.
semantics and required manual freeing of even basic SplashKit types, such as colour.
- It would return struct types via a pointer to a singleton for that function. Therefore the
following code:
```javascript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ EventListener.handleEvent*@http://localhost:8000/executionEnvironment_Internal.j
```

We can see on each line, the function, filename, line number, and even column number! The problem,
is that `stack` is actually non-standardized JavaScript, and so each browser implements it slightly
is that `stack` is actually non-standardised JavaScript, and so each browser implements it slightly
differently. Additionally, we still have to actually parse (read) the string, to get all the
information out of it. This is the job that `parseErrorStack` performs.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ for reproducibility. Here are the results grouped by API category.
| Animations | Full Support | Full Support | |
| Audio | Near Full Support | Near Full Support | No FLAC support or MOD support. |
| Camera | Full Support | Full Support | |
| Color | Full Support | Full Support | |
| Colour | Full Support | Full Support | |
| Geometry | Full Support | Full Support | |
| Graphics | Full Support | Near Full Support | C++ backend doesn't support reading pixels currently (so no `take_screenshot`, etc). |
| Input | Near Full Support | Near Full Support | IME doesn't show up when using `Start Reading Text`. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ different_render()
C++ string (not a primitive), and also returns something other than a primitive. Methods involving
manual allocation were investigated, but instead the two binding implementations Embind and WebIDL
Binder seemed more promising.
- Embind bindings for color and a few functions were created. They look as follows:
- Embind bindings for colour and a few functions were created. They look as follows:

```
EMSCRIPTEN_BINDINGS(color) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ The purpose of this spike is to investigate technologies that may make running i
viable, and explore which ways seem most promising. The main technology to be investigated here is
WebAssembly (or WASM), which was mentioned in the readme for the SplashKit-Online repository
(https://github.com/thoth-tech/SplashkitOnline). The technology itself doesn't appear to have been
used in the project; instead it seems that that project relied on both compiling _and_ executing the
code on a back-end server. This could be considered an extension of that initial research.
used in the project; instead it seems that project relied on both compiling _and_ executing the code
on a back-end server. This could be considered an extension of that initial research.

**Knowledge Gap:**

Expand Down
Loading