logstash-input-elasticsearch 1.0.2 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 648519ea6b29fdcb5b95a9939080095fe7bf129f
4
- data.tar.gz: 8e5c3a0d33d74007942e96806032fc08f7569ebf
3
+ metadata.gz: 098012eed09f98dfd3a76a5c8aa72eeaa436ba13
4
+ data.tar.gz: 59d3ab90732dcff6f8294f8ef05f1f4e57fed939
5
5
  SHA512:
6
- metadata.gz: 40e81ca75e061380601bae58d415fa136ee59cce03de7c6dafc59402b117058659ac53d6de4e83d6f0d28acb030cc86cc3be7c27f115831bc59e8218f7393551
7
- data.tar.gz: 56fa3228f843bdc67d2a4227e19989d8507f259c8ee8f9f589096923496860f22be0c6a15e8453ec1ee0aa27a08dbd45ef460d6cb56c25033fcd5af13316a7d7
6
+ metadata.gz: 18de97eb707531cab8f451711cb8398262098c75aaaaeedc7f6f5ec2a5164383d216d2c364718a5286c6741c711cc3b9be84ee204170ceeb1227b645c96385b3
7
+ data.tar.gz: 30faa4c6a889ad32638c9a6e74241039c2e5e9283274811bc414ebd856716e1a1987bb25ae7ce8f56e744faf0eb91730e233cf8593f7e67b0ce91e1edac917b2
@@ -156,7 +156,7 @@ class LogStash::Inputs::Elasticsearch < LogStash::Inputs::Base
156
156
  has_hits = r['hits']['hits'].any?
157
157
  end
158
158
 
159
- while has_hits do
159
+ while has_hits && !stop?
160
160
  r = process_next_scroll(output_queue, r['_scroll_id'])
161
161
  has_hits = r['has_hits']
162
162
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-input-elasticsearch'
4
- s.version = '1.0.2'
4
+ s.version = '2.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "Read from an Elasticsearch cluster, based on search query results"
7
7
  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"
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.require_paths = ["lib"]
12
12
 
13
13
  # Files
14
- s.files = `git ls-files`.split($\)+::Dir.glob('vendor/*')
14
+ s.files = Dir['lib/**/*','spec/**/*','vendor/**/*','*.gemspec','*.md','CONTRIBUTORS','Gemfile','LICENSE','NOTICE.TXT']
15
15
 
16
16
  # Tests
17
17
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "input" }
21
21
 
22
22
  # Gem dependencies
23
- s.add_runtime_dependency "logstash-core", '>= 1.4.0', '< 2.0.0'
23
+ s.add_runtime_dependency "logstash-core", "~> 2.0.0.snapshot"
24
24
 
25
25
  s.add_runtime_dependency 'elasticsearch', ['>= 1.0.6', '~> 1.0']
26
26
 
@@ -4,6 +4,25 @@ require "logstash/inputs/elasticsearch"
4
4
  require "elasticsearch"
5
5
 
6
6
  describe LogStash::Inputs::Elasticsearch do
7
+
8
+ it_behaves_like "an interruptible input plugin" do
9
+ let(:esclient) { double("elasticsearch-client") }
10
+ let(:config) { { } }
11
+
12
+ before :each do
13
+ allow(Elasticsearch::Client).to receive(:new).and_return(esclient)
14
+ hit = {
15
+ "_index" => "logstash-2014.10.12",
16
+ "_type" => "logs",
17
+ "_id" => "C5b2xLQwTZa76jBmHIbwHQ",
18
+ "_score" => 1.0,
19
+ "_source" => { "message" => ["ohayo"] }
20
+ }
21
+ allow(esclient).to receive(:search) { { "hits" => { "hits" => [hit] } } }
22
+ allow(esclient).to receive(:scroll) { { "hits" => { "hits" => [hit] } } }
23
+ end
24
+ end
25
+
7
26
  it "should retrieve json event from elasticseach" do
8
27
  config = %q[
9
28
  input {
metadata CHANGED
@@ -1,35 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-input-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-03 00:00:00.000000000 Z
11
+ date: 2015-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
- - - '>='
17
- - !ruby/object:Gem::Version
18
- version: 1.4.0
19
- - - <
16
+ - - ~>
20
17
  - !ruby/object:Gem::Version
21
- version: 2.0.0
18
+ version: 2.0.0.snapshot
22
19
  name: logstash-core
23
20
  prerelease: false
24
21
  type: :runtime
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - '>='
28
- - !ruby/object:Gem::Version
29
- version: 1.4.0
30
- - - <
24
+ - - ~>
31
25
  - !ruby/object:Gem::Version
32
- version: 2.0.0
26
+ version: 2.0.0.snapshot
33
27
  - !ruby/object:Gem::Dependency
34
28
  requirement: !ruby/object:Gem::Requirement
35
29
  requirements:
@@ -84,14 +78,12 @@ executables: []
84
78
  extensions: []
85
79
  extra_rdoc_files: []
86
80
  files:
87
- - .gitignore
88
81
  - CHANGELOG.md
89
82
  - CONTRIBUTORS
90
83
  - Gemfile
91
84
  - LICENSE
92
85
  - NOTICE.TXT
93
86
  - README.md
94
- - Rakefile
95
87
  - lib/logstash/inputs/elasticsearch.rb
96
88
  - logstash-input-elasticsearch.gemspec
97
89
  - spec/inputs/elasticsearch_spec.rb
@@ -117,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
109
  version: '0'
118
110
  requirements: []
119
111
  rubyforge_project:
120
- rubygems_version: 2.4.5
112
+ rubygems_version: 2.4.8
121
113
  signing_key:
122
114
  specification_version: 4
123
115
  summary: Read from an Elasticsearch cluster, based on search query results
data/.gitignore DELETED
@@ -1,4 +0,0 @@
1
- *.gem
2
- Gemfile.lock
3
- .bundle
4
- vendor
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- @files=[]
2
-
3
- task :default do
4
- system("rake -T")
5
- end
6
-
7
- require "logstash/devutils/rake"