From aad2fcd4b693b77b816761f69e1feadfef376ab4 Mon Sep 17 00:00:00 2001 From: Gunter Zeilinger Date: Fri, 27 Jan 2017 16:58:23 +0100 Subject: [PATCH] dcm4che/dcm4chee-arc-light#534: Upgrade ELK to 5.1.2 --- CHANGELOG.md | 7 ++---- CONTRIBUTORS | 10 +++++++++ DEVELOPER.md | 2 +- Gemfile | 3 ++- LICENSE | 2 -- README.md | 42 +++++++++++++----------------------- Rakefile | 6 ------ logstash-codec-frame.gemspec | 25 ++++++++++----------- spec/codecs/frame_spec.rb | 3 +-- spec/spec_helper.rb | 2 ++ 10 files changed, 44 insertions(+), 58 deletions(-) create mode 100644 CONTRIBUTORS create mode 100644 spec/spec_helper.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 53045b4..9bb3255 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,2 @@ -## 2.0.0 - - Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully, - instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895 - - Dependency on logstash-core update to 2.0 - +## 0.1.0 + - Plugin created with the logstash plugin generator diff --git a/CONTRIBUTORS b/CONTRIBUTORS new file mode 100644 index 0000000..0befc92 --- /dev/null +++ b/CONTRIBUTORS @@ -0,0 +1,10 @@ +The following is a list of people who have contributed ideas, code, bug +reports, or in general have helped logstash along its way. + +Contributors: +* gunterze - gunterze@gmail.com + +Note: If you've sent us patches, bug reports, or otherwise contributed to +Logstash, and you aren't on the list above and want to be, please let us know +and we'll make sure you're here. Contributions from folks like you are what make +open source awesome. diff --git a/DEVELOPER.md b/DEVELOPER.md index 77cd624..c16e220 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -1,2 +1,2 @@ -# logstash-codec-example +# logstash-codec-frame Example codec plugin. This should help bootstrap your effort to write your own codec plugin! diff --git a/Gemfile b/Gemfile index d926697..06618ce 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,3 @@ source 'https://rubygems.org' -gemspec \ No newline at end of file +gemspec + diff --git a/LICENSE b/LICENSE index 8026afd..51fca54 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,3 @@ -Copyright (c) 2012–2015 Elasticsearch - Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at diff --git a/README.md b/README.md index 7cc9245..a75e88d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,5 @@ # Logstash Plugin -[![Build -Status](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Codecs/job/logstash-plugin-codec-example-unit/badge/icon)](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Codecs/job/logstash-plugin-codec-example-unit/) - This is a plugin for [Logstash](https://github.com/elastic/logstash). It is fully free and fully open source. The license is Apache 2.0, meaning you are pretty much free to use it however you want in whatever way. @@ -25,7 +22,7 @@ Need help? Try #logstash on freenode IRC or the https://discuss.elastic.co/c/log #### Code - To get started, you'll need JRuby with the Bundler gem installed. -- Create a new plugin or clone and existing from the GitHub [logstash-plugins](https://github.com/logstash-plugins) organization. +- Create a new plugin or clone and existing from the GitHub [logstash-plugins](https://github.com/logstash-plugins) organization. We also provide [example plugins](https://github.com/logstash-plugins?query=example). - Install dependencies ```sh @@ -34,26 +31,15 @@ bundle install #### Test -```sh -bundle exec rspec -``` +- Update your dependencies -The Logstash code required to run the tests/specs is specified in the `Gemfile` by the line similar to: -```ruby -gem "logstash", :github => "elasticsearch/logstash", :branch => "1.5" -``` -To test against another version or a local Logstash, edit the `Gemfile` to specify an alternative location, for example: -```ruby -gem "logstash", :github => "elasticsearch/logstash", :ref => "master" -``` -```ruby -gem "logstash", :path => "/your/local/logstash" +```sh +bundle install ``` -Then update your dependencies and run your tests: +- Run tests ```sh -bundle install bundle exec rspec ``` @@ -61,29 +47,31 @@ bundle exec rspec #### 2.1 Run in a local Logstash clone -- Edit Logstash `tools/Gemfile` and add the local plugin path, for example: +- Edit Logstash `Gemfile` and add the local plugin path, for example: ```ruby -gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome" +gem "logstash-codec-awesome", :path => "/your/local/logstash-codec-awesome" ``` -- Update Logstash dependencies +- Install plugin ```sh -rake vendor:gems +bin/logstash-plugin install --no-verify ``` - Run Logstash with your plugin ```sh -bin/logstash -e 'filter {awesome {}}' +bin/logstash -e 'codec {awesome {}}' ``` At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash. #### 2.2 Run in an installed Logstash +You can use the same **2.1** method to run your plugin in an installed Logstash by editing its `Gemfile` and pointing the `:path` to your local plugin development directory or you can build the gem and install it using: + - Build your plugin gem ```sh -gem build logstash-filter-awesome.gemspec +gem build logstash-codec-awesome.gemspec ``` - Install the plugin from the Logstash home ```sh -bin/plugin install /your/local/plugin/logstash-filter-awesome.gem +bin/logstash-plugin install /your/local/plugin/logstash-codec-awesome.gem ``` - Start Logstash and proceed to test the plugin @@ -93,6 +81,6 @@ All contributions are welcome: ideas, patches, documentation, bug reports, compl Programming is not a required skill. Whatever you've seen about open source and maintainers or community members saying "send patches or die" - you will not see that here. -It is more important to me that you are able to contribute. +It is more important to the community that you are able to contribute. For more information about contributing, see the [CONTRIBUTING](https://github.com/elastic/logstash/blob/master/CONTRIBUTING.md) file. diff --git a/Rakefile b/Rakefile index 4f4b858..d50e796 100644 --- a/Rakefile +++ b/Rakefile @@ -1,7 +1 @@ -@files=[] - -task :default do - system("rake -T") -end - require "logstash/devutils/rake" diff --git a/logstash-codec-frame.gemspec b/logstash-codec-frame.gemspec index a2c19e0..69e7cb3 100644 --- a/logstash-codec-frame.gemspec +++ b/logstash-codec-frame.gemspec @@ -1,26 +1,23 @@ Gem::Specification.new do |s| - - s.name = 'logstash-codec-frame' - s.version = '2.0.0' - s.licenses = ['Apache License (2.0)'] - s.summary = "Frame-oriented text data." - s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program" - s.authors = ["Gunter Zeilinger"] - s.email = 'gunterze@gmail.com' - s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html" - s.require_paths = ["lib"] + s.name = 'logstash-codec-frame' + s.version = '5.0.0' + s.licenses = ['Apache License (2.0)'] + s.summary = 'Frame-oriented text data.' + s.description = 'This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program.' + s.homepage = 'https://github.com/dcm4che/logstash-codec-frame' + s.authors = ['Gunter Zeilinger'] + s.email = 'gunterze@gmail.com' + s.require_paths = ['lib'] # Files s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT'] - - # Tests + # Tests s.test_files = s.files.grep(%r{^(test|spec|features)/}) # Special flag to let us know this is actually a logstash plugin s.metadata = { "logstash_plugin" => "true", "logstash_group" => "codec" } # Gem dependencies - s.add_runtime_dependency "logstash-core", ">= 2.0.0.beta2", "< 3.0.0" - + s.add_runtime_dependency 'logstash-core-plugin-api', "~> 2.0" s.add_development_dependency 'logstash-devutils' end diff --git a/spec/codecs/frame_spec.rb b/spec/codecs/frame_spec.rb index 901de89..4283792 100644 --- a/spec/codecs/frame_spec.rb +++ b/spec/codecs/frame_spec.rb @@ -1,6 +1,5 @@ # encoding: utf-8 - -require "logstash/devutils/rspec/spec_helper" +require_relative '../spec_helper' require "logstash/codecs/frame" require "logstash/event" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..dc64aba --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,2 @@ +# encoding: utf-8 +require "logstash/devutils/rspec/spec_helper"