irbtools 3.0.2 → 3.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c59be94ebd289e79dba6826320715a3b5a6bc85136e5dff476a05838b713beb5
4
- data.tar.gz: ca6b55bd99160ecdc16cd1992f277e5d030fcb0c87987f620308a2dbaf7a540b
3
+ metadata.gz: e97f5261cf4f7b547eb07c577df70e0c98ac988aedebe23c143f1d021e70ea38
4
+ data.tar.gz: 795f96ed7e8e976b4147416a41f5542c6327a6c980fc078ae540b2f18d397bd6
5
5
  SHA512:
6
- metadata.gz: 6756a5b66731e6aadc9c9e586b5fb6b01b6d7c7d805b72105397d3c65f6fb9b2333186947f6a0d1f5cdfbe4c8e28eed1682bc5edfd3d7c83dd73de3f83e602f2
7
- data.tar.gz: 50fb6b0b0ac257f8ae4ba3c4b5ba2ff18fca8477028c26556bf601a25f31c6233e901c1d560765fda71dbaaa63a30cbc4999c156e4fd5422f961638408c1a657
6
+ metadata.gz: c1e66084eda5b80f95136b015159ac395882fbc5dbaebe49e067013c1664e4f72617a7f7df59b774ccfa6d5c997aff2b83fe4ae5b99ed38fc7e569150c0081ed
7
+ data.tar.gz: d03e5029790a9b45cf7dbdc87704784a487dff02b2b2a46a4b49e08ea79ea498a305895e43804c2a4c10aee64502aaf90492ad603d4f9f8f6734fcb2e69e2eff
@@ -1,5 +1,9 @@
1
1
  # Irbtools Changelog
2
2
 
3
+ ## 3.0.3
4
+ * Workaround a HIRB issue for newer IRBs (fixes #48)
5
+ * Workaround ORI issue for newer IRBs
6
+
3
7
  ## 3.0.2
4
8
  * Bump wirb to ensure Ruby 2.7 compatibility
5
9
 
@@ -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
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2019 Jan Lelis
1
+ Copyright (c) 2010-2020 Jan Lelis
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -182,5 +182,5 @@ Irbtools.start
182
182
 
183
183
  ## J-_-L
184
184
 
185
- Copyright (c) 2010-2019 Jan Lelis <https://janlelis.com> released under the MIT
185
+ Copyright (c) 2010-2020 Jan Lelis <https://janlelis.com> released under the MIT
186
186
  license.
@@ -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
@@ -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?
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Irbtools
4
- VERSION = "3.0.2"
4
+ VERSION = "3.0.3"
5
5
  end
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.2
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: 2019-12-27 00:00:00.000000000 Z
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: mail@janlelis.de
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.0.6
360
+ rubygems_version: 3.1.2
360
361
  signing_key:
361
362
  specification_version: 4
362
363
  summary: Irbtools happy IRB.