lokilogger 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: 9d31b9a0ca62456df630504045404e80c8fdc08376afc0d6eb420457d9b0745b
4
- data.tar.gz: '0283cd8fe736ecf933699b54d60f31a3e973d232c8794e8cdebff560624d7802'
3
+ metadata.gz: 2b658e3b80bf4ab3cc950ab3d9112398a2572a0be682319b7f5ee5561e95427f
4
+ data.tar.gz: 7be0372d1f05446788643cc62564a932364bfb942b8eabb5acc37584891bcd6e
5
5
  SHA512:
6
- metadata.gz: 338a081fc21929144d234674eb0cdaf64baf35e8fec2b9f84cf01f58acae1039ef6c9a6fcde6257126aee677ea21a6e4123f30246b9c020711d636955414d36f
7
- data.tar.gz: eee408bb6e620234d75bee583aad338ae1200ce04d185027600bcd3d3ac4ac1bacd168002fc09abdfe52fca48baaee7d0a47d041351b1d29f3ae0f996370c33f
6
+ metadata.gz: dc550875c2e5ba7930c1c87282be7f14e28c9262f7838333246c9670374d5b45f733869bfc12bd225e965260f19258b79e7d71cbaf1320e7bd095b1beadb4799
7
+ data.tar.gz: e881dfa29a1a2fb8dc44904d2059a75bf7d0b1465880551dc35fb7215c746800af9ff269d6fc6bd6f780d8a7f3197e0c167c00609b899805ad4dab17af97986e
data/README.adoc CHANGED
@@ -59,7 +59,8 @@ Start by creating a new logger instance:
59
59
 
60
60
  [source,ruby]
61
61
  ----
62
- # pass url, username, password
62
+ # required: url, log_level, version and tags
63
+ # optional: username and password (if one of them is nil, no auth will be used)
63
64
  logger = Lokilogger.new({url:, log_level: 0, version: "v1", username:, password:, tags: {foo: "bar"}})
64
65
  ----
65
66
 
@@ -17,15 +17,15 @@ module Lokilogger
17
17
 
18
18
  Faraday.default_adapter = :async_http
19
19
  @conn = Faraday.new url: @config[:url], headers: {"Content-Type" => "application/json"}, ssl: ssl_options, proxy: proxy_options, request: request_options do |builder|
20
- builder.request :authorization, :basic, @config[:username], @config[:password]
20
+ if @config[:username] && @config[:password]
21
+ builder.request :authorization, :basic, @config[:username], @config[:password]
22
+ end
21
23
  end
22
24
  end
23
25
 
24
26
  def check_config
25
27
  fail ConfigError, "missing/malformed url in config" if !@config[:url] || @config[:url] !~ %r{^(http|https)://}
26
28
  fail ConfigError, "missing version in config" unless @config[:version]
27
- fail ConfigError, "missing auth username in config" unless @config[:username]
28
- fail ConfigError, "missing auth password in config" unless @config[:password]
29
29
  fail ConfigError, "missing tags in config" unless @config[:tags]
30
30
  fail ConfigError, "missing log_level in config" unless @config[:log_level]
31
31
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Main namespace.
4
4
  module Lokilogger
5
- VERSION = "0.5.0"
5
+ VERSION = "0.6.0"
6
6
  end
data/lokilogger.gemspec CHANGED
@@ -15,9 +15,6 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  spec.metadata = {"label" => "lokilogger", "rubygems_mfa_required" => "true"}
17
17
 
18
- #spec.signing_key = Gem.default_key_path
19
- #spec.cert_chain = [Gem.default_cert_path]
20
-
21
18
  spec.required_ruby_version = "~> 3.2"
22
19
  spec.add_dependency "async", "~> 2.6", ">= 2.6.5"
23
20
  spec.add_dependency "async-http-faraday", "~> 0.12.0"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lokilogger
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
  - Nils Bartels