maint: ignore .DS_Store files.

* .gitignore: Add .DS_Store.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
specl: set specl._VERSION correctly.

* src/specl.lua (version): require version.lua.
(M._VERSION): Set from version table.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
matchers: factor out into a separate module.

Get rid of ugly global stats and expectations place holders, and
factor matchers out into their own module.
* src/specl.lua (objcmp, q, matchers, expect, expectations)
(stats): Move from here...
* src/matchers.lua (objcmp, q, M.matchers, M.expect, M.expectations)
(M.stats): ...to here.
* src/specl.lua (run_examples, run): Adjust.
(M): Remove matchers.
* src/specl.mk (dist_pkglua_DATA): Add src/matchers.lua.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
formatters: factor out into separate modules.

For Automake to install subdirectories correctly with a _DATA
primary, the nobase_ prefix only works when the source and
destination directories have the same name, so we have to rename
'src' to 'specl' in order that the new specl/formatters/*.lua
sources are installed correctly.
* specl/specl.mk (dist_pkglua_DATA): Rename from this...
(nobase_dist_lua_DATA): ...to this.
* src/.gitignore, src/matchers.lua, src/specl.in, src/specl.lua,
src/specl.mk, src/version.lua.in: Move from here...
* specl/.gitignore, specl/matchers.lua, specl/specl.in,
specl/specl.lua, specl/specl.mk, specl/version.lua.in: ...to here.
* Makefile.am, configure.ac, specl/specl.mk, specs/specs.mk,
specs/specl_spec.yaml: Adjust.
* specl/specl.lua (M): Remove progress and report.
(progress): Move from here...
* specl/formatter/progress.lua: New file.  ...to here.
* specl/specl.lua (report): Move from here...
* specl/formatter/report.lua: New file.  ...to here.
* specl/matchers.lua (expectations, stats): Initialise inside the
module table.
(expect): Update inside the module table.
(M): Adjust.
* specl/specl.in: Load and pass report formatter to specl.run()
on demand.
* specl/specl.mk (nobase_dist_lua_DATA): Add
specl/formatter/progress.lua and specl/formatter/report.lua.
(specl_specl_DEPS): Adjust.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
maint: support 'make check V=1' and 'SPECL_OPTS=-v make check'

* specs/specs.mk (SPECL_OPTS): Unless set in the environment already,
pass -v to specl according to whether or not V=1 was given to make.
(check-local): Use it.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
specl: support --formatter=FILE option.

* specl/specl.in (prog): Add new formatter option.
If formatter was passed, try to load the passed formatter.
Pass the eventual formatter to specl.run.
* specs/specl_spec.yaml (when using a custom formatter): Check
that custom formatters are called correctly.
* README.md (Custom Formatters): New section describing how to
write a custom formatter.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>