logstash-output-elasticsearch_java 2.0.0.beta8 → 2.0.0.beta9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3cc68f0377369395c84e8c81fa063502036434ba
4
- data.tar.gz: f68f93cf3a38cc07ebaedfea32d982752929852f
3
+ metadata.gz: c2adf5a83677078a3f4f640e2b7154ea79438a8b
4
+ data.tar.gz: df41f4b1f4728a35a49251ad972a130e94bb3f0f
5
5
  SHA512:
6
- metadata.gz: c9f328eaafb34804e5dbbc2ff4658da8e56f12caa430b62a527cd40012ff759feaa33233618ec059862b38076ddbf9bb2f0c5a9a0e831fc90699be7dba20d477
7
- data.tar.gz: c0ddb4d3e5ba928460f98682ff9755d4d20cae11e30e0239862ae47b6ea6be70c8743dd55c61512ce2e23145c2e5feefdbfdc9bc1c827d68a1f48c6bed1e5fda
6
+ metadata.gz: 8c73c40a6b138c0f0db50452e4a7049249b3fd7cc00b5121437f0adad90b1c8f13812ab1bcad63e10fd2fc2df00f4c6bece8b666b89b83eea0da62490cc62b4f
7
+ data.tar.gz: 4de7038f19b596210d23ae61bc338f7ca8380e961b73a656c631102e046fdf9a21f5775737d21d7d8bc2c8a6e888a4c0bd0ab6789dd11bc8ddbb6230f369344a
@@ -14,12 +14,6 @@ module LogStash
14
14
  @logger = Cabin::Channel.get
15
15
  end
16
16
 
17
- def client
18
- return @client if @client
19
- @client = build_client(@options)
20
- return @client
21
- end
22
-
23
17
  def template_install(name, template, force=false)
24
18
  if template_exists?(name) && !force
25
19
  @logger.debug("Found existing Elasticsearch template. Skipping template management", :name => name)
@@ -236,6 +230,13 @@ module LogStash
236
230
  end # class NodeClient
237
231
 
238
232
  class TransportClient < NodeClient
233
+ def client
234
+ return @client if @client
235
+ @client = build_client(@options)
236
+ return @client
237
+ end
238
+
239
+
239
240
  private
240
241
  def build_client(options)
241
242
  client = org.elasticsearch.client.transport.TransportClient.
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-elasticsearch_java'
3
- s.version = '2.0.0.beta8'
3
+ s.version = '2.0.0.beta9'
4
4
  s.licenses = ['apache-2.0']
5
5
  s.summary = "Logstash Output to Elasticsearch using Java node/transport client"
6
6
  s.description = "Output events to elasticsearch using the java client"
@@ -29,6 +29,12 @@ describe "transport client create actions", :integration => true do
29
29
  end
30
30
 
31
31
  context "when action => create" do
32
+ it "should instantiate a transport, not node, client" do
33
+ subject = get_es_output("create", "id123")
34
+ subject.register
35
+ expect(subject.client.send(:client).class).to eql(Java::OrgElasticsearchClientTransport::TransportClient)
36
+ end
37
+
32
38
  it "should create new documents with or without id" do
33
39
  subject = get_es_output("create", "id123")
34
40
  subject.register
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-elasticsearch_java
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta8
4
+ version: 2.0.0.beta9
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-23 00:00:00.000000000 Z
11
+ date: 2015-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement