diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..c48c3d1 --- /dev/null +++ b/Gemfile @@ -0,0 +1,3 @@ +source 'https://rubygems.org' +gemspec +gem "logstash", :github => "elasticsearch/logstash", :branch => "1.5" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..8eba2be --- /dev/null +++ b/LICENSE @@ -0,0 +1,13 @@ +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 + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Rakefile b/Rakefile new file mode 100644 index 0000000..d50e796 --- /dev/null +++ b/Rakefile @@ -0,0 +1 @@ +require "logstash/devutils/rake" diff --git a/lib/logstash/outputs/example.rb b/lib/logstash/outputs/example.rb new file mode 100644 index 0000000..53d736c --- /dev/null +++ b/lib/logstash/outputs/example.rb @@ -0,0 +1,16 @@ +# encoding: utf-8 +require "logstash/outputs/base" +require "logstash/namespace" + +# An example output that does nothing. +class LogStash::Outputs::Example < LogStash::Outputs::Base + config_name "example" + + public + def register + end # def register + + public + def receive(event) + end # def event +end # class LogStash::Outputs::Example \ No newline at end of file diff --git a/logstash-output-example.gemspec b/logstash-output-example.gemspec new file mode 100644 index 0000000..f03510a --- /dev/null +++ b/logstash-output-example.gemspec @@ -0,0 +1,23 @@ +Gem::Specification.new do |s| + s.name = 'logstash-output-example' + s.version = '0.1.0' + s.licenses = ['Apache License (2.0)'] + s.summary = "This example output does nothing." + 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 = ["Elasticsearch"] + s.email = 'info@elasticsearch.com' + s.homepage = "http://www.elasticsearch.org/guide/en/logstash/current/index.html" + s.require_paths = ["lib"] + + # Files + s.files = `git ls-files`.split($\) + # 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" => "output" } + + # Gem dependencies + s.add_runtime_dependency 'logstash', '>= 1.4.0', '< 2.0.0' + s.add_development_dependency 'logstash-devutils' +end \ No newline at end of file diff --git a/spec/outputs/example_spec.rb b/spec/outputs/example_spec.rb new file mode 100644 index 0000000..6bf5945 --- /dev/null +++ b/spec/outputs/example_spec.rb @@ -0,0 +1 @@ +require "logstash/devutils/rspec/spec_helper"