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

Allow Booleans as permissible return values from YML #7

Closed
wants to merge 2 commits into from

Conversation

smoll
Copy link

@smoll smoll commented Jan 23, 2015

Given a local.yml that looks like this:

    base_url:  http://system_test.mycompany.com
    use_ssl: false

This will allow us to call:

FigNewton.use_ssl
# => false

Without this change we get the following:

FigNewton.use_ssl
# => undefined method `use_ssl' for #<FigNewton::Node:0x007fbd754c9408>

@smoll
Copy link
Author

smoll commented Jan 23, 2015

@cheezy let me know what you think. I can also add a couple cucumber tests for this if you'd like.

@@ -57,18 +64,28 @@ Feature: Functionality of the fig_newton gem
Given I have read the configuration file
When I ask for a value that does not exist named "does_not_exist" that has a default value "the default value"
Then I should see "the default value"


Scenario: Requesting data that does not exist but has a default value of true should return the default value of true
Copy link
Author

Choose a reason for hiding this comment

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

This scenario and the one below it are failing in local tests -- looks like my proposed change does not work for booleans specified as defaults. Not sure if this is even necessary, but looking into it.

@smoll smoll closed this Jan 30, 2015
@stevenjackson
Copy link
Collaborator

@smoll Check out #8. See if that works for you.

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

2 participants