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

Modify the config parser to use symbolized key and group names #20

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tacticiankerala
Copy link

When I parsed a configuration file, the hash keys and group names where represented as string.
example:

{
  "foo" => "bar",
  "baz" => "quux",
  "123" => "456"
}

But, I think it will be much more convenient to deal with symbols in that case rather than strings.
example:

{
  :foo => "bar",
  :baz => "quux",
  :"123" => "456"
}

Also, I have modified the ability to add value and add group to support the above behavior.

I have added tests for add value and add group behavior and all the tests are passing.

@tacticiankerala
Copy link
Author

The build is failing in Ruby 1.8, JRuby 1.8 and Ree. I will look into the issue.

@tacticiankerala
Copy link
Author

It was failing because in the tests the method 'sort' was used to compare two arrays of groups. But unfortunately ruby 1.8 does not have sort operator implemented on symbols.

I have modified the tests not to use sort operator .

@derks
Copy link
Member

derks commented Mar 13, 2014

I haven't had a chance to test this out yet... however, do your changes continue to support "string" keys? If not, it would completely break backward compatibility which would not be ideal. Appreciate your feedback either way!

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.

2 participants