super_awesome_print 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/super_awesome_print.rb +14 -13
- data/lib/super_awesome_print/version.rb +1 -1
- data/sapf.log +5 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34d264ee0c1c98ab9bf51ff823019fb9ae8733a2
|
4
|
+
data.tar.gz: 5df02c87f4e02beff1b81eb707f81e1401d5e338
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54874f1aa1b87400a77c7c05131f23bf203b69961d154bfcf189644e478056bbf0b3ce1228db5d353c7c24b2a5023f5b3b2a2bffe6d051ddba40d7c7cbd90877
|
7
|
+
data.tar.gz: 68957448dd7b8b0ea25a45f0cc56e051bbffb58acd17ce627f740a2085fc42a60fdef18aa4487604b03af68fa1940c0b877a824bd9aed1afc0b2a195eaac0d63
|
data/lib/super_awesome_print.rb
CHANGED
@@ -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')
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
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
|
|
data/sapf.log
ADDED
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
|
+
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:
|