super_awesome_print 0.2.4 → 0.2.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 667f9bfc6e6c7e713cbd16c6a99190cd3acfe1da
4
- data.tar.gz: 097f500d7cb59370abfa15b206ac7436dca6e65d
3
+ metadata.gz: 34d264ee0c1c98ab9bf51ff823019fb9ae8733a2
4
+ data.tar.gz: 5df02c87f4e02beff1b81eb707f81e1401d5e338
5
5
  SHA512:
6
- metadata.gz: ffb09a964fab8ea80effd4cf5c8d900898c9526cc24e572dfbf8279599c0a11fe3df6895ee318eaedf4ada191001678249e2cfda24f765452169b0b53f1f3e8b
7
- data.tar.gz: 6dfc352ac908041b84a7c2b7df338be300bf3a6da8f38ed9edad27c81908012f1ed16c38ada01cecd9e7bc6d9ed6c989f8a7723e91978ae4f9831f44ef374d18
6
+ metadata.gz: 54874f1aa1b87400a77c7c05131f23bf203b69961d154bfcf189644e478056bbf0b3ce1228db5d353c7c24b2a5023f5b3b2a2bffe6d051ddba40d7c7cbd90877
7
+ data.tar.gz: 68957448dd7b8b0ea25a45f0cc56e051bbffb58acd17ce627f740a2085fc42a60fdef18aa4487604b03af68fa1940c0b877a824bd9aed1afc0b2a195eaac0d63
@@ -14,21 +14,22 @@ module Kernel
14
14
  end
15
15
 
16
16
  def sapf(msg)
17
- File.open(SuperAwesomePrint.config.log_file_path , 'a') do |file|
18
- file.puts("*** #{Time.now} ***")
19
- file.puts(" class: #{msg.class}") if msg.respond_to?(:class)
20
- lines = caller[0...SuperAwesomePrint.config.caller_lines].map do |line|
21
- root_path = SuperAwesomePrint.config.root_path
22
- if root_path.empty?
23
- line
24
- else
25
- line.gsub(root_path + '/', '')
26
- end
17
+ file = File.open(SuperAwesomePrint.config.log_file_path , 'a')
18
+ file.puts("*** #{Time.now} ***")
19
+ file.puts(" class: #{msg.class}") if msg.respond_to?(:class)
20
+ lines = caller[0...SuperAwesomePrint.config.caller_lines].map do |line|
21
+ root_path = SuperAwesomePrint.config.root_path
22
+ if root_path.empty?
23
+ line
24
+ else
25
+ line.gsub(root_path + '/', '')
27
26
  end
28
- lines.each { |l| file.puts(' trace: ' + l) }
29
- file.puts(msg.inspect)
30
- file.puts('*** END ***')
31
27
  end
28
+ lines.each { |l| file.puts(' trace: ' + l) }
29
+ file.puts(msg.inspect)
30
+ file.puts('*** END ***')
31
+ ensure
32
+ file.close
32
33
  end
33
34
  end
34
35
 
@@ -1,3 +1,3 @@
1
1
  module SuperAwesomePrint
2
- VERSION = '0.2.4'.freeze
2
+ VERSION = '0.2.5'.freeze
3
3
  end
data/sapf.log ADDED
@@ -0,0 +1,5 @@
1
+ *** 2017-03-17 18:40:40 +0200 ***
2
+ class: Fixnum
3
+ trace: (irb):1:in `irb_binding'
4
+ 1
5
+ *** END ***
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: super_awesome_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Antonyan
@@ -72,6 +72,7 @@ files:
72
72
  - lib/super_awesome_print.rb
73
73
  - lib/super_awesome_print/configuration.rb
74
74
  - lib/super_awesome_print/version.rb
75
+ - sapf.log
75
76
  - super_awesome_print.gemspec
76
77
  homepage: http://github.com/olegantonyan/super_awesome_print
77
78
  licenses: