debug_logging 1.0.9 → 1.0.10
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.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/README.md +4 -3
- data/debug_logging.gemspec +2 -1
- data/lib/debug_logging/version.rb +1 -1
- data/lib/simple_debug_logging.rb +32 -1
- 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: cf0324399cfcc272fe33a1a1d932e11e69878e2b
|
4
|
+
data.tar.gz: 6e4be436b2b21dc916f879dcbd8164da35b6558a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea4b6a5ac318705e58c5e1be3c189654605800c8cd3d1bd854e10cfeecee0cadb8237e5ce2072fbd351884d2977eb5638993119ff5e7c02107b4c1561a9490a9
|
7
|
+
data.tar.gz: aa9552a53534a10b20ca6721dee425879c85467b7476ae5c3b3479cad59baa6bd6a6a3a7be626ff962fd0325b0b997ddbd5fec722a809f530001aa08eb0a44ad
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/README.md
CHANGED
@@ -14,19 +14,18 @@ Unobtrusive, inheritable-overridable-configurable, drop-in debug logging, that w
|
|
14
14
|
| Project | DebugLogging |
|
15
15
|
|------------------------ | ----------------- |
|
16
16
|
| gem name | debug_logging |
|
17
|
-
| license | MIT
|
17
|
+
| license | [](https://opensource.org/licenses/MIT) |
|
18
18
|
| expert support | [](https://www.codementor.io/peterboling?utm_source=github&utm_medium=button&utm_term=peterboling&utm_campaign=github) |
|
19
19
|
| download rank | [](https://rubygems.org/gems/debug_logging) |
|
20
20
|
| version | [](http://badge.fury.io/rb/debug_logging) |
|
21
21
|
| dependencies | [](https://gemnasium.com/pboling/debug_logging) |
|
22
22
|
| code quality | [](https://codeclimate.com/github/pboling/debug_logging) |
|
23
|
-
| inline documenation | [](http://inch-ci.org/github/pboling/debug_logging) |
|
24
23
|
| continuous integration | [](https://travis-ci.org/pboling/debug_logging) |
|
25
24
|
| test coverage | [](https://coveralls.io/r/pboling/debug_logging) |
|
26
25
|
| homepage | [https://github.com/pboling/debug_logging][homepage] |
|
27
26
|
| documentation | [http://rdoc.info/github/pboling/debug_logging/frames][documentation] |
|
28
27
|
| live chat | [](https://gitter.im/pboling/debug_logging?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) |
|
29
|
-
| Spread ~♡ⓛⓞⓥⓔ♡~ | [on AngelList]
|
28
|
+
| Spread ~♡ⓛⓞⓥⓔ♡~ | [on AngelList][angellist], [on Coderwall][coderwall] |
|
30
29
|
|
31
30
|
## Next Level Magic
|
32
31
|
|
@@ -231,5 +230,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
231
230
|
[pvc]: http://docs.rubygems.org/read/chapter/16#page74
|
232
231
|
[railsbling]: http://www.railsbling.com
|
233
232
|
[peterboling]: http://www.peterboling.com
|
233
|
+
[coderwall]: http://coderwall.com/pboling
|
234
|
+
[angellist]: https://angel.co/peter-boling
|
234
235
|
[documentation]: http://rdoc.info/github/pboling/debug_logging/frames
|
235
236
|
[homepage]: https://github.com/pboling/debug_logging
|
data/debug_logging.gemspec
CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = %q{Drop-in debug logging useful when a call stack gets unruly}
|
13
13
|
spec.description = %q{
|
14
|
-
Unobtrusive debug logging for Ruby
|
14
|
+
Unobtrusive debug logging for Ruby. NO LITTERING.
|
15
15
|
Automatically log selected methods and their arguments as they are called at runtime!
|
16
16
|
}
|
17
17
|
spec.license = "MIT"
|
@@ -23,6 +23,7 @@ Automatically log selected methods and their arguments as they are called at run
|
|
23
23
|
spec.bindir = "exe"
|
24
24
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
25
|
spec.require_paths = ["lib"]
|
26
|
+
spec.required_ruby_version = ">= 2.0.0" # Uses named parameters
|
26
27
|
|
27
28
|
spec.add_runtime_dependency "colorize", "~> 0.8"
|
28
29
|
spec.add_development_dependency "rspec-pending_for"
|
data/lib/simple_debug_logging.rb
CHANGED
@@ -1,11 +1,42 @@
|
|
1
1
|
# Simpler version of what the sibling DebugLogging library does. Included as a bauble.
|
2
2
|
#
|
3
|
-
|
3
|
+
############# THIS IS A BAUBLE
|
4
|
+
############# FOR EXAMINGING SEVERAL OF THE WONDERS OF RUBY
|
5
|
+
############# TO ACCOMPLISH SOMETHING PRACTICAL
|
6
|
+
############# For a more robust implementation use the gem debug_logging itself,
|
7
|
+
############# which makes use of these same principles.
|
8
|
+
#
|
9
|
+
# Automatically log Class.method(arguments) as they are called at runtime (instance or singleton)!
|
10
|
+
#
|
11
|
+
# Create a file `unobtrusively_logged.rb` with:
|
12
|
+
#
|
13
|
+
# require 'simple_debug_logging'
|
14
|
+
# class UnobtrusivelyLogged
|
15
|
+
# def initialize(**args); end
|
16
|
+
# def an_instance_method(*args); end
|
17
|
+
# def self.a_class_method(*args); self; end
|
18
|
+
# include SimpleDebugLogging.new(i_methods: %i( initialzie an_instance_method ))
|
19
|
+
# logged :a_class_method
|
20
|
+
# end
|
21
|
+
#
|
22
|
+
# Make sure you have the latest debug_logging gem (>= 1.0.10) installed for this to work
|
23
|
+
#
|
24
|
+
# In an irb session:
|
25
|
+
# >> require_relative 'unobtrusively_logged'
|
26
|
+
# => true
|
27
|
+
# >> UnobtrusivelyLogged.a_class_method.new.an_instance_method
|
28
|
+
# UnobtrusivelyLogged.a_class_method() ~70156299674920@1506415414~
|
29
|
+
# UnobtrusivelyLogged.a_class_method ~689933733604307372~ complete in 8.000002708286047e-06s ~70156299674920@1506415414~
|
30
|
+
# UnobtrusivelyLogged#an_instance_method() ~70156299673760@1506415414~
|
31
|
+
# UnobtrusivelyLogged#an_instance_method ~689933733604307372~ complete in 2.00001522898674e-06s ~70156299673760@1506415414~
|
4
32
|
#
|
5
33
|
# NOTE: For a more advanced version see the debug_logging gem
|
6
34
|
# NOTE: The manner this is made to work for class methods is totally different than the way this is made to work for instance methods.
|
7
35
|
# NOTE: The instance method manner of logging works on Ruby 2.0+
|
8
36
|
# NOTE: The class method manner of logging works on Ruby 2.1+
|
37
|
+
|
38
|
+
require 'benchmark'
|
39
|
+
|
9
40
|
class SimpleDebugLogging < Module
|
10
41
|
def initialize(i_methods: nil)
|
11
42
|
@instance_methods_to_log = Array(i_methods) if i_methods
|
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.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|
@@ -96,7 +96,7 @@ dependencies:
|
|
96
96
|
version: '3.0'
|
97
97
|
description: |2
|
98
98
|
|
99
|
-
Unobtrusive debug logging for Ruby
|
99
|
+
Unobtrusive debug logging for Ruby. NO LITTERING.
|
100
100
|
Automatically log selected methods and their arguments as they are called at runtime!
|
101
101
|
email:
|
102
102
|
- peter.boling@gmail.com
|
@@ -104,6 +104,7 @@ executables: []
|
|
104
104
|
extensions: []
|
105
105
|
extra_rdoc_files: []
|
106
106
|
files:
|
107
|
+
- ".coveralls.yml"
|
107
108
|
- ".gitignore"
|
108
109
|
- ".rspec"
|
109
110
|
- ".travis.yml"
|
@@ -133,7 +134,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
133
134
|
requirements:
|
134
135
|
- - ">="
|
135
136
|
- !ruby/object:Gem::Version
|
136
|
-
version:
|
137
|
+
version: 2.0.0
|
137
138
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
139
|
requirements:
|
139
140
|
- - ">="
|