highline 2.0.0.pre.develop.13 → 2.0.0.pre.develop.14

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
  SHA1:
3
- metadata.gz: 15f4a2a4093aa40f67585d304e451b7015ef098d
4
- data.tar.gz: 3a192714c98631c7ec8263993fa3effa8f1c36b9
3
+ metadata.gz: 5ab46fe65f6eb631cce1fe0cc62caf13925bd40b
4
+ data.tar.gz: 4ac57c74c9460edca617bb6a829c1ec50bce410e
5
5
  SHA512:
6
- metadata.gz: 6544dfa49255c98a453fcde92a5da742bc22bf3f02553f648f8c7568e04a67a524fbfe6cf325ed009f3a00fbcbb30777707db243f87bc3cfe2a946ddb71b04a1
7
- data.tar.gz: d5d06ecbb06d9d062a5b344cac7de0e547b0ef3122e895131d5f56ab7beb4f3a637e58b5af3755c6ad7f836c1e10ec97e9019f73011d26237158eb50f9877627
6
+ metadata.gz: 24f92f0180bb9cdfa88f76d73f5e3ab0794276120b41741e9083b5325aa7be9411be8226b8d62591692693fe1b3f4302dc2fbb0704d79c9b227f76ee319e57b9
7
+ data.tar.gz: 2ed1a02b7bfd2d06bdd87b0e91fa6d1505d9d8d877461787ea431f0931acc2ae83eec795dbde832afa0cbb674113ae83442c47486d36e747a9333bf2cecf9282
@@ -2,6 +2,9 @@
2
2
 
3
3
  Below is a complete listing of changes for each revision of HighLine.
4
4
 
5
+ ### 2.0.0-develop.14 / 2017-11-21
6
+ * PR #222 / I #221 - Fix inconsistent behaviour when using agree with readline (@abinoam, @ailisp)
7
+
5
8
  ### 2.0.0-develop.13 / 2017-11-05
6
9
  * PR #219 - Make possible to use a callable as response (@abinoam)
7
10
 
@@ -196,6 +196,7 @@ class HighLine
196
196
  q.responses[:not_valid] = 'Please enter "yes" or "no".'
197
197
  q.responses[:ask_on_error] = :question
198
198
  q.character = character
199
+ q.completion = %w[yes no]
199
200
 
200
201
  yield q if block_given?
201
202
  end
@@ -575,7 +575,7 @@ class HighLine
575
575
  # @param highline [HighLine] context
576
576
  # @return [void]
577
577
  def show_question(highline)
578
- highline.say(self) unless readline && (echo == true && !limit)
578
+ highline.say(self)
579
579
  end
580
580
 
581
581
  # Returns an echo string that is adequate for this Question settings.
@@ -98,9 +98,7 @@ class HighLine
98
98
  def get_line_with_readline(question, highline)
99
99
  require "readline" # load only if needed
100
100
 
101
- question_string = highline.render_statement(question)
102
-
103
- raw_answer = readline_read(question_string, question)
101
+ raw_answer = readline_read(question)
104
102
 
105
103
  if !raw_answer && highline.track_eof?
106
104
  raise EOFError, "The input stream is exhausted."
@@ -113,7 +111,7 @@ class HighLine
113
111
  # @param prompt [String] Readline prompt
114
112
  # @param question [HighLine::Question] question from where to get
115
113
  # autocomplete candidate strings
116
- def readline_read(prompt, question)
114
+ def readline_read(question)
117
115
  # prep auto-completion
118
116
  unless question.selection.empty?
119
117
  Readline.completion_proc = lambda do |str|
@@ -126,7 +124,7 @@ class HighLine
126
124
  $VERBOSE = nil
127
125
 
128
126
  raw_answer = run_preserving_stty do
129
- Readline.readline(prompt, true)
127
+ Readline.readline("", true)
130
128
  end
131
129
 
132
130
  $VERBOSE = old_verbose
@@ -2,5 +2,5 @@
2
2
 
3
3
  class HighLine
4
4
  # The version of the installed library.
5
- VERSION = "2.0.0-develop.13".freeze
5
+ VERSION = "2.0.0-develop.14".freeze
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: highline
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.develop.13
4
+ version: 2.0.0.pre.develop.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Edward Gray II
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-05 00:00:00.000000000 Z
11
+ date: 2017-11-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler