tlogger 0.26.1 → 0.26.2

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: 6516c4c850abccb0dc4817269e14c96e292ecd1c5f02fbc23cba7b68912b7386
4
- data.tar.gz: 3b02e0e685bfacd43a0c5fa234c5f65d99284480bba721f433e9978416212c5d
3
+ metadata.gz: 6f999c21a9d4ba07f90d307edfec87eda42b4b72ee8b40b1c03ebb5996f14562
4
+ data.tar.gz: bd8a18877d7057263befec0cc93a939259bca1ab8c6084365d3bd055b732e489
5
5
  SHA512:
6
- metadata.gz: ced3234b56f358edb9c3c9dc22e96d299965a1dab7d4105bc40be9dcae1f9e6bbcbdd06d9a573cf1105933e938a40edd114a65370cf6279e8c9640f5aeaa9bb0
7
- data.tar.gz: f351183bc2b81bc2062c1479acb25b16a9fb63451a9d029b57457de8a92509ad39c7599e275d75c66ff94bc49263859e1d9f86f6c6e3b93716e6ade0a1c84520
6
+ metadata.gz: '092162f6c93adbfbff4cc3bbc1af619d10159be08960a23f352becbbb3038297ff5d67ed65a841d33b289bef62839ed7f1b270666be6e82f7d926c0ebcc868b8'
7
+ data.tar.gz: 549e00b20bfa3ab36fcf01b68e54542d36df127bb84377c6c909d27f75b3bbec27e5446552bf37861071faa7d77829ac10a9bd24f793c2e2db7dc90a4a129e4f
data/Rakefile CHANGED
@@ -1,7 +1,8 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "rake/testtask"
3
3
 
4
- require 'devops_helper'
4
+ #require 'devops_helper'
5
+ require 'devops_assist'
5
6
 
6
7
  Rake::TestTask.new(:test) do |t|
7
8
  t.libs << "test"
@@ -1,3 +1,3 @@
1
1
  module Tlogger
2
- VERSION = "0.26.1"
2
+ VERSION = "0.26.2"
3
3
  end
@@ -4,32 +4,30 @@ require_relative 'tlogger'
4
4
  module Tlogger
5
5
  module TloggerHelper
6
6
 
7
- module TloggerClassMethods
8
- def tlogger(tag = nil)
7
+ module ClassMethods
8
+ def tlogger(opts = { })
9
+ defOpts = { tag: nil, dev_mode: false }.merge!(opts)
10
+
9
11
  if @tlogger.nil?
10
12
  @tlogger = ::Tlogger.init
11
- @tlogger.tag = tag if not (tag.nil? and tag.empty?)
13
+ ::Tlogger.set_dev_mode if defOps[:dev_mode] == true
14
+ @tlogger.tag = tag if not (defOpts[:tag].nil? and defOps[:tag].empty?)
12
15
  end
13
16
  @tlogger
14
17
  end
15
18
 
16
- def default_logger(tag, dev_mode = false)
17
- ::Tlogger.set_dev_mode if dev_mode
18
- tlogger(tag)
19
- end
20
19
  end
21
20
 
22
21
  def self.included(klass)
23
- klass.extend(TloggerClassMethods)
22
+ klass.extend(ClassMethods)
24
23
  end
25
24
 
26
- self.extend(TloggerClassMethods)
27
-
28
- if not respond_to?(:logger)
29
- def logger
30
- self.class.tlogger
31
- end
25
+ def tlogger
26
+ self.class.tlogger
32
27
  end
33
28
 
34
29
  end
35
30
  end
31
+
32
+ TloggerHelper = Tlogger::TloggerHelper
33
+
data/tlogger.gemspec CHANGED
@@ -28,5 +28,7 @@ Gem::Specification.new do |spec|
28
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
29
  spec.require_paths = ["lib"]
30
30
 
31
- spec.add_development_dependency "devops_helper"
31
+ #spec.add_development_dependency "devops_helper"
32
+ spec.add_development_dependency "devops_assist"
33
+
32
34
  end
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tlogger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.1
4
+ version: 0.26.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-23 00:00:00.000000000 Z
11
+ date: 2021-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: devops_helper
14
+ name: devops_assist
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
@@ -54,7 +54,7 @@ licenses:
54
54
  - MIT
55
55
  metadata:
56
56
  homepage_uri: https://github.com/chrisliaw/tlogger
57
- post_install_message:
57
+ post_install_message:
58
58
  rdoc_options: []
59
59
  require_paths:
60
60
  - lib
@@ -70,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  version: '0'
71
71
  requirements: []
72
72
  rubygems_version: 3.2.22
73
- signing_key:
73
+ signing_key:
74
74
  specification_version: 4
75
75
  summary: Logger that added contextual information to the log messages
76
76
  test_files: []