Skip to content

Commit b5ad636

Browse files
committed
add ruby support
1 parent ea55ae2 commit b5ad636

File tree

5 files changed

+11
-0
lines changed

5 files changed

+11
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ _language_: cee.Language – Pass the language the code is written in, for examp
6363

6464
- **Python3** (Windows / Linux)
6565
- **Javascript** (Windows / Linux)
66+
- **Ruby** (Windows / Linux)
6667
- **Batch** (Windows)
6768
- **Bash** (Linux)
6869
- **C** (Linux)

runners/linux/ruby.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
timeout -s SIGKILL 10 ruby $1

runners/win32/ruby.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
@echo off
2+
ruby %1

src/languages.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ enum Language {
44
BASH = "bash",
55
BATCH = "bat",
66
JAVASCRIPT = "js",
7+
RUBY = "ruby",
78
}
89

910
export default Language;

tests/all.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ describe("Testing Basic Languages", () => {
1313
expect(response).toBe("123");
1414
});
1515
});
16+
test("Ruby", () => {
17+
return cee.execute("puts 123", cee.languages.RUBY).then((response) => {
18+
expect(response).toBe("123");
19+
});
20+
});
1621
// test("LXC", () => {
1722
// var executor = new cee.LXC("cee");
1823
// return executor.execute("whoami", cee.languages.BASH).then((response) => {

0 commit comments

Comments
 (0)