Questions tagged [highline]
27 questions
0
votes
1 answer
Latex hline does not work with rowcolor?
\begin{tabularx}{\textwidth}{ |X|X|X| }
\hline
\rowcolor{fapsgrau1}\global\setlength\arrayrulewidth{0.4pt}
\textbf{Länge} & \textbf{Breite} & \textbf{Höhe} \\
\hline
& 115 & \\
& 120 &…

tobias.m
- 41
- 1
- 3
0
votes
1 answer
Simplecov test coverage not reporting on Rake task spec
I have been battling why Simplecov is not reported this Rake task as covered when my specs work correctly via pry tests. Can anyone point me in the right direction?
The following rake task...
namespace :myapp do
namespace :data do
namespace…

Chris Hough
- 3,389
- 3
- 41
- 80
0
votes
1 answer
Three Rake tasks with highline stubs
I have been trying to use the following spec based on this Stack Overflow question to cover this process.
Current Spec...
describe 'rake task myapp:data:load:from' do
include_context 'rake'
let(:task_path) { 'tasks/data.rake' }
describe…

Chris Hough
- 3,389
- 3
- 41
- 80
0
votes
1 answer
Clear screen before any output to console
I use HighLine gem for UI. I want to clear the screen before output any data. Which method should I use? Patch some Ruby methods like puts? Patch HighLine? Change my app in some way? At the moment it has Dialog class with various methods which call…

Michael
- 135
- 2
- 11
0
votes
1 answer
HighLine: Using gather and answer_or_default
This is my current code for ircd configuration file generator,
I'm trying to be able to use answer_or_default for this, and figure out the use of HighLine::Question#gather
Here's the answer_or_default
a = HighLine.new($stdin,…

IotaSpencer
- 77
- 10
0
votes
1 answer
Erroneously using STDIN when pasting a script into the Terminal.app
I have the following script-snipped, which I use regularly to semi-automate one of my workflows.
I open a bash terminal and start irb and then paste the script:
require 'highline/import'
# ...
user = ask("User:")
repo = ask("Repository:")
# ...
#…

Besi
- 22,579
- 24
- 131
- 223
0
votes
2 answers
How can we set a variable after the user chooses from a HighLine menu in Ruby?
The HighLine documentation shows that we can display a string after the user selects an option from the list, like follows:
choose do |menu|
menu.prompt = "Please choose your favorite programming language? "
menu.choice(:ruby) { say("Good…

Matt
- 2,953
- 3
- 27
- 46
0
votes
1 answer
Randomize the echo char in Highline's ask method?
I am trying to randomize the echo character in the Highline gem's ask method, but could not get it to work. Did I not do this right?
srand
ask("password: ") { |q| q.echo = ('a'.ord+rand(26)).chr }
The character is randomized for each ask() call,…

TX T
- 817
- 2
- 16
- 25
0
votes
1 answer
Ruby highline gem: Is there a way to assign a command for the duration of the script/app
I have gem/cli that uses highline and I was wondering if you can set your own command so it is always available (similar to 'help').
require 'rubygems'
require 'highline/import'
say("\nThis is the new mode (default)...")
choose do |menu|
…

kreek
- 8,774
- 8
- 44
- 69
0
votes
1 answer
Highline clobbering previous output
Using Highline v1.6.19
When I run the following Ruby program:
require 'highline'
stdin = HighLine.new($stdin, $stdout)
stdin.ask("1 enter password: ") { |q| q.echo = false }
stdin.ask "2 enter something else: "
stdin.ask("3 enter password: ") { |q|…

Joshua Cheek
- 30,436
- 16
- 74
- 83
0
votes
1 answer
Rewrite a ruby class on the fly
I'm using HighLine to write my console application and I would like to modify the HighLine::Question::in_range! function so that tab completion stayed activated but that highline do not bother checking if the words typed are in the range.
So let's…

Benjamin
- 617
- 13
- 27
0
votes
1 answer
`highline` gem is already installed, but `commander` refuses to install
When I type gem install commander, I get:
Error installing commander:
commander requires highline (~> 1.6.11)
I even did gem install highline ("Successfully installed highline-1.6.11") and I get the same error. What could be the cause of this…

Andres Riofrio
- 9,851
- 7
- 40
- 60