* DEV: Add a new way to run specs in parallel with better output
This commit:
1. adds a new executable, `bin/interleaved_rspec` which works much like
`rspec`, but runs the tests in parallel.
2. adds a rake task, `rake interleaved:spec` which runs the whole test
suite.
3. makes autospec use this new wrapper by default. You can disable this
by running `PARALLEL_SPEC=0 rake autospec`.
It works much like the `parallel_tests` gem (and relies on it), but
makes each subprocess use a machine-readable formatter and parses this
output in order to provide a better overall summary.
(It's called interleaved, because parallel was taken and naming is
hard).
* Make popen3 invocation safer
* Use FileUtils instead of shelling out
* DRY up reporter
* Moved summary logic into Reporter
* s/interleaved/turbo/g
* Move Reporter into its own file
* Moved run into its own class
* Moved Runner into its own file
* Move JsonRowsFormatter under TurboTests
* Join on threads at the end
* Acted on feedback from eviltrout
This reduces chances of errors where consumers of strings mutate inputs
and reduces memory usage of the app.
Test suite passes now, but there may be some stuff left, so we will run
a few sites on a branch prior to merging
Previously autospec would not pick up save if you saved a plugin in a
symlinked path, this broke quite a few workflows
We now maintain a reverse map so we can correctly re-run specs in plugins
This commit introduces an ultra low priority queue for post rebakes. This
way rebakes can never interfere with regular sidekiq processing for cases
where we perform a large scale rebake.
Additionally it allows Post.rebake_old to be run with rate_limiter: false
to avoid triggering the limiter when rebaking. This is handy for cases
where you want to just force the full rebake and not wait for it to trickle
This commit also cleans up a bunch of pointless noise each time we boot app
- narrative was loading i18n cause redefinition of consts
- discourse.rb was loaded twice as was auth
- bin/unicorn now does all the smart things and boots unicron in dev
- bin/rails s will boot unicorn with no params
- remove bin/puma which only causes confusion
To get the database rebuilt requires a restart of the container.
I also added a rake admin:create, since it's useful, and it's what `boot_dev --init `does.
This adds the markdown.it engine to Discourse.
https://github.com/markdown-it/markdown-it
As the migration is going to take a while the new engine is default
disabled. To enable it you must change the hidden site setting:
enable_experimental_markdown_it.
This commit is a squash of many other commits, it also includes some
improvements to autospec (ability to run plugins), and a dev dependency
on the og gem for html normalization.
When there are spaces in any of the directories referenced, bash will error out. This wraps those items in quotes to allow bash to parse the path names properly.
This PR is intended to work in concert with the discourse_docker changes
in https://github.com/discourse/discourse_docker/pull/292. I have used
those changes to build a local "discourse_dev" image, and then
_**these**_ changes to easily spin up and work on Discourse and plugin
functionality. It's working well for me, but of course YMMV.
Add `--init` and `--patch` options to bin/docker/boot_dev to make it
easier to spin up a container running Discourse out of a development
directory.
Add `bin/docker/README.md` to explain how to go about using the docker
command-line tools.
Tweak the Docker command-line tools to use the `-u` option to specify
user rather than changing to the user "inside" the container via `chpst`
(This way, we don't have to explicitly specify the HOME environment
variable, either.)
Add `bin/docker/shell` command to make it easy to jump inside the
running container.
Commit b516ecc added `bin/` to the .gitignore file. Now that Discourse
runs using Rails 4 by default, however, we should include the binstubs
generated by `rake rails:update:bin` in version control as this is the
recommendation of the Rails core team. Additionally, for those wishing
to deploy Discourse to Heroku, these binstubs are actually mandatory
according to [this article](https://devcenter.heroku.com/articles/rails4).
Other binstubs can continue to be ignored.
Signed-off-by: David Celis <me@davidcel.is>