ichnite 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: 8382251c33c78c529aa110e20e9c3ac266e172d4
4
- data.tar.gz: 2c9b32841e1e183fe526eca8346ac13bb36db4fd
3
+ metadata.gz: 8356832e68c689347200de1532c4b5ee6c878905
4
+ data.tar.gz: 6eec0f10c9ad8f9f4cee5e337c45ff0f874b4ab4
5
5
  SHA512:
6
- metadata.gz: dad3039574d70d2c8c3cd3b68d22fa201ddd53a7e7af9609563473cc53c2daa645a26382d34b6e8a2356efc18d9ea6e18c9759025d1cba5e89db251bc85eba2b
7
- data.tar.gz: 115838c5f89d9086e3d459eff578fd91a0cd221550e6855fc90c7448a6e4cdf30bf6db5da43df76d793e4c922b0ddc2056335c9010e366ef1c2409e772488e68
6
+ metadata.gz: 4835f9417bd793d5101e9aaebf84e65f8cd4bc4a6137ffa9b93534f445699a74a5523c1263dea2c9bf870891ad8cb32563f56ebbe7516dbb514ba645658081c5
7
+ data.tar.gz: 72040b57c125facae786106773580f5adb03ad9179b35b62954fd0ebf5005d48c2975bca74fd33c6eabf45fcecff0b760b2a5294e0abb720c7c7c7a2a916802e
@@ -16,8 +16,9 @@ module Ichnite
16
16
  @buffer.truncate(0)
17
17
  end
18
18
 
19
- def log(event, data)
20
- @events << [event, data]
19
+ def emit(data)
20
+ event = data.dup
21
+ @events << [event.delete(:event), event]
21
22
  super
22
23
  end
23
24
 
@@ -32,17 +33,25 @@ module Ichnite
32
33
  end
33
34
 
34
35
  def assert_ichnite_log(expected)
35
- assert_equal [expected], ichnite_log_lines
36
+ assert_equal [expected], ichnite_logs
36
37
  end
37
38
 
38
39
  def assert_ichnite_logs(*expected)
39
- assert_equal expected, ichnite_log_lines
40
+ assert_equal expected, ichnite_logs
40
41
  end
41
42
 
42
- def ichnite_log_lines
43
+ def assert_ichnite_events(*expected)
44
+ assert_equal expected, ichnite_events
45
+ end
46
+
47
+ def ichnite_logs
43
48
  ichnite_logger.output.split("\n").map { |line| line.split("INFO -- : ").last }
44
49
  end
45
50
 
51
+ def ichnite_events
52
+ ichnite_logger.events
53
+ end
54
+
46
55
  def ichnite_logger
47
56
  Ichnite.default_logger
48
57
  end
@@ -1,3 +1,3 @@
1
1
  module Ichnite
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ichnite
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yves Senn