nit.git
7 years agoMerge: Added contributing guidelines and link from readme
Jean Privat [Fri, 10 Jun 2016 01:55:27 +0000 (21:55 -0400)]
Merge: Added contributing guidelines and link from readme

As discussed in #2133, contribution guidelines are hard to find.

This PR is an attempt to ease the process by giving newcomer friendly advices and some more insight on the contribution process for Nit.

@tonygaetani, do you think a document like this one would have been helpful for you ? Is there anything you would change to make it friendlier/clearer ?

Close #2133

Pull-Request: #2134
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agoMerge: Base64: Revamped base64_decode and added a strict mode
Jean Privat [Fri, 10 Jun 2016 01:55:20 +0000 (21:55 -0400)]
Merge: Base64: Revamped base64_decode and added a strict mode

As talked with @ppepos, base64_decode now supports either `strict` or `non-strict`
modes when decoding a base64 string.

The `strict` mode is inspired from the `-i` option from the Unix `base64` command, which ignores non-compliant characters and non-padded `base64` strings.

This is more or less what we do now, `strict` being the default.

Since only one allocation and copy is done now, performance should be better.
There is however one pitfall of this implementation due to the `nullable Object` contract from `Collection[K]`, causing multiple boxings, some further optimization could be done on that front.

Pull-Request: #2086
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agotests: Updated old tests sav
Lucas Bajolet [Wed, 8 Jun 2016 19:52:02 +0000 (15:52 -0400)]
tests: Updated old tests sav

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

7 years agotests: Improved base64 test for edge strict cases
Lucas Bajolet [Wed, 8 Jun 2016 15:07:43 +0000 (11:07 -0400)]
tests: Improved base64 test for edge strict cases

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

7 years agolib/base64: Revamped `decode_base64` for better performances and introduction of...
Lucas Bajolet [Mon, 16 May 2016 15:36:51 +0000 (11:36 -0400)]
lib/base64: Revamped `decode_base64` for better performances and introduction of a strict mode

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

7 years agolib/core: Added `is_whitespace` method to `Byte`
Lucas Bajolet [Wed, 8 Jun 2016 15:06:40 +0000 (11:06 -0400)]
lib/core: Added `is_whitespace` method to `Byte`

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

7 years agonit: Added link to `CONTRIBUTING.md` from the README
Lucas Bajolet [Fri, 27 May 2016 18:06:33 +0000 (14:06 -0400)]
nit: Added link to `CONTRIBUTING.md` from the README

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

7 years agonit: Added `CONTRIBUTING.md` file to repository
Lucas Bajolet [Fri, 27 May 2016 18:05:58 +0000 (14:05 -0400)]
nit: Added `CONTRIBUTING.md` file to repository

Signed-off-by: Lucas Bajolet <r4pass@hotmail.com>

7 years agoMerge: nitweb: add misc features
Jean Privat [Wed, 8 Jun 2016 13:00:50 +0000 (09:00 -0400)]
Merge: nitweb: add misc features

A little of everything in this PR:

* show all properties of a class: http://nitweb.moz-code.org/class/core::Array (see all props tab)
* show code into linearization card: http://nitweb.moz-code.org/class/core::Array (see linearization tab)
* show class definitions for modules: http://nitweb.moz-code.org/module/core::array

Pull-Request: #2172
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agonitweb/angular: show mclass all properties
Alexandre Terrasa [Wed, 1 Jun 2016 03:08:17 +0000 (23:08 -0400)]
nitweb/angular: show mclass all properties

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: show module definitions
Alexandre Terrasa [Tue, 7 Jun 2016 17:09:25 +0000 (13:09 -0400)]
nitweb/angular: show module definitions

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: load mentity definitions for classes and properties
Alexandre Terrasa [Tue, 7 Jun 2016 17:07:58 +0000 (13:07 -0400)]
nitweb/angular: load mentity definitions for classes and properties

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb: add /api/defs/:entity to list definitions
Alexandre Terrasa [Tue, 7 Jun 2016 17:06:10 +0000 (13:06 -0400)]
nitweb: add /api/defs/:entity to list definitions

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: show code in definition cards
Alexandre Terrasa [Tue, 7 Jun 2016 17:54:53 +0000 (13:54 -0400)]
nitweb/angular: show code in definition cards

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agoMerge: nitweb: add `code` tab for modules, classdefs and propdefs.
Jean Privat [Tue, 7 Jun 2016 19:11:11 +0000 (15:11 -0400)]
Merge: nitweb: add `code` tab for modules, classdefs and propdefs.

Interesting demos:
* http://nitweb.moz-code.org/module/array_debug::array_debug
* http://nitweb.moz-code.org/classdef/core$Array
* http://nitweb.moz-code.org/propdef/core::abstract_text$Object$to_s

Only the two last commits are relevant since the rest belongs to #2170

Pull-Request: #2171
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agoMerge: nitweb: list linearized definitions
Jean Privat [Tue, 7 Jun 2016 19:11:09 +0000 (15:11 -0400)]
Merge: nitweb: list linearized definitions

Display linearization lists:

* Mclass linearize all the class definitions
   * linearization of `core::Array` mclassdefs: http://nitweb.moz-code.org/class/core::Array

* MProperty linearize all the prop definitions
    * linearization of `core::Object::hash`: http://nitweb.moz-code.org/property/core::Object::hash

* MClassDef linearize to intro
    * linearization of `core::flat$Array`: http://nitweb.moz-code.org/classdef/core::flat$Array

* MPropdef linearize to intro
    * linearization of `core$Array$Object::SELF`: http://nitweb.moz-code.org/propdef/core$Array$Object::SELF

Pull-Request: #2170
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agoMerge: catalog: only render the asked packages (not the imported ones)
Jean Privat [Tue, 7 Jun 2016 19:10:59 +0000 (15:10 -0400)]
Merge: catalog: only render the asked packages (not the imported ones)

Imported packages where always shown. Not a good behavior on most command-line cases.

Pull-Request: #2168
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agoMerge: nitunit: testsuites are explicit
Jean Privat [Tue, 7 Jun 2016 19:10:53 +0000 (15:10 -0400)]
Merge: nitunit: testsuites are explicit

nitunit do no more try to be clever and find test-suites.

Previously, `nitunit foo.nit` caused the execution of the test suite `test_foo.nit` if it exist.
This behavior had some drawbacks:

* the test suite must follow a strict naming convention `test_*`
* the test suite must be in the same directory
* there must a an associated module. no way to create a test-suite out of thin air
* nitunit do nothing if you give the test suite instead of the module
* `-t` used to precise the location of the test suite did not work with more than one module

The proposed solution is to remove all this test-suite association with a module and asks the used to use the test-suite instead.

    nitunit test_foo.nit

Because nitunit in intended to work with more than one module, there is basically no change for client that do

    nitunit .

Pull-Request: #2167
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agoMerge: popcorn: use nitunit for blackbox testing
Jean Privat [Tue, 7 Jun 2016 19:10:44 +0000 (15:10 -0400)]
Merge: popcorn: use nitunit for blackbox testing

Pull-Request: #2153
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agonitrpg: `test_helper` is not a test_suite. just an helper.
Jean Privat [Tue, 7 Jun 2016 16:05:52 +0000 (12:05 -0400)]
nitrpg: `test_helper` is not a test_suite. just an helper.

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agoloader: make module name mismatch a false error so nitunit can test them
Jean Privat [Mon, 6 Jun 2016 18:22:35 +0000 (14:22 -0400)]
loader: make module name mismatch a false error so nitunit can test them

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agotests: update niunit .sav
Jean Privat [Mon, 6 Jun 2016 18:29:56 +0000 (14:29 -0400)]
tests: update niunit .sav

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: update man page about test-suite
Jean Privat [Mon, 6 Jun 2016 18:21:58 +0000 (14:21 -0400)]
nitunit: update man page about test-suite

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: drop -t option
Jean Privat [Mon, 6 Jun 2016 17:44:38 +0000 (13:44 -0400)]
nitunit: drop -t option

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: just process test_suite when given
Jean Privat [Mon, 6 Jun 2016 17:43:38 +0000 (13:43 -0400)]
nitunit: just process test_suite when given

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: compile with -q to silent warnings
Jean Privat [Mon, 6 Jun 2016 17:26:20 +0000 (13:26 -0400)]
nitunit: compile with -q to silent warnings

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitweb/angular: show code tab for modules, classdefs, propdefs
Alexandre Terrasa [Tue, 7 Jun 2016 16:45:20 +0000 (12:45 -0400)]
nitweb/angular: show code tab for modules, classdefs, propdefs

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: add code to model
Alexandre Terrasa [Tue, 7 Jun 2016 16:45:13 +0000 (12:45 -0400)]
nitweb/angular: add code to model

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agoMerge: nitunit: Fix documentation to reflect actual test discovery algorithm
Jean Privat [Tue, 7 Jun 2016 16:07:41 +0000 (12:07 -0400)]
Merge: nitunit: Fix documentation to reflect actual test discovery algorithm

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #2166
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agoMerge: escape_to_c: Escape trigraphs
Jean Privat [Tue, 7 Jun 2016 16:07:37 +0000 (12:07 -0400)]
Merge: escape_to_c: Escape trigraphs

Produce more standard-compliant code instead of relying on the default behaviour of gcc (or on its `-Wno-trigraphs` flag).

See also: https://github.com/nitlang/nit/pull/1949/commits/000ac8de3c64790b0fbb0e868e406a6a280f3fa9

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

Pull-Request: #2151
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

7 years agoMerge: lib/nitcorn: fix last warnings
Jean Privat [Tue, 7 Jun 2016 16:07:22 +0000 (12:07 -0400)]
Merge: lib/nitcorn: fix last warnings

Pull-Request: #2147
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

7 years ago.gitattributes: add *.res to ignore whitespaces
Alexandre Terrasa [Tue, 7 Jun 2016 16:00:46 +0000 (12:00 -0400)]
.gitattributes: add *.res to ignore whitespaces

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: fix some bootstrap components
Alexandre Terrasa [Tue, 7 Jun 2016 13:40:24 +0000 (09:40 -0400)]
nitweb/angular: fix some bootstrap components

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: show linearization for mclasses, mclassdefs, mproperties, mpropdefs
Alexandre Terrasa [Tue, 7 Jun 2016 13:40:07 +0000 (09:40 -0400)]
nitweb/angular: show linearization for mclasses, mclassdefs, mproperties, mpropdefs

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: add linearization directives
Alexandre Terrasa [Tue, 7 Jun 2016 13:39:10 +0000 (09:39 -0400)]
nitweb/angular: add linearization directives

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: add linearization to model
Alexandre Terrasa [Tue, 7 Jun 2016 13:38:38 +0000 (09:38 -0400)]
nitweb/angular: add linearization to model

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb: add /api/linearization/:full_name service
Alexandre Terrasa [Tue, 7 Jun 2016 13:37:33 +0000 (09:37 -0400)]
nitweb: add /api/linearization/:full_name service

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agomodel_collect: introduce `collect_linearization` service
Alexandre Terrasa [Tue, 7 Jun 2016 15:56:14 +0000 (11:56 -0400)]
model_collect: introduce `collect_linearization` service

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agotext: Test all implementations of `escape_to_c`
Jean-Christophe Beaupré [Mon, 6 Jun 2016 16:09:17 +0000 (12:09 -0400)]
text: Test all implementations of `escape_to_c`

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

7 years agoescape_to_c: Escape trigraphs
Jean-Christophe Beaupré [Mon, 6 Jun 2016 16:04:00 +0000 (12:04 -0400)]
escape_to_c: Escape trigraphs

Produce more standard-compliant code instead of relying on the default
behaviour of gcc (or on its `-Wno-trigraphs` flag).

See also: https://github.com/nitlang/nit/pull/1949/commits/000ac8de3c64790b0fbb0e868e406a6a280f3fa9

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

7 years agopopcorn: remove useless tests/ dir
Alexandre Terrasa [Tue, 7 Jun 2016 12:29:24 +0000 (08:29 -0400)]
popcorn: remove useless tests/ dir

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agocatalog: only render the asked packages (not the imported ones)
Jean Privat [Mon, 6 Jun 2016 20:10:12 +0000 (16:10 -0400)]
catalog: only render the asked packages (not the imported ones)

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: Fix documentation to reflect actual test discovery algorithm
Jean-Christophe Beaupré [Mon, 6 Jun 2016 17:31:54 +0000 (13:31 -0400)]
nitunit: Fix documentation to reflect actual test discovery algorithm

Signed-off-by: Jean-Christophe Beaupré <jcbrinfo@users.noreply.github.com>

7 years agoMerge: nitweb: use ConsoleLog middleware
Jean Privat [Mon, 6 Jun 2016 15:12:57 +0000 (11:12 -0400)]
Merge: nitweb: use ConsoleLog middleware

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

Pull-Request: #2163
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agoMerge: nitweb: use catalog as homepage
Jean Privat [Mon, 6 Jun 2016 15:12:12 +0000 (11:12 -0400)]
Merge: nitweb: use catalog as homepage

Used the Catalog API with Nitweb to provide a homepage.

Demo: http://nitweb.moz-code.org/

Pull-Request: #2162
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agonitweb: use ConsoleLog middleware
Alexandre Terrasa [Wed, 25 May 2016 03:58:18 +0000 (23:58 -0400)]
nitweb: use ConsoleLog middleware

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: display Catalog as homepage
Alexandre Terrasa [Mon, 6 Jun 2016 13:02:43 +0000 (09:02 -0400)]
nitweb/angular: display Catalog as homepage

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: introduce Catalog model
Alexandre Terrasa [Mon, 6 Jun 2016 13:01:34 +0000 (09:01 -0400)]
nitweb/angular: introduce Catalog model

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb: introduce API catalog route
Alexandre Terrasa [Mon, 6 Jun 2016 13:00:49 +0000 (09:00 -0400)]
nitweb: introduce API catalog route

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb: move APIRouter to nitweb.nit
Alexandre Terrasa [Mon, 6 Jun 2016 11:46:41 +0000 (07:46 -0400)]
nitweb: move APIRouter to nitweb.nit

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb: move APIHandler to web_base
Alexandre Terrasa [Mon, 6 Jun 2016 11:46:04 +0000 (07:46 -0400)]
nitweb: move APIHandler to web_base

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agoMerge: nitls: fix tree representation of nested groups
Jean Privat [Sun, 5 Jun 2016 16:12:49 +0000 (12:12 -0400)]
Merge: nitls: fix tree representation of nested groups

nitls wrongly detached some nested groups in tree-mode.

Before:

~~~
$ nitls -tp lib/nitcorn/examples/src/nitcorn_hello_world.nit lib/nitcorn/http_response.nit
lib/nitcorn/examples
`--lib/nitcorn/examples/src
   `--lib/nitcorn/examples/src/nitcorn_hello_world.nit
lib/nitcorn
`--lib/nitcorn/http_response.nit
~~~

After:

~~~
$ nitls -tp lib/nitcorn/examples/src/nitcorn_hello_world.nit lib/nitcorn/http_response.nit
lib/nitcorn
|--lib/nitcorn/examples
|  `--lib/nitcorn/examples/src
|     `--lib/nitcorn/examples/src/nitcorn_hello_world.nit
`--lib/nitcorn/http_response.nit
~~~

Pull-Request: #2161
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

7 years agoMerge: Honor `source.exclude` in ini files
Jean Privat [Sun, 5 Jun 2016 16:10:23 +0000 (12:10 -0400)]
Merge: Honor `source.exclude` in ini files

`source.exclude` is used in very specific cases to prevent some .nit file of directory to belong to a package.

This means two things:
* when the loader is scanning/loading a full package or group, and finds an excluded group or module, then the excluded entity will be not included in the package (and not scanned/loaded)
* when the loader is explicitly requested to load an excluded entity, then it will be detached from the parent package. The excluded modules will be considered as standalone modules.

Pull-Request: #2160
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

7 years agoMerge: nitunit with black boxes: alternative sav files and --autosav
Jean Privat [Sun, 5 Jun 2016 16:10:19 +0000 (12:10 -0400)]
Merge: nitunit with black boxes: alternative sav files and --autosav

Two new things:

* alternative .res location for better scalability
* option --autosav to create/update the .res files

For each TestCase `test_bar` of a TestSuite `test_mod.nit`, a corresponding file with the expected output is looked for:

* "test_mod.sav/test_bar.res". I.e. test-cases grouped by test-suites.
    This is the default and is useful if there is a lot of test-suites and test-cases in a directory
* "sav/test_bar.res". I.e. all test-cases grouped in a common sub-directory.
    Useful if there is a lot of test-suites OR test-cases in a directory.
* "test_bar.res" raw in the directory.
    Useful is there is a few test-suites and test-cases in a directory.

All 3 are exclusive. If more than one exists, the test-case is failed.
If a corresponding file then the output of the test-case is compared with the file.

To helps the management of the expected results, the option `--autosav` can be used to automatically create and update them.

With the option, if a black block test fails because a difference between the expected result and the current result then the expected result file is updated (and the test is passed).
If a test-case of a test-suite passes but that some output is generated, then an expected result file is created.

It is expected that the created/updated files are checked since the tests are considered passed.
A VCS like `git` is often a good tool to check the creation and modification of those files.

Pull-Request: #2158

7 years agocode: add some `source.exclude` to remove errors in the catalog
Jean Privat [Sat, 4 Jun 2016 16:42:41 +0000 (12:42 -0400)]
code: add some `source.exclude` to remove errors in the catalog

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agotests: add test for source.exclude ini entry
Jean Privat [Sat, 4 Jun 2016 15:06:07 +0000 (11:06 -0400)]
tests: add test for source.exclude ini entry

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agotests: update sav/test_basename_perf_args1.res that rely on project1
Jean Privat [Sat, 4 Jun 2016 17:38:20 +0000 (13:38 -0400)]
tests: update sav/test_basename_perf_args1.res that rely on project1

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agotests: improve nitls tests
Jean Privat [Sat, 4 Jun 2016 16:18:28 +0000 (12:18 -0400)]
tests: improve nitls tests

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitls: fix broken group tree when there is a chain of empty groups
Jean Privat [Sat, 4 Jun 2016 16:17:51 +0000 (12:17 -0400)]
nitls: fix broken group tree when there is a chain of empty groups

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agoloader: honor `source.exclude` config in the package.ini
Jean Privat [Sat, 4 Jun 2016 14:56:29 +0000 (10:56 -0400)]
loader: honor `source.exclude` config in the package.ini

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agomodelbuilder: stop reporting hints again and again. It could be time consuming.
Jean Privat [Sat, 4 Jun 2016 14:54:21 +0000 (10:54 -0400)]
modelbuilder: stop reporting hints again and again. It could be time consuming.

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: update manpage with multiple .res and --autosav
Jean Privat [Fri, 3 Jun 2016 00:34:02 +0000 (20:34 -0400)]
nitunit: update manpage with multiple .res and --autosav

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: add `--autosav` for testsuites
Jean Privat [Fri, 3 Jun 2016 00:03:57 +0000 (20:03 -0400)]
nitunit: add `--autosav` for testsuites

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: add a `info` to unit-test for noteworthy information
Jean Privat [Fri, 3 Jun 2016 00:03:18 +0000 (20:03 -0400)]
nitunit: add a `info` to unit-test for noteworthy information

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agotests: nitunit with multiple .res files
Jean Privat [Thu, 2 Jun 2016 23:59:41 +0000 (19:59 -0400)]
tests: nitunit with multiple .res files

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: testsuite+diff tries additional `.res` files
Jean Privat [Thu, 2 Jun 2016 23:44:47 +0000 (19:44 -0400)]
nitunit: testsuite+diff tries additional `.res` files

* "test_suite.sav/test_case.res" grouped by test-suites
  The current one.
  Useful if there is a lot of test-suites and test-cases in a directory
* "sav/test_case.res" just grouped in a common directory
  Useful if there is a lot of test-suites OR test-cases in a directory
* "test_case.res" raw in the directory.
  Useful is there is a few test-suites and test-cases in a directory.

All 3 are exclusive. If more than one exists, the test-case is failed.

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: testsuite+diff do not info missing diff if raw_output.is_empty
Jean Privat [Thu, 2 Jun 2016 23:39:54 +0000 (19:39 -0400)]
nitunit: testsuite+diff do not info missing diff if raw_output.is_empty

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agoMerge: nitunit: improve progress display
Jean Privat [Fri, 3 Jun 2016 17:17:39 +0000 (13:17 -0400)]
Merge: nitunit: improve progress display

The results are printed progressively instead of at the end of each test-suite.
The progress bar in therefore displayed below the results.

See it in action: https://asciinema.org/a/17u9jwts0nz5dfpxp8p9aab0f

Pull-Request: #2156
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agoMerge: niti: teach the interpreter to read from the standard input
Jean Privat [Fri, 3 Jun 2016 17:17:00 +0000 (13:17 -0400)]
Merge: niti: teach the interpreter to read from the standard input

With `-` the program is read from stdin.

~~~
$ echo H4sIAN7lUFcAAysoyswrUVDySM3JyVfiAgCjfiaWDgAAAA== | base64 -d | gunzip | nit -
Hello
~~~

Pull-Request: #2159
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

7 years agoMerge: nitweb: search field
Jean Privat [Fri, 3 Jun 2016 17:16:57 +0000 (13:16 -0400)]
Merge: nitweb: search field

* Introduce a search field in the top navbar connected to the `/search` service.
* Added a stub implementation of a search service depending on APIList.

Demo: http://nitweb.moz-code.org/

Pull-Request: #2157
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agotests: update nitunit
Jean Privat [Thu, 2 Jun 2016 21:48:23 +0000 (17:48 -0400)]
tests: update nitunit

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: improve status bar
Jean Privat [Fri, 3 Jun 2016 13:35:22 +0000 (09:35 -0400)]
nitunit: improve status bar

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: rename `has_status` and cie to `has_progress_bar`
Jean Privat [Fri, 3 Jun 2016 13:33:57 +0000 (09:33 -0400)]
nitunit: rename `has_status` and cie to `has_progress_bar`

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: fix typo in doc
Jean Privat [Fri, 3 Jun 2016 00:48:32 +0000 (20:48 -0400)]
nitunit: fix typo in doc

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agoman: nit.md documents `-`
Jean Privat [Fri, 3 Jun 2016 02:03:18 +0000 (22:03 -0400)]
man: nit.md documents `-`

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agotests: add `-` for nit
Jean Privat [Fri, 3 Jun 2016 02:02:49 +0000 (22:02 -0400)]
tests: add `-` for nit

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agoniti: add `-` to read the standard input
Jean Privat [Fri, 3 Jun 2016 02:02:17 +0000 (22:02 -0400)]
niti: add `-` to read the standard input

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agoMerge: lib/app: update doc for http_request and the improved -m
Jean Privat [Fri, 3 Jun 2016 01:44:20 +0000 (21:44 -0400)]
Merge: lib/app: update doc for http_request and the improved -m

Pull-Request: #2155
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agoMerge: Benitlux app: improve signup screen
Jean Privat [Fri, 3 Jun 2016 01:44:18 +0000 (21:44 -0400)]
Merge: Benitlux app: improve signup screen

The new signup screen shows more feedback and requires to write the password twice.

Pull-Request: #2154
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agoMerge: nitweb: show mentities details
Jean Privat [Fri, 3 Jun 2016 01:44:10 +0000 (21:44 -0400)]
Merge: nitweb: show mentities details

Add more content to mentities pages.

Packages list inner groups
* http://nitweb.moz-code.org/package/core

Groups show parent and list inner groups/modules
* http://nitweb.moz-code.org/group/core%3E
* http://nitweb.moz-code.org/group/core%3Ecollection%3E

Modules show imported modules, introduced classes and redefinitions
* http://nitweb.moz-code.org/module/core::array

Classes show super classes, introduced properties, redefined properties
* http://nitweb.moz-code.org/class/core::Array

Bonus, all lists are filterable by raw string or visibility.

Pull-Request: #2152
Reviewed-by: Jean Privat <jean@pryen.org>

7 years agoMerge: Factorize `capitalize` and add option to preserve uppercase letters
Jean Privat [Fri, 3 Jun 2016 01:44:04 +0000 (21:44 -0400)]
Merge: Factorize `capitalize` and add option to preserve uppercase letters

Merge the duplicated implementation of `String::capitalized` and `Buffer::capitalize` and extend it to accept the `keep_upper` optional parameter. This parameter triggers keeping uppercase letters as is.

It is applied in nitiwiki to preserve acronyms, like the many apparences of FFI at http://nitlanguage.org/FFI/.

Pull-Request: #2085
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

7 years agonitweb/angular: add search field
Alexandre Terrasa [Thu, 2 Jun 2016 23:41:19 +0000 (19:41 -0400)]
nitweb/angular: add search field

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/src: APISearch super APIList
Alexandre Terrasa [Thu, 2 Jun 2016 23:18:31 +0000 (19:18 -0400)]
nitweb/src: APISearch super APIList

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agosrc/web: APIList and APIRandom use JsonArray.from
Alexandre Terrasa [Thu, 2 Jun 2016 23:17:35 +0000 (19:17 -0400)]
src/web: APIList and APIRandom use JsonArray.from

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: show mclass content
Alexandre Terrasa [Wed, 1 Jun 2016 04:27:14 +0000 (00:27 -0400)]
nitweb/angular: show mclass content

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: show module content
Alexandre Terrasa [Thu, 2 Jun 2016 04:39:40 +0000 (00:39 -0400)]
nitweb/angular: show module content

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: show group content
Alexandre Terrasa [Wed, 1 Jun 2016 02:27:20 +0000 (22:27 -0400)]
nitweb/angular: show group content

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: show package content
Alexandre Terrasa [Wed, 1 Jun 2016 00:56:36 +0000 (20:56 -0400)]
nitweb/angular: show package content

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitweb/angular: filter entity lists
Alexandre Terrasa [Wed, 1 Jun 2016 00:39:55 +0000 (20:39 -0400)]
nitweb/angular: filter entity lists

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

7 years agonitunit: keep the status bar at the end line and show progress
Jean Privat [Thu, 2 Jun 2016 21:44:44 +0000 (17:44 -0400)]
nitunit: keep the status bar at the end line and show progress

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: check docunits in order, even if compiled independently
Jean Privat [Thu, 2 Jun 2016 21:43:32 +0000 (17:43 -0400)]
nitunit: check docunits in order, even if compiled independently

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: md files do not need a location, just the filename
Jean Privat [Thu, 2 Jun 2016 21:38:21 +0000 (17:38 -0400)]
nitunit: md files do not need a location, just the filename

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: number docunit from 1 and correctly use it in full_name
Jean Privat [Thu, 2 Jun 2016 21:32:22 +0000 (17:32 -0400)]
nitunit: number docunit from 1 and correctly use it in full_name

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: remove `more_message` from status as it causes terminal overflow
Jean Privat [Thu, 2 Jun 2016 21:31:08 +0000 (17:31 -0400)]
nitunit: remove `more_message` from status as it causes terminal overflow

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agonitunit: do not show the status bar if no-color or verbose
Jean Privat [Thu, 2 Jun 2016 21:29:33 +0000 (17:29 -0400)]
nitunit: do not show the status bar if no-color or verbose

Signed-off-by: Jean Privat <jean@pryen.org>

7 years agocontrib/nitiwiki: preserve uppercase letter in title (for acronyms like FFI)
Alexis Laferrière [Mon, 16 May 2016 13:06:17 +0000 (09:06 -0400)]
contrib/nitiwiki: preserve uppercase letter in title (for acronyms like FFI)

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

7 years agolib/text: add option to preserve uppercase letter in `capitalize`
Alexis Laferrière [Mon, 16 May 2016 14:01:19 +0000 (10:01 -0400)]
lib/text: add option to preserve uppercase letter in `capitalize`

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

7 years agolib/text: factorize the implementations of capitalize and capitalized
Alexis Laferrière [Mon, 16 May 2016 13:05:52 +0000 (09:05 -0400)]
lib/text: factorize the implementations of capitalize and capitalized

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

7 years agolib/app: update package.ini to use the mobile tag
Alexis Laferrière [Thu, 2 Jun 2016 19:18:50 +0000 (15:18 -0400)]
lib/app: update package.ini to use the mobile tag

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

7 years agolib/app: improve doc of AsyncHttpRequest
Alexis Laferrière [Thu, 2 Jun 2016 15:56:33 +0000 (11:56 -0400)]
lib/app: improve doc of AsyncHttpRequest

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>