rt-multilogger 0.1.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 00b2a85d6d6595159ed91a271f213a62ee086273
4
+ data.tar.gz: c5daf1f0b5db808a2b33225e97cf60eb33c6d2cf
5
+ SHA512:
6
+ metadata.gz: 9580d5142db9c997eebacb5fc6544b66940a6416e30f7d10e040ad8096b45a10db1b6c2979a253e4c8025ebce7f6032ad03f52e410abe697074395d19d84548a
7
+ data.tar.gz: 7b1958d7019daf6c415170b1d832bcd09ab9d6ee76ab97f4269acc1e8667e3351c69d4e66df1de756f015814e1f8dec3f288b931ae8f9dcd1b88d952748eccd0
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ # /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /vendor/bundle
@@ -0,0 +1 @@
1
+ 2.3.1
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ #
2
+ # Gemfile
3
+ # rt-multilogger
4
+ #
5
+ # Created by Ryuichi Tanimoto on 12/10/16
6
+ # Copyright (c) 2016 Ryuichi Tanimoto. All rights reserved.
7
+ #
8
+
9
+ source 'https://rubygems.org'
10
+ gemspec
@@ -0,0 +1,22 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rt-multilogger (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ minitest (5.10.1)
10
+ rake (10.5.0)
11
+
12
+ PLATFORMS
13
+ ruby
14
+
15
+ DEPENDENCIES
16
+ bundler (~> 1.13)
17
+ minitest (~> 5.0)
18
+ rake (~> 10.0)
19
+ rt-multilogger!
20
+
21
+ BUNDLED WITH
22
+ 1.13.6
@@ -0,0 +1,36 @@
1
+ # RT::MultiLogger
2
+
3
+ ## Installation
4
+
5
+ Add this line to your application's Gemfile:
6
+
7
+ ```ruby
8
+ gem 'rt-multilogger'
9
+ ```
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install rt-multilogger
18
+
19
+ ## Usage
20
+
21
+ Add this line to your Ruby code:
22
+
23
+ ```ruby
24
+ require 'rt/multilogger'
25
+ ```
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/RyuichiTanimoto/rt-multilogger.
36
+
@@ -0,0 +1,18 @@
1
+ #
2
+ # Rakefile
3
+ # rt-multilogger
4
+ #
5
+ # Created by Ryuichi Tanimoto on 12/10/16
6
+ # Copyright (c) 2016 Ryuichi Tanimoto. All rights reserved.
7
+ #
8
+
9
+ require "bundler/gem_tasks"
10
+ require "rake/testtask"
11
+
12
+ Rake::TestTask.new(:test) do |t|
13
+ t.libs << "test"
14
+ t.libs << "lib"
15
+ t.test_files = FileList['test/**/*_test.rb']
16
+ end
17
+
18
+ task :default => :test
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # console
4
+ # rt-multilogger
5
+ #
6
+ # Created by Ryuichi Tanimoto on 12/10/16
7
+ # Copyright (c) 2016 Ryuichi Tanimoto. All rights reserved.
8
+ #
9
+
10
+ require "bundler/setup"
11
+ require "rt/multilogger"
12
+
13
+ # You can add fixtures and/or initialization code here to make experimenting
14
+ # with your gem easier. You can also use a different console, if you like.
15
+
16
+ # (If you use this, don't forget to add pry to your Gemfile!)
17
+ # require "pry"
18
+ # Pry.start
19
+
20
+ require "irb"
21
+ IRB.start
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bash
2
+ #
3
+ # setup
4
+ # rt-multilogger
5
+ #
6
+ # Created by Ryuichi Tanimoto on 12/10/16
7
+ # Copyright (c) 2016 Ryuichi Tanimoto. All rights reserved.
8
+ #
9
+
10
+ set -euo pipefail
11
+ IFS=$'\n\t'
12
+ set -vx
13
+
14
+ bundle install
15
+
16
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # rt-multilogger
4
+ # rt-multilogger
5
+ #
6
+ # Created by Ryuichi Tanimoto on 12/10/16
7
+ # Copyright (c) 2016 Ryuichi Tanimoto. All rights reserved.
8
+ #
9
+
10
+ require "rt/multilogger"
@@ -0,0 +1,26 @@
1
+ #
2
+ # multilogger.rb
3
+ # rt-multilogger
4
+ #
5
+ # Created by Ryuichi Tanimoto on 12/10/16
6
+ # Copyright (c) 2016 Ryuichi Tanimoto. All rights reserved.
7
+ #
8
+
9
+ require 'rt/multilogger/version'
10
+ require 'logger'
11
+
12
+ module RT
13
+ class MultiLogger
14
+ def initialize *args
15
+ @stdout = Logger.new STDOUT
16
+ @log = Logger.new(*args)
17
+ end
18
+ %w(fatal error warn info debug).each do |level|
19
+ define_method level do |args|
20
+ [@stdout, @log].all? do |output|
21
+ output.send level, *args
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,13 @@
1
+ #
2
+ # version.rb
3
+ # rt-multilogger
4
+ #
5
+ # Created by Ryuichi Tanimoto on 12/10/16
6
+ # Copyright (c) 2016 Ryuichi Tanimoto. All rights reserved.
7
+ #
8
+
9
+ module RT
10
+ class MultiLogger
11
+ VERSION = "0.1.0"
12
+ end
13
+ end
@@ -0,0 +1,34 @@
1
+ # coding: utf-8
2
+ #
3
+ # rt-multilogger.gemspec
4
+ # rt-multilogger
5
+ #
6
+ # Created by Ryuichi Tanimoto on 12/10/16
7
+ # Copyright (c) 2016 Ryuichi Tanimoto. All rights reserved.
8
+ #
9
+
10
+ lib = File.expand_path('../lib', __FILE__)
11
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
12
+ require 'rt/multilogger/version'
13
+
14
+ Gem::Specification.new do |spec|
15
+ spec.name = "rt-multilogger"
16
+ spec.version = RT::MultiLogger::VERSION
17
+ spec.authors = ["RyuichiTanimoto"]
18
+ spec.email = ["ryuichi.tanimoto@gmail.com"]
19
+
20
+ spec.summary = %q{Logger which outputs the application log both to a file and STDOUT.}
21
+ spec.homepage = "https://github.com/RyuichiTanimoto/rt-multilogger"
22
+ spec.license = 'GPL'
23
+
24
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
25
+ f.match(%r{^(test|spec|features)/})
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ spec.add_development_dependency "bundler", "~> 1.13"
32
+ spec.add_development_dependency "rake", "~> 10.0"
33
+ spec.add_development_dependency "minitest", "~> 5.0"
34
+ end
metadata ADDED
@@ -0,0 +1,99 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rt-multilogger
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - RyuichiTanimoto
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-12-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.13'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.13'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ description:
56
+ email:
57
+ - ryuichi.tanimoto@gmail.com
58
+ executables:
59
+ - rt-multilogger
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - ".gitignore"
64
+ - ".ruby-version"
65
+ - Gemfile
66
+ - Gemfile.lock
67
+ - README.md
68
+ - Rakefile
69
+ - bin/console
70
+ - bin/setup
71
+ - exe/rt-multilogger
72
+ - lib/rt/multilogger.rb
73
+ - lib/rt/multilogger/version.rb
74
+ - rt-multilogger.gemspec
75
+ homepage: https://github.com/RyuichiTanimoto/rt-multilogger
76
+ licenses:
77
+ - GPL
78
+ metadata: {}
79
+ post_install_message:
80
+ rdoc_options: []
81
+ require_paths:
82
+ - lib
83
+ required_ruby_version: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ required_rubygems_version: !ruby/object:Gem::Requirement
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: '0'
93
+ requirements: []
94
+ rubyforge_project:
95
+ rubygems_version: 2.5.1
96
+ signing_key:
97
+ specification_version: 4
98
+ summary: Logger which outputs the application log both to a file and STDOUT.
99
+ test_files: []