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

Open
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
Contributor

richtera commented Dec 16, 2013

Fix #254 related to #251.

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

Contributor

richtera commented Dec 17, 2013

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 notifications@github.com 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/ruhoh/ruhoh.rb/pull/256#issuecomment-30719281
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment