pry-auto_benching.rb 2.6.3 → 2.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pry-auto_benching/version.rb +1 -1
- data/lib/pry-auto_benching.rb +5 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1536ab1a4afd482c41b8fa7fb0bad1eedbccc8949f986fac318b0666e6c5e54
|
4
|
+
data.tar.gz: fbf499605a243236d629b8d2c118606305f27d9b38ed85e0ef8a9dcc25bac59b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4b9546f5a929321e98bf8c98f3eafbbb0b4f537a15998be8dfb88c45664441745aac89873da836717b90e376ef3a8fe1285df938d245ff273d2983cf5047712
|
7
|
+
data.tar.gz: 589c338a699df3b37abe866a1b0f61688dc47b65393c33e7c1891b3b42a75590c84625cfc4afb6d056d56cd06743102243dbc6903d27e3805270098cda3fe7fb
|
data/lib/pry-auto_benching.rb
CHANGED
@@ -2,12 +2,12 @@ module Pry::AutoBenching
|
|
2
2
|
write_duration = -> (pry, duration) {
|
3
3
|
auto_benching = pry.config.auto_benching
|
4
4
|
if auto_benching.target_display == :prompt
|
5
|
-
pry.config.prompt_name =
|
5
|
+
pry.config.prompt_name = "#{Pry::Helpers::Text.send(auto_benching.prompt_color, duration.to_s + 's')} "
|
6
6
|
elsif auto_benching.target_display == :output
|
7
|
-
pry.config.prompt_name
|
7
|
+
pry.config.forget(:prompt_name)
|
8
8
|
pry.pager.page auto_benching.output_string.call(pry, duration)
|
9
9
|
else
|
10
|
-
pry.config.prompt_name
|
10
|
+
pry.config.forget(:prompt_name)
|
11
11
|
pry.output.warn "_pry_.config.auto_benching.target_display has an invalid value " \
|
12
12
|
"(#{auto_benching.target_display.inspect}). \n" \
|
13
13
|
"It should be equal to ':output' or ':prompt'."
|
@@ -29,13 +29,13 @@ module Pry::AutoBenching
|
|
29
29
|
auto_benching.display_duration_if.call(pry, duration)
|
30
30
|
write_duration.call(pry, duration)
|
31
31
|
else
|
32
|
-
pry.config.prompt_name
|
32
|
+
pry.config.forget(:prompt_name)
|
33
33
|
end
|
34
34
|
else # Ruby code
|
35
35
|
if auto_benching.display_duration_if.call(pry, duration)
|
36
36
|
write_duration.call(pry, duration)
|
37
37
|
else
|
38
|
-
pry.config.prompt_name
|
38
|
+
pry.config.forget(:prompt_name)
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pry-auto_benching.rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Gleeson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|