Installation can be done using asdf
, which requires the following plugins:
Once the plugins are installed, type the following command on the project directory:
asdf install
- Install the app dependencies:
mix deps.get
- Compile the app:
mix compile
- Access the iex terminal:
iex -S mix
- Try out:
Gatherer.fetch("https://www.google.com")
In order to run the tests, type the following:
mix test
In order to see the coverage, add the --cover
option:
mix test --cover
- The
fetch
function does not check whether the img sources or the anchor hrefs follow the URL syntax. Given more time, one may add validations, as a next step.