whirly 0.2.6 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +5 -0
- data/MIT-LICENSE.txt +1 -1
- data/README.md +9 -9
- data/Rakefile +1 -1
- data/data/cli-spinners.json +542 -1
- data/lib/whirly/version.rb +3 -1
- data/spec/whirly_spec.rb +7 -7
- data/whirly.gemspec +3 -3
- metadata +10 -9
- data/.travis.yml +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0d29fbecff7cd421276c1212e4f78775d153dbdaa911c9c0ab4455cc95f7af02
|
4
|
+
data.tar.gz: a390b99e94244688c8bc6a283b1f8e407d2031f03fec6be9f9e7bfd0727c0e83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5ad854b00b8d9b8e620cbe96b456fbaa98ec116233ca531e840f4204986f9397a32494e2aea1bf73057a97dc7541a6c0f868a6c901441cdf6e19a3602e2ff78
|
7
|
+
data.tar.gz: 85171c117d3f3d1d77b1fbfd9af2e864b6e2bd39d55d3673c63d8247e404c36d4f89a7de2acb4aabd250d7c247131f91833651d18c7f9b4ccabd1423b38ae11a
|
data/CHANGELOG.md
CHANGED
data/MIT-LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Whirly 😀 [![[version]](https://badge.fury.io/rb/whirly.svg)](
|
1
|
+
# Whirly 😀 [![[version]](https://badge.fury.io/rb/whirly.svg)](https://badge.fury.io/rb/whirly) [<img src="https://github.com/janlelis/whirly/workflows/Test/badge.svg" />](https://github.com/janlelis/whirly/actions/workflows/test.yml)
|
2
2
|
|
3
3
|
A simple, colorful and customizable terminal spinner library for Ruby. It comes with 24 custom spinners and also includes those from the [cli-spinners](https://github.com/sindresorhus/cli-spinners) project.
|
4
4
|
|
@@ -12,7 +12,7 @@ A simple, colorful and customizable terminal spinner library for Ruby. It comes
|
|
12
12
|
|
13
13
|
### Bundled Spinners from CLI Spinners
|
14
14
|
|
15
|
-
![](https://raw.githubusercontent.com/sindresorhus/cli-spinners/
|
15
|
+
![](https://raw.githubusercontent.com/sindresorhus/cli-spinners/main/screenshot.gif)
|
16
16
|
|
17
17
|
[Play on asciinema](https://asciinema.org/a/9mlcoussb137m32swwuqtb2p1?size=big)
|
18
18
|
|
@@ -65,7 +65,7 @@ Whirly.start spinner: "pong", color: false, status: "The Game of Pong" do
|
|
65
65
|
end
|
66
66
|
```
|
67
67
|
|
68
|
-
Also see the [examples directory](https://github.com/janlelis/whirly/tree/
|
68
|
+
Also see the [examples directory](https://github.com/janlelis/whirly/tree/main/examples) for example scripts.
|
69
69
|
|
70
70
|
### Configuring Whirly
|
71
71
|
|
@@ -99,7 +99,7 @@ end
|
|
99
99
|
|
100
100
|
### Included Spinners
|
101
101
|
|
102
|
-
See [`data/whirly-static-spinnes.json`](https://github.com/janlelis/whirly/blob/
|
102
|
+
See [`data/whirly-static-spinnes.json`](https://github.com/janlelis/whirly/blob/main/data/whirly-static-spinners.json), [`lib/whirly/spinners/whirly.rb`](https://github.com/janlelis/whirly/blob/main/lib/whirly/spinners/whirly.rb) and [cli-spinners](https://github.com/sindresorhus/cli-spinners). You can get a demonstration of all bundled spinners by running the [`examples/all_spinners.rb`](https://github.com/janlelis/whirly/blob/main/examples/all_spinners.rb) script.
|
103
103
|
|
104
104
|
## All `Whirly.start` / `Whirly.configure` Configuration Options
|
105
105
|
|
@@ -212,7 +212,7 @@ Whirly comes with spinners from different sources. This options defines which so
|
|
212
212
|
|
213
213
|
*Default:* `$stdout`
|
214
214
|
|
215
|
-
You can pass in an [IO](https://ruby-doc.org/core
|
215
|
+
You can pass in an [IO](https://ruby-doc.org/core/IO.html)-like object, if you want to display *Whirly* on an other stream than `$stdout`.
|
216
216
|
|
217
217
|
## Full Spinner Hash Format
|
218
218
|
|
@@ -220,7 +220,7 @@ A full spinner is defined by a hash which can have the following key-value pairs
|
|
220
220
|
|
221
221
|
### `"frames"`
|
222
222
|
|
223
|
-
An [Array](https://ruby-doc.org/core
|
223
|
+
An [Array](https://ruby-doc.org/core/Array.html) or [Enumerable](https://ruby-doc.org/core/Enumerable.html) of strings that will be used as the spinner icon.
|
224
224
|
|
225
225
|
### `"proc"`
|
226
226
|
|
@@ -239,7 +239,7 @@ The order in which frames should be played. It can be one of the following:
|
|
239
239
|
- `"swing"`: Cycle through all frames in normal order, and then in reverse order, but only play first and last frame once each round
|
240
240
|
- `"random"`: Play random frames
|
241
241
|
|
242
|
-
Please note: While `"linear"` also works with frames that are just an [Enumerable](https://ruby-doc.org/core
|
242
|
+
Please note: While `"linear"` also works with frames that are just an [Enumerable](https://ruby-doc.org/core/Enumerable.html), all other frame modes require the object to be representable as an [Array](https://ruby-doc.org/core/Array.html).
|
243
243
|
|
244
244
|
### `"stop"`
|
245
245
|
|
@@ -250,9 +250,9 @@ A frame to be used to end the spinner icon animation.
|
|
250
250
|
- Interval is milliseconds, but don't rely on exact timing
|
251
251
|
- Will not do anything if stream is not a real console (or `non_tty: true` is passed)
|
252
252
|
- Colors not working? Be sure to include the [paint](https://github.com/janlelis/paint/) gem in your Gemfile
|
253
|
-
- Don't set very short intervals (or it might affect performance
|
253
|
+
- Don't set very short intervals (or it might affect performance substantially)
|
254
254
|
|
255
255
|
## MIT License
|
256
256
|
|
257
|
-
- Copyright (C) 2016 Jan Lelis <
|
257
|
+
- Copyright (C) 2016 Jan Lelis <https://janlelis.com>. Released under the MIT license.
|
258
258
|
- Contains data from cli-spinners: MIT License, Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
|
data/Rakefile
CHANGED
data/data/cli-spinners.json
CHANGED
@@ -274,6 +274,267 @@
|
|
274
274
|
"⠀⡀"
|
275
275
|
]
|
276
276
|
},
|
277
|
+
"dots8Bit": {
|
278
|
+
"interval": 80,
|
279
|
+
"frames": [
|
280
|
+
"⠀",
|
281
|
+
"⠁",
|
282
|
+
"⠂",
|
283
|
+
"⠃",
|
284
|
+
"⠄",
|
285
|
+
"⠅",
|
286
|
+
"⠆",
|
287
|
+
"⠇",
|
288
|
+
"⡀",
|
289
|
+
"⡁",
|
290
|
+
"⡂",
|
291
|
+
"⡃",
|
292
|
+
"⡄",
|
293
|
+
"⡅",
|
294
|
+
"⡆",
|
295
|
+
"⡇",
|
296
|
+
"⠈",
|
297
|
+
"⠉",
|
298
|
+
"⠊",
|
299
|
+
"⠋",
|
300
|
+
"⠌",
|
301
|
+
"⠍",
|
302
|
+
"⠎",
|
303
|
+
"⠏",
|
304
|
+
"⡈",
|
305
|
+
"⡉",
|
306
|
+
"⡊",
|
307
|
+
"⡋",
|
308
|
+
"⡌",
|
309
|
+
"⡍",
|
310
|
+
"⡎",
|
311
|
+
"⡏",
|
312
|
+
"⠐",
|
313
|
+
"⠑",
|
314
|
+
"⠒",
|
315
|
+
"⠓",
|
316
|
+
"⠔",
|
317
|
+
"⠕",
|
318
|
+
"⠖",
|
319
|
+
"⠗",
|
320
|
+
"⡐",
|
321
|
+
"⡑",
|
322
|
+
"⡒",
|
323
|
+
"⡓",
|
324
|
+
"⡔",
|
325
|
+
"⡕",
|
326
|
+
"⡖",
|
327
|
+
"⡗",
|
328
|
+
"⠘",
|
329
|
+
"⠙",
|
330
|
+
"⠚",
|
331
|
+
"⠛",
|
332
|
+
"⠜",
|
333
|
+
"⠝",
|
334
|
+
"⠞",
|
335
|
+
"⠟",
|
336
|
+
"⡘",
|
337
|
+
"⡙",
|
338
|
+
"⡚",
|
339
|
+
"⡛",
|
340
|
+
"⡜",
|
341
|
+
"⡝",
|
342
|
+
"⡞",
|
343
|
+
"⡟",
|
344
|
+
"⠠",
|
345
|
+
"⠡",
|
346
|
+
"⠢",
|
347
|
+
"⠣",
|
348
|
+
"⠤",
|
349
|
+
"⠥",
|
350
|
+
"⠦",
|
351
|
+
"⠧",
|
352
|
+
"⡠",
|
353
|
+
"⡡",
|
354
|
+
"⡢",
|
355
|
+
"⡣",
|
356
|
+
"⡤",
|
357
|
+
"⡥",
|
358
|
+
"⡦",
|
359
|
+
"⡧",
|
360
|
+
"⠨",
|
361
|
+
"⠩",
|
362
|
+
"⠪",
|
363
|
+
"⠫",
|
364
|
+
"⠬",
|
365
|
+
"⠭",
|
366
|
+
"⠮",
|
367
|
+
"⠯",
|
368
|
+
"⡨",
|
369
|
+
"⡩",
|
370
|
+
"⡪",
|
371
|
+
"⡫",
|
372
|
+
"⡬",
|
373
|
+
"⡭",
|
374
|
+
"⡮",
|
375
|
+
"⡯",
|
376
|
+
"⠰",
|
377
|
+
"⠱",
|
378
|
+
"⠲",
|
379
|
+
"⠳",
|
380
|
+
"⠴",
|
381
|
+
"⠵",
|
382
|
+
"⠶",
|
383
|
+
"⠷",
|
384
|
+
"⡰",
|
385
|
+
"⡱",
|
386
|
+
"⡲",
|
387
|
+
"⡳",
|
388
|
+
"⡴",
|
389
|
+
"⡵",
|
390
|
+
"⡶",
|
391
|
+
"⡷",
|
392
|
+
"⠸",
|
393
|
+
"⠹",
|
394
|
+
"⠺",
|
395
|
+
"⠻",
|
396
|
+
"⠼",
|
397
|
+
"⠽",
|
398
|
+
"⠾",
|
399
|
+
"⠿",
|
400
|
+
"⡸",
|
401
|
+
"⡹",
|
402
|
+
"⡺",
|
403
|
+
"⡻",
|
404
|
+
"⡼",
|
405
|
+
"⡽",
|
406
|
+
"⡾",
|
407
|
+
"⡿",
|
408
|
+
"⢀",
|
409
|
+
"⢁",
|
410
|
+
"⢂",
|
411
|
+
"⢃",
|
412
|
+
"⢄",
|
413
|
+
"⢅",
|
414
|
+
"⢆",
|
415
|
+
"⢇",
|
416
|
+
"⣀",
|
417
|
+
"⣁",
|
418
|
+
"⣂",
|
419
|
+
"⣃",
|
420
|
+
"⣄",
|
421
|
+
"⣅",
|
422
|
+
"⣆",
|
423
|
+
"⣇",
|
424
|
+
"⢈",
|
425
|
+
"⢉",
|
426
|
+
"⢊",
|
427
|
+
"⢋",
|
428
|
+
"⢌",
|
429
|
+
"⢍",
|
430
|
+
"⢎",
|
431
|
+
"⢏",
|
432
|
+
"⣈",
|
433
|
+
"⣉",
|
434
|
+
"⣊",
|
435
|
+
"⣋",
|
436
|
+
"⣌",
|
437
|
+
"⣍",
|
438
|
+
"⣎",
|
439
|
+
"⣏",
|
440
|
+
"⢐",
|
441
|
+
"⢑",
|
442
|
+
"⢒",
|
443
|
+
"⢓",
|
444
|
+
"⢔",
|
445
|
+
"⢕",
|
446
|
+
"⢖",
|
447
|
+
"⢗",
|
448
|
+
"⣐",
|
449
|
+
"⣑",
|
450
|
+
"⣒",
|
451
|
+
"⣓",
|
452
|
+
"⣔",
|
453
|
+
"⣕",
|
454
|
+
"⣖",
|
455
|
+
"⣗",
|
456
|
+
"⢘",
|
457
|
+
"⢙",
|
458
|
+
"⢚",
|
459
|
+
"⢛",
|
460
|
+
"⢜",
|
461
|
+
"⢝",
|
462
|
+
"⢞",
|
463
|
+
"⢟",
|
464
|
+
"⣘",
|
465
|
+
"⣙",
|
466
|
+
"⣚",
|
467
|
+
"⣛",
|
468
|
+
"⣜",
|
469
|
+
"⣝",
|
470
|
+
"⣞",
|
471
|
+
"⣟",
|
472
|
+
"⢠",
|
473
|
+
"⢡",
|
474
|
+
"⢢",
|
475
|
+
"⢣",
|
476
|
+
"⢤",
|
477
|
+
"⢥",
|
478
|
+
"⢦",
|
479
|
+
"⢧",
|
480
|
+
"⣠",
|
481
|
+
"⣡",
|
482
|
+
"⣢",
|
483
|
+
"⣣",
|
484
|
+
"⣤",
|
485
|
+
"⣥",
|
486
|
+
"⣦",
|
487
|
+
"⣧",
|
488
|
+
"⢨",
|
489
|
+
"⢩",
|
490
|
+
"⢪",
|
491
|
+
"⢫",
|
492
|
+
"⢬",
|
493
|
+
"⢭",
|
494
|
+
"⢮",
|
495
|
+
"⢯",
|
496
|
+
"⣨",
|
497
|
+
"⣩",
|
498
|
+
"⣪",
|
499
|
+
"⣫",
|
500
|
+
"⣬",
|
501
|
+
"⣭",
|
502
|
+
"⣮",
|
503
|
+
"⣯",
|
504
|
+
"⢰",
|
505
|
+
"⢱",
|
506
|
+
"⢲",
|
507
|
+
"⢳",
|
508
|
+
"⢴",
|
509
|
+
"⢵",
|
510
|
+
"⢶",
|
511
|
+
"⢷",
|
512
|
+
"⣰",
|
513
|
+
"⣱",
|
514
|
+
"⣲",
|
515
|
+
"⣳",
|
516
|
+
"⣴",
|
517
|
+
"⣵",
|
518
|
+
"⣶",
|
519
|
+
"⣷",
|
520
|
+
"⢸",
|
521
|
+
"⢹",
|
522
|
+
"⢺",
|
523
|
+
"⢻",
|
524
|
+
"⢼",
|
525
|
+
"⢽",
|
526
|
+
"⢾",
|
527
|
+
"⢿",
|
528
|
+
"⣸",
|
529
|
+
"⣹",
|
530
|
+
"⣺",
|
531
|
+
"⣻",
|
532
|
+
"⣼",
|
533
|
+
"⣽",
|
534
|
+
"⣾",
|
535
|
+
"⣿"
|
536
|
+
]
|
537
|
+
},
|
277
538
|
"line": {
|
278
539
|
"interval": 130,
|
279
540
|
"frames": [
|
@@ -720,6 +981,7 @@
|
|
720
981
|
"clock": {
|
721
982
|
"interval": 100,
|
722
983
|
"frames": [
|
984
|
+
"🕛 ",
|
723
985
|
"🕐 ",
|
724
986
|
"🕑 ",
|
725
987
|
"🕒 ",
|
@@ -741,6 +1003,103 @@
|
|
741
1003
|
"🌏 "
|
742
1004
|
]
|
743
1005
|
},
|
1006
|
+
"material": {
|
1007
|
+
"interval": 17,
|
1008
|
+
"frames": [
|
1009
|
+
"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
1010
|
+
"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
1011
|
+
"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
1012
|
+
"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
1013
|
+
"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
1014
|
+
"██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
1015
|
+
"███████▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
1016
|
+
"████████▁▁▁▁▁▁▁▁▁▁▁▁",
|
1017
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
1018
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
1019
|
+
"██████████▁▁▁▁▁▁▁▁▁▁",
|
1020
|
+
"███████████▁▁▁▁▁▁▁▁▁",
|
1021
|
+
"█████████████▁▁▁▁▁▁▁",
|
1022
|
+
"██████████████▁▁▁▁▁▁",
|
1023
|
+
"██████████████▁▁▁▁▁▁",
|
1024
|
+
"▁██████████████▁▁▁▁▁",
|
1025
|
+
"▁██████████████▁▁▁▁▁",
|
1026
|
+
"▁██████████████▁▁▁▁▁",
|
1027
|
+
"▁▁██████████████▁▁▁▁",
|
1028
|
+
"▁▁▁██████████████▁▁▁",
|
1029
|
+
"▁▁▁▁█████████████▁▁▁",
|
1030
|
+
"▁▁▁▁██████████████▁▁",
|
1031
|
+
"▁▁▁▁██████████████▁▁",
|
1032
|
+
"▁▁▁▁▁██████████████▁",
|
1033
|
+
"▁▁▁▁▁██████████████▁",
|
1034
|
+
"▁▁▁▁▁██████████████▁",
|
1035
|
+
"▁▁▁▁▁▁██████████████",
|
1036
|
+
"▁▁▁▁▁▁██████████████",
|
1037
|
+
"▁▁▁▁▁▁▁█████████████",
|
1038
|
+
"▁▁▁▁▁▁▁█████████████",
|
1039
|
+
"▁▁▁▁▁▁▁▁████████████",
|
1040
|
+
"▁▁▁▁▁▁▁▁████████████",
|
1041
|
+
"▁▁▁▁▁▁▁▁▁███████████",
|
1042
|
+
"▁▁▁▁▁▁▁▁▁███████████",
|
1043
|
+
"▁▁▁▁▁▁▁▁▁▁██████████",
|
1044
|
+
"▁▁▁▁▁▁▁▁▁▁██████████",
|
1045
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁████████",
|
1046
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
|
1047
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████",
|
1048
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
|
1049
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
|
1050
|
+
"█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
|
1051
|
+
"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
|
1052
|
+
"██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
|
1053
|
+
"███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
|
1054
|
+
"████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
|
1055
|
+
"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
1056
|
+
"█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
1057
|
+
"██████▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
1058
|
+
"████████▁▁▁▁▁▁▁▁▁▁▁▁",
|
1059
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
1060
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
1061
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
1062
|
+
"█████████▁▁▁▁▁▁▁▁▁▁▁",
|
1063
|
+
"███████████▁▁▁▁▁▁▁▁▁",
|
1064
|
+
"████████████▁▁▁▁▁▁▁▁",
|
1065
|
+
"████████████▁▁▁▁▁▁▁▁",
|
1066
|
+
"██████████████▁▁▁▁▁▁",
|
1067
|
+
"██████████████▁▁▁▁▁▁",
|
1068
|
+
"▁██████████████▁▁▁▁▁",
|
1069
|
+
"▁██████████████▁▁▁▁▁",
|
1070
|
+
"▁▁▁█████████████▁▁▁▁",
|
1071
|
+
"▁▁▁▁▁████████████▁▁▁",
|
1072
|
+
"▁▁▁▁▁████████████▁▁▁",
|
1073
|
+
"▁▁▁▁▁▁███████████▁▁▁",
|
1074
|
+
"▁▁▁▁▁▁▁▁█████████▁▁▁",
|
1075
|
+
"▁▁▁▁▁▁▁▁█████████▁▁▁",
|
1076
|
+
"▁▁▁▁▁▁▁▁▁█████████▁▁",
|
1077
|
+
"▁▁▁▁▁▁▁▁▁█████████▁▁",
|
1078
|
+
"▁▁▁▁▁▁▁▁▁▁█████████▁",
|
1079
|
+
"▁▁▁▁▁▁▁▁▁▁▁████████▁",
|
1080
|
+
"▁▁▁▁▁▁▁▁▁▁▁████████▁",
|
1081
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
|
1082
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
|
1083
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
|
1084
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
|
1085
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
|
1086
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
|
1087
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
|
1088
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
|
1089
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
|
1090
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
|
1091
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
|
1092
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
|
1093
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
|
1094
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
1095
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
1096
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
|
1097
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
1098
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
1099
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
|
1100
|
+
"▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"
|
1101
|
+
]
|
1102
|
+
},
|
744
1103
|
"moon": {
|
745
1104
|
"interval": 80,
|
746
1105
|
"frames": [
|
@@ -867,8 +1226,190 @@
|
|
867
1226
|
"christmas": {
|
868
1227
|
"interval": 400,
|
869
1228
|
"frames": [
|
870
|
-
"🌲",
|
1229
|
+
"🌲",
|
871
1230
|
"🎄"
|
872
1231
|
]
|
1232
|
+
},
|
1233
|
+
"grenade": {
|
1234
|
+
"interval": 80,
|
1235
|
+
"frames": [
|
1236
|
+
"، ",
|
1237
|
+
"′ ",
|
1238
|
+
" ´ ",
|
1239
|
+
" ‾ ",
|
1240
|
+
" ⸌",
|
1241
|
+
" ⸊",
|
1242
|
+
" |",
|
1243
|
+
" ⁎",
|
1244
|
+
" ⁕",
|
1245
|
+
" ෴ ",
|
1246
|
+
" ⁓",
|
1247
|
+
" ",
|
1248
|
+
" ",
|
1249
|
+
" "
|
1250
|
+
]
|
1251
|
+
},
|
1252
|
+
"point": {
|
1253
|
+
"interval": 125,
|
1254
|
+
"frames": [
|
1255
|
+
"∙∙∙",
|
1256
|
+
"●∙∙",
|
1257
|
+
"∙●∙",
|
1258
|
+
"∙∙●",
|
1259
|
+
"∙∙∙"
|
1260
|
+
]
|
1261
|
+
},
|
1262
|
+
"layer": {
|
1263
|
+
"interval": 150,
|
1264
|
+
"frames": [
|
1265
|
+
"-",
|
1266
|
+
"=",
|
1267
|
+
"≡"
|
1268
|
+
]
|
1269
|
+
},
|
1270
|
+
"betaWave": {
|
1271
|
+
"interval": 80,
|
1272
|
+
"frames": [
|
1273
|
+
"ρββββββ",
|
1274
|
+
"βρβββββ",
|
1275
|
+
"ββρββββ",
|
1276
|
+
"βββρβββ",
|
1277
|
+
"ββββρββ",
|
1278
|
+
"βββββρβ",
|
1279
|
+
"ββββββρ"
|
1280
|
+
]
|
1281
|
+
},
|
1282
|
+
"fingerDance": {
|
1283
|
+
"interval": 160,
|
1284
|
+
"frames": [
|
1285
|
+
"🤘 ",
|
1286
|
+
"🤟 ",
|
1287
|
+
"🖖 ",
|
1288
|
+
"✋ ",
|
1289
|
+
"🤚 ",
|
1290
|
+
"👆 "
|
1291
|
+
]
|
1292
|
+
},
|
1293
|
+
"fistBump": {
|
1294
|
+
"interval": 80,
|
1295
|
+
"frames": [
|
1296
|
+
"🤜\u3000\u3000\u3000\u3000🤛 ",
|
1297
|
+
"🤜\u3000\u3000\u3000\u3000🤛 ",
|
1298
|
+
"🤜\u3000\u3000\u3000\u3000🤛 ",
|
1299
|
+
"\u3000🤜\u3000\u3000🤛\u3000 ",
|
1300
|
+
"\u3000\u3000🤜🤛\u3000\u3000 ",
|
1301
|
+
"\u3000🤜✨🤛\u3000\u3000 ",
|
1302
|
+
"🤜\u3000✨\u3000🤛\u3000 "
|
1303
|
+
]
|
1304
|
+
},
|
1305
|
+
"soccerHeader": {
|
1306
|
+
"interval": 80,
|
1307
|
+
"frames": [
|
1308
|
+
" 🧑⚽️ 🧑 ",
|
1309
|
+
"🧑 ⚽️ 🧑 ",
|
1310
|
+
"🧑 ⚽️ 🧑 ",
|
1311
|
+
"🧑 ⚽️ 🧑 ",
|
1312
|
+
"🧑 ⚽️ 🧑 ",
|
1313
|
+
"🧑 ⚽️ 🧑 ",
|
1314
|
+
"🧑 ⚽️🧑 ",
|
1315
|
+
"🧑 ⚽️ 🧑 ",
|
1316
|
+
"🧑 ⚽️ 🧑 ",
|
1317
|
+
"🧑 ⚽️ 🧑 ",
|
1318
|
+
"🧑 ⚽️ 🧑 ",
|
1319
|
+
"🧑 ⚽️ 🧑 "
|
1320
|
+
]
|
1321
|
+
},
|
1322
|
+
"mindblown": {
|
1323
|
+
"interval": 160,
|
1324
|
+
"frames": [
|
1325
|
+
"😐 ",
|
1326
|
+
"😐 ",
|
1327
|
+
"😮 ",
|
1328
|
+
"😮 ",
|
1329
|
+
"😦 ",
|
1330
|
+
"😦 ",
|
1331
|
+
"😧 ",
|
1332
|
+
"😧 ",
|
1333
|
+
"🤯 ",
|
1334
|
+
"💥 ",
|
1335
|
+
"✨ ",
|
1336
|
+
"\u3000 ",
|
1337
|
+
"\u3000 ",
|
1338
|
+
"\u3000 "
|
1339
|
+
]
|
1340
|
+
},
|
1341
|
+
"speaker": {
|
1342
|
+
"interval": 160,
|
1343
|
+
"frames": [
|
1344
|
+
"🔈 ",
|
1345
|
+
"🔉 ",
|
1346
|
+
"🔊 ",
|
1347
|
+
"🔉 "
|
1348
|
+
]
|
1349
|
+
},
|
1350
|
+
"orangePulse": {
|
1351
|
+
"interval": 100,
|
1352
|
+
"frames": [
|
1353
|
+
"🔸 ",
|
1354
|
+
"🔶 ",
|
1355
|
+
"🟠 ",
|
1356
|
+
"🟠 ",
|
1357
|
+
"🔶 "
|
1358
|
+
]
|
1359
|
+
},
|
1360
|
+
"bluePulse": {
|
1361
|
+
"interval": 100,
|
1362
|
+
"frames": [
|
1363
|
+
"🔹 ",
|
1364
|
+
"🔷 ",
|
1365
|
+
"🔵 ",
|
1366
|
+
"🔵 ",
|
1367
|
+
"🔷 "
|
1368
|
+
]
|
1369
|
+
},
|
1370
|
+
"orangeBluePulse": {
|
1371
|
+
"interval": 100,
|
1372
|
+
"frames": [
|
1373
|
+
"🔸 ",
|
1374
|
+
"🔶 ",
|
1375
|
+
"🟠 ",
|
1376
|
+
"🟠 ",
|
1377
|
+
"🔶 ",
|
1378
|
+
"🔹 ",
|
1379
|
+
"🔷 ",
|
1380
|
+
"🔵 ",
|
1381
|
+
"🔵 ",
|
1382
|
+
"🔷 "
|
1383
|
+
]
|
1384
|
+
},
|
1385
|
+
"timeTravel": {
|
1386
|
+
"interval": 100,
|
1387
|
+
"frames": [
|
1388
|
+
"🕛 ",
|
1389
|
+
"🕚 ",
|
1390
|
+
"🕙 ",
|
1391
|
+
"🕘 ",
|
1392
|
+
"🕗 ",
|
1393
|
+
"🕖 ",
|
1394
|
+
"🕕 ",
|
1395
|
+
"🕔 ",
|
1396
|
+
"🕓 ",
|
1397
|
+
"🕒 ",
|
1398
|
+
"🕑 ",
|
1399
|
+
"🕐 "
|
1400
|
+
]
|
1401
|
+
},
|
1402
|
+
"aesthetic": {
|
1403
|
+
"interval": 80,
|
1404
|
+
"frames": [
|
1405
|
+
"▰▱▱▱▱▱▱",
|
1406
|
+
"▰▰▱▱▱▱▱",
|
1407
|
+
"▰▰▰▱▱▱▱",
|
1408
|
+
"▰▰▰▰▱▱▱",
|
1409
|
+
"▰▰▰▰▰▱▱",
|
1410
|
+
"▰▰▰▰▰▰▱",
|
1411
|
+
"▰▰▰▰▰▰▰",
|
1412
|
+
"▰▱▱▱▱▱▱"
|
1413
|
+
]
|
873
1414
|
}
|
874
1415
|
}
|
data/lib/whirly/version.rb
CHANGED
data/spec/whirly_spec.rb
CHANGED
@@ -5,11 +5,11 @@ require "paint"
|
|
5
5
|
require "stringio"
|
6
6
|
|
7
7
|
def short_sleep
|
8
|
-
sleep 0.
|
8
|
+
sleep 0.4
|
9
9
|
end
|
10
10
|
|
11
11
|
def medium_sleep
|
12
|
-
sleep 0.
|
12
|
+
sleep 0.7
|
13
13
|
end
|
14
14
|
|
15
15
|
def long_sleep
|
@@ -201,12 +201,12 @@ describe Whirly do
|
|
201
201
|
it "spins more often when interval is lower" do
|
202
202
|
capture1 = StringIO.new
|
203
203
|
Whirly.start(stream: capture1, interval: 100)
|
204
|
-
|
204
|
+
long_sleep
|
205
205
|
Whirly.stop
|
206
206
|
|
207
207
|
capture2 = StringIO.new
|
208
208
|
Whirly.start(stream: capture2, interval: 50)
|
209
|
-
|
209
|
+
long_sleep
|
210
210
|
Whirly.stop
|
211
211
|
|
212
212
|
assert capture1.string.size < capture2.string.size
|
@@ -220,7 +220,7 @@ describe Whirly do
|
|
220
220
|
short_sleep
|
221
221
|
Whirly.stop
|
222
222
|
|
223
|
-
refute /\[38
|
223
|
+
refute /\[38;/ =~ @capture.string
|
224
224
|
end
|
225
225
|
|
226
226
|
it "will use color when :color option is truthy" do
|
@@ -228,7 +228,7 @@ describe Whirly do
|
|
228
228
|
short_sleep
|
229
229
|
Whirly.stop
|
230
230
|
|
231
|
-
assert /\[38
|
231
|
+
assert /\[38;/ =~ @capture.string
|
232
232
|
end
|
233
233
|
|
234
234
|
it "defaults :color to true when the paint gem is available" do
|
@@ -251,7 +251,7 @@ describe Whirly do
|
|
251
251
|
long_sleep
|
252
252
|
Whirly.stop
|
253
253
|
|
254
|
-
colors = @capture.string.scan(/\[38
|
254
|
+
colors = @capture.string.scan(/\[38;.*?m/).flatten
|
255
255
|
assert colors.uniq.size > 1
|
256
256
|
end
|
257
257
|
end
|
data/whirly.gemspec
CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.summary = "Whirly: The friendly terminal spinner"
|
9
9
|
gem.description = "Simple terminal spinner with support for custom spinners. Includes spinners from npm's cli-spinners."
|
10
10
|
gem.authors = ["Jan Lelis"]
|
11
|
-
gem.email = ["
|
11
|
+
gem.email = ["hi@ruby.consulting"]
|
12
12
|
gem.homepage = "https://github.com/janlelis/whirly"
|
13
13
|
gem.license = "MIT"
|
14
14
|
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
21
21
|
gem.require_paths = ["lib"]
|
22
22
|
|
23
|
-
gem.add_dependency "unicode-display_width", "
|
23
|
+
gem.add_dependency "unicode-display_width", ">= 1.1"
|
24
24
|
|
25
|
-
gem.required_ruby_version = "
|
25
|
+
gem.required_ruby_version = ">= 2.0", "< 4.0"
|
26
26
|
end
|
metadata
CHANGED
@@ -1,40 +1,39 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: whirly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: unicode-display_width
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.1'
|
27
27
|
description: Simple terminal spinner with support for custom spinners. Includes spinners
|
28
28
|
from npm's cli-spinners.
|
29
29
|
email:
|
30
|
-
-
|
30
|
+
- hi@ruby.consulting
|
31
31
|
executables: []
|
32
32
|
extensions: []
|
33
33
|
extra_rdoc_files: []
|
34
34
|
files:
|
35
35
|
- ".gitignore"
|
36
36
|
- ".gitmodules"
|
37
|
-
- ".travis.yml"
|
38
37
|
- CHANGELOG.md
|
39
38
|
- CODE_OF_CONDUCT.md
|
40
39
|
- Gemfile
|
@@ -68,17 +67,19 @@ require_paths:
|
|
68
67
|
- lib
|
69
68
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
69
|
requirements:
|
71
|
-
- - "
|
70
|
+
- - ">="
|
72
71
|
- !ruby/object:Gem::Version
|
73
72
|
version: '2.0'
|
73
|
+
- - "<"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '4.0'
|
74
76
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
77
|
requirements:
|
76
78
|
- - ">="
|
77
79
|
- !ruby/object:Gem::Version
|
78
80
|
version: '0'
|
79
81
|
requirements: []
|
80
|
-
|
81
|
-
rubygems_version: 2.6.13
|
82
|
+
rubygems_version: 3.2.3
|
82
83
|
signing_key:
|
83
84
|
specification_version: 4
|
84
85
|
summary: 'Whirly: The friendly terminal spinner'
|
data/.travis.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
language: ruby
|
3
|
-
|
4
|
-
script: bundle exec ruby spec/whirly_spec.rb
|
5
|
-
|
6
|
-
rvm:
|
7
|
-
- 2.4.2
|
8
|
-
- 2.3.4
|
9
|
-
- 2.2
|
10
|
-
- 2.1
|
11
|
-
- 2.0
|
12
|
-
- ruby-head
|
13
|
-
- jruby-head
|
14
|
-
- jruby-9.1.13.0
|
15
|
-
|
16
|
-
cache:
|
17
|
-
- bundler
|
18
|
-
|
19
|
-
matrix:
|
20
|
-
allow_failures:
|
21
|
-
- rvm: jruby-head
|