tee_logger 2.1.0 → 2.1.1

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: 663a9c80a5e899c9afa6337089e51c94578c9ef9
4
- data.tar.gz: d5522bc64ca244eebfd8f26d43f9c3fdd891f100
3
+ metadata.gz: afd26690c0f0397edc4a12059520e2713d15f51f
4
+ data.tar.gz: 0c789f266466407a56e56c04ed582357aeda1303
5
5
  SHA512:
6
- metadata.gz: 9b0d14d1bf676de05350d675cbbdd2ad1d92f3d28b8da8cff88b8889203cb08503dc863ef444d5b982c9620a12abed70dfe72268e486644330c853143bc8423e
7
- data.tar.gz: 8f78b5ed0bd35f1c138568052cb6af38dbfb3ea4b8a4b937aa632966f96258f257fed680a83a02c5386cb90083aed6cf013a702ceef73a988be148f71302f43d
6
+ metadata.gz: 62b0b3fafe4f25007fd652889162ce7753774b245e1329242c45e0d84d269436e3f40704cac2128a9ec4168a70a12373959e89c8e80b33cfd4e067e3101d88b3
7
+ data.tar.gz: b4de6b8e8b8c237d2e6504ab35ef4b8b7a62cd2a01a85e8258720063eab5dd812b36eb349c322c62c2b4ff09362fd20d147a6eab1c63db96528079f926b4f6c1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ # 2.1.1
2
+ - refactoring of test case
3
+ - Introduced capture_stdout
4
+ - Introduced FakeFS
5
+ - Change logdev of Console for Logger from STDOUT to $ stdout
6
+
1
7
  # 2.1.0
2
8
  - Integrate TeeLogger::Base class to TeeLogger::TeeLogger class
3
9
 
data/Rakefile CHANGED
@@ -1,6 +1,6 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
3
 
4
4
  RSpec::Core::RakeTask.new(:spec)
5
5
 
6
- task :default => :spec
6
+ task default: :spec
@@ -1,4 +1,4 @@
1
1
  # namespace
2
2
  module TeeLogger
3
- VERSION = '2.1.0'
3
+ VERSION = '2.1.1'
4
4
  end
data/lib/tee_logger.rb CHANGED
@@ -10,12 +10,13 @@ module TeeLogger
10
10
  TeeLogger.new(logdev, shift_age, shift_size)
11
11
  end
12
12
 
13
+ # main
13
14
  class TeeLogger
14
15
  attr_reader :logger, :console
15
16
 
16
17
  def initialize(logdev = DEFAULT_FILE, shift_age = 0, shift_size = 1_048_576)
17
18
  @logger = Logger.new(logdev, shift_age, shift_size)
18
- @console = Logger.new(STDOUT)
19
+ @console = Logger.new($stdout)
19
20
  end
20
21
 
21
22
  # logging methods.
@@ -36,12 +37,12 @@ module TeeLogger
36
37
  end
37
38
 
38
39
  # TODO: Implement!
39
- def disable(target)
40
+ def disable(_target)
40
41
  # undef_method, remove_method ....
41
42
  end
42
43
 
43
44
  # TODO: Implement!
44
- def enable(target)
45
+ def enable(_target)
45
46
  # undef_method, remove_method ....
46
47
  end
47
48
 
@@ -56,6 +57,16 @@ module TeeLogger
56
57
  @console.progname = name
57
58
  end
58
59
 
60
+ def formatter
61
+ @logger.formatter
62
+ @console.formatter
63
+ end
64
+
65
+ def formatter=(formatter)
66
+ @logger.formatter = formatter
67
+ @console.formatter = formatter
68
+ end
69
+
59
70
  # def close
60
71
  # @logger.close
61
72
  # # @console.close
data/tee_logger.gemspec CHANGED
@@ -27,4 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency 'pry-doc'
28
28
  spec.add_development_dependency 'pry-theme'
29
29
  spec.add_development_dependency 'rubocop'
30
+
31
+ spec.add_development_dependency 'capture_stdout'
32
+ spec.add_development_dependency 'fakefs'
30
33
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tee_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - k-ta-yamada
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-09-08 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,6 +108,34 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: capture_stdout
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: fakefs
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
111
139
  description: logging to file and standard output
112
140
  email:
113
141
  - key.luvless@gmail.com