Skip to content
This repository was archived by the owner on Jun 5, 2020. It is now read-only.

Conversation

cyberious
Copy link

  • Currently have to quote all boolean values in order to pass validation of empty?
    this fix adds a check to ensure the value type responds to empty?


validate do
fail('it is required to pass "value"') if self[:value].nil? || self[:value].empty? || self[:value] == :absent
fail('it is required to pass "value"') if self[:value].nil? || (self[:value].respond_to?(:emtpy?) && self[:value].empty?) || self[:value] == :absent

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like a typo - :emtpy => empty

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doh!

- Currently have to quote all boolean values in order to pass validation of empty?
  this fix adds a check to ensure the value type responds to empty?
…caught with modulesync

- A lot of ruby dependent issues need to be resolved include rake and fast_gettext
@bmjen bmjen merged commit 4e4498e into puppetlabs-toy-chest:master Dec 13, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants