howech/cfndsl — pull request #37 by danrasband (2014-04-09 21:44:10+00:00)
Title: Add conditions and condition functions

This pull request adds conditions and condition functions. So now you can add a condition to the cloudformation template and reference it in a resource like this:

```ruby
CloudFormation do
Condition :IsProduction, FnEquals(Ref(:Environment), 'production')

Resource :MyEC2Instance do
Condition :IsProduction

# ... other properties
end
end
```

The pull request adds the following condition functions:

* `Fn::And` -> `FnAnd([condition1, condition2])`
* `Fn::Or` -> `FnOr([condition1, condition2])`
* `Fn::Not` -> `FnNot(condition)`
* `Fn::If` -> `FnIf(condition, trueValue, falseValue)`
* `Fn::Equals` -> `FnEquals(value1, value2)`

The other changes are just converting tabs to spaces and removing spaces at the ends of lines and such.