Skip to content

refactor8/parser

Repository files navigation

Parser

This test should not take you longer than two hours to complete.

What we are looking for: functionality, efficiency, readability and tests Use this test to demonstrate your understanding of OO and TDD.

  1. ruby_app

Write a ruby script that:

a. Receives a log as argument (webserver.log is provided) e.g.: ./parser.rb webserver.log

b. Returns the following:

list of webpages with most page views ordered from most pages views to less page views e.g.: /home 90 visits /index 80 visits etc... list of webpages with most unique page views also ordered e.g.: /about/2 8 unique views /index 5 unique views etc...

Installation

Add this line to your application's Gemfile:

gem 'parser'

And then execute:

$ bundle

Or install it yourself as:

$ gem install parser

Usage

$ parser <logfile>

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/refactor8/parser. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Parser project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

About

Web log parser code challenge

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published