This CLI tool processes goals data from a .dat
file and finds the Team with the smallest difference in for and against goals.
You can run the script in two ways:
First, ensure the script is executable. You can make the script executable by running:
chmod +x bin/smallest_goals_difference
Then, you can execute the script directly from the terminal:
bin/smallest_goals_difference data/soccerr.dat
If you prefer not to change file permissions, you can run the script using the Ruby interpreter directly:
ruby bin/smallest_goals_difference data/soccerr.dat
Example of the output:
Team with the smallest difference in for and against goals: Aston_Villa
Smallest difference: 1 (For 46 - Against 47)
Install the dependencies with Bundler:
bundle install
Run the tests with RSpec:
bundle exec rspec