nit.git
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 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 agopopcorn: test test_popcorn with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:57:44 +0000 (11:57 -0400)]
popcorn: test test_popcorn with pop_tests

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

7 years agopopcorn: test test_example_static_multiple with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:35:17 +0000 (11:35 -0400)]
popcorn: test test_example_static_multiple with pop_tests

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

7 years agopopcorn: test test_example_static_default with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:35:03 +0000 (11:35 -0400)]
popcorn: test test_example_static_default with pop_tests

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

7 years agopopcorn: test test_example_static with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:34:41 +0000 (11:34 -0400)]
popcorn: test test_example_static with pop_tests

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

7 years agopopcorn: test test_session with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:27:58 +0000 (11:27 -0400)]
popcorn: test test_session with pop_tests

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

7 years agopopcorn: test test_angular with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:21:57 +0000 (11:21 -0400)]
popcorn: test test_angular with pop_tests

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

7 years agopopcorn: test test_example_simple_logger with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:17:32 +0000 (11:17 -0400)]
popcorn: test test_example_simple_logger with pop_tests

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

7 years agopopcorn: test test_example_simple_error_handler with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:17:17 +0000 (11:17 -0400)]
popcorn: test test_example_simple_error_handler with pop_tests

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

7 years agopopcorn: test test_example_html_error_handler with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:16:49 +0000 (11:16 -0400)]
popcorn: test test_example_html_error_handler with pop_tests

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

7 years agopopcorn: test test_example_advanced_logger with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:16:21 +0000 (11:16 -0400)]
popcorn: test test_example_advanced_logger with pop_tests

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

7 years agopopcorn: test test_example_query_string with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:07:17 +0000 (11:07 -0400)]
popcorn: test test_example_query_string with pop_tests

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

7 years agopopcorn: test test_example_post_handler with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 15:07:00 +0000 (11:07 -0400)]
popcorn: test test_example_post_handler with pop_tests

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

7 years agopopcorn: test test_example_router with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 14:56:07 +0000 (10:56 -0400)]
popcorn: test test_example_router with pop_tests

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

7 years agopopcorn: test test_example_param_route with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 14:55:47 +0000 (10:55 -0400)]
popcorn: test test_example_param_route with pop_tests

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

7 years agopopcorn: test examples/routing/glob_route with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 05:43:50 +0000 (01:43 -0400)]
popcorn: test examples/routing/glob_route with pop_tests

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

7 years agopopcorn: test examples/hello_world with pop_tests
Alexandre Terrasa [Thu, 2 Jun 2016 05:38:23 +0000 (01:38 -0400)]
popcorn: test examples/hello_world with pop_tests

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

7 years agopopcorn: introduce pop_tests module
Alexandre Terrasa [Thu, 2 Jun 2016 05:35:24 +0000 (01:35 -0400)]
popcorn: introduce pop_tests module

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

7 years agoMerge: core: fix some "call on nullable" warnings
Jean Privat [Wed, 1 Jun 2016 01:24:31 +0000 (21:24 -0400)]
Merge: core: fix some "call on nullable" warnings

Too tired too work but no enough to sleep...

According to Jenkins [here](http://gresil.org/jenkins/job/CI_github/4177/warnings2Result/package.795683049/), [here](http://gresil.org/jenkins/job/CI_github/4177/warnings2Result/package.-1960060028/) and [here](http://gresil.org/jenkins/job/CI_github/4177/warnings2Result/package.1056020115/), this PR should fix the remaining warning of `core/`.

The algorithm used for the human/pillow approach was:

~~~
1. can it be fixed shamelessly with a .as(not null) ?
    yes: add that sweet .as(not null) and hope for the best
2. is there more than one occurrence of the variable involved?
    yes: factorise with a local variable, add that sweet .as(not null) and hope for the best
3. is this code to complex for my human/pillow head?
    yes: shame = false, fallback to 1.
abort "Not yet occurred case..."
~~~

There is love for @R4PaSs (core::text), @xymus (core::re) and @privat (core::*).

TL;DR No more warnings in core.

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

7 years agotests: fix line numbers in array related tests
Alexandre Terrasa [Mon, 30 May 2016 19:08:09 +0000 (15:08 -0400)]
tests: fix line numbers in array related tests

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

7 years agocore: fix warnings in file
Alexandre Terrasa [Wed, 20 Apr 2016 05:56:01 +0000 (01:56 -0400)]
core: fix warnings in file

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

7 years agocore: fix warnings in re
Alexandre Terrasa [Wed, 20 Apr 2016 05:54:21 +0000 (01:54 -0400)]
core: fix warnings in re

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

7 years agocore: fix warnings in exec
Alexandre Terrasa [Wed, 20 Apr 2016 05:53:42 +0000 (01:53 -0400)]
core: fix warnings in exec

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

7 years agocore: fix warnings in error
Alexandre Terrasa [Wed, 20 Apr 2016 05:53:37 +0000 (01:53 -0400)]
core: fix warnings in error

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

7 years agocore: fix warnings in ropes
Alexandre Terrasa [Wed, 20 Apr 2016 05:51:55 +0000 (01:51 -0400)]
core: fix warnings in ropes

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

7 years agocore: fix warnings in abstract_text
Alexandre Terrasa [Wed, 20 Apr 2016 05:51:50 +0000 (01:51 -0400)]
core: fix warnings in abstract_text

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

7 years agocore: fix warnings in list
Alexandre Terrasa [Wed, 20 Apr 2016 05:46:17 +0000 (01:46 -0400)]
core: fix warnings in list

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

7 years agocore: fix warnings in array
Alexandre Terrasa [Wed, 20 Apr 2016 05:40:56 +0000 (01:40 -0400)]
core: fix warnings in array

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

7 years agoMerge: README: Update libgc's URL
Jean Privat [Mon, 30 May 2016 17:14:12 +0000 (13:14 -0400)]
Merge: README: Update libgc's URL

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

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

7 years agoMerge: nitweb: clean existing api
Jean Privat [Mon, 30 May 2016 17:14:07 +0000 (13:14 -0400)]
Merge: nitweb: clean existing api

This PR cleans the Quick&Dirty(c) JSON API of nitweb to use the model_json one.

Modified services:
* /uml -> /api/um/:entity
* /code -> /api/code/:entity
* /random -> /api/random
* /search -> /api/search

Also do some renaming to match `popcorn` philosophy.

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

7 years agonitweb: migrate /entity?json to /api/entity
Alexandre Terrasa [Fri, 20 May 2016 02:59:04 +0000 (22:59 -0400)]
nitweb: migrate /entity?json to /api/entity

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

7 years agonitweb: migrate /uml to /api/uml/:entity
Alexandre Terrasa [Fri, 20 May 2016 02:57:06 +0000 (22:57 -0400)]
nitweb: migrate /uml to /api/uml/:entity

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

7 years agonitweb: migrate /code to /api/code/:entity
Alexandre Terrasa [Fri, 20 May 2016 02:48:48 +0000 (22:48 -0400)]
nitweb: migrate /code to /api/code/:entity

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

7 years agonitweb: migrate /random to /api/random
Alexandre Terrasa [Fri, 20 May 2016 02:47:32 +0000 (22:47 -0400)]
nitweb: migrate /random to /api/random

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

7 years agonitweb: migrate /search to /api/search
Alexandre Terrasa [Wed, 25 May 2016 03:21:34 +0000 (23:21 -0400)]
nitweb: migrate /search to /api/search

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

7 years agonitweb: introduce model_api
Alexandre Terrasa [Fri, 20 May 2016 02:43:33 +0000 (22:43 -0400)]
nitweb: introduce model_api

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

7 years agonitweb: rename ModelAction intro ModelHandler
Alexandre Terrasa [Fri, 20 May 2016 02:34:41 +0000 (22:34 -0400)]
nitweb: rename ModelAction intro ModelHandler

Following the popcorn style

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

7 years agoweb: redefine model_json for API ready json objets of Model
Alexandre Terrasa [Tue, 19 Apr 2016 01:20:38 +0000 (21:20 -0400)]
web: redefine model_json for API ready json objets of Model

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

7 years agoREADME: Update libgc's URL
jcbrinfo [Mon, 30 May 2016 13:03:07 +0000 (09:03 -0400)]
README: Update libgc's URL

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

7 years agoMerge: rta: resolve the open-types in a depth-first order to reach limit faster
Jean Privat [Sun, 29 May 2016 20:36:02 +0000 (16:36 -0400)]
Merge: rta: resolve the open-types in a depth-first order to reach limit faster

Reported-by: Alexandre Terrasa <alexandre@moz-code.org> @Morriar

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

7 years agoMerge: catalog: tweak documentation score
Jean Privat [Sun, 29 May 2016 20:35:59 +0000 (16:35 -0400)]
Merge: catalog: tweak documentation score

especially, private things, redefinitions and test_suites count for peanuts.

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

7 years agoMerge: Int::is_pow2
Jean Privat [Sun, 29 May 2016 20:35:56 +0000 (16:35 -0400)]
Merge: Int::is_pow2

Simple addition to `core`, the `is_pow2` method on Int tells whether an integer is a power of two.

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

7 years agorta: resolve the open-types in a depth-first order to reach limit faster
Jean Privat [Sun, 29 May 2016 02:45:45 +0000 (22:45 -0400)]
rta: resolve the open-types in a depth-first order to reach limit faster

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

7 years agocatalog: tweak documentation score
Jean Privat [Sat, 28 May 2016 20:38:43 +0000 (16:38 -0400)]
catalog: tweak documentation score

especially, private things, redefinitions and test_suites count for peanuts.

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

7 years agolib/core: Added `Int::is_pow2` to library
Lucas Bajolet [Sat, 28 May 2016 17:26:25 +0000 (13:26 -0400)]
lib/core: Added `Int::is_pow2` to library

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

7 years agotests: filter out readline on OSX
Jean Privat [Sat, 28 May 2016 14:18:54 +0000 (10:18 -0400)]
tests: filter out readline on OSX

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

7 years agoMerge: NOTICE: Update
Jean Privat [Fri, 27 May 2016 18:48:07 +0000 (14:48 -0400)]
Merge: NOTICE: Update

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

Pull-Request: #2135

7 years agoMerge: examples/fibonacci: fix off-by-one fibonacci
Jean Privat [Fri, 27 May 2016 18:48:02 +0000 (14:48 -0400)]
Merge: examples/fibonacci: fix off-by-one fibonacci

Signed-off-by: Tony Gaetani <tony.gaetani@gmail.com>

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

7 years agoMerge: Docunit --no-color
Jean Privat [Fri, 27 May 2016 18:47:56 +0000 (14:47 -0400)]
Merge: Docunit --no-color

Small last nitpicks on nitnuit

* --no-color mode
* better summary at the end
* working dir no more hidden and removed on success

Pull-Request: #2131

7 years agoMerge: GNU readline wrapper
Jean Privat [Fri, 27 May 2016 18:47:53 +0000 (14:47 -0400)]
Merge: GNU readline wrapper

This is a tiny wrapper for the GNU readline library. For some reasons, pkg-config doesn't know about libreadline so I had to hardcode the cflags using the ldflags module annotation.

Signed-off-by: Frédéric Vachon <fredvac@gmail.com>

Pull-Request: #2083
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Etienne M. Gagnon <egagnon@j-meg.com>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>

7 years agoNOTICE: Update
Jean-Christophe Beaupré [Fri, 27 May 2016 18:30:46 +0000 (14:30 -0400)]
NOTICE: Update

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

7 years agonitunit: update tests
Jean Privat [Fri, 27 May 2016 15:28:59 +0000 (11:28 -0400)]
nitunit: update tests

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

7 years agonitunit: remove the working directory on success
Jean Privat [Fri, 27 May 2016 15:26:16 +0000 (11:26 -0400)]
nitunit: remove the working directory on success

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

7 years agoexamples/fibonacci: fix off-by-one fibonacci
Tony Gaetani [Fri, 27 May 2016 09:07:52 +0000 (11:07 +0200)]
examples/fibonacci: fix off-by-one fibonacci

Signed-off-by: Tony Gaetani <tony.gaetani@gmail.com>

7 years agolib: Add a tiny GNU readline wrapper
Frédéric Vachon [Sat, 14 May 2016 16:21:07 +0000 (12:21 -0400)]
lib: Add a tiny GNU readline wrapper

Signed-off-by: Frédéric Vachon <fredvac@gmail.com>

7 years agonitunit: the working dir is now `nitunit.out`
Jean Privat [Fri, 27 May 2016 02:31:05 +0000 (22:31 -0400)]
nitunit: the working dir is now `nitunit.out`

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

7 years agonitunit: improve summary of results
Jean Privat [Fri, 27 May 2016 02:25:30 +0000 (22:25 -0400)]
nitunit: improve summary of results

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

7 years agonitunit: honor --no-color
Jean Privat [Thu, 26 May 2016 23:53:59 +0000 (19:53 -0400)]
nitunit: honor --no-color

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

7 years agoMerge: nitcorn: FileServer default file
Jean Privat [Thu, 26 May 2016 23:55:27 +0000 (19:55 -0400)]
Merge: nitcorn: FileServer default file

This PR introduce the concept of default file in `FileServer`. This allow the user to specify what file to return instead of the 404 page if no file matches the query.

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

7 years agoMerge: lib/core: Added `is_dir` function to `Path`
Jean Privat [Thu, 26 May 2016 23:55:15 +0000 (19:55 -0400)]
Merge: lib/core: Added `is_dir` function to `Path`

Quite self-explanatory, really it is just a simpler `Path::stat` followed by a `FileStat::is_dir`.

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

7 years agocore: fix warnings in abstract_collection
Alexandre Terrasa [Wed, 20 Apr 2016 05:38:41 +0000 (01:38 -0400)]
core: fix warnings in abstract_collection

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

7 years agolib/popcorn: update README for `default_file`
Alexandre Terrasa [Mon, 23 May 2016 20:15:00 +0000 (16:15 -0400)]
lib/popcorn: update README for `default_file`

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

7 years agolib/popcorn: update angular example and test
Alexandre Terrasa [Mon, 23 May 2016 20:12:01 +0000 (16:12 -0400)]
lib/popcorn: update angular example and test

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

7 years agolib/popcorn: add example and test for default_file
Alexandre Terrasa [Mon, 23 May 2016 20:11:25 +0000 (16:11 -0400)]
lib/popcorn: add example and test for default_file

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

7 years agolib/popcorn: StaticHandler use `default_file`
Alexandre Terrasa [Mon, 23 May 2016 20:10:15 +0000 (16:10 -0400)]
lib/popcorn: StaticHandler use `default_file`

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

7 years agonitcorn/file_server: allow default_response if not file match
Alexandre Terrasa [Mon, 23 May 2016 20:09:39 +0000 (16:09 -0400)]
nitcorn/file_server: allow default_response if not file match

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

7 years agonitcorn/file_server: fix warnings on file_stat calls
Alexandre Terrasa [Mon, 23 May 2016 19:37:15 +0000 (15:37 -0400)]
nitcorn/file_server: fix warnings on file_stat calls

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

7 years agonitcorn/file_server: extract answer_redirection method
Alexandre Terrasa [Mon, 23 May 2016 19:14:17 +0000 (15:14 -0400)]
nitcorn/file_server: extract answer_redirection method

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

7 years agonitcorn/file_server: extract answer_directory_listing method
Alexandre Terrasa [Mon, 23 May 2016 19:09:57 +0000 (15:09 -0400)]
nitcorn/file_server: extract answer_directory_listing method

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

7 years agonitcorn/file_server: extract answer_file method
Alexandre Terrasa [Mon, 23 May 2016 19:09:11 +0000 (15:09 -0400)]
nitcorn/file_server: extract answer_file method

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

7 years agolib/core: Added `is_dir` function to `Path`
Lucas Bajolet [Thu, 26 May 2016 18:55:49 +0000 (14:55 -0400)]
lib/core: Added `is_dir` function to `Path`

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

7 years agoMerge: Popcorn: use_before, use_after
Jean Privat [Thu, 26 May 2016 15:43:35 +0000 (11:43 -0400)]
Merge: Popcorn: use_before, use_after

This PR introduce two changes in the popcorn request-response cycle:
* Introduce placeholders `use_before` and `use_after` to force handler execution before or after each request. This makes the life of developer easier when using a lot of routers/routers.
* Break response cycle if a between (between as between before and after) handler gives a response then call after_handler. This encourage the use of middleware into `use_before` and `use_after` and avoid requests sent twice. Bonus the api makes more sense like this.

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

7 years agoMerge: src/model: fix mdoc_or_fallback for MClasses and MProperties
Jean Privat [Thu, 26 May 2016 15:43:33 +0000 (11:43 -0400)]
Merge: src/model: fix mdoc_or_fallback for MClasses and MProperties

Specify `mdoc_or_fallback` behavior in MClass and MProperty (return intro mdoc)

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

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

7 years agoMerge: model_collect: add services for module importation
Jean Privat [Thu, 26 May 2016 15:43:30 +0000 (11:43 -0400)]
Merge: model_collect: add services for module importation

Build a new hierarchy poset from MClass inheritance

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

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

7 years agoMerge: Less randomness and race conditions in tests
Jean Privat [Thu, 26 May 2016 13:06:47 +0000 (09:06 -0400)]
Merge: Less randomness and race conditions in tests

Parallel executions can cause some race collisions on named resources (e.g. DB table names).

To solve this issue, `tests.sh` and `nitunit` initialize  `NIT_TESTING_ID` with a distinct integer identifier that can be used to give unique names to resources.

`rand` is not a recommended way to get a distinct identifier because its randomness is disabled by default.

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

7 years agoMerge: toolcontext: introduce --share-dir
Jean Privat [Thu, 26 May 2016 13:06:43 +0000 (09:06 -0400)]
Merge: toolcontext: introduce --share-dir

So other tools than nitdoc can use it.

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

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

7 years agoMerge: Generalize MEntity visibility
Jean Privat [Thu, 26 May 2016 13:06:41 +0000 (09:06 -0400)]
Merge: Generalize MEntity visibility

Proposal to generalize the visibility concept to all the MEntities:
* packages, groups and modules are always public
* classes depend on the signature, classdefs return the class visibility (shortcut)
* properties depend on the signature, propdefs return the property visibility (shortcut)
Other exotic MEntities are always public.

This PR makes the changes in model and update `model_json` as PoC for the gain of the generalization.

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

7 years agoMerge: make nitunit more colorful (and useful?)
Jean Privat [Thu, 26 May 2016 13:06:39 +0000 (09:06 -0400)]
Merge: make nitunit  more colorful (and useful?)

This series move more information in the UnitTest class, this allow specific and unified way of displaying the test results.

See the asciinema: https://asciinema.org/a/108jd2a3tkfifg3wzoacg0a65

Comments? Needs? Ideas?

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

7 years agonitrpg&nitcorn: replace `rand` with `NIT_TESTING_ID` for their tests
Jean Privat [Wed, 25 May 2016 19:38:25 +0000 (15:38 -0400)]
nitrpg&nitcorn: replace `rand` with `NIT_TESTING_ID` for their tests

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

7 years agotests.sh: add NIT_TESTING_ID with the same semantic than with nitunit
Jean Privat [Wed, 25 May 2016 19:36:09 +0000 (15:36 -0400)]
tests.sh: add NIT_TESTING_ID with the same semantic than with nitunit

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

7 years agonitunit manual: document NIT_TESTING, SRAND and NIT_TESTING_ID
Jean Privat [Wed, 25 May 2016 19:34:38 +0000 (15:34 -0400)]
nitunit manual: document NIT_TESTING, SRAND and NIT_TESTING_ID

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

7 years agonitdoc: use --share-dir option
Alexandre Terrasa [Thu, 26 May 2016 04:31:21 +0000 (00:31 -0400)]
nitdoc: use --share-dir option

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

7 years agotoolcontext: introduce --share-dir
Alexandre Terrasa [Thu, 26 May 2016 04:31:07 +0000 (00:31 -0400)]
toolcontext: introduce --share-dir

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

7 years agolib/popcorn: document use_before and use_after
Alexandre Terrasa [Wed, 25 May 2016 23:56:50 +0000 (19:56 -0400)]
lib/popcorn: document use_before and use_after

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

7 years agotests: fix model_visitor tests since mdoc fix
Alexandre Terrasa [Wed, 25 May 2016 23:47:59 +0000 (19:47 -0400)]
tests: fix model_visitor tests since mdoc fix

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

7 years agomodel/model_collect: importation_poset do not collect direct parents and children
Alexandre Terrasa [Wed, 25 May 2016 23:43:18 +0000 (19:43 -0400)]
model/model_collect: importation_poset do not collect direct parents and children

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

7 years agomodel_collect: add services for module importation
Alexandre Terrasa [Fri, 18 Dec 2015 05:20:41 +0000 (00:20 -0500)]
model_collect: add services for module importation

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

7 years agonitunit: set more environment variables NIT_TESTING_ID and SRAND
Jean Privat [Wed, 25 May 2016 19:34:04 +0000 (15:34 -0400)]
nitunit: set more environment variables NIT_TESTING_ID and SRAND

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

7 years agolib/core: add `Sys::pid`
Jean Privat [Wed, 25 May 2016 19:33:34 +0000 (15:33 -0400)]
lib/core: add `Sys::pid`

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

7 years agotests: update nitunit tests
Jean Privat [Wed, 25 May 2016 00:15:08 +0000 (20:15 -0400)]
tests: update nitunit tests

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

7 years agonitunit: show a progress bar
Jean Privat [Wed, 25 May 2016 00:11:56 +0000 (20:11 -0400)]
nitunit: show a progress bar

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

7 years agonitunit: suites in docunits have a name
Jean Privat [Wed, 25 May 2016 00:11:08 +0000 (20:11 -0400)]
nitunit: suites in docunits have a name

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

7 years agonitunit: separate the error message from the test output
Jean Privat [Wed, 25 May 2016 00:10:27 +0000 (20:10 -0400)]
nitunit: separate the error message from the test output

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

7 years agonitunit: add more information in UnitTest
Jean Privat [Wed, 25 May 2016 00:06:57 +0000 (20:06 -0400)]
nitunit: add more information in UnitTest

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

7 years agolib/popcorn: App uses pre / post middlewares
Alexandre Terrasa [Mon, 23 May 2016 20:52:36 +0000 (16:52 -0400)]
lib/popcorn: App uses pre / post middlewares

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

7 years agolib/popcorn: introduce Router::use_after service
Alexandre Terrasa [Mon, 23 May 2016 20:52:12 +0000 (16:52 -0400)]
lib/popcorn: introduce Router::use_after service

So the user can force some middlewares to be called after the other handlers.

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

7 years agolib/popcorn: introduce Router::use_before service
Alexandre Terrasa [Mon, 23 May 2016 20:51:55 +0000 (16:51 -0400)]
lib/popcorn: introduce Router::use_before service

So the user can force some middlewares to be called before the other handlers.

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

7 years agolib/popcorn: extract Router::handler_in private service
Alexandre Terrasa [Mon, 23 May 2016 20:50:38 +0000 (16:50 -0400)]
lib/popcorn: extract Router::handler_in private service

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

7 years agolib/popcorn: extract Router::build_route private service
Alexandre Terrasa [Mon, 23 May 2016 20:49:11 +0000 (16:49 -0400)]
lib/popcorn: extract Router::build_route private service

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