debug_logging 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +81 -5
- data/debug_logging.gemspec +2 -0
- data/lib/debug_logging/version.rb +1 -1
- data/lib/debug_logging.rb +1 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a00a267599393fb551ec1a302174c836e2a91f1
|
4
|
+
data.tar.gz: d85adc612f75cd6a7d253f1faae0f687ddf35d24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a592d835e6d2091dd218bf60ed0b8ab42a4034776c7c4d9f939ff10a9cefaa4fed764204e58545e7dc139df1a0a5ab5742b43ae75873efb83440be0b223dcb8e
|
7
|
+
data.tar.gz: 6716a893dc45a1e042d1020df6fb574a9411f3d57530bed61f1f07e9b450410a2e61dad63c91e368b95623c53325f6f0e27c9b2b6b366689aa860c57a09cfceb
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,15 +1,34 @@
|
|
1
1
|
# DebugLogging
|
2
2
|
|
3
|
+
| Project | DebugLogging |
|
4
|
+
|------------------------ | ----------------- |
|
5
|
+
| gem name | debug_logging |
|
6
|
+
| license | MIT |
|
7
|
+
| 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) |
|
8
|
+
| download rank | [![Total Downloads](https://img.shields.io/gem/rt/debug_logging.svg)](https://rubygems.org/gems/debug_logging) |
|
9
|
+
| version | [![Gem Version](https://badge.fury.io/rb/debug_logging.png)](http://badge.fury.io/rb/debug_logging) |
|
10
|
+
| dependencies | [![Dependency Status](https://gemnasium.com/pboling/debug_logging.png)](https://gemnasium.com/pboling/debug_logging) |
|
11
|
+
| code quality | [![Code Climate](https://codeclimate.com/github/pboling/debug_logging.png)](https://codeclimate.com/github/pboling/debug_logging) |
|
12
|
+
| inline documenation | [![Inline docs](http://inch-ci.org/github/pboling/debug_logging.png)](http://inch-ci.org/github/pboling/debug_logging) |
|
13
|
+
| continuous integration | [![Build Status](https://secure.travis-ci.org/pboling/debug_logging.png?branch=master)](https://travis-ci.org/pboling/debug_logging) |
|
14
|
+
| test coverage | [![Coverage Status](https://coveralls.io/repos/pboling/debug_logging/badge.png)](https://coveralls.io/r/pboling/debug_logging) |
|
15
|
+
| homepage | [https://github.com/pboling/debug_logging][homepage] |
|
16
|
+
| documentation | [http://rdoc.info/github/pboling/debug_logging/frames][documentation] |
|
17
|
+
| 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) |
|
18
|
+
| Spread ~♡ⓛⓞⓥⓔ♡~ | [on AngelList](https://angel.co/peter-boling), [on Coderwall](http://coderwall.com/pboling) |
|
19
|
+
|
3
20
|
## Next Level Magic
|
4
21
|
|
22
|
+
|
23
|
+
Herein you will find:
|
24
|
+
|
5
25
|
* Classes inheriting from Module.
|
6
26
|
* Cats and dogs sleeping together.
|
7
|
-
*
|
8
|
-
* 100% clean.
|
9
|
-
* 0% obtrusive.
|
27
|
+
* Zero tolerance policy on monkey patching.
|
28
|
+
* 100% clean, 0% obtrusive.
|
10
29
|
* 100% tested.
|
11
30
|
* 50% Ruby 2.0+ compatible.
|
12
|
-
* 100% Ruby 2.1+ compatible.
|
31
|
+
* 100% Ruby 2.1+ compatible, and therefore also compatible with JRuby 9000 and later.
|
13
32
|
* 10g Monosodium glutamate.
|
14
33
|
|
15
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.
|
@@ -111,6 +130,7 @@ class Car
|
|
111
130
|
# Option 1: specify the exact method(s) to add logging to
|
112
131
|
include DebugLogging::InstanceLogger.new(i_methods: [:drive, :stop])
|
113
132
|
|
133
|
+
# Provides the `logged` method decorator
|
114
134
|
extend DebugLogging::ClassLogger
|
115
135
|
|
116
136
|
logged def make; new; end
|
@@ -121,7 +141,6 @@ class Car
|
|
121
141
|
# override options for any instance method(s), by passing a hash as the last argument
|
122
142
|
logged :dealer_options, { multiple_last_hashes: true }
|
123
143
|
|
124
|
-
|
125
144
|
def drive(speed); speed; end
|
126
145
|
def stop(**opts); 0; end
|
127
146
|
|
@@ -146,3 +165,60 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
146
165
|
## Contributing
|
147
166
|
|
148
167
|
Bug reports and pull requests are welcome on GitHub at https://github.com/pboling/debug_logging.
|
168
|
+
|
169
|
+
1. Fork it
|
170
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
171
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
172
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
173
|
+
5. Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
174
|
+
6. Create new Pull Request
|
175
|
+
|
176
|
+
## Versioning
|
177
|
+
|
178
|
+
This library aims to adhere to [Semantic Versioning 2.0.0](http://semver.org/).
|
179
|
+
Violations of this scheme should be reported as bugs. Specifically,
|
180
|
+
if a minor or patch version is released that breaks backward
|
181
|
+
compatibility, a new version should be immediately released that
|
182
|
+
restores compatibility. Breaking changes to the public API will
|
183
|
+
only be introduced with new major versions.
|
184
|
+
|
185
|
+
As a result of this policy, you can (and should) specify a
|
186
|
+
dependency on this gem using the [Pessimistic Version Constraint](http://docs.rubygems.org/read/chapter/16#page74) with two digits of precision.
|
187
|
+
|
188
|
+
For example:
|
189
|
+
|
190
|
+
```ruby
|
191
|
+
spec.add_dependency 'debug_logging', '~> 1.0'
|
192
|
+
```
|
193
|
+
|
194
|
+
## License
|
195
|
+
|
196
|
+
MIT License
|
197
|
+
|
198
|
+
Copyright (c) 2017 [Peter Boling][peterboling] of [RailsBling.com][railsbling]
|
199
|
+
|
200
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
201
|
+
a copy of this software and associated documentation files (the
|
202
|
+
"Software"), to deal in the Software without restriction, including
|
203
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
204
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
205
|
+
permit persons to whom the Software is furnished to do so, subject to
|
206
|
+
the following conditions:
|
207
|
+
|
208
|
+
The above copyright notice and this permission notice shall be
|
209
|
+
included in all copies or substantial portions of the Software.
|
210
|
+
|
211
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
212
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
213
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
214
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
215
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
216
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
217
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
218
|
+
|
219
|
+
[semver]: http://semver.org/
|
220
|
+
[pvc]: http://docs.rubygems.org/read/chapter/16#page74
|
221
|
+
[railsbling]: http://www.railsbling.com
|
222
|
+
[peterboling]: http://www.peterboling.com
|
223
|
+
[documentation]: http://rdoc.info/github/pboling/debug_logging/frames
|
224
|
+
[homepage]: https://github.com/pboling/debug_logging
|
data/debug_logging.gemspec
CHANGED
@@ -14,6 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
Unobtrusive debug logging for Ruby without the litter
|
15
15
|
Automatically log selected methods and their arguments as they are called at runtime!
|
16
16
|
}
|
17
|
+
spec.license = "MIT"
|
17
18
|
spec.homepage = "https://github.com/pboling/debug_logging"
|
18
19
|
|
19
20
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
@@ -26,6 +27,7 @@ Automatically log selected methods and their arguments as they are called at run
|
|
26
27
|
spec.add_runtime_dependency "colorize", "~> 0.8"
|
27
28
|
spec.add_development_dependency "rspec-pending_for"
|
28
29
|
spec.add_development_dependency "bundler", "~> 1.14"
|
30
|
+
spec.add_development_dependency "coveralls", "~> 0.8"
|
29
31
|
spec.add_development_dependency "rake", "~> 10.0"
|
30
32
|
spec.add_development_dependency "rspec", "~> 3.0"
|
31
33
|
end
|
data/lib/debug_logging.rb
CHANGED
@@ -32,6 +32,7 @@ require "debug_logging/class_logger"
|
|
32
32
|
# # Option 1: specify the exact method(s) to add logging to
|
33
33
|
# include DebugLogging::InstanceLogger.new(i_methods: [:drive, :stop])
|
34
34
|
#
|
35
|
+
# # Provides the `logged` method decorator
|
35
36
|
# extend DebugLogging::ClassLogger
|
36
37
|
#
|
37
38
|
# logged def debug_make; new; end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Boling
|
@@ -52,6 +52,20 @@ 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'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: rake
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +122,8 @@ files:
|
|
108
122
|
- lib/debug_logging/version.rb
|
109
123
|
- lib/simple_debug_logging.rb
|
110
124
|
homepage: https://github.com/pboling/debug_logging
|
111
|
-
licenses:
|
125
|
+
licenses:
|
126
|
+
- MIT
|
112
127
|
metadata: {}
|
113
128
|
post_install_message:
|
114
129
|
rdoc_options: []
|