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:
+14
-1
@@ -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
|
||||
--------------------
|
||||
|
||||
@@ -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:
|
||||
Reference in New Issue
Block a user