debug_logging 1.0.16 → 1.0.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +32 -4
- data/Gemfile +19 -2
- data/README.md +25 -21
- data/debug_logging.gemspec +0 -1
- data/lib/debug_logging/configuration.rb +1 -0
- data/lib/debug_logging/version.rb +1 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d234b40fc99de752fa25984cfd20bad70087a1147fccefaddf9e7b082fb9d1c7
|
4
|
+
data.tar.gz: 291e57e9e9f9794da89ddf220744df3e1440902a86616aac10dc65779824ae73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ed53e0d9b4d1205c66f0ec62ffe121c06f995db9f377c73da642dba8d68cade983fab6df802f20506959e28075874049c6ffd16882ee4589e1f1896a170a35c
|
7
|
+
data.tar.gz: 74ff60f6e26a107a57c209e62205f3b2d5d8ecc36cd591d383f41bec46a2ced3c690389a920eb708e1654b0da44b78946558ef7820b47bfba51d8ee94d1fde61
|
data/.travis.yml
CHANGED
@@ -1,7 +1,35 @@
|
|
1
|
-
|
1
|
+
env:
|
2
|
+
global:
|
3
|
+
- JRUBY_OPTS="-Xcli.debug=true --debug"
|
4
|
+
- CC_TEST_REPORTER_ID=b78cb927bf15a7aee5aacd4486215628550f784e77d137a2da8c96c417a068ff
|
5
|
+
|
6
|
+
before_script:
|
7
|
+
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
8
|
+
- chmod +x ./cc-test-reporter
|
9
|
+
- ./cc-test-reporter before-build
|
10
|
+
|
11
|
+
script:
|
12
|
+
- bundle exec rspec
|
13
|
+
|
14
|
+
after_script:
|
15
|
+
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
16
|
+
|
17
|
+
before_install:
|
18
|
+
- gem update --system
|
19
|
+
- gem install bundler
|
20
|
+
|
21
|
+
install:
|
22
|
+
- bundle install
|
23
|
+
|
24
|
+
bundler_args: --no-deployment --jobs 3 --retry 3
|
25
|
+
|
26
|
+
cache: bundler
|
27
|
+
|
2
28
|
language: ruby
|
29
|
+
sudo: false
|
30
|
+
|
3
31
|
rvm:
|
4
|
-
- ruby-2.3.
|
5
|
-
- ruby-2.4.
|
32
|
+
- ruby-2.3.7
|
33
|
+
- ruby-2.4.4
|
34
|
+
- ruby-2.5.1
|
6
35
|
- jruby-9.1.9.0
|
7
|
-
before_install: gem install bundler -v 1.15.4
|
data/Gemfile
CHANGED
@@ -1,6 +1,23 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
|
+
|
5
|
+
group :test do
|
6
|
+
ruby_version = Gem::Version.new(RUBY_VERSION)
|
7
|
+
if ruby_version >= Gem::Version.new('2.1')
|
8
|
+
gem 'rubocop', '~> 0.59.0'
|
9
|
+
gem 'rubocop-rspec', '~> 1.24.0'
|
10
|
+
end
|
11
|
+
if ruby_version >= Gem::Version.new('2.0')
|
12
|
+
gem 'byebug', '~> 10', platform: :mri, require: false
|
13
|
+
gem 'pry', '~> 0', platform: :mri, require: false
|
14
|
+
gem 'pry-byebug', '~> 3', platform: :mri, require: false
|
15
|
+
end
|
16
|
+
# NOTE: Switching coveralls to simplecov causing many spec failures.
|
17
|
+
# Something about coveralls bleeds into this gem, and this gem is
|
18
|
+
# dependent on that tweaking behavior
|
19
|
+
gem 'coveralls', '~> 0', require: false
|
20
|
+
end
|
21
|
+
|
3
22
|
# Specify your gem's dependencies in debug_logging.gemspec
|
4
23
|
gemspec
|
5
|
-
|
6
|
-
gem 'byebug', '~> 9.0', platform: :mri
|
data/README.md
CHANGED
@@ -2,7 +2,27 @@
|
|
2
2
|
|
3
3
|
Unobtrusive, inheritable-overridable-configurable, drop-in debug logging, that won't leave a mess behind when it is time to remove it.
|
4
4
|
|
5
|
+
NOTE: Septmeber 9, 2018 I discovered that some of the functionality of this gem is affected by the presence of the coveralls gem. All specs pass when it is loaded, and about 35% fail when it is not. I am going to figure out why this is. The failures mean that some logging features won't work as configured until I decouple this gem from coveralls.
|
6
|
+
|
7
|
+
| Project | DebugLogging |
|
8
|
+
|------------------------ | ----------------------- |
|
9
|
+
| gem name | [debug_logging](https://rubygems.org/gems/debug_logging) |
|
10
|
+
| license | [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) |
|
11
|
+
| download rank | [![Downloads Today](https://img.shields.io/gem/rd/debug_logging.svg)](https://github.com/pboling/debug_logging) |
|
12
|
+
| version | [![Version](https://img.shields.io/gem/v/debug_logging.svg)](https://rubygems.org/gems/debug_logging) |
|
13
|
+
| dependencies | [![Depfu](https://badges.depfu.com/badges/d1a4cf43255916521fef1e3685c61faa/count.svg)](https://depfu.com/github/pboling/debug_logging?project_id=2675) |
|
14
|
+
| continuous integration | [![Build Status](https://travis-ci.org/pboling/debug_logging.svg?branch=master)](https://travis-ci.org/pboling/debug_logging) |
|
15
|
+
| test coverage | [![Test Coverage](https://api.codeclimate.com/v1/badges/1f36d7019c3b81cae1a2/test_coverage)](https://codeclimate.com/github/pboling/debug_logging/test_coverage) |
|
16
|
+
| maintainability | [![Maintainability](https://api.codeclimate.com/v1/badges/1f36d7019c3b81cae1a2/maintainability)](https://codeclimate.com/github/pboling/debug_logging/maintainability) |
|
17
|
+
| code triage | [![Open Source Helpers](https://www.codetriage.com/pboling/debug_logging/badges/users.svg)](https://www.codetriage.com/pboling/debug_logging) |
|
18
|
+
| homepage | [on Github.com][homepage], [on Railsbling.com][blogpage] |
|
19
|
+
| documentation | [on RDoc.info][documentation] |
|
20
|
+
| live chat | [![Join the chat at https://gitter.im/pboling/debug_logging](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pboling/debug_logging?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
|
21
|
+
| expert support | [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github) |
|
22
|
+
| Spread ~♡ⓛⓞⓥⓔ♡~ | [🌍 🌎 🌏](https://about.me/peter.boling), [🍚](https://www.crowdrise.com/helprefugeeswithhopefortomorrowliberia/fundraiser/peterboling), [➕](https://plus.google.com/+PeterBoling/posts), [👼](https://angel.co/peter-boling), [🐛](https://www.topcoder.com/members/pboling/), [:shipit:](http://coderwall.com/pboling), [![Tweet Peter](https://img.shields.io/twitter/follow/galtzo.svg?style=social&label=Follow)](http://twitter.com/galtzo) |
|
23
|
+
|
5
24
|
### Gives you (all are optional):
|
25
|
+
|
6
26
|
* *benchmarking*
|
7
27
|
* *colorization by class/method*
|
8
28
|
* *robust argument printer with customizable ellipsis*
|
@@ -13,25 +33,8 @@ Unobtrusive, inheritable-overridable-configurable, drop-in debug logging, that w
|
|
13
33
|
* *Prevents heavy computation of strings with `logger.debug { 'log me' }` block format.*
|
14
34
|
* **so many free ponies** 🎠🐴🎠🐴🎠🐴
|
15
35
|
|
16
|
-
| Project | DebugLogging |
|
17
|
-
|------------------------ | ----------------- |
|
18
|
-
| gem name | debug_logging |
|
19
|
-
| license | [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) |
|
20
|
-
| expert support | [![Get help on Codementor](https://cdn.codementor.io/badges/get_help_github.svg)](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github) |
|
21
|
-
| download rank | [![Total Downloads](https://img.shields.io/gem/rt/debug_logging.svg)](https://rubygems.org/gems/debug_logging) |
|
22
|
-
| version | [![Gem Version](https://badge.fury.io/rb/debug_logging.svg)](http://badge.fury.io/rb/debug_logging) |
|
23
|
-
| dependencies | [![Dependency Status](https://gemnasium.com/pboling/debug_logging.svg)](https://gemnasium.com/pboling/debug_logging) |
|
24
|
-
| code quality | [![Code Climate](https://codeclimate.com/github/pboling/debug_logging.svg)](https://codeclimate.com/github/pboling/debug_logging) |
|
25
|
-
| continuous integration | [![Build Status](https://secure.travis-ci.org/pboling/debug_logging.svg?branch=master)](https://travis-ci.org/pboling/debug_logging) |
|
26
|
-
| test coverage | [![Coverage Status](https://coveralls.io/repos/pboling/debug_logging/badge.svg)](https://coveralls.io/r/pboling/debug_logging) |
|
27
|
-
| homepage | [https://github.com/pboling/debug_logging][homepage] |
|
28
|
-
| documentation | [http://rdoc.info/github/pboling/debug_logging/frames][documentation] |
|
29
|
-
| live chat | [![Join the chat at https://gitter.im/pboling/debug_logging](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/pboling/debug_logging?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
|
30
|
-
| Spread ~♡ⓛⓞⓥⓔ♡~ | [on AngelList][angellist], [on Coderwall][coderwall] |
|
31
|
-
|
32
36
|
## Next Level Magic
|
33
37
|
|
34
|
-
|
35
38
|
Herein you will find:
|
36
39
|
|
37
40
|
* Classes inheriting from Module.
|
@@ -74,11 +77,11 @@ Crack open the specs for more complex usage examples than the ones below.
|
|
74
77
|
### Without Rails
|
75
78
|
|
76
79
|
It just works. ;)
|
77
|
-
Configuration can go anywhere you want.
|
80
|
+
Configuration can go anywhere you want. Configuration is the same regardless; see below.
|
78
81
|
|
79
82
|
### With Rails
|
80
83
|
|
81
|
-
Recommend creating `config/initializers/debug_logging.rb` with:
|
84
|
+
Recommend creating `config/initializers/debug_logging.rb`, or adding to `config/application.rb` with:
|
82
85
|
|
83
86
|
```ruby
|
84
87
|
# Showing the defaults
|
@@ -210,11 +213,11 @@ For example:
|
|
210
213
|
spec.add_dependency 'debug_logging', '~> 1.0'
|
211
214
|
```
|
212
215
|
|
213
|
-
## License
|
216
|
+
## License [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
|
214
217
|
|
215
218
|
MIT License
|
216
219
|
|
217
|
-
Copyright (c) 2017 [Peter Boling][peterboling] of [RailsBling.com][railsbling]
|
220
|
+
Copyright (c) 2017 - 2018 [Peter Boling][peterboling] of [RailsBling.com][railsbling]
|
218
221
|
|
219
222
|
Permission is hereby granted, free of charge, to any person obtaining
|
220
223
|
a copy of this software and associated documentation files (the
|
@@ -243,3 +246,4 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
243
246
|
[angellist]: https://angel.co/peter-boling
|
244
247
|
[documentation]: http://rdoc.info/github/pboling/debug_logging/frames
|
245
248
|
[homepage]: https://github.com/pboling/debug_logging
|
249
|
+
[blogpage]: http://www.railsbling.com/tags/debug_logging/
|
data/debug_logging.gemspec
CHANGED
@@ -28,7 +28,6 @@ Automatically log selected methods and their arguments as they are called at run
|
|
28
28
|
spec.add_runtime_dependency "colorize", "~> 0.8"
|
29
29
|
spec.add_development_dependency "rspec-pending_for"
|
30
30
|
spec.add_development_dependency "bundler", "~> 1.14"
|
31
|
-
spec.add_development_dependency "coveralls", "~> 0.8"
|
32
31
|
spec.add_development_dependency "rake", "~> 12.2"
|
33
32
|
spec.add_development_dependency "rspec", "~> 3.0"
|
34
33
|
spec.add_development_dependency "activesupport", "~> 5.1"
|
@@ -1,6 +1,7 @@
|
|
1
1
|
module DebugLogging
|
2
2
|
class Configuration
|
3
3
|
DEFAULT_ELLIPSIS = " ✂️ …".freeze
|
4
|
+
# For reference, log levels as integers mapped to symbols:
|
4
5
|
# LEVELS = { 0 => :debug, 1 => :info, 2 => :warn, 3 => :error, 4 => :fatal, 5 => :unknown }
|
5
6
|
attr_accessor :enabled
|
6
7
|
attr_accessor :logger
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: debug_logging
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '1.14'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: coveralls
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - "~>"
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.8'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - "~>"
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0.8'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: rake
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
142
|
version: '0'
|
157
143
|
requirements: []
|
158
144
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.
|
145
|
+
rubygems_version: 2.7.7
|
160
146
|
signing_key:
|
161
147
|
specification_version: 4
|
162
148
|
summary: Drop-in debug logging useful when a call stack gets unruly
|