qq 0.2.3 → 0.2.4
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 +4 -4
- data/lib/qq.rb +6 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bda4efc91a9d9c2ca0c0d2bda31969e9683af93
|
4
|
+
data.tar.gz: 2ec309b3914cf24ed94c3dfbab3343142219b37b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f3bbbc35a5fd088c0acb7c3ac497ef1f01d45a8000062a2ac643b51011e56308e75e7423f6c07579de7704c11cedd72cf4a35a63d911b744abf8f4e3616f5d8
|
7
|
+
data.tar.gz: 05e27d595f8986b29ec4359084e99c2f79908ac8a4c487e639de5b7c33231c17aac19b468580038a99b612409f4ad3f95174a8a062abba6cbce2f8d3c191531d
|
data/lib/qq.rb
CHANGED
@@ -34,7 +34,7 @@ class QQ < Parser::AST::Processor
|
|
34
34
|
NORMAL, YELLOW, CYAN = "\x1b[0m", "\x1b[33m", "\x1b[36m"
|
35
35
|
|
36
36
|
@@mutex ||= Mutex.new
|
37
|
-
@@start ||=
|
37
|
+
@@start ||= Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_second)
|
38
38
|
@@location ||= nil
|
39
39
|
|
40
40
|
# @see Kernel#qq
|
@@ -65,20 +65,18 @@ class QQ < Parser::AST::Processor
|
|
65
65
|
end
|
66
66
|
|
67
67
|
protected
|
68
|
+
|
68
69
|
def write args
|
69
70
|
File.open(File.join(Dir.tmpdir, 'q'), 'a') do |fh|
|
70
|
-
now =
|
71
|
+
now = Process.clock_gettime(Process::CLOCK_MONOTONIC, :float_second)
|
71
72
|
|
72
|
-
if @@start <= now - 2 || @@location&.label != @location.label
|
73
|
-
fh.write "\n%s[%s] %s\n" % [NORMAL, now.strftime('%T'), @location]
|
73
|
+
if @@start <= now - 2.0 || @@location&.label != @location.label
|
74
|
+
fh.write "\n%s[%s] %s\n" % [NORMAL, Time.now.strftime('%T'), @location]
|
74
75
|
@@start = now
|
75
76
|
end
|
76
77
|
|
77
78
|
args.each do |arg, arg_source|
|
78
|
-
|
79
|
-
arg = arg.attributes
|
80
|
-
end
|
81
|
-
fh.write [YELLOW, "%1.3fs " % (now - @@start), NORMAL, arg_source, ' = ', CYAN].join
|
79
|
+
fh.write [YELLOW, '%1.3fs ' % (now - @@start), NORMAL, arg_source, ' = ', CYAN].join
|
82
80
|
PP.pp(arg, fh)
|
83
81
|
fh.write NORMAL
|
84
82
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qq
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Hanna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
67
67
|
version: '0'
|
68
68
|
requirements: []
|
69
69
|
rubyforge_project:
|
70
|
-
rubygems_version: 2.
|
70
|
+
rubygems_version: 2.6.10
|
71
71
|
signing_key:
|
72
72
|
specification_version: 4
|
73
73
|
summary: Improved pp debugging.
|