trifle-logger 0.2.1 → 0.2.2
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/trifle/logger/tracer/hash.rb +11 -6
- data/lib/trifle/logger/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22b50e2000ee750a8f1d944ac0616112672f0075e2dd083775946c989a7a9262
|
4
|
+
data.tar.gz: f11284203057303f713dfd097cf48cc1bfa4a59169118bd2b80fa9efbe95b9c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd97d0bd9e57ed06448352b30c65a544f49edbdabcabdbfdd1c326e7e46d2904d8adb99c5b8993dd5c743610ba13b1f191a38f408b3fdc1eaf130fa6a0767dc6
|
7
|
+
data.tar.gz: a51b16ea5f6a884db7daea389325a2a316b7594290b8ad16bcb1fcadb8aef943c20c2929931f3d7c074e95de64c29983401e08f3511116c7af60181e9fe5f3c1
|
data/Gemfile.lock
CHANGED
@@ -6,9 +6,10 @@ module Trifle
|
|
6
6
|
class Hash
|
7
7
|
attr_accessor :key, :meta, :data, :tags, :artifacts, :state, :ignore, :reference
|
8
8
|
|
9
|
-
def initialize(key:, meta: nil)
|
9
|
+
def initialize(key:, meta: nil, config: nil)
|
10
10
|
@key = key
|
11
11
|
@meta = meta
|
12
|
+
@config = config
|
12
13
|
@data = []
|
13
14
|
@tags = []
|
14
15
|
@artifacts = []
|
@@ -16,10 +17,14 @@ module Trifle
|
|
16
17
|
@ignore = false
|
17
18
|
@result_prefix = '=> '
|
18
19
|
|
19
|
-
trace("
|
20
|
+
trace("Tracer has been initialized for #{key}")
|
20
21
|
@reference = liftoff.first
|
21
22
|
end
|
22
23
|
|
24
|
+
def config
|
25
|
+
@config || Trifle::Logger.default
|
26
|
+
end
|
27
|
+
|
23
28
|
def keys
|
24
29
|
parts = key.split('/')
|
25
30
|
parts.count.times.map { |i| parts[0..i].join('/') }
|
@@ -99,19 +104,19 @@ module Trifle
|
|
99
104
|
|
100
105
|
def liftoff
|
101
106
|
@bumped_at = now
|
102
|
-
|
107
|
+
config.on_liftoff(self)
|
103
108
|
end
|
104
109
|
|
105
110
|
def bump
|
106
|
-
return unless @bumped_at && @bumped_at <= now -
|
111
|
+
return unless @bumped_at && @bumped_at <= now - config.bump_every
|
107
112
|
|
108
113
|
@bumped_at = now
|
109
|
-
|
114
|
+
config.on_bump(self)
|
110
115
|
end
|
111
116
|
|
112
117
|
def wrapup
|
113
118
|
success! if running?
|
114
|
-
|
119
|
+
config.on_wrapup(self)
|
115
120
|
end
|
116
121
|
end
|
117
122
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trifle-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jozef Vaclavik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|