null-logger 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +0 -1
- data/.rspec +1 -0
- data/.ruby-version +1 -1
- data/.travis.yml +4 -0
- data/CHANGELOG.md +11 -1
- data/Gemfile +5 -1
- data/Gemfile.lock +10 -127
- data/README.md +6 -2
- data/Rakefile +5 -13
- data/lib/null_logger.rb +4 -2
- data/lib/null_logger/version.rb +2 -1
- data/null-logger.gemspec +11 -9
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb46a333d77b31236b9b3e071244d02a3eba700e
|
4
|
+
data.tar.gz: 48afc3f414bc22b2c8f86b925caee3132b8a8bcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cc144000c3ca3af691c6d9673c01829c869c05e9f28f9a1c7d02ba8091c0637fbe2b8ce06043d10aee1323601e63659e91e9820ed10579c0efdb3dc5379c4f2
|
7
|
+
data.tar.gz: 1fc286f6d4bc649be4f8a069c2f7e3d0abfff8bc369fd0b19ad90fd7e37345be7506cd97026f9ad1cfd17f5c31340862986c5cbf94f70d9a30f37f6392bc86d4
|
data/.gitignore
CHANGED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.1
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,21 @@
|
|
1
1
|
# Null-Logger changelog
|
2
2
|
|
3
|
+
## 0.1.4
|
4
|
+
- Ruby 2.4.1 as default
|
5
|
+
- Gem bump
|
6
|
+
- Coditsu as quality tool
|
7
|
+
- Readme updates
|
8
|
+
- PG dev tools drop
|
9
|
+
- Spec updates
|
10
|
+
|
3
11
|
## 0.1.3
|
4
12
|
- Ruby 2.1.* support dropped
|
5
|
-
- Ruby 2.3.1 as default
|
13
|
+
- ~~Ruby 2.3.1 as default~~
|
14
|
+
- Ruby 2.4.0 as default
|
6
15
|
- Gem dump
|
7
16
|
- Rubocop fixes
|
8
17
|
- Added #respond_to_method_missing?
|
18
|
+
- added .rspec for default spec helper require
|
9
19
|
|
10
20
|
## 0.1.2
|
11
21
|
- Dev tools update
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,97 +1,20 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
null-logger (0.1.
|
4
|
+
null-logger (0.1.4)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
|
10
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
11
|
-
i18n (~> 0.7)
|
12
|
-
minitest (~> 5.1)
|
13
|
-
tzinfo (~> 1.1)
|
14
|
-
addressable (2.4.0)
|
15
|
-
ast (2.3.0)
|
16
|
-
axiom-types (0.1.1)
|
17
|
-
descendants_tracker (~> 0.0.4)
|
18
|
-
ice_nine (~> 0.11.0)
|
19
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
20
|
-
brakeman (3.3.3)
|
21
|
-
bundler-audit (0.5.0)
|
22
|
-
bundler (~> 1.2)
|
23
|
-
thor (~> 0.18)
|
24
|
-
codeclimate-engine-rb (0.3.1)
|
25
|
-
virtus (~> 1.0)
|
26
|
-
coderay (1.1.1)
|
27
|
-
coercible (1.0.0)
|
28
|
-
descendants_tracker (~> 0.0.1)
|
29
|
-
colorize (0.8.1)
|
30
|
-
concurrent-ruby (1.0.2)
|
31
|
-
descendants_tracker (0.0.4)
|
32
|
-
thread_safe (~> 0.3, >= 0.3.1)
|
33
|
-
diff-lcs (1.2.5)
|
9
|
+
diff-lcs (1.3)
|
34
10
|
docile (1.1.5)
|
35
|
-
|
36
|
-
|
37
|
-
faker (1.6.6)
|
38
|
-
i18n (~> 0.5)
|
39
|
-
flay (2.8.0)
|
40
|
-
erubis (~> 2.7.0)
|
41
|
-
path_expander (~> 1.0)
|
42
|
-
ruby_parser (~> 3.0)
|
43
|
-
sexp_processor (~> 4.0)
|
44
|
-
flog (4.4.0)
|
45
|
-
path_expander (~> 1.0)
|
46
|
-
ruby_parser (~> 3.1, > 3.1.0)
|
47
|
-
sexp_processor (~> 4.4)
|
48
|
-
haml (4.0.7)
|
49
|
-
tilt
|
50
|
-
haml_lint (0.18.1)
|
51
|
-
haml (~> 4.0)
|
52
|
-
rake (>= 10, < 12)
|
53
|
-
rubocop (>= 0.36.0)
|
54
|
-
sysexits (~> 1.1)
|
55
|
-
i18n (0.7.0)
|
56
|
-
ice_nine (0.11.2)
|
57
|
-
json (2.0.2)
|
58
|
-
launchy (2.4.3)
|
59
|
-
addressable (~> 2.3)
|
60
|
-
method_source (0.8.2)
|
61
|
-
minitest (5.9.0)
|
62
|
-
parser (2.3.1.2)
|
63
|
-
ast (~> 2.2)
|
64
|
-
path_expander (1.0.0)
|
65
|
-
polishgeeks-dev-tools (1.3.2)
|
66
|
-
brakeman
|
67
|
-
bundler-audit
|
68
|
-
faker
|
69
|
-
haml_lint
|
70
|
-
pry
|
71
|
-
rspec
|
72
|
-
rubocop
|
73
|
-
rubocop-rspec
|
74
|
-
rubycritic
|
75
|
-
shoulda
|
76
|
-
simplecov
|
77
|
-
timecop
|
78
|
-
yard
|
79
|
-
powerpack (0.1.1)
|
80
|
-
pry (0.10.4)
|
81
|
-
coderay (~> 1.1.0)
|
82
|
-
method_source (~> 0.8.1)
|
83
|
-
slop (~> 3.4)
|
84
|
-
rainbow (2.1.0)
|
85
|
-
rake (11.2.2)
|
86
|
-
reek (4.1.0)
|
87
|
-
codeclimate-engine-rb (~> 0.3.1)
|
88
|
-
parser (~> 2.3.1, >= 2.3.1.2)
|
89
|
-
rainbow (~> 2.0)
|
11
|
+
json (2.1.0)
|
12
|
+
rake (12.0.0)
|
90
13
|
rspec (3.5.0)
|
91
14
|
rspec-core (~> 3.5.0)
|
92
15
|
rspec-expectations (~> 3.5.0)
|
93
16
|
rspec-mocks (~> 3.5.0)
|
94
|
-
rspec-core (3.5.
|
17
|
+
rspec-core (3.5.4)
|
95
18
|
rspec-support (~> 3.5.0)
|
96
19
|
rspec-expectations (3.5.0)
|
97
20
|
diff-lcs (>= 1.2.0, < 2.0)
|
@@ -100,60 +23,20 @@ GEM
|
|
100
23
|
diff-lcs (>= 1.2.0, < 2.0)
|
101
24
|
rspec-support (~> 3.5.0)
|
102
25
|
rspec-support (3.5.0)
|
103
|
-
|
104
|
-
parser (>= 2.3.1.1, < 3.0)
|
105
|
-
powerpack (~> 0.1)
|
106
|
-
rainbow (>= 1.99.1, < 3.0)
|
107
|
-
ruby-progressbar (~> 1.7)
|
108
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
109
|
-
rubocop-rspec (1.5.1)
|
110
|
-
rubocop (>= 0.41.2)
|
111
|
-
ruby-progressbar (1.8.1)
|
112
|
-
ruby_parser (3.8.2)
|
113
|
-
sexp_processor (~> 4.1)
|
114
|
-
rubycritic (2.9.2)
|
115
|
-
colorize
|
116
|
-
flay (= 2.8.0)
|
117
|
-
flog (= 4.4.0)
|
118
|
-
launchy (= 2.4.3)
|
119
|
-
parser (= 2.3.1.2)
|
120
|
-
reek (= 4.1.0)
|
121
|
-
ruby_parser (~> 3.8)
|
122
|
-
virtus (~> 1.0)
|
123
|
-
sexp_processor (4.7.0)
|
124
|
-
shoulda (3.5.0)
|
125
|
-
shoulda-context (~> 1.0, >= 1.0.1)
|
126
|
-
shoulda-matchers (>= 1.4.1, < 3.0)
|
127
|
-
shoulda-context (1.2.1)
|
128
|
-
shoulda-matchers (2.8.0)
|
129
|
-
activesupport (>= 3.0.0)
|
130
|
-
simplecov (0.12.0)
|
26
|
+
simplecov (0.14.1)
|
131
27
|
docile (~> 1.1.0)
|
132
28
|
json (>= 1.8, < 3)
|
133
29
|
simplecov-html (~> 0.10.0)
|
134
30
|
simplecov-html (0.10.0)
|
135
|
-
slop (3.6.0)
|
136
|
-
sysexits (1.2.0)
|
137
|
-
thor (0.19.1)
|
138
|
-
thread_safe (0.3.5)
|
139
|
-
tilt (2.0.5)
|
140
|
-
timecop (0.8.1)
|
141
|
-
tzinfo (1.2.2)
|
142
|
-
thread_safe (~> 0.1)
|
143
|
-
unicode-display_width (1.1.0)
|
144
|
-
virtus (1.0.5)
|
145
|
-
axiom-types (~> 0.1)
|
146
|
-
coercible (~> 1.0)
|
147
|
-
descendants_tracker (~> 0.0, >= 0.0.3)
|
148
|
-
equalizer (~> 0.0, >= 0.0.9)
|
149
|
-
yard (0.9.5)
|
150
31
|
|
151
32
|
PLATFORMS
|
152
33
|
ruby
|
153
34
|
|
154
35
|
DEPENDENCIES
|
155
36
|
null-logger!
|
156
|
-
|
37
|
+
rake
|
38
|
+
rspec
|
39
|
+
simplecov
|
157
40
|
|
158
41
|
BUNDLED WITH
|
159
|
-
1.
|
42
|
+
1.14.6
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ A simple logger that does not log anything. It can be used for defining an inter
|
|
12
12
|
|
13
13
|
Add gem to your Gemfile
|
14
14
|
```ruby
|
15
|
-
gem 'null-logger'
|
15
|
+
gem 'null-logger', require: 'null_logger'
|
16
16
|
```
|
17
17
|
|
18
18
|
## Usage
|
@@ -61,7 +61,11 @@ Make your feature addition or bug fix.
|
|
61
61
|
Add tests for it. This is important so I don't break it in a future version unintentionally.
|
62
62
|
Commit, do not mess with Rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull). Send me a pull request. Bonus points for topic branches.
|
63
63
|
|
64
|
-
|
64
|
+
[![coditsu](https://coditsu.io/assets/quality_bar.svg)](https://coditsu.io)
|
65
|
+
|
66
|
+
Each pull request must pass our quality requirements. To check if everything is as it should be, we use [Coditsu](https://coditsu.io) that combinse multiple linters and code analyzers. Unfortunately, for now it is invite-only based, so just ping us and we will give you access to the quality results.
|
67
|
+
|
68
|
+
Please run:
|
65
69
|
|
66
70
|
```bash
|
67
71
|
bundle exec rake
|
data/Rakefile
CHANGED
@@ -1,18 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'bundler'
|
2
4
|
require 'bundler/gem_tasks'
|
5
|
+
require 'rspec/core/rake_task'
|
3
6
|
require 'rake'
|
4
|
-
require 'polishgeeks-dev-tools'
|
5
|
-
|
6
|
-
PolishGeeks::DevTools.setup do |config|
|
7
|
-
config.brakeman = false
|
8
|
-
config.haml_lint = false
|
9
|
-
end
|
10
7
|
|
11
|
-
|
12
|
-
task :check do
|
13
|
-
PolishGeeks::DevTools::Runner.new.execute(
|
14
|
-
PolishGeeks::DevTools::Logger.new
|
15
|
-
)
|
16
|
-
end
|
8
|
+
RSpec::Core::RakeTask.new(:spec)
|
17
9
|
|
18
|
-
task default: :
|
10
|
+
task default: :spec
|
data/lib/null_logger.rb
CHANGED
@@ -1,15 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# Null logger class
|
2
4
|
# Is used when logger is not defined
|
3
5
|
class NullLogger
|
4
6
|
# Possible log levels from ruby Logger::Severity class
|
5
|
-
LOG_LEVELS = %w
|
7
|
+
LOG_LEVELS = %w[
|
6
8
|
unknown
|
7
9
|
fatal
|
8
10
|
error
|
9
11
|
warn
|
10
12
|
info
|
11
13
|
debug
|
12
|
-
|
14
|
+
].freeze
|
13
15
|
|
14
16
|
# @return [Boolean] true if we can handle this missing method, otherwise false
|
15
17
|
# @param method_name [String, Symbol] method name
|
data/lib/null_logger/version.rb
CHANGED
data/null-logger.gemspec
CHANGED
@@ -1,21 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
lib = File.expand_path('../lib', __FILE__)
|
2
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
5
|
|
4
6
|
require 'null_logger/version'
|
5
7
|
|
6
8
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name
|
8
|
-
spec.version
|
9
|
-
spec.authors
|
10
|
-
spec.email
|
9
|
+
spec.name = 'null-logger'
|
10
|
+
spec.version = NullLogger::VERSION
|
11
|
+
spec.authors = ['Maciej Mensfeld', 'Adam Gwozdowski']
|
12
|
+
spec.email = %w[maciej@coditsu.io adam99g@gmail.com]
|
13
|
+
spec.summary = 'A simple logger that does not log anything.'
|
14
|
+
spec.description = 'It can be used for defining an interface for other loggers'
|
15
|
+
spec.homepage = 'https://github.com/karafka/null-logger'
|
16
|
+
spec.license = 'MIT'
|
11
17
|
|
12
|
-
spec.summary = 'A simple logger that does not log anything.'
|
13
|
-
spec.description = 'It can be used for defining an interface for other loggers'
|
14
|
-
spec.homepage = 'https://github.com/karafka/null-logger'
|
15
|
-
spec.license = 'MIT'
|
16
18
|
spec.required_ruby_version = '>= 2.2.0'
|
17
19
|
|
18
20
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
|
19
21
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
|
-
spec.require_paths = %w
|
22
|
+
spec.require_paths = %w[lib]
|
21
23
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: null-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maciej Mensfeld
|
@@ -9,17 +9,18 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-05-02 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: It can be used for defining an interface for other loggers
|
15
15
|
email:
|
16
|
-
- maciej@
|
16
|
+
- maciej@coditsu.io
|
17
17
|
- adam99g@gmail.com
|
18
18
|
executables: []
|
19
19
|
extensions: []
|
20
20
|
extra_rdoc_files: []
|
21
21
|
files:
|
22
22
|
- ".gitignore"
|
23
|
+
- ".rspec"
|
23
24
|
- ".ruby-gemset"
|
24
25
|
- ".ruby-version"
|
25
26
|
- ".travis.yml"
|
@@ -52,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
53
|
version: '0'
|
53
54
|
requirements: []
|
54
55
|
rubyforge_project:
|
55
|
-
rubygems_version: 2.
|
56
|
+
rubygems_version: 2.6.11
|
56
57
|
signing_key:
|
57
58
|
specification_version: 4
|
58
59
|
summary: A simple logger that does not log anything.
|