Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

fudge_settings leak across directories #69

Open
celeduc opened this issue Oct 4, 2013 · 2 comments
Open

fudge_settings leak across directories #69

celeduc opened this issue Oct 4, 2013 · 2 comments
Milestone

Comments

@celeduc
Copy link
Contributor

celeduc commented Oct 4, 2013

If I specify a value in fudge_settings.yml in a directory that same value will carry over to the next directory unless overridden by a fudge_settings.yml file with that same key.

e.g.:

  each_directory ['meta_one', 'meta_too'] do
    task :torture
  end

meta_one/fudge_settings.yml:

torture:
  threshold: 8
  average: 4

meta_two/fudge_settings.yml:

torture:
  threshold: 8

In this case, the torture task will still apply the average of 4 in meta_two.

@KevinBrowne
Copy link
Member

I agree that this is a problem, but when we fix this we may want to consider the question of carrying settings over into sub-directories.

For example, what if I did something like this?

each_directory ['meta/one', 'meta/one/point_1', 'meta/one/point_2', 'meta/too'] do
  task :torture
end

In this case, I would expect any values in meta/one/fudge_settings.yml to carry through to meta/one/point_1 and meta/one/point_2 (unless explicitly overridden in the sub-directory), but not to meta/too.

The case for carrying settings over into sub-directories might be clearer if we rewrite the above as:

each_directory 'meta/**/*' do
  task :torture
end

@loz
Copy link
Contributor

loz commented Mar 27, 2014

Are we saying that it's not possible to override the settings in the Fudgefile declaration? I see carrying through to subdirs as desirable. We might want a flag to say 'recursive: false' or something

@loz loz closed this as completed Mar 27, 2014
@loz loz reopened this Mar 27, 2014
@loz loz added this to the 1.0 Release milestone Mar 27, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

3 participants