whirly 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.CHANGELOG.md.swp +0 -0
- data/.travis.yml +1 -0
- data/CHANGELOG.md +4 -0
- data/README.md +3 -1
- data/lib/.whirly.rb.swp +0 -0
- data/lib/whirly/version.rb +1 -1
- data/lib/whirly.rb +2 -2
- data/spec/.whirly_spec.rb.swp +0 -0
- data/spec/whirly_spec.rb +4 -4
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d86b20b619830ad0f5a6a91233f718d2ec5013b2
|
4
|
+
data.tar.gz: 01f56d888e248d61c3f8a93963cd39280a836482
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e959c6a547673ad48be7e05370c15ac0e7ac0e93e0a7ef4f7dc95a9ec64ffcbe86a0409c524d0f07ef6f6bec07e4219e08c19f87e12e18eb8dd4d02ada1aca24
|
7
|
+
data.tar.gz: 345b15765db9728785617f8031881c7569596a559f8ad17db0367986efe59a706d09c28072de0b5ead41986f979cbff59c8c7eb7f2b3d354aa739199a1644d20
|
data/.CHANGELOG.md.swp
ADDED
Binary file
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Whirly [![[version]](https://badge.fury.io/rb/whirly.svg)](http://badge.fury.io/rb/whirly) [![[travis]](https://travis-ci.org/janlelis/whirly.png)](https://travis-ci.org/janlelis/whirly)
|
1
|
+
# Whirly 😀 [![[version]](https://badge.fury.io/rb/whirly.svg)](http://badge.fury.io/rb/whirly) [![[travis]](https://travis-ci.org/janlelis/whirly.png)](https://travis-ci.org/janlelis/whirly)
|
2
2
|
|
3
3
|
A simple, colorful and customizable terminal spinner library for Ruby. It comes with 17 custom spinners and also includes those from the [cli-spinners](https://github.com/sindresorhus/cli-spinners) project.
|
4
4
|
|
@@ -62,6 +62,8 @@ Whirly.start spinner: "pong", use_color: false, status: "The Game of Pong" do
|
|
62
62
|
end
|
63
63
|
```
|
64
64
|
|
65
|
+
Also see the [examples directory](https://github.com/janlelis/whirly/tree/master/examples) for example scripts.
|
66
|
+
|
65
67
|
### Configuring Whirly
|
66
68
|
|
67
69
|
You can pass the same options you would pass to `.start` to `.configure` instead to create a persistent configuration that will be used by `.start`:
|
data/lib/.whirly.rb.swp
ADDED
Binary file
|
data/lib/whirly/version.rb
CHANGED
data/lib/whirly.rb
CHANGED
@@ -220,14 +220,14 @@ module Whirly
|
|
220
220
|
def self.render_prefix
|
221
221
|
res = ""
|
222
222
|
res << "\n" if @options[:position] == "below"
|
223
|
-
res << "\
|
223
|
+
res << "\e7" if @options[:ansi_escape_mode] == "restore"
|
224
224
|
res << "\e[G" if @options[:ansi_escape_mode] == "line"
|
225
225
|
res
|
226
226
|
end
|
227
227
|
|
228
228
|
def self.render_suffix
|
229
229
|
res = ""
|
230
|
-
res << "\
|
230
|
+
res << "\e8" if @options[:ansi_escape_mode] == "restore"
|
231
231
|
res << "\e[1A" if @options[:position] == "below"
|
232
232
|
res
|
233
233
|
end
|
Binary file
|
data/spec/whirly_spec.rb
CHANGED
@@ -4,11 +4,11 @@ require "minitest/autorun"
|
|
4
4
|
require "stringio"
|
5
5
|
|
6
6
|
def short_sleep
|
7
|
-
sleep 0.
|
7
|
+
sleep 0.15
|
8
8
|
end
|
9
9
|
|
10
10
|
def medium_sleep
|
11
|
-
sleep 0.
|
11
|
+
sleep 0.5
|
12
12
|
end
|
13
13
|
|
14
14
|
def long_sleep
|
@@ -117,7 +117,7 @@ describe Whirly do
|
|
117
117
|
short_sleep
|
118
118
|
Whirly.stop
|
119
119
|
|
120
|
-
assert_match /\
|
120
|
+
assert_match /\e8\n\z/, @capture.string
|
121
121
|
end
|
122
122
|
end
|
123
123
|
|
@@ -202,7 +202,7 @@ describe Whirly do
|
|
202
202
|
Whirly.start
|
203
203
|
short_sleep
|
204
204
|
Whirly.stop
|
205
|
-
assert_match /\
|
205
|
+
assert_match /\e7.*\e8/m, @capture.string
|
206
206
|
end
|
207
207
|
|
208
208
|
it "will use beginning of line and clear line ANSI sequences when 'line' is given" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whirly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
@@ -32,6 +32,7 @@ executables: []
|
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
|
+
- ".CHANGELOG.md.swp"
|
35
36
|
- ".gitignore"
|
36
37
|
- ".gitmodules"
|
37
38
|
- ".travis.yml"
|
@@ -50,11 +51,13 @@ files:
|
|
50
51
|
- examples/multi_lines.rb
|
51
52
|
- examples/single.rb
|
52
53
|
- examples/status.rb
|
54
|
+
- lib/.whirly.rb.swp
|
53
55
|
- lib/whirly.rb
|
54
56
|
- lib/whirly/spinners.rb
|
55
57
|
- lib/whirly/spinners/cli.rb
|
56
58
|
- lib/whirly/spinners/whirly.rb
|
57
59
|
- lib/whirly/version.rb
|
60
|
+
- spec/.whirly_spec.rb.swp
|
58
61
|
- spec/whirly_spec.rb
|
59
62
|
- whirly.gemspec
|
60
63
|
homepage: https://github.com/janlelis/whirly
|
@@ -82,4 +85,5 @@ signing_key:
|
|
82
85
|
specification_version: 4
|
83
86
|
summary: 'Whirly: The friendly terminal spinner'
|
84
87
|
test_files:
|
88
|
+
- spec/.whirly_spec.rb.swp
|
85
89
|
- spec/whirly_spec.rb
|