Logstash's config compiler adds a comment to the compiled code, like
if ..... # if [your] and [conditional]
The idea is to to help aid in reading the compiled logstash config.
However, if a conditional has newlines in it, the `#text_value` of
that conditional will have newlines, and we'll accidentally create
invalid ruby code which will fail with SyntaxError.
Prior to this change, the following Logstash config, under 1.5.0,
would cause a crash on startup:
if [some]
or [condition] {
...
}
The cause was that Logstash would compile this to:
if event("[some]"]) || event("[condition]") # if [some]
or [condition]
...
end
The 2nd line there `or [condition]` was intended to be on the line
above.
This change strips the line terminators \r and \n, just in case, and
provides a test case to cover.
I verified that this test case _fails_ without the config_ast.rb patch
and _succeeds_ with the patch.
Fixes#2850Fixes#3281
This is done because we made a mistake in the versioning of the rpm and
debs.
rpm and deb both sort "1.5.0.rc4" to be newer than "1.5.0". The default
epoch is 0, so setting epoch to 1 will cause "1.5.0" to sort higher than
the release candidates and betas.
* Clean up pending development dependencies from the logstash-core gemspec
* Add gems as a build dependency in the Gemfile, is used when doing an
install-all task, and failed in the ci env (like octokit)
remove unused load path
use either local core lib dir or logstash-core gem
include spec in logstash-core
do not include lib, spec and locales dirs in package root
environment bootstrapping in lib/bootstrap.rb
added comments
move pluginmanager out of logstash-core
kafla installation solved by pluginmanager refactor
refactor bootstrap code
refactor shell scripts to simplify and DRY, indirect rspec command to our ruby launcher
add bin/rspec
cut by half the bin/plugin and bin/rspec startup time
fix drip context
use printf instead of tr
updated Windows bin scripts
missing gemspec in gemspec
use gem instead of gemspec so our plugin manager can correctly install logstash-core
generate packages including locally built logstash-core gem
move jenkins developmnent dependencies into Gemfile, they do not belong in logstash-core
path leftover
clean help agent help usage message and remore rspec in available command
comments cosmetics
update Bundler dependency, all recent testing have been made with 1.9.4
updated .lock file with regard to updated Gemfile
cleanup gemspec, Gemfile and regen .lock file
added progress output
avoid dual require on version
closes#3096