fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fab-user] Completed suggestions: load and config (#1, #2, #3)


From: Niklas Lindström
Subject: [Fab-user] Completed suggestions: load and config (#1, #2, #3)
Date: Wed, 22 Oct 2008 00:09:45 +0200

[These changes are present in my fork of Fabric at
<http://github.com/niklasl/fabric/tree/master>]


== 1. Load once ==

Only run `load` once per filename. Uses `_LOADED_FABFILES`.


== 2. Load with namespaces ==

`load` takes a managed namespace as globals, composed of the items in
COMMANDS, OPERATIONS, DECORATORS and the new `config` object (see
`_new_namespace`).

Note: as per Christian's advice, I've run:

    $ cd prototypes/; fab test_imports test_global_assignment

which printed "all double-good". So I think Christian is happy about it. :)


== 3. A config object instead of get/set ==

The object `config` has been added as a suggested replacement for the
`get` and `set` operators. It is actually a reference to `ENV`, which
is now an instance of `Configuration`. (See also `_new_namespace` from
Change #2.)

Note: I initially named this `var`, but it looked to cryptic in my opinion.

Suggestion: Christian suggested `let`, but I've kept `config` so far..

Suggestion: if this is accepted, I propose to remove the current `get`
and `set` operations (and rename the `set` command).


------------------------------------------
Best regards,
Niklas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]