tty-spinner 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -3
  3. data/lib/tty/spinner/version.rb +1 -1
  4. metadata +16 -102
  5. data/Rakefile +0 -8
  6. data/examples/auto_spin.rb +0 -8
  7. data/examples/basic.rb +0 -8
  8. data/examples/clear.rb +0 -9
  9. data/examples/color.rb +0 -12
  10. data/examples/error.rb +0 -9
  11. data/examples/formats.rb +0 -11
  12. data/examples/hide_cursor.rb +0 -12
  13. data/examples/multi/basic.rb +0 -13
  14. data/examples/multi/basic_top_level.rb +0 -13
  15. data/examples/multi/custom_style.rb +0 -26
  16. data/examples/multi/files.rb +0 -14
  17. data/examples/multi/jobs.rb +0 -10
  18. data/examples/multi/multi.rb +0 -17
  19. data/examples/multi/multi_top_level.rb +0 -18
  20. data/examples/multi/pause.rb +0 -26
  21. data/examples/multi/threaded.rb +0 -30
  22. data/examples/pause.rb +0 -19
  23. data/examples/run.rb +0 -18
  24. data/examples/success.rb +0 -9
  25. data/examples/threaded.rb +0 -11
  26. data/examples/update.rb +0 -11
  27. data/spec/spec_helper.rb +0 -51
  28. data/spec/unit/auto_spin_spec.rb +0 -27
  29. data/spec/unit/clear_spec.rb +0 -18
  30. data/spec/unit/error_spec.rb +0 -46
  31. data/spec/unit/events_spec.rb +0 -37
  32. data/spec/unit/formats_spec.rb +0 -9
  33. data/spec/unit/frames_spec.rb +0 -33
  34. data/spec/unit/hide_cursor_spec.rb +0 -53
  35. data/spec/unit/job_spec.rb +0 -14
  36. data/spec/unit/join_spec.rb +0 -12
  37. data/spec/unit/multi/auto_spin_spec.rb +0 -34
  38. data/spec/unit/multi/error_spec.rb +0 -109
  39. data/spec/unit/multi/line_inset_spec.rb +0 -59
  40. data/spec/unit/multi/on_spec.rb +0 -13
  41. data/spec/unit/multi/register_spec.rb +0 -47
  42. data/spec/unit/multi/spin_spec.rb +0 -103
  43. data/spec/unit/multi/stop_spec.rb +0 -97
  44. data/spec/unit/multi/success_spec.rb +0 -110
  45. data/spec/unit/new_spec.rb +0 -26
  46. data/spec/unit/pause_spec.rb +0 -25
  47. data/spec/unit/reset_spec.rb +0 -21
  48. data/spec/unit/run_spec.rb +0 -32
  49. data/spec/unit/spin_spec.rb +0 -119
  50. data/spec/unit/stop_spec.rb +0 -64
  51. data/spec/unit/success_spec.rb +0 -46
  52. data/spec/unit/update_spec.rb +0 -87
  53. data/tasks/console.rake +0 -11
  54. data/tasks/coverage.rake +0 -11
  55. data/tasks/spec.rake +0 -29
  56. data/tty-spinner.gemspec +0 -27
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 96bd3cd66e3292a4a49e7f51dc0ddf56d06c10427a0de936bd0a963cbe66a68b
4
- data.tar.gz: 5c4516265bcdce18a77c920b1311c702e16f99efc367e79e44d50ca816103027
3
+ metadata.gz: f67db708fa528fc2f9466f0f3ffad5c243f571e8cd75c91307ffb7e9f38fd37d
4
+ data.tar.gz: 8524d2c3973e18ef49c1371fc6bd43ce54ccbeaadbeb93268b5d3107eae625da
5
5
  SHA512:
6
- metadata.gz: fcdeb174e4e46b9479c896086ee16372549e902dd16ca841ce7eb9c388034e954bf676f4af121e33fc2665b8e4c351856d34776d89d8be112593d0f7c9190b15
7
- data.tar.gz: e990455d5be05a01f933d7bb6572cb28e00e4c65cccdf8af622b0f7c6edd2356c007b7c49f7a0d7bc4265ff9cca9f0599fb69449415eef03edf73559a4d80dc0
6
+ metadata.gz: abff2b7c8bdb9b524fe667d4b5baef8506bcfd17a1e80031a10313e2dbfd10ba9e5cf69b72eae01a8de31970d4a1cf5a2de456fb779fe723a9b5b326f62e8146
7
+ data.tar.gz: cfc1167501830593b9b65e4c5ef49852ebb1d5aaafcb4656d048dedd4d9a911e380b3e1ee5562c098819f4e36693dcfee940c74443291df3affc4cd9cc37d711
@@ -1,5 +1,10 @@
1
1
  # Change log
2
2
 
3
+ ## [v0.9.3] - 2020-01-28
4
+
5
+ ### Changed
6
+ * Change gemspec to add metadata, remove test artefacts and load version directly
7
+
3
8
  ## [v0.9.2] - 2019-12-08
4
9
 
5
10
  ### Fixed
@@ -52,8 +57,8 @@
52
57
  ## [v0.6.0] - 2017-09-07
53
58
 
54
59
  ### Changed
55
- * Change TTY::Spinner::Multi to render registerd spinners at row
56
- position at point of redering and not registration
60
+ * Change TTY::Spinner::Multi to render registered spinners at row
61
+ position at point of rendering and not registration
57
62
 
58
63
  ### Fixed
59
64
  * Fix handling of multi spinner events
@@ -113,12 +118,13 @@
113
118
 
114
119
  ### Changed
115
120
  * Change message formatting, use :spinner token to customize message
116
- * Change format for definining spinner formats and intervals
121
+ * Change format for defining spinner formats and intervals
117
122
 
118
123
  ## [v0.1.0] - 2014-11-15
119
124
 
120
125
  * Initial implementation and release
121
126
 
127
+ [v0.9.3]: https://github.com/piotrmurach/tty-spinner/compare/v0.9.2...v0.9.3
122
128
  [v0.9.2]: https://github.com/piotrmurach/tty-spinner/compare/v0.9.1...v0.9.2
123
129
  [v0.9.1]: https://github.com/piotrmurach/tty-spinner/compare/v0.9.0...v0.9.1
124
130
  [v0.9.0]: https://github.com/piotrmurach/tty-spinner/compare/v0.8.0...v0.9.0
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TTY
4
4
  class Spinner
5
- VERSION = "0.9.2"
5
+ VERSION = "0.9.3"
6
6
  end # Spinner
7
7
  end # TTY
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tty-spinner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
8
  autorequire:
9
- bindir: bin
9
+ bindir: exe
10
10
  cert_chain: []
11
- date: 2019-12-08 00:00:00.000000000 Z
11
+ date: 2020-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tty-cursor
@@ -24,119 +24,33 @@ dependencies:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.7'
27
- - !ruby/object:Gem::Dependency
28
- name: bundler
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 1.5.0
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: 1.5.0
41
- - !ruby/object:Gem::Dependency
42
- name: rspec
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: '3.1'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: '3.1'
55
- - !ruby/object:Gem::Dependency
56
- name: rake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
27
  description: A terminal spinner for tasks that have non-deterministic time frame.
70
28
  email:
71
- - pmurach@gmail.com
29
+ - piotr@piotrmurach.com
72
30
  executables: []
73
31
  extensions: []
74
- extra_rdoc_files: []
32
+ extra_rdoc_files:
33
+ - README.md
34
+ - CHANGELOG.md
75
35
  files:
76
36
  - CHANGELOG.md
77
37
  - LICENSE.txt
78
38
  - README.md
79
- - Rakefile
80
- - examples/auto_spin.rb
81
- - examples/basic.rb
82
- - examples/clear.rb
83
- - examples/color.rb
84
- - examples/error.rb
85
- - examples/formats.rb
86
- - examples/hide_cursor.rb
87
- - examples/multi/basic.rb
88
- - examples/multi/basic_top_level.rb
89
- - examples/multi/custom_style.rb
90
- - examples/multi/files.rb
91
- - examples/multi/jobs.rb
92
- - examples/multi/multi.rb
93
- - examples/multi/multi_top_level.rb
94
- - examples/multi/pause.rb
95
- - examples/multi/threaded.rb
96
- - examples/pause.rb
97
- - examples/run.rb
98
- - examples/success.rb
99
- - examples/threaded.rb
100
- - examples/update.rb
101
39
  - lib/tty-spinner.rb
102
40
  - lib/tty/spinner.rb
103
41
  - lib/tty/spinner/formats.rb
104
42
  - lib/tty/spinner/multi.rb
105
43
  - lib/tty/spinner/version.rb
106
- - spec/spec_helper.rb
107
- - spec/unit/auto_spin_spec.rb
108
- - spec/unit/clear_spec.rb
109
- - spec/unit/error_spec.rb
110
- - spec/unit/events_spec.rb
111
- - spec/unit/formats_spec.rb
112
- - spec/unit/frames_spec.rb
113
- - spec/unit/hide_cursor_spec.rb
114
- - spec/unit/job_spec.rb
115
- - spec/unit/join_spec.rb
116
- - spec/unit/multi/auto_spin_spec.rb
117
- - spec/unit/multi/error_spec.rb
118
- - spec/unit/multi/line_inset_spec.rb
119
- - spec/unit/multi/on_spec.rb
120
- - spec/unit/multi/register_spec.rb
121
- - spec/unit/multi/spin_spec.rb
122
- - spec/unit/multi/stop_spec.rb
123
- - spec/unit/multi/success_spec.rb
124
- - spec/unit/new_spec.rb
125
- - spec/unit/pause_spec.rb
126
- - spec/unit/reset_spec.rb
127
- - spec/unit/run_spec.rb
128
- - spec/unit/spin_spec.rb
129
- - spec/unit/stop_spec.rb
130
- - spec/unit/success_spec.rb
131
- - spec/unit/update_spec.rb
132
- - tasks/console.rake
133
- - tasks/coverage.rake
134
- - tasks/spec.rake
135
- - tty-spinner.gemspec
136
- homepage: https://piotrmurach.github.io/tty
44
+ homepage: https://ttytoolkit.org
137
45
  licenses:
138
46
  - MIT
139
- metadata: {}
47
+ metadata:
48
+ allowed_push_host: https://rubygems.org
49
+ bug_tracker_uri: https://github.com/piotrmurach/tty-spinner/issues
50
+ changelog_uri: https://github.com/piotrmurach/tty-spinner/blob/master/CHANGELOG.md
51
+ documentation_uri: https://www.rubydoc.info/gems/tty-spinner
52
+ homepage_uri: https://ttytoolkit.org
53
+ source_code_uri: https://github.com/piotrmurach/tty-spinner
140
54
  post_install_message:
141
55
  rdoc_options: []
142
56
  require_paths:
@@ -152,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
66
  - !ruby/object:Gem::Version
153
67
  version: '0'
154
68
  requirements: []
155
- rubygems_version: 3.0.6
69
+ rubygems_version: 3.1.2
156
70
  signing_key:
157
71
  specification_version: 4
158
72
  summary: A terminal spinner for tasks that have non-deterministic time frame.
data/Rakefile DELETED
@@ -1,8 +0,0 @@
1
- # coding: utf-8
2
-
3
- require "bundler/gem_tasks"
4
-
5
- FileList['tasks/**/*.rake'].each(&method(:import))
6
-
7
- desc 'Run all specs'
8
- task ci: %w[ spec ]
@@ -1,8 +0,0 @@
1
- require_relative '../lib/tty-spinner'
2
-
3
- spinner = TTY::Spinner.new("Loading :spinner ...", format: :bouncing_ball)
4
- spinner.auto_spin
5
-
6
- sleep 1 # Some long task
7
-
8
- spinner.stop('done')
@@ -1,8 +0,0 @@
1
- require_relative '../lib/tty-spinner'
2
-
3
- spinner = TTY::Spinner.new("Loading :spinner ... ", format: :spin_2)
4
- 20.times do
5
- spinner.spin
6
- sleep(0.1)
7
- end
8
- spinner.stop('done')
@@ -1,9 +0,0 @@
1
- require_relative '../lib/tty-spinner'
2
-
3
- spinner = TTY::Spinner.new("[:spinner] Task name", format: :bouncing_ball)
4
- 20.times do
5
- spinner.spin
6
- sleep(0.1)
7
- end
8
-
9
- spinner.success
@@ -1,12 +0,0 @@
1
- require 'pastel'
2
- require_relative '../lib/tty-spinner'
3
-
4
- pastel = Pastel.new
5
-
6
- format = "[#{pastel.yellow(':spinner')}] " + pastel.yellow("Task name")
7
- spinner = TTY::Spinner.new(format, success_mark: pastel.green('+'))
8
- 20.times do
9
- spinner.spin
10
- sleep(0.1)
11
- end
12
- spinner.success(pastel.green("(successful)"))
@@ -1,9 +0,0 @@
1
- require_relative '../lib/tty-spinner'
2
-
3
- spinner = TTY::Spinner.new("[:spinner] Task name")
4
- 20.times do
5
- spinner.spin
6
- sleep(0.1)
7
- end
8
-
9
- spinner.error('(error)')
@@ -1,11 +0,0 @@
1
- require_relative '../lib/tty-spinner'
2
-
3
- TTY::Formats::FORMATS.keys.each do |token|
4
- options = {format: token, hide_cursor: true}
5
- spinner = TTY::Spinner.new("#{token}: :spinner", options)
6
- 20.times do
7
- spinner.spin
8
- sleep(0.1)
9
- end
10
- spinner.stop
11
- end
@@ -1,12 +0,0 @@
1
- require 'pastel'
2
- require_relative '../lib/tty-spinner'
3
-
4
- pastel = Pastel.new
5
-
6
- format = "[#{pastel.yellow(':spinner')}] " + pastel.yellow("Task name")
7
- spinner = TTY::Spinner.new(format, success_mark: pastel.green('+'), hide_cursor: true)
8
- 10.times do
9
- spinner.spin
10
- sleep(0.1)
11
- end
12
- spinner.success(pastel.green("(successful)"))
@@ -1,13 +0,0 @@
1
- require_relative '../../lib/tty-spinner'
2
-
3
- spinners = TTY::Spinner::Multi.new
4
-
5
- sp1 = spinners.register "[:spinner] one"
6
- sp2 = spinners.register "[:spinner] two"
7
- sp3 = spinners.register "[:spinner] three"
8
-
9
- th1 = Thread.new { 20.times { sleep(0.2); sp1.spin }}
10
- th2 = Thread.new { 30.times { sleep(0.1); sp2.spin }}
11
- th3 = Thread.new { 10.times { sleep(0.3); sp3.spin }}
12
-
13
- [th1, th2, th3].each(&:join)
@@ -1,13 +0,0 @@
1
- require_relative '../../lib/tty-spinner'
2
-
3
- spinners = TTY::Spinner::Multi.new "[:spinner] main", format: :pulse
4
-
5
- sp1 = spinners.register "[:spinner] one", format: :classic
6
- sp2 = spinners.register "[:spinner] two", format: :classic
7
- sp3 = spinners.register "[:spinner] three", format: :classic
8
-
9
- th1 = Thread.new { 20.times { sleep(0.2); sp1.spin }}
10
- th2 = Thread.new { 30.times { sleep(0.1); sp2.spin }}
11
- th3 = Thread.new { 10.times { sleep(0.3); sp3.spin }}
12
-
13
- [th1, th2, th3].each(&:join)
@@ -1,26 +0,0 @@
1
- require_relative '../../lib/tty-spinner'
2
-
3
- opts = {
4
- style: {
5
- top: ". ",
6
- middle: "|-> ",
7
- bottom: "|__ ",
8
- },
9
- format: :bouncing_ball
10
- }
11
- spinners = TTY::Spinner::Multi.new("[:spinner] Top level spinner", opts)
12
-
13
- sp1 = spinners.register "[:spinner] one"
14
- sp2 = spinners.register "[:spinner] two"
15
- sp3 = spinners.register "[:spinner] three"
16
-
17
- sp1.auto_spin
18
- sp2.auto_spin
19
- sp3.auto_spin
20
-
21
- sleep(2)
22
- sp1.success
23
- sleep 1
24
- sp2.success
25
- sleep 1
26
- sp3.error
@@ -1,14 +0,0 @@
1
- require 'pastel'
2
- require_relative '../../lib/tty-spinner'
3
-
4
- pastel = Pastel.new
5
- spinners = TTY::Spinner::Multi.new("[:spinner] Downloading files...")
6
-
7
- ['file1', 'file2', 'file3'].each do |file|
8
- spinners.register("[:spinner] #{file}") do |sp|
9
- sleep(rand * 5)
10
- sp.success(pastel.green("success"))
11
- end
12
- end
13
-
14
- spinners.auto_spin
@@ -1,10 +0,0 @@
1
- require_relative '../../lib/tty-spinner'
2
-
3
- spinners = TTY::Spinner::Multi.new("[:spinner] top")
4
-
5
- spinners.register("[:spinner] one") { |sp| sleep(2); sp.success('yes 2') }
6
- spinners.register("[:spinner] two") { |sp| sleep(3); sp.error('no 2') }
7
- spinners.register("[:spinner] three") { |sp| sleep(1); sp.success('yes 3') }
8
-
9
- spinners.auto_spin
10
-
@@ -1,17 +0,0 @@
1
- require_relative '../../lib/tty-spinner'
2
-
3
- spinners = TTY::Spinner::Multi.new
4
-
5
- sp1 = spinners.register "[:spinner] one"
6
- sp2 = spinners.register "[:spinner] two"
7
- sp3 = spinners.register "[:spinner] three"
8
-
9
- sp1.auto_spin
10
- sp2.auto_spin
11
- sp3.auto_spin
12
-
13
- sleep(2)
14
-
15
- sp1.stop
16
- sp2.stop
17
- sp3.stop
@@ -1,18 +0,0 @@
1
- require_relative '../../lib/tty-spinner'
2
-
3
- spinners = TTY::Spinner::Multi.new("[:spinner] Top level spinner")
4
-
5
- sp1 = spinners.register "[:spinner] one"
6
- sp2 = spinners.register "[:spinner] two"
7
- sp3 = spinners.register "[:spinner] three"
8
-
9
- sp1.auto_spin
10
- sp2.auto_spin
11
- sp3.auto_spin
12
-
13
- sleep(2)
14
- sp1.success
15
- sleep 1
16
- sp2.success
17
- sleep 1
18
- sp3.error
@@ -1,26 +0,0 @@
1
- require_relative '../../lib/tty-spinner'
2
-
3
- spinners = TTY::Spinner::Multi.new("[:spinner]")
4
-
5
- sp1 = spinners.register("[:spinner] one")
6
- sp2 = spinners.register("[:spinner] two")
7
- sp3 = spinners.register("[:spinner] three")
8
-
9
- sp1.auto_spin
10
- sp2.auto_spin
11
- sp3.auto_spin
12
-
13
- sleep(1)
14
-
15
- spinners.pause
16
-
17
- sleep(1)
18
-
19
- spinners.resume
20
-
21
- sleep(1)
22
-
23
- sp1.stop
24
- sp2.stop
25
- sp3.stop
26
- spinners.stop