Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix configuring cassette_library_dir #50

Merged
merged 2 commits into from
Mar 26, 2016
Merged

Fix configuring cassette_library_dir #50

merged 2 commits into from
Mar 26, 2016

Conversation

wojtekmach
Copy link
Contributor

  • when user of the app calls cassette_library_dir/2, that function is
    actually being called twice. 1st time because of
    ConfigLoader.load_defaults and 2nd time with the custom dir. Thus,
    calling File.mkdir_p inside cassette_library_dir/2 with a custom
    dir, always created 2 dirs: the default one and the custom one
  • it looks like this call isn't needed here, because ExVCR.JSON.save/2
    creates a directory when it doesn't exist
  • Use File.mkdir_p! since we don't do explicit error handling

* when user of the app calls `cassette_library_dir/2`, that function is
  actually being called twice. 1st time because of
  ConfigLoader.load_defaults and 2nd time with the custom dir. Thus,
  calling `File.mkdir_p` inside `cassette_library_dir/2` with a custom
  dir, always created 2 dirs: the default one and the custom one

* it looks like this call isn't needed here, because `ExVCR.JSON.save/2`
  creates a directory when it doesn't exist
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 93.059% when pulling a990cdc on wojtekmach:fix_cassette_library_dir_config into e8ce74e on parroty:master.

@parroty parroty merged commit 23a76d7 into parroty:master Mar 26, 2016
@parroty
Copy link
Owner

parroty commented Mar 26, 2016

Thanks!. It's not well structured and messed at adding the default setting 😓

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants