Compare commits
No commits in common. "6f5f246a001434470390cfcbd85ba192b0ddd365" and "1cc31bda50dbe5f618eff607c105f0d021e70cd4" have entirely different histories.
6f5f246a00
...
1cc31bda50
@ -1,3 +1,3 @@
|
|||||||
# sr2ini_yhn
|
# sr2ini
|
||||||
|
|
||||||
sr2ini as a Yunohost package.
|
Simple Initiative tracker for Shadowrun 2e.
|
||||||
16
__tests__/sr2ini.test.js
Normal file
16
__tests__/sr2ini.test.js
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
const s = require("../src/js/sr2ini.js");
|
||||||
|
|
||||||
|
describe ("test function rollForInitiative()", () => {
|
||||||
|
test("function should accept numbes as integers as well as strings", () => {
|
||||||
|
expect(typeof s.rollForInitiative("1", "5")).toBe("number");
|
||||||
|
expect(typeof s.rollForInitiative(1, 5)).toBe("number");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("result should be greater than zero", () => {
|
||||||
|
expect(s.rollForInitiative("1", "5")).toBeGreaterThan(0);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("should return zero for bad parameters", () => {
|
||||||
|
expect(s.rollForInitiative("a", 2)).toBe(0);
|
||||||
|
});
|
||||||
|
});
|
||||||
@ -1,51 +0,0 @@
|
|||||||
packaging_format = 2
|
|
||||||
|
|
||||||
id = "sr2ini"
|
|
||||||
name = "SR2 Initiative Tracker"
|
|
||||||
description.en = "A simple initiative tracker for Shaodwrun 2e."
|
|
||||||
description.de = "Ein einfacher Initiative-Tracker für Shaodwrun, 2. Edition."
|
|
||||||
|
|
||||||
version = "0.1~ynh1"
|
|
||||||
|
|
||||||
maintainers = ["Eclipse"]
|
|
||||||
|
|
||||||
[upstream]
|
|
||||||
license = "ISC"
|
|
||||||
|
|
||||||
[integration]
|
|
||||||
yunohost = ">= 11.1"
|
|
||||||
architectures = "all"
|
|
||||||
multi_instance = true
|
|
||||||
ldap = "not_relevant"
|
|
||||||
sso = "not_relevant"
|
|
||||||
disk = "1M"
|
|
||||||
ram.build = "1M"
|
|
||||||
ram.runtime = "1M"
|
|
||||||
|
|
||||||
[install]
|
|
||||||
[install.domain]
|
|
||||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
|
||||||
type = "domain"
|
|
||||||
|
|
||||||
[install.path]
|
|
||||||
# this is a generic question - ask strings are automatically handled by Yunohost's core
|
|
||||||
type = "path"
|
|
||||||
default = "/sr2ini"
|
|
||||||
|
|
||||||
[install.init_main_permission]
|
|
||||||
type = "group"
|
|
||||||
default = "visitors"
|
|
||||||
|
|
||||||
[resources]
|
|
||||||
[resources.sources.main]
|
|
||||||
url = "https://git.unterdemradar.de/tobias/sr2ini_ynh/src/branch/main/tools/sr2ini_ynh-o.1~ynh1.tar.gz"
|
|
||||||
sha256 = "abfb79af75dbf3ff5dc9373f112df1767056f4bdb0b06ccdd885823a13e70df9"
|
|
||||||
format = "tar.gz"
|
|
||||||
in_subdir = "false"
|
|
||||||
|
|
||||||
[resources.system_user]
|
|
||||||
|
|
||||||
[resources.install_dir]
|
|
||||||
|
|
||||||
[resources.permissions]
|
|
||||||
main.url = "/"
|
|
||||||
10
package.json
10
package.json
@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "sr2ini_ynh",
|
"name": "sr2ini",
|
||||||
"version": "0.1~ynh1",
|
"version": "1.0.0",
|
||||||
"description": "sr2ini as a Yunohost package.",
|
"description": "Simple Initiative tracker for Shadowrun 2e",
|
||||||
"private": true,
|
"private": true,
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Eclipse729",
|
"name": "Eclipse729",
|
||||||
"email": "eclipse@unterdemradar.de",
|
"email": "eclipse@unterdemradar.de",
|
||||||
"url": "https://unterdemradar.de"
|
"url": "https://www.unterdemradar.de"
|
||||||
},
|
},
|
||||||
"homepage": "",
|
"homepage": "https://www.unterdemradar.de/sr2ini/",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"source": "src/index.html",
|
"source": "src/index.html",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
source /usr/share/yunohost/helpers
|
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Setting up source files..." --weight=1
|
|
||||||
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
|
||||||
|
|
||||||
chown -R $app:www-data "$install_dir"
|
|
||||||
chmod -R o-rwx "$install_dir"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in New Issue
Block a user