Compare commits

..

No commits in common. "master" and "v0.1.0" have entirely different histories.

6 changed files with 7 additions and 12 deletions

View file

@ -2,7 +2,7 @@ require "../src/spinner"
require "colorize"
chars = Spinner::Charset[:arrow].map do |c|
c.colorize(:light_green).to_s
c.colorize(:light_green)
end
spin = Spin.new(0.2, chars)

View file

@ -1,9 +1,9 @@
require "../src/spinner"
require "colorize"
colors = [:red, :light_red, :yellow, :green, :light_blue, :blue, :magenta]
colors = {:red, :light_red, :yellow, :green, :light_blue, :blue, :magenta}
chars = colors.map do |color|
".xXx.".colorize(color).to_s
".xXx.".colorize(color)
end
spin = Spin.new(0.01, chars)

View file

@ -1,5 +1,5 @@
name: spinner
version: 0.1.1
version: 0.1.0
authors:
- Aşkın Gedik <askn@bil.omu.edu.tr>

View file

@ -1,15 +1,13 @@
require "./spinner/*"
class Spin
property delay
property chars : Array(String)
property delay, chars
CL = STDOUT.tty? ? "\u001b[0G" : "\u000d \u000d"
CLEAR = STDOUT.tty? ? "\u001b[2K" : "\u000d"
def initialize(@delay = 0.1, chars = Spinner::Charset[:pipe])
def initialize(@delay = 0.1, @chars = Spinner::Charset[:pipe])
@state = true
@chars = chars.to_a
end
def stop

View file

@ -31,9 +31,6 @@ module Spinner
progress1: {"(*---------)", "(-*--------)", "(--*-------)", "(---*------)", "(----*-----)", "(-----*----)", "(------*---)", "(-------*--)", "(--------*-)", "(---------*)"},
progress2: {"█▒▒▒▒▒▒▒▒▒", "███▒▒▒▒▒▒▒", "█████▒▒▒▒▒", "███████▒▒▒", "██████████"},
progress3: {"[ ]", "[=> ]", "[===> ]", "[=====> ]", "[======> ]", "[========> ]", "[==========> ]", "[============> ]", "[==============> ]", "[================> ]", "[==================> ]", "[===================>]"},
pulsate1: {"█▒▒▒▒▒▒▒▒▒", "▒█▒▒▒▒▒▒▒▒", "▒▒█▒▒▒▒▒▒▒", "▒▒▒█▒▒▒▒▒▒", "▒▒▒▒█▒▒▒▒▒", "▒▒▒▒▒█▒▒▒▒", "▒▒▒▒▒▒█▒▒▒", "▒▒▒▒▒▒▒█▒▒", "▒▒▒▒▒▒▒▒█▒", "▒▒▒▒▒▒▒▒▒█", "▒▒▒▒▒▒▒▒█▒", "▒▒▒▒▒▒▒█▒▒", "▒▒▒▒▒▒█▒▒▒", "▒▒▒▒▒█▒▒▒▒", "▒▒▒▒█▒▒▒▒▒", "▒▒▒█▒▒▒▒▒▒", "▒▒█▒▒▒▒▒▒▒", "▒█▒▒▒▒▒▒▒▒"},
pulsate2: {"[= ]", "[ = ]", "[ = ]", "[ = ]", "[ = ]", "[ = ]", "[ = ]", "[ =]", "[ = ]", "[ = ]", "[ = ]", "[ = ]", "[ = ]", "[ = ]"},
pulsate3: {"= ", "== ", "=== ", "==== ", "===== ", "====== ", "======= ", "========", " =======", " ======", " =====", " ====", " ===", " ==", " =", " ==", " ===", " ====", " =====", " ======", " =======", "========", "======= ", "====== ", "===== ", "==== ", "=== ", "== "},
fish: {">))'> ", " >))'> ", " >))'> ", " >))'> ", " >))'>", " <'((<", " <'((< ", " <'((< ", " <'((< ", "<'((< "},
}
end

View file

@ -1,3 +1,3 @@
module Spinner
VERSION = "0.1.1"
VERSION = "0.1.0"
end