-
Notifications
You must be signed in to change notification settings - Fork 309
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
allow specification of a index template #194
Conversation
5fa9a87
to
32f301e
Compare
@pitr Do you have any comments? I'd love to get this merged. Thanks! |
raise "If you specify a template_name you must specify a valid template file (checked '#{@template_file}')!" | ||
end | ||
file_contents = IO.read(@template_file).gsub(/\n/,'') | ||
template = JSON.parse(file_contents) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simply leaving last line as JSON.parse(file_contents)
is sufficient
Looks good, I left a few comments. Could you also extract all template logic to a separate module. |
32f301e
to
19d734b
Compare
@pitr Thanks for the feedback. Changes made. I was rescuing the more specific exception earlier when I was testing, but I encountered an error about an undeclared exception class when fluent-plugin-aws-elasticsearch-service consumed fluent-plugin-elasticsearch... but that seems to be gone now (just tested). Not sure what changed. :) |
1.7.0 released with this change. Also, I renamed template code in e87598a since out_*.rb files are for plugins |
Allow users to specify a template to define on connection creation (similar to logstash).
See #33.
version
in gemspec are untouchedelasticsearch_dynamic
(not required but recommended)