Skip to content

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

Open
richtera wants to merge 1 commit intoruhoh:masterfrom
richtera:master
Open

Make sure we only merge_data with yml, yaml and json files.#256
richtera wants to merge 1 commit intoruhoh:masterfrom
richtera:master

Conversation

@richtera
Copy link
Copy Markdown
Contributor

Fix #254 related to #251.

@waynedpj
Copy link
Copy Markdown

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
Copy Markdown
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 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//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