putter 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/putter/method_creator.rb +4 -2
- data/lib/putter/print_strategy.rb +7 -1
- data/lib/putter/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f49bb8f4ed93c423c58e3fc8707a7d7c613229a0
|
4
|
+
data.tar.gz: 128e0a0cf0fabbbfe8e35b48cfa73b6bfe3f010a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d99d67308bfc3d749580744ada385d099935589378ed5499005e43caf73625d6db46d847902d3187b96067598aade12d3ce8b663a6657184ff844ba771038887
|
7
|
+
data.tar.gz: 9f5b847dd8de084d89c6307d2e91c0b08e358ae784d2857aad559d925db04082e42b614935a8215d1aae5b1b7cad9c30157d2ccfd473ff5ed3b20d661dbcfbd8
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
# CHANGELOG
|
2
|
+
### 0.5.1 - 2016-11-11
|
3
|
+
- Add hotfix for putter running on a script in a local directory to print out the file information
|
4
|
+
|
2
5
|
### 0.5.0 - 2016-11-10
|
3
6
|
- Add methods blacklist to the configuration options
|
4
7
|
- Ensures that local method options override anything in the blacklist
|
data/Gemfile.lock
CHANGED
@@ -3,8 +3,10 @@ module Putter
|
|
3
3
|
def add_putter_method_to_proxy(proxy, data)
|
4
4
|
proxy.send(:instance_exec, data) do |data|
|
5
5
|
define_method(data.method) do |*proxy_args, &blk|
|
6
|
-
line = caller.find {|call| call.match(data.stack_trace_ignore_regex)}
|
7
|
-
data.line
|
6
|
+
data.line = caller.find {|call| call.match(data.stack_trace_ignore_regex)}
|
7
|
+
if data.line.include?(::Dir.pwd)
|
8
|
+
data.line = data.line.split(::Dir.pwd)[1]
|
9
|
+
end
|
8
10
|
data.args = proxy_args.to_s
|
9
11
|
data.result = super *proxy_args, &blk
|
10
12
|
::Putter.configuration.print_strategy.call data
|
@@ -4,7 +4,13 @@ module Putter
|
|
4
4
|
module PrintStrategy
|
5
5
|
Default = Proc.new do |data|
|
6
6
|
prefix = "\tPutter Debugging: #{data.label} ".colorize(:cyan)
|
7
|
-
|
7
|
+
if data.line.nil?
|
8
|
+
line = " "
|
9
|
+
elsif data.line[0] != "/"
|
10
|
+
line = "./#{data.line} "
|
11
|
+
else
|
12
|
+
line = ".#{data.line} "
|
13
|
+
end
|
8
14
|
suffix = "-- Method: :#{data.method}, Args: #{data.args}, Result: #{data.result}".colorize(:green)
|
9
15
|
puts prefix + line + suffix
|
10
16
|
end
|
data/lib/putter/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: putter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John DeWyze
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|