whirly 0.2.6 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c9838bdc9ac96f84af04b1be93109b09f6dbacd4
4
- data.tar.gz: c54393ab1d36a8c14e1cf0fea85ecdb9b89ea266
2
+ SHA256:
3
+ metadata.gz: c4550be25e66b153ff6f48bf9b8a05cd1982ebdc24130da3268b677519fb793b
4
+ data.tar.gz: ece80ae11e0c1248eecf6a9483d2cebf62f63436f16aa1cd052a5a5ee067ef78
5
5
  SHA512:
6
- metadata.gz: 31c3228e24ecd0a66e6f782f3e35b582912a6354aec7970dbfd908f85ec0f2baffb98c17c5d4ba6cf577d683d27b4f8744e82c9bd95320501cd3c898482cf8cc
7
- data.tar.gz: e399ee01f428080bac062e0537f22fc3c0cad439f0949a27eb4334ce2d53cc8b02bd3fb2445f4c60c6047c1e271d3dd10170f407856d4fc6a868b7cf02be4712
6
+ metadata.gz: 4497156f0b29284aa432a61cacbb5bdf2bf2bb7ea18c4be25414bded074b04c0fc1d2465fc5b0113c47a06f712f42844232544b36d271ea3bc16e4a56a625db3
7
+ data.tar.gz: c3a54bc98525064b463d064bcd59fd43ec4cb32d5c4797359f67fc561bf08d69baae83847b9ea7986122dd5716de708a867d200cb3c9504d820c03a1a00da166
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 0.4.0
4
+
5
+ - Allow Ruby 4.x
6
+ - Add json (default) gem as dependency
7
+ - Update CLI spinners to 3.3.0
8
+
9
+ ### 0.3.0
10
+
11
+ - Allow more recent versions of Ruby and unicode-display_width gem
12
+ - Update CLI spinners to 2.6.0
13
+
3
14
  ### 0.2.6
4
15
 
5
16
  - Update CLI spinners to 1.1.0 (adds "weather" and "christmas")
data/Gemfile CHANGED
@@ -5,4 +5,4 @@ gemspec
5
5
  gem 'minitest'
6
6
  gem 'paint'
7
7
  gem 'rake'
8
- # gem 'irbtools-more', require: 'irbtools/binding'
8
+ gem 'stringio'
data/Gemfile.lock CHANGED
@@ -1,25 +1,45 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- whirly (0.2.6)
5
- unicode-display_width (~> 1.1)
4
+ whirly (0.4.0)
5
+ json
6
+ unicode-display_width (>= 1.1)
6
7
 
7
8
  GEM
8
9
  remote: https://rubygems.org/
9
10
  specs:
10
- minitest (5.8.4)
11
- paint (1.0.1)
12
- rake (12.1.0)
13
- unicode-display_width (1.3.0)
11
+ json (2.8.2)
12
+ minitest (6.0.1)
13
+ prism (~> 1.5)
14
+ paint (2.3.0)
15
+ prism (1.7.0)
16
+ rake (13.3.1)
17
+ stringio (3.2.0)
18
+ unicode-display_width (3.2.0)
19
+ unicode-emoji (~> 4.1)
20
+ unicode-emoji (4.2.0)
14
21
 
15
22
  PLATFORMS
16
23
  ruby
24
+ x86_64-linux
17
25
 
18
26
  DEPENDENCIES
19
27
  minitest
20
28
  paint
21
29
  rake
30
+ stringio
22
31
  whirly!
23
32
 
33
+ CHECKSUMS
34
+ json (2.8.2)
35
+ minitest (6.0.1) sha256=7854c74f48e2e975969062833adc4013f249a4b212f5e7b9d5c040bf838d54bb
36
+ paint (2.3.0) sha256=327d623e4038619d5bd99ae5db07973859cd78400c7f0329eea283cef8e83be5
37
+ prism (1.7.0) sha256=10062f734bf7985c8424c44fac382ac04a58124ea3d220ec3ba9fe4f2da65103
38
+ rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c
39
+ stringio (3.2.0)
40
+ unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
41
+ unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
42
+ whirly (0.4.0)
43
+
24
44
  BUNDLED WITH
25
- 1.14.6
45
+ 4.0.3
data/MIT-LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2016 Jan Lelis, mail@janlelis.de
1
+ Copyright (c) 2016 Jan Lelis, https://janlelis.com
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
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.svg)](https://travis-ci.org/janlelis/whirly)
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/master/screenshot.gif)
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/master/examples) for example scripts.
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/master/data/whirly-static-spinners.json), [`lib/whirly/spinners/whirly.rb`](https://github.com/janlelis/whirly/blob/master/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/master/examples/all_spinners.rb) script.
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-2.3.1/IO.html)-like object, if you want to display *Whirly* on an other stream than `$stdout`.
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-2.3.1/Array.html) or [Enumerable](https://ruby-doc.org/core-2.3.1/Enumerable.html) of strings that will be used as the spinner icon.
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-2.3.1/Enumerable.html), all other frame modes require the object to be representable as an [Array](https://ruby-doc.org/core-2.3.1/Array.html).
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 substantly)
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 <http://janlelis.com>. Released under the MIT license.
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
@@ -35,7 +35,7 @@ end
35
35
 
36
36
  desc "#{gemspec.name} | Spec"
37
37
  task :spec do
38
- sh "for file in spec/*.rb; do ruby $file; done"
38
+ ruby "spec/whirly_spec.rb"
39
39
  end
40
40
  task default: :spec
41
41
 
@@ -274,6 +274,350 @@
274
274
  "⠀⡀"
275
275
  ]
276
276
  },
277
+ "dots13": {
278
+ "interval": 80,
279
+ "frames": [
280
+ "⣼",
281
+ "⣹",
282
+ "⢻",
283
+ "⠿",
284
+ "⡟",
285
+ "⣏",
286
+ "⣧",
287
+ "⣶"
288
+ ]
289
+ },
290
+ "dots14": {
291
+ "interval": 80,
292
+ "frames": [
293
+ "⠉⠉",
294
+ "⠈⠙",
295
+ "⠀⠹",
296
+ "⠀⢸",
297
+ "⠀⣰",
298
+ "⢀⣠",
299
+ "⣀⣀",
300
+ "⣄⡀",
301
+ "⣆⠀",
302
+ "⡇⠀",
303
+ "⠏⠀",
304
+ "⠋⠁"
305
+ ]
306
+ },
307
+ "dots8Bit": {
308
+ "interval": 80,
309
+ "frames": [
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
+ "⢳",
538
+ "⢴",
539
+ "⢵",
540
+ "⢶",
541
+ "⢷",
542
+ "⣰",
543
+ "⣱",
544
+ "⣲",
545
+ "⣳",
546
+ "⣴",
547
+ "⣵",
548
+ "⣶",
549
+ "⣷",
550
+ "⢸",
551
+ "⢹",
552
+ "⢺",
553
+ "⢻",
554
+ "⢼",
555
+ "⢽",
556
+ "⢾",
557
+ "⢿",
558
+ "⣸",
559
+ "⣹",
560
+ "⣺",
561
+ "⣻",
562
+ "⣼",
563
+ "⣽",
564
+ "⣾",
565
+ "⣿"
566
+ ]
567
+ },
568
+ "dotsCircle": {
569
+ "interval": 80,
570
+ "frames": [
571
+ "⢎ ",
572
+ "⠎⠁",
573
+ "⠊⠑",
574
+ "⠈⠱",
575
+ " ⡱",
576
+ "⢀⡰",
577
+ "⢄⡠",
578
+ "⢆⡀"
579
+ ]
580
+ },
581
+ "sand": {
582
+ "interval": 80,
583
+ "frames": [
584
+ "⠁",
585
+ "⠂",
586
+ "⠄",
587
+ "⡀",
588
+ "⡈",
589
+ "⡐",
590
+ "⡠",
591
+ "⣀",
592
+ "⣁",
593
+ "⣂",
594
+ "⣄",
595
+ "⣌",
596
+ "⣔",
597
+ "⣤",
598
+ "⣥",
599
+ "⣦",
600
+ "⣮",
601
+ "⣶",
602
+ "⣷",
603
+ "⣿",
604
+ "⡿",
605
+ "⠿",
606
+ "⢟",
607
+ "⠟",
608
+ "⡛",
609
+ "⠛",
610
+ "⠫",
611
+ "⢋",
612
+ "⠋",
613
+ "⠍",
614
+ "⡉",
615
+ "⠉",
616
+ "⠑",
617
+ "⠡",
618
+ "⢁"
619
+ ]
620
+ },
277
621
  "line": {
278
622
  "interval": 130,
279
623
  "frames": [
@@ -294,6 +638,19 @@
294
638
  "-"
295
639
  ]
296
640
  },
641
+ "rollingLine": {
642
+ "interval": 80,
643
+ "frames": [
644
+ "/ ",
645
+ " - ",
646
+ " \\ ",
647
+ " |",
648
+ " |",
649
+ " \\ ",
650
+ " - ",
651
+ "/ "
652
+ ]
653
+ },
297
654
  "pipe": {
298
655
  "interval": 100,
299
656
  "frames": [
@@ -471,6 +828,21 @@
471
828
  "◥"
472
829
  ]
473
830
  },
831
+ "binary": {
832
+ "interval": 80,
833
+ "frames": [
834
+ "010010",
835
+ "001100",
836
+ "100101",
837
+ "111010",
838
+ "111101",
839
+ "010111",
840
+ "101011",
841
+ "111000",
842
+ "110011",
843
+ "110101"
844
+ ]
845
+ },
474
846
  "arc": {
475
847
  "interval": 100,
476
848
  "frames": [
@@ -663,6 +1035,7 @@
663
1035
  "[= ]",
664
1036
  "[== ]",
665
1037
  "[=== ]",
1038
+ "[====]",
666
1039
  "[ ===]",
667
1040
  "[ ==]",
668
1041
  "[ =]",
@@ -714,12 +1087,13 @@
714
1087
  "💙 ",
715
1088
  "💜 ",
716
1089
  "💚 ",
717
- "❤️ "
1090
+ "💗 "
718
1091
  ]
719
1092
  },
720
1093
  "clock": {
721
1094
  "interval": 100,
722
1095
  "frames": [
1096
+ "🕛 ",
723
1097
  "🕐 ",
724
1098
  "🕑 ",
725
1099
  "🕒 ",
@@ -741,6 +1115,103 @@
741
1115
  "🌏 "
742
1116
  ]
743
1117
  },
1118
+ "material": {
1119
+ "interval": 17,
1120
+ "frames": [
1121
+ "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1122
+ "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1123
+ "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1124
+ "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1125
+ "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1126
+ "██████▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1127
+ "███████▁▁▁▁▁▁▁▁▁▁▁▁▁",
1128
+ "████████▁▁▁▁▁▁▁▁▁▁▁▁",
1129
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
1130
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
1131
+ "██████████▁▁▁▁▁▁▁▁▁▁",
1132
+ "███████████▁▁▁▁▁▁▁▁▁",
1133
+ "█████████████▁▁▁▁▁▁▁",
1134
+ "██████████████▁▁▁▁▁▁",
1135
+ "██████████████▁▁▁▁▁▁",
1136
+ "▁██████████████▁▁▁▁▁",
1137
+ "▁██████████████▁▁▁▁▁",
1138
+ "▁██████████████▁▁▁▁▁",
1139
+ "▁▁██████████████▁▁▁▁",
1140
+ "▁▁▁██████████████▁▁▁",
1141
+ "▁▁▁▁█████████████▁▁▁",
1142
+ "▁▁▁▁██████████████▁▁",
1143
+ "▁▁▁▁██████████████▁▁",
1144
+ "▁▁▁▁▁██████████████▁",
1145
+ "▁▁▁▁▁██████████████▁",
1146
+ "▁▁▁▁▁██████████████▁",
1147
+ "▁▁▁▁▁▁██████████████",
1148
+ "▁▁▁▁▁▁██████████████",
1149
+ "▁▁▁▁▁▁▁█████████████",
1150
+ "▁▁▁▁▁▁▁█████████████",
1151
+ "▁▁▁▁▁▁▁▁████████████",
1152
+ "▁▁▁▁▁▁▁▁████████████",
1153
+ "▁▁▁▁▁▁▁▁▁███████████",
1154
+ "▁▁▁▁▁▁▁▁▁███████████",
1155
+ "▁▁▁▁▁▁▁▁▁▁██████████",
1156
+ "▁▁▁▁▁▁▁▁▁▁██████████",
1157
+ "▁▁▁▁▁▁▁▁▁▁▁▁████████",
1158
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
1159
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁██████",
1160
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
1161
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
1162
+ "█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
1163
+ "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
1164
+ "██▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
1165
+ "███▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
1166
+ "████▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
1167
+ "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
1168
+ "█████▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
1169
+ "██████▁▁▁▁▁▁▁▁▁▁▁▁▁█",
1170
+ "████████▁▁▁▁▁▁▁▁▁▁▁▁",
1171
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
1172
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
1173
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
1174
+ "█████████▁▁▁▁▁▁▁▁▁▁▁",
1175
+ "███████████▁▁▁▁▁▁▁▁▁",
1176
+ "████████████▁▁▁▁▁▁▁▁",
1177
+ "████████████▁▁▁▁▁▁▁▁",
1178
+ "██████████████▁▁▁▁▁▁",
1179
+ "██████████████▁▁▁▁▁▁",
1180
+ "▁██████████████▁▁▁▁▁",
1181
+ "▁██████████████▁▁▁▁▁",
1182
+ "▁▁▁█████████████▁▁▁▁",
1183
+ "▁▁▁▁▁████████████▁▁▁",
1184
+ "▁▁▁▁▁████████████▁▁▁",
1185
+ "▁▁▁▁▁▁███████████▁▁▁",
1186
+ "▁▁▁▁▁▁▁▁█████████▁▁▁",
1187
+ "▁▁▁▁▁▁▁▁█████████▁▁▁",
1188
+ "▁▁▁▁▁▁▁▁▁█████████▁▁",
1189
+ "▁▁▁▁▁▁▁▁▁█████████▁▁",
1190
+ "▁▁▁▁▁▁▁▁▁▁█████████▁",
1191
+ "▁▁▁▁▁▁▁▁▁▁▁████████▁",
1192
+ "▁▁▁▁▁▁▁▁▁▁▁████████▁",
1193
+ "▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
1194
+ "▁▁▁▁▁▁▁▁▁▁▁▁███████▁",
1195
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
1196
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁███████",
1197
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█████",
1198
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
1199
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
1200
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁████",
1201
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
1202
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁███",
1203
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
1204
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
1205
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁██",
1206
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
1207
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
1208
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█",
1209
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1210
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1211
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁",
1212
+ "▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁"
1213
+ ]
1214
+ },
744
1215
  "moon": {
745
1216
  "interval": 80,
746
1217
  "frames": [
@@ -867,8 +1338,328 @@
867
1338
  "christmas": {
868
1339
  "interval": 400,
869
1340
  "frames": [
870
- "🌲",
1341
+ "🌲",
871
1342
  "🎄"
872
1343
  ]
1344
+ },
1345
+ "grenade": {
1346
+ "interval": 80,
1347
+ "frames": [
1348
+ "، ",
1349
+ "′ ",
1350
+ " ´ ",
1351
+ " ‾ ",
1352
+ " ⸌",
1353
+ " ⸊",
1354
+ " |",
1355
+ " ⁎",
1356
+ " ⁕",
1357
+ " ෴ ",
1358
+ " ⁓",
1359
+ " ",
1360
+ " ",
1361
+ " "
1362
+ ]
1363
+ },
1364
+ "point": {
1365
+ "interval": 125,
1366
+ "frames": [
1367
+ "∙∙∙",
1368
+ "●∙∙",
1369
+ "∙●∙",
1370
+ "∙∙●",
1371
+ "∙∙∙"
1372
+ ]
1373
+ },
1374
+ "layer": {
1375
+ "interval": 150,
1376
+ "frames": [
1377
+ "-",
1378
+ "=",
1379
+ "≡"
1380
+ ]
1381
+ },
1382
+ "betaWave": {
1383
+ "interval": 80,
1384
+ "frames": [
1385
+ "ρββββββ",
1386
+ "βρβββββ",
1387
+ "ββρββββ",
1388
+ "βββρβββ",
1389
+ "ββββρββ",
1390
+ "βββββρβ",
1391
+ "ββββββρ"
1392
+ ]
1393
+ },
1394
+ "fingerDance": {
1395
+ "interval": 160,
1396
+ "frames": [
1397
+ "🤘 ",
1398
+ "🤟 ",
1399
+ "🖖 ",
1400
+ "✋ ",
1401
+ "🤚 ",
1402
+ "👆 "
1403
+ ]
1404
+ },
1405
+ "fistBump": {
1406
+ "interval": 80,
1407
+ "frames": [
1408
+ "🤜\u3000\u3000\u3000\u3000🤛 ",
1409
+ "🤜\u3000\u3000\u3000\u3000🤛 ",
1410
+ "🤜\u3000\u3000\u3000\u3000🤛 ",
1411
+ "\u3000🤜\u3000\u3000🤛\u3000 ",
1412
+ "\u3000\u3000🤜🤛\u3000\u3000 ",
1413
+ "\u3000🤜✨🤛\u3000\u3000 ",
1414
+ "🤜\u3000✨\u3000🤛\u3000 "
1415
+ ]
1416
+ },
1417
+ "soccerHeader": {
1418
+ "interval": 80,
1419
+ "frames": [
1420
+ " 🧑⚽️ 🧑 ",
1421
+ "🧑 ⚽️ 🧑 ",
1422
+ "🧑 ⚽️ 🧑 ",
1423
+ "🧑 ⚽️ 🧑 ",
1424
+ "🧑 ⚽️ 🧑 ",
1425
+ "🧑 ⚽️ 🧑 ",
1426
+ "🧑 ⚽️🧑 ",
1427
+ "🧑 ⚽️ 🧑 ",
1428
+ "🧑 ⚽️ 🧑 ",
1429
+ "🧑 ⚽️ 🧑 ",
1430
+ "🧑 ⚽️ 🧑 ",
1431
+ "🧑 ⚽️ 🧑 "
1432
+ ]
1433
+ },
1434
+ "mindblown": {
1435
+ "interval": 160,
1436
+ "frames": [
1437
+ "😐 ",
1438
+ "😐 ",
1439
+ "😮 ",
1440
+ "😮 ",
1441
+ "😦 ",
1442
+ "😦 ",
1443
+ "😧 ",
1444
+ "😧 ",
1445
+ "🤯 ",
1446
+ "💥 ",
1447
+ "✨ ",
1448
+ "\u3000 ",
1449
+ "\u3000 ",
1450
+ "\u3000 "
1451
+ ]
1452
+ },
1453
+ "speaker": {
1454
+ "interval": 160,
1455
+ "frames": [
1456
+ "🔈 ",
1457
+ "🔉 ",
1458
+ "🔊 ",
1459
+ "🔉 "
1460
+ ]
1461
+ },
1462
+ "orangePulse": {
1463
+ "interval": 100,
1464
+ "frames": [
1465
+ "🔸 ",
1466
+ "🔶 ",
1467
+ "🟠 ",
1468
+ "🟠 ",
1469
+ "🔶 "
1470
+ ]
1471
+ },
1472
+ "bluePulse": {
1473
+ "interval": 100,
1474
+ "frames": [
1475
+ "🔹 ",
1476
+ "🔷 ",
1477
+ "🔵 ",
1478
+ "🔵 ",
1479
+ "🔷 "
1480
+ ]
1481
+ },
1482
+ "orangeBluePulse": {
1483
+ "interval": 100,
1484
+ "frames": [
1485
+ "🔸 ",
1486
+ "🔶 ",
1487
+ "🟠 ",
1488
+ "🟠 ",
1489
+ "🔶 ",
1490
+ "🔹 ",
1491
+ "🔷 ",
1492
+ "🔵 ",
1493
+ "🔵 ",
1494
+ "🔷 "
1495
+ ]
1496
+ },
1497
+ "timeTravel": {
1498
+ "interval": 100,
1499
+ "frames": [
1500
+ "🕛 ",
1501
+ "🕚 ",
1502
+ "🕙 ",
1503
+ "🕘 ",
1504
+ "🕗 ",
1505
+ "🕖 ",
1506
+ "🕕 ",
1507
+ "🕔 ",
1508
+ "🕓 ",
1509
+ "🕒 ",
1510
+ "🕑 ",
1511
+ "🕐 "
1512
+ ]
1513
+ },
1514
+ "aesthetic": {
1515
+ "interval": 80,
1516
+ "frames": [
1517
+ "▰▱▱▱▱▱▱",
1518
+ "▰▰▱▱▱▱▱",
1519
+ "▰▰▰▱▱▱▱",
1520
+ "▰▰▰▰▱▱▱",
1521
+ "▰▰▰▰▰▱▱",
1522
+ "▰▰▰▰▰▰▱",
1523
+ "▰▰▰▰▰▰▰",
1524
+ "▰▱▱▱▱▱▱"
1525
+ ]
1526
+ },
1527
+ "dwarfFortress": {
1528
+ "interval": 80,
1529
+ "frames": [
1530
+ " ██████£££ ",
1531
+ "☺██████£££ ",
1532
+ "☺██████£££ ",
1533
+ "☺▓█████£££ ",
1534
+ "☺▓█████£££ ",
1535
+ "☺▒█████£££ ",
1536
+ "☺▒█████£££ ",
1537
+ "☺░█████£££ ",
1538
+ "☺░█████£££ ",
1539
+ "☺ █████£££ ",
1540
+ " ☺█████£££ ",
1541
+ " ☺█████£££ ",
1542
+ " ☺▓████£££ ",
1543
+ " ☺▓████£££ ",
1544
+ " ☺▒████£££ ",
1545
+ " ☺▒████£££ ",
1546
+ " ☺░████£££ ",
1547
+ " ☺░████£££ ",
1548
+ " ☺ ████£££ ",
1549
+ " ☺████£££ ",
1550
+ " ☺████£££ ",
1551
+ " ☺▓███£££ ",
1552
+ " ☺▓███£££ ",
1553
+ " ☺▒███£££ ",
1554
+ " ☺▒███£££ ",
1555
+ " ☺░███£££ ",
1556
+ " ☺░███£££ ",
1557
+ " ☺ ███£££ ",
1558
+ " ☺███£££ ",
1559
+ " ☺███£££ ",
1560
+ " ☺▓██£££ ",
1561
+ " ☺▓██£££ ",
1562
+ " ☺▒██£££ ",
1563
+ " ☺▒██£££ ",
1564
+ " ☺░██£££ ",
1565
+ " ☺░██£££ ",
1566
+ " ☺ ██£££ ",
1567
+ " ☺██£££ ",
1568
+ " ☺██£££ ",
1569
+ " ☺▓█£££ ",
1570
+ " ☺▓█£££ ",
1571
+ " ☺▒█£££ ",
1572
+ " ☺▒█£££ ",
1573
+ " ☺░█£££ ",
1574
+ " ☺░█£££ ",
1575
+ " ☺ █£££ ",
1576
+ " ☺█£££ ",
1577
+ " ☺█£££ ",
1578
+ " ☺▓£££ ",
1579
+ " ☺▓£££ ",
1580
+ " ☺▒£££ ",
1581
+ " ☺▒£££ ",
1582
+ " ☺░£££ ",
1583
+ " ☺░£££ ",
1584
+ " ☺ £££ ",
1585
+ " ☺£££ ",
1586
+ " ☺£££ ",
1587
+ " ☺▓££ ",
1588
+ " ☺▓££ ",
1589
+ " ☺▒££ ",
1590
+ " ☺▒££ ",
1591
+ " ☺░££ ",
1592
+ " ☺░££ ",
1593
+ " ☺ ££ ",
1594
+ " ☺££ ",
1595
+ " ☺££ ",
1596
+ " ☺▓£ ",
1597
+ " ☺▓£ ",
1598
+ " ☺▒£ ",
1599
+ " ☺▒£ ",
1600
+ " ☺░£ ",
1601
+ " ☺░£ ",
1602
+ " ☺ £ ",
1603
+ " ☺£ ",
1604
+ " ☺£ ",
1605
+ " ☺▓ ",
1606
+ " ☺▓ ",
1607
+ " ☺▒ ",
1608
+ " ☺▒ ",
1609
+ " ☺░ ",
1610
+ " ☺░ ",
1611
+ " ☺ ",
1612
+ " ☺ &",
1613
+ " ☺ ☼&",
1614
+ " ☺ ☼ &",
1615
+ " ☺☼ &",
1616
+ " ☺☼ & ",
1617
+ " ‼ & ",
1618
+ " ☺ & ",
1619
+ " ‼ & ",
1620
+ " ☺ & ",
1621
+ " ‼ & ",
1622
+ " ☺ & ",
1623
+ "‼ & ",
1624
+ " & ",
1625
+ " & ",
1626
+ " & ░ ",
1627
+ " & ▒ ",
1628
+ " & ▓ ",
1629
+ " & £ ",
1630
+ " & ░£ ",
1631
+ " & ▒£ ",
1632
+ " & ▓£ ",
1633
+ " & ££ ",
1634
+ " & ░££ ",
1635
+ " & ▒££ ",
1636
+ "& ▓££ ",
1637
+ "& £££ ",
1638
+ " ░£££ ",
1639
+ " ▒£££ ",
1640
+ " ▓£££ ",
1641
+ " █£££ ",
1642
+ " ░█£££ ",
1643
+ " ▒█£££ ",
1644
+ " ▓█£££ ",
1645
+ " ██£££ ",
1646
+ " ░██£££ ",
1647
+ " ▒██£££ ",
1648
+ " ▓██£££ ",
1649
+ " ███£££ ",
1650
+ " ░███£££ ",
1651
+ " ▒███£££ ",
1652
+ " ▓███£££ ",
1653
+ " ████£££ ",
1654
+ " ░████£££ ",
1655
+ " ▒████£££ ",
1656
+ " ▓████£££ ",
1657
+ " █████£££ ",
1658
+ " ░█████£££ ",
1659
+ " ▒█████£££ ",
1660
+ " ▓█████£££ ",
1661
+ " ██████£££ ",
1662
+ " ██████£££ "
1663
+ ]
873
1664
  }
874
1665
  }
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Whirly
2
- VERSION = "0.2.6".freeze
4
+ VERSION = "0.4.0"
3
5
  end
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.2
8
+ sleep 0.4
9
9
  end
10
10
 
11
11
  def medium_sleep
12
- sleep 0.6
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
- medium_sleep
204
+ long_sleep
205
205
  Whirly.stop
206
206
 
207
207
  capture2 = StringIO.new
208
208
  Whirly.start(stream: capture2, interval: 50)
209
- medium_sleep
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;5;/ =~ @capture.string
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;5;/ =~ @capture.string
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;5;(\d+)m/).flatten
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 = ["mail@janlelis.de"]
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,8 @@ 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", "~> 1.1"
23
+ gem.add_dependency "unicode-display_width", ">= 1.1"
24
+ gem.add_dependency "json"
24
25
 
25
- gem.required_ruby_version = "~> 2.0"
26
+ gem.required_ruby_version = ">= 2.0", "< 5.0"
26
27
  end
metadata CHANGED
@@ -1,40 +1,53 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whirly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.6
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-01 00:00:00.000000000 Z
11
+ date: 2025-12-27 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
+ - !ruby/object:Gem::Dependency
28
+ name: json
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  description: Simple terminal spinner with support for custom spinners. Includes spinners
28
42
  from npm's cli-spinners.
29
43
  email:
30
- - mail@janlelis.de
44
+ - hi@ruby.consulting
31
45
  executables: []
32
46
  extensions: []
33
47
  extra_rdoc_files: []
34
48
  files:
35
49
  - ".gitignore"
36
50
  - ".gitmodules"
37
- - ".travis.yml"
38
51
  - CHANGELOG.md
39
52
  - CODE_OF_CONDUCT.md
40
53
  - Gemfile
@@ -62,24 +75,26 @@ homepage: https://github.com/janlelis/whirly
62
75
  licenses:
63
76
  - MIT
64
77
  metadata: {}
65
- post_install_message:
78
+ post_install_message:
66
79
  rdoc_options: []
67
80
  require_paths:
68
81
  - lib
69
82
  required_ruby_version: !ruby/object:Gem::Requirement
70
83
  requirements:
71
- - - "~>"
84
+ - - ">="
72
85
  - !ruby/object:Gem::Version
73
86
  version: '2.0'
87
+ - - "<"
88
+ - !ruby/object:Gem::Version
89
+ version: '5.0'
74
90
  required_rubygems_version: !ruby/object:Gem::Requirement
75
91
  requirements:
76
92
  - - ">="
77
93
  - !ruby/object:Gem::Version
78
94
  version: '0'
79
95
  requirements: []
80
- rubyforge_project:
81
- rubygems_version: 2.6.13
82
- signing_key:
96
+ rubygems_version: 3.5.21
97
+ signing_key:
83
98
  specification_version: 4
84
99
  summary: 'Whirly: The friendly terminal spinner'
85
100
  test_files:
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