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

Add support for .properties for expand_key mode #38

Merged
merged 7 commits into from Jan 14, 2016

Conversation

kalistace
Copy link
Contributor

.properties files are commonly used among Java based projects. The feature would allow teams to use them out of the box without having to convert their existing properties.

Additionally, it allows application to look for .properties files on the filepath in case consul is down or if we are running an application locally.

The PR brings a new dependency : https://github.com/gagle/node-properties

@jsullivan3
Copy link
Contributor

Thank you for submitting this patch - I won't be able to take an in-depth look at this one for a couple of days, though. I'll get back to you as soon as I can look through it.

We sometimes want to keep the placeholders as string
so they are processed further ahead in the process( by the application or another tool)
@jsullivan3
Copy link
Contributor

The latest commit appears to have broken the build. Can you please check the value for 'properties on line 24 of package.json?

@kalistace
Copy link
Contributor Author

Sorry, i pushed that on the wrong branch :(

I'm basically preparing a new pull request of that module allowing tolerant substitution, instead of just storing the file as a flat file when a property cannot be parsed.

As soon as this PR gagle/node-properties#26 is merged, I'll do another PR for that feature.

/* istanbul ignore if */
if (err) return cb('Failed to read key ' + fqf + ' due to ' + err);
var body = body ? body.trim() : '';
write_content_to_consul(create_key_name(branch, file), body, cb);
});
};

var handle_expended_keys_with_different_file_types = function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spelling issue - functionally fine, but I believe this function should be named "expanded" and not "expended"

@jsullivan3
Copy link
Contributor

Just a couple of very minor changes - looks great. If you could tweak the spelling issue, I can get this merged. Thanks for contributing this functionality!

@kalistace
Copy link
Contributor Author

All fixed :) Thanks for reviewing it !

More than happy to contribute.

jsullivan3 added a commit that referenced this pull request Jan 14, 2016
Add support for .properties for expand_key mode
@jsullivan3 jsullivan3 merged commit 4cc8775 into breser:master Jan 14, 2016
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.

None yet

2 participants