Skip to content

Replace toml with tomlrb #358

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

Merged
merged 1 commit into from
Dec 22, 2015
Merged

Replace toml with tomlrb #358

merged 1 commit into from
Dec 22, 2015

Conversation

bayandin
Copy link
Contributor

It seems current version of toml parser is abandoned and has a lot of unfixed issues. I've replaced toml with tomlrb which also recommended as toml 0.4.0 complaint parser.
My real problem with toml is it can't parse keys with dots:

[caps.chromeOptions.prefs]
"intl.accept_languages" = "en-GB"

Compare with tomlrb:

2.1.5 :001 > require 'tomlrb'
 => true
2.1.5 :002 > require 'toml'
 => true
2.1.5 :003 > t = <<-TOML
2.1.5 :004"> [caps.chromeOptions.prefs]
2.1.5 :005"> "intl.accept_languages" = "en-GB"
2.1.5 :006"> TOML
 => "[caps.chromeOptions.prefs]\n\"intl.accept_languages\" = \"en-GB\"\n"
2.1.5 :007 > TOML::Parser.new(t).parsed
Failed to match sequence (ALL_SPACE (TABLE / TABLE_ARRAY / KEY_VALUE / COMMENT_LINE){0, } ALL_SPACE) at line 2 char 1.
`- Don't know what to do with "\"intl.acce" at line 2 char 1.
 => {}
2.1.5 :008 > Tomlrb.parse(t)
 => {"caps"=>{"chromeOptions"=>{"prefs"=>{"intl.accept_languages"=>"en-GB"}}}}

@jlipps
Copy link
Member

jlipps commented Dec 21, 2015

👍

@maudineormsby
Copy link

👍 as well. nice.

@KazuCocoa
Copy link
Member

🆒

bootstraponline added a commit that referenced this pull request Dec 22, 2015
@bootstraponline bootstraponline merged commit be4dca6 into appium:master Dec 22, 2015
@bayandin bayandin deleted the change-toml-parser branch December 23, 2015 08:52
@bootstraponline
Copy link
Member

@bayandin Thanks for submitting a pull request. The code has been released in appium_lib 8.0.1 and published on RubyGems. There's a call for maintainers #337 so if you'd like to join the appium Ruby team let me know.

@bayandin
Copy link
Contributor Author

@bootstraponline wow! Yes, I'll be happy to join the team. Thanks! :)

@bootstraponline
Copy link
Member

Cool. Invite sent.

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.

5 participants