Skip to content

Commit 0823291

Browse files
authored
list the available luarocks on the test-runner (#132)
1 parent b64a090 commit 0823291

2 files changed

Lines changed: 91 additions & 0 deletions

File tree

docs/TESTS.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,63 @@ $ perl -i -pe 's/^\s+\Kpending\b/it/' two_fer_spec.moon
2323

2424
When you are working in the online editor, the test runner will automatically run all the tests.
2525

26+
## Using LuaRocks
27+
28+
Lua by itself is a very small language.
29+
[LuaRocks][luarocks] is the package manager for Lua modules.
30+
31+
You are free to use any module in your solutions, but not all of them will be available in the online test-runner.
32+
The test-runner provides these:
33+
34+
**Already available as `busted` dependencies**
35+
36+
* [penlight][penlight] ([home][penlight-home])
37+
38+
> Penlight is a set of pure Lua libraries for making it easier to work with common tasks like iterating over directories, reading configuration files and the like. Provides functional operations on tables and sequences.
39+
40+
* [dkjson][dkjson] ([home][dkjson-home])
41+
42+
> dkjson is a module for encoding and decoding JSON data.
43+
44+
**Already available as MoonScript dependencies**
45+
46+
* [LPeg][lpeg] ([home][lpeg-home])
47+
48+
> LPeg is a new pattern-matching library for Lua, based on Parsing Expression Grammars (PEGs).
49+
50+
* [LuaFileSystem][lfs] ([home][lfs-home])
51+
52+
> LuaFileSystem offers a portable way to access the underlying directory structure and file attributes.
53+
54+
**Datetime**
55+
56+
* [date][date] ([github][date-home])
57+
58+
> Date and Time string parsing; Time addition and subtraction; Time span calculation; Supports ISO 8601 Dates.
59+
60+
* [lua-tz][lua-tz] ([github][lua-tz-home])
61+
62+
> Lua TZ provides date and time functions with support for time zones. The core functions have an interface similar to the standard functions os.date and os.time, but additionally accept a time zone argument.
63+
64+
* [luatz][luatz] ([github][luatz-home])
65+
66+
> A lua library for time and date manipulation.
67+
68+
2669
[lua-tests]: https://exercism.org/docs/tracks/lua/tests
2770
[tdd]: https://exercism.org/docs/using/solving-exercises/tdd
71+
[luarocks]: https://luarocks.org/
72+
[penlight]: https://luarocks.org/modules/tieske/penlight
73+
[penlight-home]: https://lunarmodules.github.io/Penlight/
74+
[dkjson]: https://luarocks.org/modules/dhkolf/dkjson
75+
[dkjson-home]: https://dkolf.de/dkjson-lua/
76+
[lpeg]: https://luarocks.org/modules/gvvaughan/lpeg
77+
[lpeg-home]: https://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html
78+
[lfs]: https://luarocks.org/modules/hisham/luafilesystem
79+
[lfs-home]: https://lunarmodules.github.io/luafilesystem/
80+
[date]: https://luarocks.org/modules/tieske/date
81+
[date-home]: https://github.com/Tieske/date
82+
[lua-tz]: https://luarocks.org/modules/anaef/lua-tz
83+
[lua-tz-home]: https://github.com/anaef/lua-tz
84+
[luatz]: https://luarocks.org/modules/daurnimator/luatz
85+
[luatz-home]: https://github.com/daurnimator/luatz

exercises/shared/.docs/tests.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,38 @@ $ perl -i -pe 's/^\s+\Kpending\b/it/' two_fer_spec.moon
2323

2424
When you are working in the online editor, the test runner will automatically run all the tests.
2525

26+
## Using LuaRocks
27+
28+
Lua by itself is a very small language.
29+
[LuaRocks][luarocks] is the package manager for Lua modules.
30+
31+
You are free to use any module in your solutions, but not all of them will be available in the online test-runner.
32+
The test-runner provides these:
33+
34+
**Already available as `busted` dependencies**
35+
36+
* [penlight][penlight-home]
37+
* [dkjson][dkjson-home]
38+
39+
**Already available as MoonScript dependencies**
40+
41+
* [LPeg][lpeg-home]
42+
* [LuaFileSystem][lfs-home]
43+
44+
**Datetime**
45+
46+
* [date][date-home]
47+
* [lua-tz][lua-tz-home]
48+
* [luatz][luatz-home]
49+
50+
2651
[lua-tests]: https://exercism.org/docs/tracks/lua/tests
2752
[tdd]: https://exercism.org/docs/using/solving-exercises/tdd
53+
[luarocks]: https://luarocks.org/
54+
[penlight-home]: https://lunarmodules.github.io/Penlight/
55+
[dkjson-home]: https://dkolf.de/dkjson-lua/
56+
[lpeg-home]: https://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html
57+
[lfs-home]: https://lunarmodules.github.io/luafilesystem/
58+
[date-home]: https://github.com/Tieske/date
59+
[lua-tz-home]: https://github.com/anaef/lua-tz
60+
[luatz-home]: https://github.com/daurnimator/luatz

0 commit comments

Comments
 (0)