mini_readline 0.6.11 → 0.7.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/README.md +9 -56
- data/lib/mini_readline.rb +4 -13
- data/lib/mini_readline/version.rb +1 -1
- data/sire.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66df58b8ca2e0db8aaf7f468d2875e319d85015b
|
4
|
+
data.tar.gz: 51b5958f048e2d2a9271df178c6ff858f4d98040
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cabf7deb7ab36fcd201205de153e473f139593d752bfc19323ff03082aaa7eb4e2072096639da32ed30324395c5c3fc6d067a2ba60bcefce6d4a66f2e553d02b
|
7
|
+
data.tar.gz: a1fef7fd990291969cf1f0ef7bdbeaebc75a0a507bef7878675dd76200befc2b96e518c628dc6e3e7d3a5f068175746f81d93942ff6ae55c582c7663f931dfed
|
data/README.md
CHANGED
@@ -128,69 +128,22 @@ MiniReadline.readline(">", false, secret_mask: "*")
|
|
128
128
|
See the section Options below for more information on the sorts of things that
|
129
129
|
can be accomplished with these options settings.
|
130
130
|
|
131
|
-
##### Module Aliasing [
|
131
|
+
##### Module Aliasing [Support Ended]
|
132
132
|
|
133
133
|
In an attempt to enhance compatibility, the mini_readline gem has the ability
|
134
|
-
to alias itself as the readline gem.
|
135
|
-
|
136
|
-
```ruby
|
137
|
-
Readline.readline('>', true)
|
138
|
-
```
|
139
|
-
or to avoid tracking command history, use:
|
140
|
-
|
141
|
-
```ruby
|
142
|
-
Readline.readline('>', false)
|
143
|
-
```
|
144
|
-
The aliasing of modules is subject to the following list of conditions:
|
145
|
-
|
146
|
-
1) If the global variable $no_alias_read_line_module is set to true before the
|
147
|
-
mini_readline gem is required, *no* aliasing will take place.
|
148
|
-
```ruby
|
149
|
-
$no_alias_read_line_module = true
|
150
|
-
require 'mini_readline'
|
151
|
-
```
|
152
|
-
2) Else, if the global variable $force_alias_read_line_module is set to true
|
153
|
-
before the mini_readline gem is required, aliasing *will* take place.
|
154
|
-
```ruby
|
155
|
-
$force_alias_read_line_module = true
|
156
|
-
require 'mini_readline'
|
157
|
-
```
|
158
|
-
Note: Using the $force_alias_read_line_module setting now generates a warning.
|
134
|
+
to alias itself as the readline gem. This feature was found to be unworkable
|
135
|
+
and has been removed as of Version 0.7.0.
|
159
136
|
|
160
|
-
|
137
|
+
This feature was controlled by two global variables:
|
161
138
|
|
162
|
-
3) Else, if the readline gem is already loaded, *no* aliasing will take place.
|
163
|
-
```ruby
|
164
|
-
require 'readline'
|
165
|
-
require 'mini_readline'
|
166
|
-
```
|
167
|
-
4) Finally, if none of the above conditions are met, aliasing *will* take place.
|
168
139
|
```ruby
|
169
|
-
|
140
|
+
$force_alias_read_line_module
|
141
|
+
$no_alias_read_line_module
|
170
142
|
```
|
171
|
-
Note
|
172
|
-
gem, it will redefine the Readline constant, generating a warning message on
|
173
|
-
$stderr. If that is an issue, the following should ensure that the
|
174
|
-
mini_readline gem stays in charge.
|
175
|
-
```ruby
|
176
|
-
require 'readline'
|
177
|
-
$force_alias_read_line_module = true
|
178
|
-
require 'mini_readline'
|
179
|
-
```
|
180
|
-
|
181
|
-
##### Limitations
|
182
|
-
|
183
|
-
All of the measures taken to ensure some backward compatibility with the
|
184
|
-
standard readline facility are only of limited effectiveness. Any program
|
185
|
-
that digs into the innards of the system gem will likely need at least some
|
186
|
-
porting to switch to the mini_readline gem.
|
187
|
-
|
188
|
-
For the most part, compatible mode exists to make that porting process an
|
189
|
-
easier one.
|
143
|
+
Note: Using these variables now generates one of these exceptions.
|
190
144
|
|
191
|
-
|
192
|
-
|
193
|
-
feature to go away by version 0.7.0 unless some feedback is received.**
|
145
|
+
mini_readline: $force_alias_read_line_module is not supported.
|
146
|
+
mini_readline: $no_alias_read_line_module is not supported.
|
194
147
|
|
195
148
|
### Native Mode
|
196
149
|
|
data/lib/mini_readline.rb
CHANGED
@@ -29,19 +29,10 @@ module MiniReadline
|
|
29
29
|
|
30
30
|
end
|
31
31
|
|
32
|
-
if defined?($force_alias_read_line_module)
|
33
|
-
|
32
|
+
if defined?($force_alias_read_line_module)
|
33
|
+
fail "mini_readline: $force_alias_read_line_module is not supported."
|
34
34
|
end
|
35
35
|
|
36
|
-
|
37
|
-
|
38
|
-
old_stderr = $stderr
|
39
|
-
$stderr = File.open(File::NULL, 'w')
|
40
|
-
|
41
|
-
if !$no_alias_read_line_module && ($force_alias_read_line_module || !defined? Readline)
|
42
|
-
Readline = MiniReadline
|
43
|
-
end
|
44
|
-
ensure
|
45
|
-
$stderr.close
|
46
|
-
$stderr = old_stderr
|
36
|
+
if defined?($no_alias_read_line_module)
|
37
|
+
fail "mini_readline: $no_alias_read_line_module is not supported."
|
47
38
|
end
|
data/sire.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mini_readline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Camilleri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|