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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e18636a633a48b056ce7d9a0c4db8e2e1881623
4
- data.tar.gz: a452fc2c64ea0e1a208b91721c8de9002c608c9e
3
+ metadata.gz: 66df58b8ca2e0db8aaf7f468d2875e319d85015b
4
+ data.tar.gz: 51b5958f048e2d2a9271df178c6ff858f4d98040
5
5
  SHA512:
6
- metadata.gz: 447f8998d5ec57d0b29c0f4f4632338729e031b60abfd884eac04d87e23c6aba08083f03fc30c54108227575c3c5789b452b58f12836308e9c17e773e05c9a0c
7
- data.tar.gz: dcf7a413496c934d5a2f0bb74af8a90f046ec6968137fbb20333250385e2abd9da438471283675bc02d423973da667ea50ae4e6885ced6e6b622c8c73fd4b0b5
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 [Deprecated]
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. When this feature is used, compatible code
135
- is even more compatible looking:
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
- mini_readline: $force_alias_read_line_module is deprecated.
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
- require 'mini_readline'
140
+ $force_alias_read_line_module
141
+ $no_alias_read_line_module
170
142
  ```
171
- Note that if the readline gem is subsequently required after the mini_readline
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
- **IMPORTANT NOTE: The module aliasing feature is now deprecated. For now there
192
- will be no change, soon warnings will ensue, then errors. Look for this
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) && $force_alias_read_line_module
33
- warn "mini_readline: $force_alias_read_line_module is deprecated."
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
- #Optionally: Setup the module alias for Readline
37
- begin
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
@@ -1,4 +1,4 @@
1
1
  module MiniReadline
2
2
  #The current version of the mini_readline gem.
3
- VERSION = "0.6.11"
3
+ VERSION = "0.7.0"
4
4
  end
data/sire.rb CHANGED
@@ -31,6 +31,8 @@ else
31
31
  end
32
32
  end
33
33
 
34
+ Readline = MiniReadline unless defined?(Readline)
35
+
34
36
  class Object
35
37
  #Generate the class lineage of the object.
36
38
  def classes
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.6.11
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-10-27 00:00:00.000000000 Z
11
+ date: 2016-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest