parroty / exvcr

HTTP request/response recording library for elixir, inspired by VCR.
MIT License
720 stars 131 forks source link

Fix warnings from OptionParser in exvcr mix tasks #149

Closed javierjulio closed 4 years ago

javierjulio commented 4 years ago

I'm new to Elixir but fluent in Ruby/VCR. I just implemented exvcr on a small Elixir project where I ran into this and thought I could take a shot at resolving it.

When running either the entry task mix vcr or the mix vcr.check task, it shows the same warning message below, but will just have a different stacktrace:

> mix vcr
warning: not passing the :switches or :strict option to OptionParser is deprecated
  (elixir) lib/option_parser.ex:607: OptionParser.build_config/1
  (elixir) lib/option_parser.ex:231: OptionParser.parse/2
  lib/mix/tasks.ex:17: Mix.Tasks.Vcr.run/1
  (mix) lib/mix/task.ex:331: Mix.Task.run_task/3
  (mix) lib/mix/cli.ex:79: Mix.CLI.run_task/2

These warnings occurred on Elixir v1.9 but I'm not sure what other versions they may or may not occur on. From the documentation and other usage here, I thought the switches key was the preferred approach but I may be wrong. Please correct me and I will be happy to update.

When setting up exvcr on my project, it worked on the first try. Thanks so much! ❤️

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 93.042% when pulling dca3f59623f870fb189dadc1cc2e931e55d82348 on javierjulio:javierjulio-patch-1 into b45c6af4231b087c83977485c1e0e3ae40bcacce on parroty:master.

parroty commented 4 years ago

Thanks!

javierjulio commented 4 years ago

Thank you @parroty! ❤️