Skip to content

Comments

This allows you to manage symbol keys#3

Open
binford2k wants to merge 1 commit intofiddyspence:masterfrom
binford2k:ticket/2/symbols
Open

This allows you to manage symbol keys#3
binford2k wants to merge 1 commit intofiddyspence:masterfrom
binford2k:ticket/2/symbols

Conversation

@binford2k
Copy link
Contributor

Given a hash like

$symbols = {
  ":bar" => {
    "baz" => "foo",
    "moo" => 1,
    ":cow" => "1",
  }
}

Prior to this commit, this type would manage a hash with literal keys
with the colon in them and it was impossible to manage a hash with
symbolic keys. This commit will convert a string like ":thing" to a
symbol, like :thing when managing yaml files.

Fixes #2

Given a hash like

```puppet
$symbols = {
  ":bar" => {
    "baz" => "foo",
    "moo" => 1,
    ":cow" => "1",
  }
}
```

Prior to this commit, this type would manage a hash with literal keys
with the colon in them and it was impossible to manage a hash with
symbolic keys. This commit will convert a string like `":thing"` to a
symbol, like `:thing` when managing yaml files.

Fixes fiddyspence#2
@fiddyspence
Copy link
Owner

Hi de hi. I thunk each_with_object was a new in ruby 1.9.3 thing which would break all the EL6 (non puppet-agent users. I (deliberately because holiday) don't have access to a real computering device until early June to check properly sadly. Also it looks like Chris of the past was in a hurry (read lazy) and never bothered putting even the most basic of basic unit tests on the code (again I can fix this in June trivially).

@binford2k
Copy link
Contributor Author

I do think you're right. I may push an update. In the meantime my bleeding ◔_◔ template will do. Have an awesome holiday!

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