logfoo 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: dd5014e7a23197a6a740a846db5db08695e121c5
4
- data.tar.gz: cfc1af3c48361cc74fc8d448446cdc26cdb0d334
3
+ metadata.gz: fcafbed67282fa17b012e80e7c33e6a7c8c30fc0
4
+ data.tar.gz: 8cd5be4771878f292a13115a8940c4e54ddaecc2
5
5
  SHA512:
6
- metadata.gz: d396846de3e416e05e2848328b9cada5cbba7e85d9b5019f2fe8aaf0de5b42cdb70a02875a0c5ec804ff69c5f401cd715b14f948d87493402dfcc5b086df9bb3
7
- data.tar.gz: 80fe74f6e96d301002bb36d72cf86f350e06c766a9ebe2c178fa4b73439751a5d4a096c03d9006c68889340b9425d2a78e436ff4c09a96dd6fd8ab2aaa0b6a62
6
+ metadata.gz: c159c3d3092b19fcf3c97d4a665b80fd9e43dc4c39cec1b72cde4b8c7ab32b0b45f78ff26fe7f09d90e46e0559c2c89263658ec972f717a18a30f8b4d2285df4
7
+ data.tar.gz: 18ef735323b484a265c8e419f163a31b8d27e3e879dc65bd3fde9ce592eaf80fa8d8bd6e50759e52e18b8dd109c453f0adfe780c27b5e86347afeb00d8488a11
@@ -7,7 +7,8 @@ module Logfoo
7
7
  end
8
8
 
9
9
  def call(entry)
10
- @formatter.call(entry).each{|line| @io.puts line }
10
+ @io.write @formatter.call(entry)
11
+ @io.flush
11
12
  end
12
13
  end
13
14
  end
@@ -12,23 +12,23 @@ module Logfoo
12
12
  when Entry
13
13
  format_entry(entry)
14
14
  else
15
- [entry_or_ex.to_s]
15
+ entry.to_s
16
16
  end
17
17
  end
18
18
 
19
19
  private
20
20
 
21
21
  def format_entry(entry)
22
- [format_hash(entry.to_h)]
22
+ "#{format_hash(entry.to_h)}\n"
23
23
  end
24
24
 
25
25
  def format_exception(entry)
26
- values = []
27
- values << format_hash(entry.to_h)
26
+ values = ""
27
+ values << "#{format_hash(entry.to_h)}\n"
28
28
  if entry.exception && entry.exception.backtrace.is_a?(Array)
29
29
  values <<
30
30
  "#{entry.exception.class}: #{entry.exception.message}\n" +
31
- entry.exception.backtrace.map{|l| "\t#{l}" }.join("\n")
31
+ entry.exception.backtrace.map{|l| "\t#{l}\n" }.join
32
32
  end
33
33
  values
34
34
  end
@@ -1,3 +1,3 @@
1
1
  module Logfoo
2
- VERSION = '0.0.4'
2
+ VERSION = '0.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logfoo
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
  - Dmitry Galinsky
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-02-15 00:00:00.000000000 Z
11
+ date: 2016-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler