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

Add bin/user_agent_parser script. #16

Merged
merged 5 commits into from
Mar 13, 2014
Merged

Add bin/user_agent_parser script. #16

merged 5 commits into from
Mar 13, 2014

Conversation

rejeep
Copy link
Contributor

@rejeep rejeep commented Mar 11, 2014

The script reads each line from STDIN as a user agent, parses it and
prints back the parsed result.

rejeep added 2 commits March 11, 2014 11:04
The script reads each line from STDIN as a user agent, parses it and
prints back the parsed result.
@toolmantim
Copy link
Contributor

Cool!

Can you change it to only init the parser once? Otherwise it's loading from disk and parsing the YML patterns for each line of input.

@rejeep
Copy link
Contributor Author

rejeep commented Mar 12, 2014

Great catch, a lot faster now! :)

toolmantim added a commit that referenced this pull request Mar 13, 2014
Add bin/user_agent_parser script.
@toolmantim toolmantim merged commit 858ccd9 into ua-parser:master Mar 13, 2014
@toolmantim
Copy link
Contributor

Thanks @rejeep — that's now available on rubygems as version 2.1.3.

I've also added you as a collab and gem owner. Feel free to update the Readme to mention the CLI if you think it makes sense to.

Also that performance gotcha keeps popping up (#14) — it'd be great to bump to v3.0.0 and remove that method altogether.

@rejeep
Copy link
Contributor Author

rejeep commented Mar 13, 2014

I've also added you as a collab and gem owner. Feel free to update the Readme to mention the CLI if you think it makes sense to.

Thanks! I found a bug after installing it as a gem. I've fixed it and pushed a new version. I hope I followed your release standards.

Also that performance gotcha keeps popping up (#14) — it'd be great to bump to v3.0.0 and remove that method altogether.

Yes, that would be a good idea. I saw afterwards that you mentioned it in the Readme, but it's easy to miss. Me and a colleague tried to use this gem the other day, but realized it was incredibly slow for large data sets, so we user some other gem. But now I see why it was slow! :)

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