Skip to content

Make sure we only merge_data with yml, yaml and json files. #256

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

richtera
Copy link
Contributor

Fix #254 related to #251.

@waynedpj
Copy link

ahoy, looks like you beat me to the fix whilst i am still trying to figure out Git .. but you probably actually fixed it ;) however, the only change i had make to fix my issue #254 was at the following line in ruhoh.rb/lib/ruhoh/config.rb:

Dir["*/config.*"].each { |id|

changing that to

Dir.glob("config.{yml,yaml,json}", File::FNM_CASEFOLD).each { |id|

i have not figured out how to apply your patch, send mine, etc., but when i make your patch by hand the problem is also solved. also, if i apply your and my fix together, the problem still is resolved. unfortunately i do not yet understand the code well enough to know if both should be applied? perhaps you or @plusjade can shed some light.

either way, thanks for the fix.

peace, w

@richtera
Copy link
Contributor Author

As far as I know both should be there. The one you fixed pre-reads all the
config files to find the theme and then the code I changed is applied. Your
regular expression using {} and comma might be better than () and vertical
bar since we don't need to capture the extension.
Andy

Sent via the internets

On Dec 16, 2013, at 8:38 PM, waynedpj [email protected] wrote:

ahoy, looks like you beat me to the fix whilst i am still trying to figure
out Git .. but probably actually fixed it ;) however, the only change i had
make to fix my issue #254
https://github.com/ruhoh/ruhoh.rb/issues/254was at the following
line https://github.com/ruhoh/ruhoh.rb/blob/master/lib/ruhoh/config.rb#L57in
ruhoh.rb/lib/ruhoh/config.rbhttps://github.com/ruhoh/ruhoh.rb/blob/master/lib/ruhoh/config.rb
:

Dir["/config."].each { |id|

changing that to

Dir.glob("config.{yml,yaml,json}", File::FNM_CASEFOLD).each { |id|

i have not figured out how to apply your patch, send mine, etc., but when i
make your patch by hand the problem is also solved. also, if i apply your
and my fix together, the problem still is resolved. unfortunately i do not
yet understand the code well enough to know if both should be applied?
perhaps you or @plusjade https://github.com/plusjade can shed some light.

either way, thanks for the fix.

peace, w


Reply to this email directly or view it on
GitHubhttps://github.com//pull/256#issuecomment-30719281
.

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.

config.yml~ (backup file) overrides config.yml
2 participants