logstash-output-solr-lw 0.5.0 → 0.6.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
  SHA256:
3
- metadata.gz: e4cd884e30345ea01084423d67979dea2a60fdfa65c6aa0899a61b70e8ab214a
4
- data.tar.gz: 6f70bdf98145431da75d107339629d2995b4ab8b2c813b5a1227a09ee5cd83c4
3
+ metadata.gz: d6612277d396cb3be159156516ccbce2f60fd7cbc6cf9ef69f17798102496955
4
+ data.tar.gz: e01c6fda0ecc0381d73e2a0643792f484ec50afc2acb52e13ca671a8957415c8
5
5
  SHA512:
6
- metadata.gz: 878b6c260ce17e3c92beefafe7df63a26545da2816c9b14b24e89ca45ae24d547960ecce38b46ad948910200fd7f36c8ded40d7e4ac0375efe7b6003c0ac3744
7
- data.tar.gz: bace73f59af9ef3b8226ab6062f4ee27897ad54d0f991368a124c4f212d8baa8011bd7c87f6d376c7d2d6ace6de25bed446217aa4f20668d496ebad265af9ff5
6
+ metadata.gz: 122b55bf955b5fc150726addbedcfffbf57f7558c08bbef679a60e7a178067573a3e2971db462b7f83489232c3bd8362f168acf692e24bff9c20fbc32ee27b89
7
+ data.tar.gz: 4c495993c13e99f152399426b83f5a46f10f711552162396868a4a3fb5b90dac1ee2cafe45a80fc93310dfd8a7c0cfe3e3a1c7caa7392a1fdcf8015a32ab2228
@@ -68,14 +68,13 @@ class LogStash::Outputs::Solr < LogStash::Outputs::Base
68
68
  @zk = nil
69
69
 
70
70
  if @mode == MODE_STANDALONE then
71
- u = @url
72
71
  if !@user.nil? and !@user.to_s.strip.empty? and !@password.nil? and !@password.to_s.strip.empty? then
73
72
  uri = URI.parse(@url)
74
73
  uri.user = @user
75
74
  uri.password = @password
76
- u = uri.to_s()
75
+ @url = uri.to_s()
77
76
  end
78
- @solr_std[@collection] = RSolr.connect :url => u
77
+ @solr_std[@collection] = RSolr.connect :url => @url
79
78
  elsif @mode == MODE_SOLRCLOUD then
80
79
  @zk = ZK.new(@zk_host)
81
80
  cloud_connection = RSolr::Cloud::Connection.new(@zk, :user => @user, :password => @password)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-solr-lw'
3
- s.version = "0.5.0"
3
+ s.version = "0.6.0"
4
4
  s.licenses = ["Apache License (2.0)"]
5
5
  s.summary = "Logstash output plugin for sending data to Solr."
6
6
  s.description = "Logstash output plugin for sending data to Solr. It supports SolrCloud, not only Standalone Solr."
@@ -73,6 +73,26 @@ describe LogStash::Outputs::Solr do
73
73
  end
74
74
  end
75
75
 
76
+ describe 'register_standalone_basic_auth' do
77
+ let(:config) {
78
+ {
79
+ 'url' => 'http://localhost:8983/solr/collection1',
80
+ 'user' => 'user1',
81
+ 'password' => 'pass1'
82
+ }
83
+ }
84
+
85
+ it 'mode' do
86
+ output = LogStash::Outputs::Solr.new(config)
87
+ output.register
88
+
89
+ mode = output.instance_variable_get('@mode')
90
+ expect(mode).to eq('Standalone')
91
+ url = output.instance_variable_get('@url')
92
+ expect(url).to eq('http://user1:pass1@localhost:8983/solr/collection1')
93
+ end
94
+ end
95
+
76
96
  describe 'register_solrcloud' do
77
97
  before do
78
98
  start_zookeeper
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-solr-lw
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Minoru Osuka