loog 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.0pdd.yml +9 -0
- data/.gitattributes +7 -0
- data/.gitignore +5 -0
- data/.pdd +5 -0
- data/.rubocop.yml +20 -0
- data/.rultor.yml +32 -0
- data/.simplecov +38 -0
- data/.travis.yml +13 -0
- data/Gemfile +24 -0
- data/LICENSE.txt +21 -0
- data/README.md +51 -0
- data/Rakefile +59 -0
- data/appveyor.yml +21 -0
- data/lib/loog.rb +89 -0
- data/logo.svg +19 -0
- data/loog.gemspec +50 -0
- data/test/test_loog.rb +40 -0
- metadata +132 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b9a4fe7e73c514b7950b2a99f518ace13de913d549e096c656b48ce08640f049
|
4
|
+
data.tar.gz: 8a1eaf6616a5e131a118a2b00be537ffb3bb090b0ca20fef7f9d3f8bdb9ee679
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 93c0fe3664e25fedd3d3617ed2352bfa0df68d94447209cdfe29f8c2003817a5cfd794004835f749db45f018a22e78ceab6b59923185563a1573172e90f7df0e
|
7
|
+
data.tar.gz: 418602f9562567576797f1c5d9bde64cbbcc7c6105fff46ffbaf2fba08bbc11d31801b639c1d7d305ad5dcd6d924eef4cd70cb88f104868c2cb44ecf86be7498
|
data/.0pdd.yml
ADDED
data/.gitattributes
ADDED
data/.gitignore
ADDED
data/.pdd
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
AllCops:
|
2
|
+
DisplayCopNames: true
|
3
|
+
TargetRubyVersion: 2.3.3
|
4
|
+
|
5
|
+
Layout/EmptyLineAfterGuardClause:
|
6
|
+
Enabled: false
|
7
|
+
Layout/MultilineMethodCallIndentation:
|
8
|
+
Enabled: false
|
9
|
+
Metrics/AbcSize:
|
10
|
+
Max: 50
|
11
|
+
Metrics/MethodLength:
|
12
|
+
Max: 30
|
13
|
+
Metrics/CyclomaticComplexity:
|
14
|
+
Max: 10
|
15
|
+
Metrics/PerceivedComplexity:
|
16
|
+
Max: 10
|
17
|
+
Metrics/ParameterLists:
|
18
|
+
Max: 10
|
19
|
+
Layout/AlignParameters:
|
20
|
+
Enabled: false
|
data/.rultor.yml
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
assets:
|
2
|
+
rubygems.yml: zerocracy/home#assets/rubygems.yml
|
3
|
+
s3cfg: zerocracy/home#assets/s3cfg
|
4
|
+
install: |
|
5
|
+
export GEM_HOME=~/.ruby
|
6
|
+
export GEM_PATH=$GEM_HOME:$GEM_PATH
|
7
|
+
sudo apt-get -y update
|
8
|
+
sudo gem install pdd
|
9
|
+
release:
|
10
|
+
script: |-
|
11
|
+
bundle install
|
12
|
+
bundle exec rake
|
13
|
+
rm -rf *.gem
|
14
|
+
sed -i "s/0\.0\.0/${tag}/g" loog.gemspec
|
15
|
+
git add loog.gemspec
|
16
|
+
git commit -m "version set to ${tag}"
|
17
|
+
gem build loog.gemspec
|
18
|
+
chmod 0600 ../rubygems.yml
|
19
|
+
gem push *.gem --config-file ../rubygems.yml
|
20
|
+
commanders:
|
21
|
+
- yegor256
|
22
|
+
architect:
|
23
|
+
- yegor256
|
24
|
+
merge:
|
25
|
+
script: |-
|
26
|
+
bundle install
|
27
|
+
bundle exec rake
|
28
|
+
pdd
|
29
|
+
deploy:
|
30
|
+
script: |-
|
31
|
+
echo "There is nothing to deploy"
|
32
|
+
exit -1
|
data/.simplecov
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# Copyright (c) 2019 Yegor Bugayenko
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
5
|
+
# in the Software without restriction, including without limitation the rights
|
6
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
# copies of the Software, and to permit persons to whom the Software is
|
8
|
+
# furnished to do so, subject to the following conditions:
|
9
|
+
#
|
10
|
+
# The above copyright notice and this permission notice shall be included in all
|
11
|
+
# copies or substantial portions of the Software.
|
12
|
+
#
|
13
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
19
|
+
# SOFTWARE.
|
20
|
+
|
21
|
+
if Gem.win_platform? then
|
22
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
23
|
+
SimpleCov::Formatter::HTMLFormatter
|
24
|
+
]
|
25
|
+
SimpleCov.start do
|
26
|
+
add_filter "/test/"
|
27
|
+
add_filter "/features/"
|
28
|
+
end
|
29
|
+
else
|
30
|
+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(
|
31
|
+
[SimpleCov::Formatter::HTMLFormatter]
|
32
|
+
)
|
33
|
+
SimpleCov.start do
|
34
|
+
add_filter "/test/"
|
35
|
+
add_filter "/features/"
|
36
|
+
minimum_coverage 60
|
37
|
+
end
|
38
|
+
end
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2018 Yegor Bugayenko
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
10
|
+
# furnished to do so, subject to the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
13
|
+
# copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
source 'https://rubygems.org'
|
24
|
+
gemspec
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
(The MIT License)
|
2
|
+
|
3
|
+
Copyright (c) 2019 Yegor Bugayenko
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the 'Software'), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
<img src="/logo.svg" width="64px" height="64px"/>
|
2
|
+
|
3
|
+
[![EO principles respected here](http://www.elegantobjects.org/badge.svg)](http://www.elegantobjects.org)
|
4
|
+
[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/loog)](http://www.rultor.com/p/yegor256/loog)
|
5
|
+
[![We recommend RubyMine](http://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
|
6
|
+
|
7
|
+
[![Build Status](https://travis-ci.org/yegor256/loog.svg)](https://travis-ci.org/yegor256/loog)
|
8
|
+
[![Build status](https://ci.appveyor.com/api/projects/status/4wypa4uq4anp155x?svg=true)](https://ci.appveyor.com/project/yegor256/loog)
|
9
|
+
[![Gem Version](https://badge.fury.io/rb/loog.svg)](http://badge.fury.io/rb/loog)
|
10
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/4346229c7af42b820e84/maintainability)](https://codeclimate.com/github/yegor256/loog/maintainability)
|
11
|
+
[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/yegor256/loog/master/frames)
|
12
|
+
|
13
|
+
[![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/loog.svg)](https://codecov.io/github/yegor256/loog?branch=master)
|
14
|
+
[![Hits-of-Code](https://hitsofcode.com/github/yegor256/loog)](https://hitsofcode.com/view/github/yegor256/loog)
|
15
|
+
|
16
|
+
Loog is an object-oriented logging wrapper around Ruby
|
17
|
+
[`Logger`](https://ruby-doc.org/stdlib-2.4.0/libdoc/logger/rdoc/Logger.html).
|
18
|
+
|
19
|
+
First, install it:
|
20
|
+
|
21
|
+
```bash
|
22
|
+
$ gem install loog
|
23
|
+
```
|
24
|
+
|
25
|
+
Then, use it like this:
|
26
|
+
|
27
|
+
```ruby
|
28
|
+
require 'loog'
|
29
|
+
Loog::VERBOSE.info('Hello, world!')
|
30
|
+
```
|
31
|
+
|
32
|
+
The gem is basically a provider of a few pre-configured loggers, which
|
33
|
+
you can use for production (`Loog::REGULAR`) or for testing (`Loog::VERBOSE`).
|
34
|
+
You can also shut it up with `Loog::NULL`.
|
35
|
+
|
36
|
+
That's it.
|
37
|
+
|
38
|
+
## How to contribute
|
39
|
+
|
40
|
+
Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
|
41
|
+
Make sure you build is green before you contribute
|
42
|
+
your pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+ and
|
43
|
+
[Bundler](https://bundler.io/) installed. Then:
|
44
|
+
|
45
|
+
```
|
46
|
+
$ bundle update
|
47
|
+
$ bundle exec rake
|
48
|
+
```
|
49
|
+
|
50
|
+
If it's clean and you don't see any error messages, submit your pull request.
|
51
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright (c) 2018 Yegor Bugayenko
|
4
|
+
#
|
5
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
7
|
+
# in the Software without restriction, including without limitation the rights
|
8
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
# copies of the Software, and to permit persons to whom the Software is
|
10
|
+
# furnished to do so, subject to the following conditions:
|
11
|
+
#
|
12
|
+
# The above copyright notice and this permission notice shall be included in all
|
13
|
+
# copies or substantial portions of the Software.
|
14
|
+
#
|
15
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
# SOFTWARE.
|
22
|
+
|
23
|
+
require 'rubygems'
|
24
|
+
require 'rake'
|
25
|
+
require 'rake/clean'
|
26
|
+
|
27
|
+
CLEAN = FileList['coverage']
|
28
|
+
|
29
|
+
def name
|
30
|
+
@name ||= File.basename(Dir['*.gemspec'].first, '.*')
|
31
|
+
end
|
32
|
+
|
33
|
+
def version
|
34
|
+
Gem::Specification.load(Dir['*.gemspec'].first).version
|
35
|
+
end
|
36
|
+
|
37
|
+
task default: %i[clean test rubocop]
|
38
|
+
|
39
|
+
require 'rake/testtask'
|
40
|
+
desc 'Run all unit tests'
|
41
|
+
Rake::TestTask.new(:test) do |test|
|
42
|
+
test.libs << 'lib' << 'test'
|
43
|
+
test.pattern = 'test/**/test_*.rb'
|
44
|
+
test.verbose = false
|
45
|
+
end
|
46
|
+
|
47
|
+
require 'rdoc/task'
|
48
|
+
RDoc::Task.new do |rdoc|
|
49
|
+
rdoc.main = 'README.md'
|
50
|
+
rdoc.rdoc_dir = 'rdoc'
|
51
|
+
rdoc.rdoc_files.include('README.md', 'lib/**/*.rb')
|
52
|
+
end
|
53
|
+
|
54
|
+
require 'rubocop/rake_task'
|
55
|
+
desc 'Run RuboCop on all directories'
|
56
|
+
RuboCop::RakeTask.new(:rubocop) do |task|
|
57
|
+
task.fail_on_error = true
|
58
|
+
task.requires << 'rubocop-rspec'
|
59
|
+
end
|
data/appveyor.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
version: '{build}'
|
2
|
+
skip_tags: true
|
3
|
+
clone_depth: 10
|
4
|
+
branches:
|
5
|
+
only:
|
6
|
+
- master
|
7
|
+
except:
|
8
|
+
- gh-pages
|
9
|
+
os: Windows Server 2012
|
10
|
+
install:
|
11
|
+
- cmd: SET PATH=C:\Ruby23-x64\bin;%PATH%
|
12
|
+
- cmd: ruby --version
|
13
|
+
- cmd: git --version
|
14
|
+
build_script:
|
15
|
+
- bundle update
|
16
|
+
- bundle install
|
17
|
+
test_script:
|
18
|
+
- bundle exec rake
|
19
|
+
cache:
|
20
|
+
- C:\Ruby200\bin -> loog.gemspec
|
21
|
+
- C:\Ruby200\lib\ruby\gems\2.0.0 -> loog.gemspec
|
data/lib/loog.rb
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# (The MIT License)
|
4
|
+
#
|
5
|
+
# Copyright (c) 2018 Yegor Bugayenko
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in all
|
15
|
+
# copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
24
|
+
|
25
|
+
require 'logger'
|
26
|
+
|
27
|
+
# Loog is an object-oriented wrapper around Ruby Logger:
|
28
|
+
#
|
29
|
+
# require 'loog'
|
30
|
+
# log = Loog::VERBOSE
|
31
|
+
# log.info('Hello, world!')
|
32
|
+
#
|
33
|
+
# For more information read
|
34
|
+
# {README}[https://github.com/yegor256/loog/blob/master/README.md] file.
|
35
|
+
#
|
36
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
37
|
+
# Copyright:: Copyright (c) 2018 Yegor Bugayenko
|
38
|
+
# License:: MIT
|
39
|
+
module Loog
|
40
|
+
# Compact formatter
|
41
|
+
COMPACT = proc do |severity, _time, _target, msg|
|
42
|
+
prefix = ''
|
43
|
+
case severity
|
44
|
+
when 'ERROR', 'FATAL'
|
45
|
+
prefix = 'E: '
|
46
|
+
when 'DEBUG'
|
47
|
+
prefix = 'D: '
|
48
|
+
end
|
49
|
+
prefix + msg.to_s.rstrip.gsub(/\n/, "\n" + (' ' * prefix.length)) + "\n"
|
50
|
+
end
|
51
|
+
|
52
|
+
# Short formatter
|
53
|
+
SHORT = proc do |_severity, _time, _target, msg|
|
54
|
+
msg.to_s.rstrip + "\n"
|
55
|
+
end
|
56
|
+
|
57
|
+
# Full formatter
|
58
|
+
FULL = proc do |severity, time, _target, msg|
|
59
|
+
format(
|
60
|
+
"%<time>s %<severity>5s %<msg>s\n",
|
61
|
+
time: time.utc.iso8601,
|
62
|
+
severity: severity,
|
63
|
+
msg: msg.to_s.rstrip
|
64
|
+
)
|
65
|
+
end
|
66
|
+
|
67
|
+
# No logging at all
|
68
|
+
NULL = Logger.new(STDOUT)
|
69
|
+
NULL.level = Logger::UNKNOWN
|
70
|
+
NULL.freeze
|
71
|
+
|
72
|
+
# Everything, including debug
|
73
|
+
VERBOSE = Logger.new(STDOUT)
|
74
|
+
VERBOSE.level = Logger::DEBUG
|
75
|
+
VERBOSE.formatter = COMPACT
|
76
|
+
VERBOSE.freeze
|
77
|
+
|
78
|
+
# Info and errors, no debug info
|
79
|
+
REGULAR = Logger.new(STDOUT)
|
80
|
+
REGULAR.level = Logger::INFO
|
81
|
+
REGULAR.formatter = COMPACT
|
82
|
+
REGULAR.freeze
|
83
|
+
|
84
|
+
# Errors only
|
85
|
+
ERRORS = Logger.new(STDOUT)
|
86
|
+
ERRORS.level = Logger::ERROR
|
87
|
+
ERRORS.formatter = COMPACT
|
88
|
+
ERRORS.freeze
|
89
|
+
end
|
data/logo.svg
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg width="314px" height="314px" viewBox="0 0 314 314" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
3
|
+
<!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
|
4
|
+
<title>Group 2</title>
|
5
|
+
<desc>Created with Sketch.</desc>
|
6
|
+
<defs></defs>
|
7
|
+
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
8
|
+
<g id="Group-2">
|
9
|
+
<g id="Group">
|
10
|
+
<circle id="Oval" fill="#053C5E" cx="157" cy="157" r="157"></circle>
|
11
|
+
<rect id="Rectangle" fill="#2B2B2B" x="0" y="233" width="184" height="69"></rect>
|
12
|
+
<text id="loog" font-family="CourierNewPS-BoldMT, Courier New" font-size="60" font-weight="bold" fill="#FFFFFF">
|
13
|
+
<tspan x="20.9765625" y="281">loog</tspan>
|
14
|
+
</text>
|
15
|
+
<path d="M135.676765,111.215287 C135.211714,113.540467 132.770932,120.688823 130.252813,127.100603 C127.734621,133.512383 125.2898,140.431445 124.819828,142.476214 C123.6868,147.405663 121.517836,147.185477 119.69487,141.95608 C116.899865,133.938362 105.171362,111.043501 103.859129,111.043501 C100.420089,111.043501 101.508757,114.986149 109.1771,130.30227 C113.739327,139.414532 118.032086,147.448041 118.716515,148.15443 C120.694817,150.196115 120.172626,154.319657 117.358599,158.877992 C113.567467,165.019055 107.570942,183.721189 108.054206,187.896804 C108.804956,194.383204 112.436054,192.210274 113.355359,184.724515 C114.48376,175.535577 120.945556,159.641154 124.897459,156.333653 C127.109021,154.482778 128.268636,151.905536 128.573284,148.163978 C128.818001,145.157747 131.906711,135.560972 135.437115,126.837819 C138.96752,118.114666 141.511492,110.079835 141.090434,108.982574 C139.755727,105.504315 136.554941,106.824333 135.676765,111.215287 M174.714659,126.841564 C169.37392,129.699438 169.197653,130.049915 167.452978,141.283475 C165.577352,153.360398 165.225112,168.513913 166.548289,180.203784 L167.566817,189.202501 L161.346213,191.9541 C154.601949,194.937416 150.91195,200.302465 153.156708,203.861146 C155.104824,206.949562 157.09025,206.70198 157.571826,203.310532 C158.083734,199.706169 166.097413,193.204052 170.29418,192.987978 C172.116999,192.894116 173.522874,191.717021 173.97823,189.903529 C174.383277,188.290613 177.740353,184.944554 181.438431,182.467858 C188.546172,177.707551 194.317883,170.450278 194.317883,166.273341 C194.317883,162.684548 189.493165,158.361603 185.487795,158.361603 C180.701636,158.361603 180.027195,155.239403 183.731222,150.229385 C188.308065,144.038966 188.284856,130.867646 183.690534,127.147387 C179.896537,124.075276 179.885006,124.074836 174.714659,126.841564 M182.67318,134.240439 C184.752542,140.153164 174.808961,161.185104 171.588639,157.68562 C169.868715,155.81653 172.863122,135.012708 175.266374,132.134564 C177.872553,129.013319 181.163896,129.949075 182.67318,134.240439 M184.854262,162.269586 C190.589839,163.855621 189.673839,167.881335 181.645765,176.371155 C177.281618,180.986262 173.904933,183.573859 173.371946,182.711474 C172.876636,181.91012 172.127869,176.711937 171.707987,171.159972 L170.944531,161.065463 L176.209475,161.200234 C179.105172,161.274339 182.995308,161.755548 184.854262,162.269586 M132.642184,172.492256 C131.593837,175.224098 133.152917,177.288844 136.264027,177.288844 C139.014965,177.288844 139.431396,176.221769 138.067531,172.667568 C137.039234,169.987871 133.645289,169.878218 132.642184,172.492256 M203.781503,185.840798 C203.781503,187.657595 209.264724,193.512152 210.966361,193.512152 C212.534035,193.512152 211.991059,187.391138 210.270768,185.670847 C208.092403,183.492409 203.781503,183.605293 203.781503,185.840798" id="Fill-6" fill="#427B8A" fill-rule="nonzero"></path>
|
16
|
+
</g>
|
17
|
+
</g>
|
18
|
+
</g>
|
19
|
+
</svg>
|
data/loog.gemspec
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# (The MIT License)
|
4
|
+
#
|
5
|
+
# Copyright (c) 2018 Yegor Bugayenko
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in all
|
15
|
+
# copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
24
|
+
|
25
|
+
require 'English'
|
26
|
+
Gem::Specification.new do |s|
|
27
|
+
s.specification_version = 2 if s.respond_to? :specification_version=
|
28
|
+
if s.respond_to? :required_rubygems_version=
|
29
|
+
s.required_rubygems_version = Gem::Requirement.new('>= 0')
|
30
|
+
end
|
31
|
+
s.rubygems_version = '2.3.3'
|
32
|
+
s.required_ruby_version = '>=2.3'
|
33
|
+
s.name = 'loog'
|
34
|
+
s.version = '0.1.0'
|
35
|
+
s.license = 'MIT'
|
36
|
+
s.summary = 'Object-oriented logging wrapper'
|
37
|
+
s.description = 'Object-oriented wrapper for Ruby default logging facility'
|
38
|
+
s.authors = ['Yegor Bugayenko']
|
39
|
+
s.email = 'yegor256@gmail.com'
|
40
|
+
s.homepage = 'http://github.com/yegor256/loog'
|
41
|
+
s.files = `git ls-files`.split($RS)
|
42
|
+
s.test_files = s.files.grep(%r{^(test)/})
|
43
|
+
s.rdoc_options = ['--charset=UTF-8']
|
44
|
+
s.extra_rdoc_files = ['README.md']
|
45
|
+
s.add_development_dependency 'minitest', '5.11.3'
|
46
|
+
s.add_development_dependency 'rake', '12.3.1'
|
47
|
+
s.add_development_dependency 'rdoc', '4.3.0'
|
48
|
+
s.add_development_dependency 'rubocop', '0.62.0'
|
49
|
+
s.add_development_dependency 'rubocop-rspec', '1.31.0'
|
50
|
+
end
|
data/test/test_loog.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# (The MIT License)
|
4
|
+
#
|
5
|
+
# Copyright (c) 2018 Yegor Bugayenko
|
6
|
+
#
|
7
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
9
|
+
# in the Software without restriction, including without limitation the rights
|
10
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
11
|
+
# copies of the Software, and to permit persons to whom the Software is
|
12
|
+
# furnished to do so, subject to the following conditions:
|
13
|
+
#
|
14
|
+
# The above copyright notice and this permission notice shall be included in all
|
15
|
+
# copies or substantial portions of the Software.
|
16
|
+
#
|
17
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
18
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
19
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
20
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
21
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
22
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
23
|
+
# SOFTWARE.
|
24
|
+
|
25
|
+
require 'minitest/autorun'
|
26
|
+
require_relative '../lib/loog'
|
27
|
+
|
28
|
+
# Loog test.
|
29
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
30
|
+
# Copyright:: Copyright (c) 2018 Yegor Bugayenko
|
31
|
+
# License:: MIT
|
32
|
+
class LoogTest < Minitest::Test
|
33
|
+
def test_simple_logging
|
34
|
+
Loog::VERBOSE.info('Works?')
|
35
|
+
end
|
36
|
+
|
37
|
+
def test_null_logging
|
38
|
+
Loog::NULL.info('Should not be visible')
|
39
|
+
end
|
40
|
+
end
|
metadata
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: loog
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Yegor Bugayenko
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-05-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: minitest
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 5.11.3
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 5.11.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 12.3.1
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 12.3.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rdoc
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 4.3.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 4.3.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.62.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.62.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.31.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.31.0
|
83
|
+
description: Object-oriented wrapper for Ruby default logging facility
|
84
|
+
email: yegor256@gmail.com
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files:
|
88
|
+
- README.md
|
89
|
+
files:
|
90
|
+
- ".0pdd.yml"
|
91
|
+
- ".gitattributes"
|
92
|
+
- ".gitignore"
|
93
|
+
- ".pdd"
|
94
|
+
- ".rubocop.yml"
|
95
|
+
- ".rultor.yml"
|
96
|
+
- ".simplecov"
|
97
|
+
- ".travis.yml"
|
98
|
+
- Gemfile
|
99
|
+
- LICENSE.txt
|
100
|
+
- README.md
|
101
|
+
- Rakefile
|
102
|
+
- appveyor.yml
|
103
|
+
- lib/loog.rb
|
104
|
+
- logo.svg
|
105
|
+
- loog.gemspec
|
106
|
+
- test/test_loog.rb
|
107
|
+
homepage: http://github.com/yegor256/loog
|
108
|
+
licenses:
|
109
|
+
- MIT
|
110
|
+
metadata: {}
|
111
|
+
post_install_message:
|
112
|
+
rdoc_options:
|
113
|
+
- "--charset=UTF-8"
|
114
|
+
require_paths:
|
115
|
+
- lib
|
116
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '2.3'
|
121
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
122
|
+
requirements:
|
123
|
+
- - ">="
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
requirements: []
|
127
|
+
rubygems_version: 3.0.1
|
128
|
+
signing_key:
|
129
|
+
specification_version: 2
|
130
|
+
summary: Object-oriented logging wrapper
|
131
|
+
test_files:
|
132
|
+
- test/test_loog.rb
|