Skip to content

filipewl/tlw

Repository files navigation

Smallest Weather Spread CLI

This CLI tool processes weather data from a .dat file and finds the day with the smallest temperature spread.

Usage

Running the Script

You can run the script in two ways:

1. Make the Script Executable

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

2. Run with Ruby Directly

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)

Running the tests

Install the dependencies with Bundler:

bundle install

Run the tests with RSpec:

bundle exec rspec

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages