Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved hash and yaml output of a target definition #11

Merged
merged 2 commits into from
Apr 6, 2013

Conversation

supermarin
Copy link

No description provided.

@coveralls
Copy link

Coverage decreased (-0.0%) when pulling 198b111 on internal_hash into 53dbab9 on master.

View Details

# and :for_pods key for inhibiting warnings per pod
#
def inhibit_warnings_hash
get_hash_value('inhibit_warnings', { 'all' => false, 'for_pods' => [] })
Copy link
Member

Choose a reason for hiding this comment

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

The class tries to remove the keys when they are false to keep the YAML clean. In this case, would using the following default work:

{}

And then in the methods do something like:

       def inhibit_warnings_for_pod(pod_name)
          inhibit_warnings_hash['for_pods'] ||= []
          inhibit_warnings_hash['for_pods'] << pod_name
       end

@fabiopelosin
Copy link
Member

Lol… missed your comment… I prefer not to have the keys which are empty or false so the YAML Podfiles stay clean.

@supermarin
Copy link
Author

yep. makes sense

supermarin pushed a commit that referenced this pull request Apr 6, 2013
improved hash and yaml output of a target definition
@supermarin supermarin merged commit 9084f2a into master Apr 6, 2013
@coveralls
Copy link

Coverage decreased (-0.11%) when pulling 5198ba2 on internal_hash into 53dbab9 on master.

View Details

Ashton-W pushed a commit to Ashton-W/Core that referenced this pull request Nov 2, 2015
improved hash and yaml output of a target definition
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants