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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e5d9857773568b7246fa5399bdbdfad54bfbd96
4
- data.tar.gz: be5caaf99f8666322b70cde787ecffac3477cad6
3
+ metadata.gz: f49bb8f4ed93c423c58e3fc8707a7d7c613229a0
4
+ data.tar.gz: 128e0a0cf0fabbbfe8e35b48cfa73b6bfe3f010a
5
5
  SHA512:
6
- metadata.gz: 8dd17629db6f833c3146b0ae63219fb5479b2025474fad5ee12218a21a019a6a762e7b878144dc9ddc1106feb8b461524291b3cca74301d46f93cd655d513dd2
7
- data.tar.gz: d60e579a5c7ef5d5926afca2941937fd9eb3d2f15babe8e3ecdf399a1d342b74cd8e4eef7d8158ceb7a9678c6cf63f5aac5bef9523700b96d37f3a0bc4e77740
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- putter (0.5.0)
4
+ putter (0.5.1)
5
5
  colorize (~> 0)
6
6
 
7
7
  GEM
@@ -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 = line.split(::Dir.pwd)[1]
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
- line = !data.line.nil? ? ".#{data.line} " : " "
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
@@ -1,3 +1,3 @@
1
1
  module Putter
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
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.0
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-10 00:00:00.000000000 Z
11
+ date: 2016-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize