terminal output gem with animated stars, colored messages, and progress tracking.
gem 'starlined'require 'starlined'
include Starlined::Messages
info "Starting deployment"
warn "Config file missing"
error "Connection failed"
success "Build complete", 3.5 # with elapsed timerunner = Starlined::Runner.new
runner.start("Installing deps", steps: 3)
runner.run("bundle install", aka: "bundler")
runner.run("npm install", aka: "npm")
runner.run("rake db:migrate", aka: "database")
runner.stopThe aka parameter shows what's currently running in the animation.
runner = Starlined::Runner.new
runner.start("Running tests", steps: 3)
threads = []
threads << Thread.new { runner.run("rspec spec/models") }
threads << Thread.new { runner.run("rspec spec/controllers") }
threads << Thread.new { runner.run("rspec spec/features") }
threads.each(&:join)
runner.stopStarlined.configure do |config|
config.verbose = true # show verbose messages
config.sleep_time = 0.5 # animation speed
config.msg_ljust = 40 # message padding
endCC-NC-BY-4.0, open-sourced from okticket