mini_readline 0.6.5 → 0.6.7
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/CODE_OF_CONDUCT.md +49 -0
- data/README.md +14 -9
- data/lib/mini_readline.rb +4 -0
- data/lib/mini_readline/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ceacc828df705967b25a0f557c94851e37eb2453
|
4
|
+
data.tar.gz: 166a205727e1be37dbdcbc451e3541e44477e81c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f4a068c51f1c7e9db78e75f9274537726d4fe37e003106a6651d4536de01ecbd117f10e7fa4c7ab0cfc6121738bc4067ab6aeedccf2f710bc57c91da0d00ea0
|
7
|
+
data.tar.gz: 5541574214dbfa7d6b68908287022e8fb6aeae0ed80d361b2de3ac588ae7b244dd50c01b2328f89eb1f4756f6297141c4e4b645abb272d768034294bebe1856e
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at peter.c.camilleri@gmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/README.md
CHANGED
@@ -41,7 +41,7 @@ The mini_readline gem supports a simple set of editing commands. These vary
|
|
41
41
|
somewhat based on the system platform. The keyboard mappings (and alias
|
42
42
|
mappings) are listed below:
|
43
43
|
|
44
|
-
Editor Action | Windows Key |
|
44
|
+
Editor Action | Windows Key | Mac/Linux Key
|
45
45
|
-----------------|----------------------------------|------------
|
46
46
|
Enter | Enter | Enter
|
47
47
|
Left | Left Arrow, Pad Left | Left Arrow, Ctrl-B
|
@@ -61,9 +61,8 @@ Auto-complete | Tab, Ctrl-I | Tab, Ctrl-I
|
|
61
61
|
End of Input | Ctrl-Z | Alt-z
|
62
62
|
|
63
63
|
### Notes
|
64
|
-
* The label "
|
65
|
-
|
66
|
-
* On "Other" systems lacking an Alt key, these sequences may be
|
64
|
+
* The label "Mac/Linux" also includes the Cygwin platform.
|
65
|
+
* On "Mac/Linux" systems lacking an Alt key, these sequences may be
|
67
66
|
replaced by Escape followed by the appropriate letter.
|
68
67
|
* References to Pad keys under Windows assume that Num Lock is not engaged.
|
69
68
|
* Support for End of Input is controlled by the eoi_detect option. See options
|
@@ -103,7 +102,8 @@ also be accomplished with the command:
|
|
103
102
|
### Compatible Mode
|
104
103
|
|
105
104
|
In compatible mode, mini_readline tries to be somewhat compatible with the
|
106
|
-
classic system readline facility.
|
105
|
+
classic system readline facility. This means that MiniReadline module methods
|
106
|
+
are used to obtain user input. Here is this compatible mode in action with
|
107
107
|
entry history enabled:
|
108
108
|
|
109
109
|
```ruby
|
@@ -111,8 +111,13 @@ MiniReadline.readline('>', true)
|
|
111
111
|
```
|
112
112
|
and with entry history disabled:
|
113
113
|
```ruby
|
114
|
+
MiniReadline.readline('>')
|
115
|
+
```
|
116
|
+
or
|
117
|
+
```ruby
|
114
118
|
MiniReadline.readline('>', false)
|
115
119
|
```
|
120
|
+
|
116
121
|
Where the string argument is the prompt seen by the user and the flag controls
|
117
122
|
the history buffer. Use true to enable history and false to disable it.
|
118
123
|
|
@@ -130,9 +135,9 @@ can be accomplished with these options settings.
|
|
130
135
|
|
131
136
|
##### Module Aliasing [Deprecated]
|
132
137
|
|
133
|
-
|
134
|
-
itself as the readline gem. When this feature is used, compatible code
|
135
|
-
more compatible looking:
|
138
|
+
In an attempt to enhance compatibility, the mini_readline gem has the ability
|
139
|
+
to alias itself as the readline gem. When this feature is used, compatible code
|
140
|
+
is even more compatible looking:
|
136
141
|
```ruby
|
137
142
|
Readline.readline('>', true)
|
138
143
|
```
|
@@ -193,7 +198,7 @@ feature to go away by version 0.7.0 unless some feedback is received.**
|
|
193
198
|
In native mode, instances of the Readline class are used to get user input.
|
194
199
|
|
195
200
|
```ruby
|
196
|
-
edit = MiniReadline::Readline.new
|
201
|
+
edit = MiniReadline::Readline.new
|
197
202
|
```
|
198
203
|
|
199
204
|
The constructor takes an optional argument. A hash of options that are used
|
data/lib/mini_readline.rb
CHANGED
@@ -32,6 +32,10 @@ module MiniReadline
|
|
32
32
|
|
33
33
|
end
|
34
34
|
|
35
|
+
if defined?($force_alias_read_line_module) && $force_alias_read_line_module
|
36
|
+
warn "mini_readline: $force_alias_read_line_module is deprecated."
|
37
|
+
end
|
38
|
+
|
35
39
|
#Optionally: Setup the module alias for Readline
|
36
40
|
begin
|
37
41
|
old_stderr = $stderr
|
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.
|
4
|
+
version: 0.6.7
|
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-09-
|
11
|
+
date: 2016-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -80,6 +80,7 @@ extensions: []
|
|
80
80
|
extra_rdoc_files: []
|
81
81
|
files:
|
82
82
|
- ".gitignore"
|
83
|
+
- CODE_OF_CONDUCT.md
|
83
84
|
- Gemfile
|
84
85
|
- LICENSE.txt
|
85
86
|
- README.md
|