fancy_irb 2.0.0 → 2.1.0
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/CHANGELOG.md +3 -0
- data/lib/fancy_irb/irb_ext.rb +40 -16
- data/lib/fancy_irb/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89cbb2934ed19ad839cdc15eda21b617c01eb2bd6e689a54012c8eeee98098b9
|
4
|
+
data.tar.gz: dcded533d53ac26e54bce266d2a80eea702c38b22173735b014e50b163f258c8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba416ba54282e7172fcd88035163fa9f809d3465c2f85f3c7fd858456d41988de8df81ec709d26ee32ed254f78d0d4429765aa561edb5cde3cbb90ba5c5ded5a
|
7
|
+
data.tar.gz: 58d7c084efe90a61fc67857c497279ada9dd739ec732bf235e21a50171624ec2f103bdda48ef33ee31f91a995af9e0969459122910398a10329696575e7d5916
|
data/CHANGELOG.md
CHANGED
data/lib/fancy_irb/irb_ext.rb
CHANGED
@@ -1,22 +1,12 @@
|
|
1
|
-
module
|
2
|
-
|
1
|
+
module FancyIrb
|
2
|
+
module IrbExtCommon
|
3
3
|
def output_value
|
4
4
|
FancyIrb.output_value(@context, @scanner)
|
5
5
|
end
|
6
6
|
|
7
|
-
alias prompt_non_fancy prompt
|
8
|
-
def prompt(prompt_arg, ltype, indent, line_no)
|
9
|
-
FancyIrb.handle_prompt(
|
10
|
-
prompt_non_fancy(prompt_arg, ltype, indent, line_no),
|
11
|
-
IRB.conf[:AUTO_INDENT] ? indent * 2 : 0
|
12
|
-
# IRB.conf[:AUTO_INDENT] && IRB.conf[:PROMPT][IRB.conf[:PROMPT_MODE]][:PROMPT_C] == prompt_arg
|
13
|
-
)
|
14
|
-
end
|
15
|
-
|
16
|
-
alias signal_status_non_fancy signal_status
|
17
7
|
def signal_status(name, *args, &block)
|
18
8
|
FancyIrb.reset_line!
|
19
|
-
|
9
|
+
super(name, *args, &block)
|
20
10
|
ensure
|
21
11
|
if name == :IN_EVAL
|
22
12
|
FancyIrb.present_and_clear_captured_error!
|
@@ -24,14 +14,48 @@ module IRB
|
|
24
14
|
end
|
25
15
|
end
|
26
16
|
|
27
|
-
|
28
|
-
|
17
|
+
module IrbExtPrompt
|
18
|
+
private def format_prompt(format, ltype, indent, line_no)
|
19
|
+
FancyIrb.handle_prompt(
|
20
|
+
super(format, ltype, indent, line_no),
|
21
|
+
IRB.conf[:AUTO_INDENT] ? indent * 2 : 0
|
22
|
+
# IRB.conf[:AUTO_INDENT] && IRB.conf[:PROMPT][IRB.conf[:PROMPT_MODE]][:PROMPT_C] == format
|
23
|
+
)
|
24
|
+
end
|
25
|
+
end
|
29
26
|
|
27
|
+
module IrbExtPromptLegacy
|
28
|
+
def prompt(format, ltype, indent, line_no)
|
29
|
+
FancyIrb.handle_prompt(
|
30
|
+
super(format, ltype, indent, line_no),
|
31
|
+
IRB.conf[:AUTO_INDENT] ? indent * 2 : 0
|
32
|
+
# IRB.conf[:AUTO_INDENT] && IRB.conf[:PROMPT][IRB.conf[:PROMPT_MODE]][:PROMPT_C] == format
|
33
|
+
)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
module ContextExt
|
30
38
|
def evaluate(*args, **kwargs)
|
31
|
-
|
39
|
+
super(*args, **kwargs)
|
32
40
|
rescue Exception
|
33
41
|
FancyIrb.register_error_capturer!
|
34
42
|
raise
|
35
43
|
end
|
36
44
|
end
|
37
45
|
end
|
46
|
+
|
47
|
+
module IRB
|
48
|
+
class Irb
|
49
|
+
prepend FancyIrb::IrbExtCommon
|
50
|
+
|
51
|
+
if IRB::VERSION < "1.8.2"
|
52
|
+
prepend FancyIrb::IrbExtPromptLegacy
|
53
|
+
else
|
54
|
+
prepend FancyIrb::IrbExtPrompt
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
class Context
|
59
|
+
prepend FancyIrb::ContextExt
|
60
|
+
end
|
61
|
+
end
|
data/lib/fancy_irb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fancy_irb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-10-
|
11
|
+
date: 2023-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paint
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
|
-
rubygems_version: 3.4.
|
143
|
+
rubygems_version: 3.4.21
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Colors and rockets in IRB
|