logspot 0.6.2 → 0.6.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0373a708827acf8aee24e2bd09c43ebdb146aa0e
4
- data.tar.gz: 5388889e9017ea2e3ced123835daddad20ba7ccb
3
+ metadata.gz: 25c21c7f245b06c8ae83b61a341fb4f68d8891d4
4
+ data.tar.gz: 6fa944d1c7a88e99fdd1eaf9d0f4e3b146f34406
5
5
  SHA512:
6
- metadata.gz: bd38e97b570b0b1feabf617806be2a47a1282882d2d4be53a02dbf0dccf0386ce6d4a728ee89b5764b98fb6c7f47301ab1d2fa8d2ec60ef4b88e5e3aaa2a863d
7
- data.tar.gz: d14c08df7a755d438ca6c59a2d5e0f040b0161c0cb0997f9419fef2bf3665f0589d51e1b5211860a4a5b1fd8196645ed0ec01f8c5f25f8e136707641538a0800
6
+ metadata.gz: c3d3cc1ed9775c242bb6b0fab3f0a542e874e072f5df6adc2461543c468c39a2a8b881974566910dce9896c525e5dc440538dc1a922840818da933ad28be1351
7
+ data.tar.gz: 67b6a35ac38fcb819cba4a11e43cb1310b31a4382d18c679a6be09827ffeca7112fd16e6ab9e58d6ebc52fcf7889bf0499547f853abe781f377533c5c592b709
@@ -39,3 +39,6 @@ PLATFORMS
39
39
  DEPENDENCIES
40
40
  logspot!
41
41
  rspec
42
+
43
+ BUNDLED WITH
44
+ 1.10.4
@@ -4,8 +4,8 @@ class LoGspot
4
4
  LOG_LEVELS = %w(DEBUG INFO WARN ERROR FATAL)
5
5
 
6
6
  def initialize(file_or_file_name = STDOUT, wrapper: nil, tag_format: '[%{time} %{level}] ', time_format: '%Y/%m/%d %H:%M:%S', tag_block: nil)
7
- wrapper = ->(output, data) {
8
- base = tag_block ? tag_block.(Time.current, level) : tag_format % { time: Time.current.strftime(time_format), level: level }
7
+ wrapper ||= ->(output, data) {
8
+ base = tag_block ? tag_block.(Time.current, data[:level]) : tag_format % { time: Time.current.strftime(time_format), level: data[:level] }
9
9
  if data[:space]
10
10
  base = ' ' * uncolorize_str(base).length
11
11
  end
@@ -106,8 +106,7 @@ class LoGspot
106
106
  attr_reader :raw_output, :top_output, :output, :level
107
107
 
108
108
  def write(l, *args, &block)
109
- @level = l
110
- output.puts(message: args[0], args: args, arg_block: block)
109
+ output.puts(level: l, message: args[0], args: args, arg_block: block)
111
110
  end
112
111
 
113
112
  def wrap_output(block, *args, &wrapper)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logspot'
3
- s.version = '0.6.2'
3
+ s.version = '0.6.3'
4
4
  s.authors = ['Tetsuri Moriya']
5
5
  s.email = ['tetsuri.moriya@gmail.com']
6
6
  s.summary = 'Logger'
@@ -4,7 +4,7 @@ describe LoGspot do
4
4
  let(:filename) { File.expand_path('../../tmp/spec.log', __FILE__) }
5
5
 
6
6
  before do
7
- FileUtils.rm(filename)
7
+ FileUtils.rm(filename) if File.exists?(filename)
8
8
  end
9
9
 
10
10
  let(:tag_format) { '' }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logspot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsuri Moriya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-22 00:00:00.000000000 Z
11
+ date: 2015-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -83,4 +83,3 @@ signing_key:
83
83
  specification_version: 4
84
84
  summary: Logger
85
85
  test_files: []
86
- has_rdoc: