logspot 0.5.0 → 0.6.0

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: a4edef053fc6b53e57b5189c8d2ff6c1750d578f
4
- data.tar.gz: b28973b319462b292ede579ee2673b4df401bacb
3
+ metadata.gz: aba11e3f2d853681652f15ddb8c52d0c15f5e116
4
+ data.tar.gz: f12a98237a32d26b8f9b372e1ad4452b9a94c402
5
5
  SHA512:
6
- metadata.gz: ee34d18e23317aceda4d2accaf75292444a2aa23a42993ba8916f63cdd638927a0a118d6acd2786caef16fc72a7e780bcda19df07d19ac18760145e7414d2591
7
- data.tar.gz: 539e68ee94ad552ae5bfd19416e2a2fb0bc9eeff0b53b8c1773210e817e277a03e24cd6a4ba583fee007b902ef82ad07c2646bcf316489cf8c14a935b580a66c
6
+ metadata.gz: ac0c4d3d6a339fee329296da43edb9912cc865f5a03b7aa5b1c7351a48f7edc71b77003ed5ad83276ddf9f1e547cd894924703cc449deeba1e0e3f17c182c256
7
+ data.tar.gz: 60d317e8b662a72c41ae4e2b63a44f3e3f384ba8424ba7865ee32bfd489747344696dcb9cfc4add789c4926dd6bb85ac40d0de8c849303b5bf7b1da817af2816
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- logspot (0.4.0)
4
+ logspot (0.5.0)
5
5
  activesupport (>= 4)
6
6
 
7
7
  GEM
@@ -15,6 +15,11 @@ class LoGspot::Output::File
15
15
  file.flush
16
16
  end
17
17
 
18
+ def write(message)
19
+ file.write(message)
20
+ file.flush
21
+ end
22
+
18
23
  def finalize
19
24
  file.close if physical
20
25
  end
@@ -87,10 +87,8 @@ class LoGspot
87
87
  @output = previous_output
88
88
  end
89
89
 
90
- def raw(&block)
91
- previous_output, @output = output, raw_output
92
- block.call
93
- @output = previous_output
90
+ def raw(message)
91
+ raw_output.write(message)
94
92
  end
95
93
 
96
94
  LOG_LEVELS.each do |level|
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logspot'
3
- s.version = '0.5.0'
3
+ s.version = '0.6.0'
4
4
  s.authors = ['Tetsuri Moriya']
5
5
  s.email = ['tetsuri.moriya@gmail.com']
6
6
  s.summary = 'Logger'
@@ -65,11 +65,9 @@ describe LoGspot do
65
65
 
66
66
  it 'should output properly' do
67
67
  logger.tagged('tag') do
68
- logger.raw do
69
- logger.info('test')
70
- end
68
+ logger.raw('test')
71
69
  end
72
- expect(read.()).to eq "test\n"
70
+ expect(read.()).to eq "test"
73
71
  end
74
72
  end
75
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logspot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tetsuri Moriya