irbtools 3.0.2 → 3.0.3
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 +4 -0
- data/CONFIGURE.md +18 -0
- data/MIT-LICENSE.txt +1 -1
- data/README.md +1 -1
- data/irbtools.gemspec +2 -2
- data/lib/irbtools/hirb.rb +9 -0
- data/lib/irbtools/libraries.rb +1 -0
- data/lib/irbtools/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e97f5261cf4f7b547eb07c577df70e0c98ac988aedebe23c143f1d021e70ea38
|
|
4
|
+
data.tar.gz: 795f96ed7e8e976b4147416a41f5542c6327a6c980fc078ae540b2f18d397bd6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c1e66084eda5b80f95136b015159ac395882fbc5dbaebe49e067013c1664e4f72617a7f7df59b774ccfa6d5c997aff2b83fe4ae5b99ed38fc7e569150c0081ed
|
|
7
|
+
data.tar.gz: d03e5029790a9b45cf7dbdc87704784a487dff02b2b2a46a4b49e08ea79ea498a305895e43804c2a4c10aee64502aaf90492ad603d4f9f8f6734fcb2e69e2eff
|
data/CHANGELOG.md
CHANGED
data/CONFIGURE.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
The welcome message can be customized with `Irbtools.welcome_message=`
|
|
5
5
|
|
|
6
|
+
### IRB Prompt
|
|
7
|
+
|
|
8
|
+
**irbtools** changes the prompt to *:IRBTOOLS mode*, which uses `>> ` as the prompt, `| ` for indentation, and ` > ` for continuing a statement. You can switch back to the default IRB prompt with:
|
|
9
|
+
|
|
10
|
+
IRB.conf[:PROMPT_MODE] = :DEFAULT
|
|
11
|
+
|
|
6
12
|
### Customize Libraries to Load
|
|
7
13
|
|
|
8
14
|
It is possible to modify, which libraries to load:
|
|
@@ -53,3 +59,15 @@ When adding a new library, you should firstly consider some way to load it via
|
|
|
53
59
|
`:autoload`. If this is not possible, try loading via `:thread`. If that is
|
|
54
60
|
not possible either, you will need to fallback to the default loading
|
|
55
61
|
mechanism.
|
|
62
|
+
|
|
63
|
+
#### Example
|
|
64
|
+
|
|
65
|
+
Change a [FancyIRB](https://github.com/janlelis/fancy_irb/) setting:
|
|
66
|
+
|
|
67
|
+
require 'irbtools/configure'
|
|
68
|
+
|
|
69
|
+
Irbtools.replace_library_callback :fancy_irb do
|
|
70
|
+
FancyIrb.start rocket_mode: false
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
Irbtools.start
|
data/MIT-LICENSE.txt
CHANGED
data/README.md
CHANGED
data/irbtools.gemspec
CHANGED
|
@@ -7,9 +7,9 @@ Gem::Specification.new do |s|
|
|
|
7
7
|
|
|
8
8
|
s.homepage = 'https://github.com/janlelis/irbtools'
|
|
9
9
|
s.authors = ["Jan Lelis"]
|
|
10
|
+
s.email = ["hi@ruby.consulting"]
|
|
10
11
|
s.summary = 'Irbtools happy IRB.'
|
|
11
|
-
s.description = "Irbtools make working with Ruby's IRB console more productive."
|
|
12
|
-
s.email = 'mail@janlelis.de'
|
|
12
|
+
s.description = "The Irbtools make working with Ruby's IRB console more fun & productive."
|
|
13
13
|
s.files = %w[
|
|
14
14
|
lib/irbtools.rb
|
|
15
15
|
lib/irbtools/version.rb
|
data/lib/irbtools/hirb.rb
CHANGED
|
@@ -7,6 +7,15 @@ Irbtools.add_library :hirb, thread: :paint do
|
|
|
7
7
|
Hirb::Pager.command_pager(what, options = {})
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
+
# Workaround for newer IRB versions
|
|
11
|
+
if defined? IRB::Irb
|
|
12
|
+
IRB::Irb.class_eval do
|
|
13
|
+
def output_value(_ = false)
|
|
14
|
+
Hirb::View.view_or_page_output(@context.last_value) || non_hirb_view_output
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
10
19
|
# page wirb output hacks
|
|
11
20
|
class Hirb::Pager
|
|
12
21
|
alias original_activated_by? activated_by?
|
data/lib/irbtools/libraries.rb
CHANGED
|
@@ -39,6 +39,7 @@ Irbtools.add_library 'object_shadow', thread: :paint do
|
|
|
39
39
|
ObjectShadow.include(ObjectShadow::DeepInspect)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
Irbtools.add_library 'readline', thread: :ori
|
|
42
43
|
Irbtools.add_library 'ori', thread: :ori do
|
|
43
44
|
# TODO Readline history can be empty (issue)
|
|
44
45
|
module ORI::Internals
|
data/lib/irbtools/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: irbtools
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.
|
|
4
|
+
version: 3.0.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jan Lelis
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2020-12-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: irb
|
|
@@ -312,8 +312,9 @@ dependencies:
|
|
|
312
312
|
- - ">="
|
|
313
313
|
- !ruby/object:Gem::Version
|
|
314
314
|
version: '0'
|
|
315
|
-
description: Irbtools make working with Ruby's IRB console more productive.
|
|
316
|
-
email:
|
|
315
|
+
description: The Irbtools make working with Ruby's IRB console more fun & productive.
|
|
316
|
+
email:
|
|
317
|
+
- hi@ruby.consulting
|
|
317
318
|
executables: []
|
|
318
319
|
extensions: []
|
|
319
320
|
extra_rdoc_files:
|
|
@@ -356,7 +357,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
356
357
|
- !ruby/object:Gem::Version
|
|
357
358
|
version: '0'
|
|
358
359
|
requirements: []
|
|
359
|
-
rubygems_version: 3.
|
|
360
|
+
rubygems_version: 3.1.2
|
|
360
361
|
signing_key:
|
|
361
362
|
specification_version: 4
|
|
362
363
|
summary: Irbtools happy IRB.
|