Skip to content

Commit cae7745

Browse files
committed
Drop chrome extension and battle_asserts
1 parent 368ba11 commit cae7745

File tree

21 files changed

+12
-665
lines changed

21 files changed

+12
-665
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ clean:
99
rm -rf services/app/.elixir_ls
1010
rm -rf services/app/priv/static
1111
rm -rf node_modules
12-
rm -rf tmp/battle_asserts
1312

1413
test:
1514
make -C ./services/app/ test

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
Codebattle - is an open source game being developed by the Hexlet community.
1010
The current version of the application is available at [codebattle.hexlet.io](https://codebattle.hexlet.io).
11-
We also have [chrome extension](https://chrome.google.com/webstore/detail/codebattle-web-extension/embfhnfkfobkdohleknckodkmhgmpdli). Which allow to subscribe on last game updates.
1211

1312
This project exists thanks to all the people who contribute. [Contribute guideline.](CONTRIBUTING.md)
1413

@@ -68,8 +67,6 @@ $ mix images.build elixir
6867
$ mix images.pull # all
6968
$ mix images.pull elixir
7069

71-
$ mix asserts.upload # Pulls from battle_asserts all issues and upserts into DB
72-
7370
#If you use images in dev env, run commands in make compose-bash
7471
```
7572

make-compose.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
ASSERTS_PATH = "/tmp/battle_asserts"
2-
31
compose:
42
docker compose up app
53

@@ -69,9 +67,6 @@ compose-logs:
6967
compose-compile:
7068
docker compose run --rm --name codebattle_app app mix compile
7169

72-
compose-upload-battle-asserts:
73-
docker compose run --rm --name codebattle_app app mix asserts.upload
74-
7570
compose-build-images:
7671
docker compose run --rm --name codebattle_app app mix images.build ${lang}
7772

services/app/apps/codebattle/assets/js/widgets/pages/game/ContributorsList.jsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ const renderContributorsList = contributors => (
2222
/>
2323
</a>
2424
</li>
25-
))
25+
))
2626
: null}
2727
</ul>
2828
);
2929

30-
function ContributorsList({ name }) {
31-
const url = `https://api.github.com/repos/hexlet-codebattle/battle_asserts/commits?path=src/battle_asserts/issues/${name}.clj`;
30+
function ContributorsList({ name, tags, level }) {
31+
const url = `https://api.github.com/repos/hexlet-codebattle/tasks/commits?path=tasks/${level}/${tags[0]}/${name}.toml`;
3232

3333
const dispatch = useDispatch();
3434

@@ -60,7 +60,9 @@ function ContributorsList({ name }) {
6060

6161
return (
6262
<div className="d-flex flex-column mb-1 align-self-end">
63-
<h6 className="card-text">{i18n.t('This users have contributed to this task:')}</h6>
63+
<h6 className="card-text">
64+
{i18n.t('This users have contributed to this task:')}
65+
</h6>
6466
{renderContributorsList(contributors)}
6567
</div>
6668
);

services/app/apps/codebattle/assets/js/widgets/pages/game/TaskAssignment.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import ContributorsList from './ContributorsList';
1616
import TaskDescriptionMarkdown from './TaskDescriptionMarkdown';
1717
import TaskLanguagesSelection from './TaskLanguageSelection';
1818

19-
const renderTaskLink = name => {
20-
const link = `https://github.com/hexlet-codebattle/battle_asserts/tree/master/src/battle_asserts/issues/${name}.clj`;
19+
const renderTaskLink = task => {
20+
const link = `https://github.com/hexlet-codebattle/tasks/tree/master/tasks/${task.level}/${task.tags[0]}/${task.name}.toml`;
2121

2222
return (
2323
<a href={link} className="cb-text d-inline-block">
@@ -132,15 +132,15 @@ function TaskAssignment({
132132
</div>
133133
{task.origin === 'github' && !hideContribution && (
134134
<>
135-
<ContributorsList name={task.name} />
135+
<ContributorsList task={task} />
136136
<div className="d-flex align-items-end flex-column flex-sm-row justify-content-between">
137137
<h6 className="card-text small font-italic">
138138
<span className="mr-2">
139139
{i18n.t(
140140
'Found a mistake? Have something to add? Pull Requests are welcome: ',
141141
)}
142142
</span>
143-
{renderTaskLink(task.name)}
143+
{renderTaskLink(task)}
144144
</h6>
145145
</div>
146146
</>

services/app/apps/codebattle/lib/codebattle/application.ex

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ defmodule Codebattle.Application do
1919
[
2020
{ChromicPDF, chromic_pdf_opts()},
2121
{Cachex, name: :season_cache},
22-
{Codebattle.TasksImporter, []},
2322
{Codebattle.UsersPointsAndRankServer, []},
2423
{Codebattle.Bot.GameCreator, []},
2524
{Codebattle.Tournament.UpcomingRunner, []},

services/app/apps/codebattle/lib/codebattle/tasks_importer.ex

Lines changed: 0 additions & 120 deletions
This file was deleted.

services/app/apps/codebattle/lib/codebattle_web/channels/extension_socket.ex

Lines changed: 0 additions & 16 deletions
This file was deleted.

services/app/apps/codebattle/lib/codebattle_web/controllers/raw_task_controller.ex

Lines changed: 0 additions & 76 deletions
This file was deleted.

services/app/apps/codebattle/lib/codebattle_web/endpoint.ex

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ defmodule CodebattleWeb.Endpoint do
1010

1111
socket("/ws", CodebattleWeb.UserSocket, websocket: [timeout: :infinity, compress: true])
1212

13-
socket("/extension", CodebattleWeb.ExtensionSocket,
14-
websocket: [timeout: :infinity, check_origin: false],
15-
check_origin: false
16-
)
17-
1813
socket("/live", Phoenix.LiveView.Socket,
1914
websocket: [
2015
connect_info: [

0 commit comments

Comments
 (0)