Commit Graph

7 Commits

Author SHA1 Message Date
Seth Vargo 39233e802f Validate pushes in the global config 2015-01-07 15:51:20 -05:00
Mitchell Hashimoto 4efb401050 kernel/v2: push config keys on strategy
/cc @sethvargo - This adds more tests that fail if this change isn't in
place.
2014-12-14 22:24:14 -08:00
Seth Vargo 214a79e057 Pushes are hashed by name, not strategy.
@mitchellh this is a partial revert of 84ae22e. It took me a little bit
to figure out why this broke everything, but then I finally realized it.

84ae22e changes the finalize! function to lookup pushes by strategy
type, but pushes are keyed by push strategy name. In other words, given:

    config.push.define("foo", strategy: "bar")

the `push_configs` has will look like:


    { :foo => [:bar, #<PushConfig>] }

This is important, because if we key by strategy, the user cannot 
specify the same push strategy more than once:

    config.push.define("foo", strategy: "bar")
    config.push.define("zip", strategy: "bar")

If we keyed off of the strategy, this would be impossible.
2014-12-14 23:32:32 -05:00
Mitchell Hashimoto 84ae22e976 kernel/v2: fix push strategy config lookup 2014-12-12 01:36:39 -08:00
Seth Vargo 9af7675bd3 Use a more readable version for setter 2014-12-08 11:35:11 -08:00
Seth Vargo 411c7d6f75 Define finalize! and __compiled_pushes for Push config 2014-12-08 11:35:11 -08:00
Seth Vargo 03b8105571 Super primitive implementation of Environment#push 2014-12-08 11:35:10 -08:00