dsl: add Squib.configure

I ended up adding this one on a whim, but it feels like a long time coming. We need cleaner support for Rakefiles, and this is a good step toward that I think.
This commit is contained in:
Andy Meneely
2016-11-17 21:11:12 -05:00
parent 738aab3997
commit 56b5a711e4
6 changed files with 51 additions and 2 deletions
+14 -1
View File
@@ -47,7 +47,7 @@ prefix
img_dir
default: ``'.'``
For reading image file command (e.g. png and svg), read from this directory instead
warn_ellipsize
@@ -111,6 +111,19 @@ For debugging/sanity purposes, if you want to make sure your configuration optio
puts backend # prints 'memory' by default
end
These are read-only - you will not be able to change these.
Squib.configure sets options programmatically
---------------------------------------------
You can also use :doc:`/dsl/configure` to override anything in the config file. Use it like this:
.. literalinclude:: ../samples/project/Rakefile
:language: ruby
:linenos:
See :doc:`/guides/getting-started/part_3_workflows` for how we put this to good use.
Making Squib Verbose
--------------------
+18
View File
@@ -0,0 +1,18 @@
Squib.configure
---------------
Prior to the construction of a Squib::Deck, set a global default that overrides what is specified `config.yml`.
This is intended to be done prior to Squib::Deck.new, and is intended to be used inside of a Rakefile
Options
^^^^^^^
All options that are specified in :doc:`/config`
Exmaples
^^^^^^^^
.. literalinclude:: ../../samples/project/Rakefile
:language: ruby
:linenos: