This CLI tool processes weather data from a .dat
file and finds the day with the smallest temperature spread.
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_temperature_spread
Then, you can execute the script directly from the terminal:
bin/smallest_temperature_spread data/w_dataa.dat
If you prefer not to change file permissions, you can run the script using the Ruby interpreter directly:
ruby bin/smallest_temperature_spread data/w_dataa.dat
Example of the output:
Day with the smallest temperature spread: 14
Smallest temperature spread: 2 (Max 61 - Min 59)
Install the dependencies with Bundler:
bundle install
Run the tests with RSpec:
bundle exec rspec