You can clone with
No one assigned
I tried two approaches for supporting both 1.9 and 1.8.7.
Converting yaml to a ruby string that's reconstructed using eval works on 1.9 and fails on 1.8.
Converting yaml to json works on 1.9 and fails the test suite on 1.8.
I'd like to use user_agent_parser in github/gollum, however 1.8 support is required. Any advice on converting yaml to a common format that can be shared between ruby versions and still pass the tests?
The YAML has to be shared between not only the Ruby versions, but all the languages that consume ua-parser, so I don't think changing the YAML is feasible.
The only solution I can see is to find a 1.8 compatible YAML parser which supports this newer YAML format.
What seems to be the issue with parsing the yaml? I didn't get an error when I parsed it. Does it incorrectly parse the structure or something?
I think I see. The test yaml files are the issue, correct?
Note: I updated the submodule to the latest ua-parser sha (b269d98) and no yaml parse errors happened. Lots of failures to work through, but yaml parsing seems to work now.
Got the tests passing on 1.8.7:
And on 1.9.3:
Gonna fork and submit a pull request.
That's awesome. I don't remember why it didn't work for me. I ended up using useragent for gollum because both are GitHub projects.