rb-spinners 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +2 -0
- data/.gitignore +51 -0
- data/.travis.yml +12 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +44 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/example/example.rb +32 -0
- data/lib/spinners.rb +682 -0
- data/lib/spinners/version.rb +3 -0
- data/spinners.gemspec +43 -0
- metadata +131 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: a05cd07d2ac23b1f972333e16d2dd7ecfcb5f2706e6cc18a7955484e18afe0e4
|
4
|
+
data.tar.gz: 11f06a678e0a81aa8b4a42d3ec120ee5117cfbcbce8429dc1e6f815d8034208e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d54f31566838aa57d217a6a4fb6f202e149815b49117e67a4704f135188ad8b6353a3ad92343c326d4b7da57f41897f412c2f0353bb895ac3d44bc5958e42ade
|
7
|
+
data.tar.gz: 01a777028ccc22a18af378c4a71db56f7ad9e257ba6170cdb2556e6c116b7097c88acbef94164a89eb5a41ec813ae16eba40e61bf46f60c9091bb8f5a8241dfb
|
data/.coveralls.yml
ADDED
data/.gitignore
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
## Specific to RubyMotion:
|
17
|
+
.dat*
|
18
|
+
.repl_history
|
19
|
+
build/
|
20
|
+
*.bridgesupport
|
21
|
+
build-iPhoneOS/
|
22
|
+
build-iPhoneSimulator/
|
23
|
+
|
24
|
+
## Specific to RubyMotion (use of CocoaPods):
|
25
|
+
#
|
26
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
27
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
28
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
29
|
+
#
|
30
|
+
# vendor/Pods/
|
31
|
+
|
32
|
+
## Documentation cache and generated files:
|
33
|
+
/.yardoc/
|
34
|
+
/_yardoc/
|
35
|
+
/doc/
|
36
|
+
/rdoc/
|
37
|
+
|
38
|
+
## Environment normalization:
|
39
|
+
/.bundle/
|
40
|
+
/vendor/bundle
|
41
|
+
/lib/bundler/man/
|
42
|
+
|
43
|
+
# for a library or gem, you might want to ignore these files since the code is
|
44
|
+
# intended to run in multiple environments; otherwise, check them in:
|
45
|
+
Gemfile.lock
|
46
|
+
# .ruby-version
|
47
|
+
# .ruby-gemset
|
48
|
+
|
49
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
50
|
+
.rvmrc
|
51
|
+
.rspec_status
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2019 KaitoAkita
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# rb-spinners
|
2
|
+
[![Build Status](https://travis-ci.org/takezyou/rb-spinners.svg?branch=master)](https://travis-ci.org/takezyou/rb-spinners)
|
3
|
+
[![Coverage Status](https://coveralls.io/repos/github/takezyou/rb-spinner/badge.svg?branch=master)](https://coveralls.io/github/takezyou/rb-spinner?branch=master)
|
4
|
+
|
5
|
+
More than 60 spinners for terminal, ruby wrapper for amazing node library cli-spinners and python library py-spinners.
|
6
|
+
Too many gem names (/Users/kaitoakita/Workspace/takezyou/rb-spinner/pkg/spinners-0.1.0.gem, Set, to, http://mygemserver.com); please specify only one
|
7
|
+
The list of spinners is just a [JSONfile](https://github.com/sindresorhus/cli-spinners/blob/dac4fc6571059bb9e9bc204711e9dfe8f72e5c6f/spinners.json).
|
8
|
+
|
9
|
+
If you want to use something more wonderful, use [halo](https://github.com/manrajgrover/halo) and [ora](https://github.com/sindresorhus/ora)
|
10
|
+
## Installation
|
11
|
+
|
12
|
+
Add this line to your application's Gemfile:
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
gem 'rb-spinners'
|
16
|
+
```
|
17
|
+
|
18
|
+
And then execute:
|
19
|
+
|
20
|
+
$ bundle
|
21
|
+
|
22
|
+
Or install it yourself as:
|
23
|
+
|
24
|
+
$ gem install rb-spinners
|
25
|
+
|
26
|
+
## Usage
|
27
|
+
|
28
|
+
```
|
29
|
+
require 'spinners'
|
30
|
+
|
31
|
+
puts Spinners::DOTS
|
32
|
+
# {:dots=>{:interval=>80, :frames=>["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]}}
|
33
|
+
```
|
34
|
+
|
35
|
+
## Contributing
|
36
|
+
|
37
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/takezyou/rb-spinners.
|
38
|
+
## Related
|
39
|
+
- [cli-spinners](https://github.com/sindresorhus/cli-spinners)
|
40
|
+
- [py-spinners](https://github.com/sindresorhus/cli-spinners)
|
41
|
+
|
42
|
+
## License
|
43
|
+
|
44
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "spinners"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/example/example.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'tty-cursor'
|
2
|
+
|
3
|
+
require 'spinners'
|
4
|
+
|
5
|
+
CURSOR = "\e[1A"
|
6
|
+
CLEAR_LINE = "\033[K"
|
7
|
+
|
8
|
+
def animate(name, interval, frames)
|
9
|
+
frames.each do |frame|
|
10
|
+
printf CLEAR_LINE
|
11
|
+
puts printf('%s %s', frame, name)
|
12
|
+
printf CURSOR
|
13
|
+
STDOUT.flush
|
14
|
+
sleep 0.001 * interval
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
cursor = TTY::Cursor
|
19
|
+
STDOUT.write(cursor.hide)
|
20
|
+
spinners = Spinners.constants.sort.map do |spinner|
|
21
|
+
Spinners.const_get(spinner)
|
22
|
+
end
|
23
|
+
|
24
|
+
spinners.each do |spinner|
|
25
|
+
name = spinner.keys[0]
|
26
|
+
interval = spinner.dig(name, :interval)
|
27
|
+
frames = spinner.dig(name, :frames)
|
28
|
+
animate(name, interval, frames)
|
29
|
+
end
|
30
|
+
|
31
|
+
printf "\n"
|
32
|
+
STDOUT.write(cursor.show)
|
data/lib/spinners.rb
ADDED
@@ -0,0 +1,682 @@
|
|
1
|
+
module Spinners
|
2
|
+
DOTS = {
|
3
|
+
dots: {
|
4
|
+
interval: 80,
|
5
|
+
frames: %w[⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏]
|
6
|
+
}
|
7
|
+
}
|
8
|
+
DOTS2 = {
|
9
|
+
dots2: {
|
10
|
+
interval: 80,
|
11
|
+
frames: %w[⣾ ⣽ ⣻ ⢿ ⡿ ⣟ ⣯ ⣷]
|
12
|
+
}
|
13
|
+
}
|
14
|
+
DOTS3 = {
|
15
|
+
dots3: {
|
16
|
+
interval: 80,
|
17
|
+
frames: %w[⠋ ⠙ ⠚ ⠞ ⠖ ⠦ ⠴ ⠲ ⠳ ⠓]
|
18
|
+
}
|
19
|
+
}
|
20
|
+
DOTS4 = {
|
21
|
+
dots4: {
|
22
|
+
interval: 80,
|
23
|
+
frames: %w[⠄ ⠆ ⠇ ⠋ ⠙ ⠸ ⠰ ⠠ ⠰ ⠸ ⠙ ⠋ ⠇ ⠆]
|
24
|
+
}
|
25
|
+
}
|
26
|
+
DOTS5 = {
|
27
|
+
dots5: {
|
28
|
+
interval: 80,
|
29
|
+
frames: %w[⠋ ⠙ ⠚ ⠒ ⠂ ⠂ ⠒ ⠲ ⠴ ⠦ ⠖ ⠒ ⠐ ⠐ ⠒ ⠓ ⠋]
|
30
|
+
}
|
31
|
+
}
|
32
|
+
DOTS6 = {
|
33
|
+
dots6: {
|
34
|
+
interval: 80,
|
35
|
+
frames: %w[⠁ ⠉ ⠙ ⠚ ⠒ ⠂ ⠂ ⠒ ⠲ ⠴ ⠤ ⠄ ⠄ ⠤ ⠴ ⠲ ⠒ ⠂ ⠂ ⠒ ⠚ ⠙ ⠉ ⠁]
|
36
|
+
}
|
37
|
+
}
|
38
|
+
DOTS7 = {
|
39
|
+
dots7: {
|
40
|
+
interval: 80,
|
41
|
+
frames: %w[⠈ ⠉ ⠋ ⠓ ⠒ ⠐ ⠐ ⠒ ⠖ ⠦ ⠤ ⠠ ⠠ ⠤ ⠦ ⠖ ⠒ ⠐ ⠐ ⠒ ⠓ ⠋ ⠉ ⠈]
|
42
|
+
}
|
43
|
+
}
|
44
|
+
DOTS8 = {
|
45
|
+
dots8: {
|
46
|
+
interval: 80,
|
47
|
+
frames: %w[⠁ ⠁ ⠉ ⠙ ⠚ ⠒ ⠂ ⠂ ⠒ ⠲ ⠴ ⠤ ⠄ ⠄ ⠤ ⠠ ⠠ ⠤ ⠦ ⠖ ⠒ ⠐ ⠐ ⠒ ⠓ ⠋ ⠉ ⠈ ⠈]
|
48
|
+
}
|
49
|
+
}
|
50
|
+
DOTS9 = {
|
51
|
+
dots9: {
|
52
|
+
interval: 80,
|
53
|
+
frames: %w[⢹ ⢺ ⢼ ⣸ ⣇ ⡧ ⡗ ⡏]
|
54
|
+
}
|
55
|
+
}
|
56
|
+
DOTS10 = {
|
57
|
+
dots10: {
|
58
|
+
interval: 80,
|
59
|
+
frames: %w[⢄ ⢂ ⢁ ⡁ ⡈ ⡐ ⡠]
|
60
|
+
}
|
61
|
+
}
|
62
|
+
DOTS11 = {
|
63
|
+
dots11: {
|
64
|
+
interval: 100,
|
65
|
+
frames: %w[⠁ ⠂ ⠄ ⡀ ⢀ ⠠ ⠐ ⠈]
|
66
|
+
}
|
67
|
+
}
|
68
|
+
DOTS12 = {
|
69
|
+
dots12: {
|
70
|
+
interval: 80,
|
71
|
+
frames: [
|
72
|
+
'⢀⠀',
|
73
|
+
'⡀⠀',
|
74
|
+
'⠄⠀',
|
75
|
+
'⢂⠀',
|
76
|
+
'⡂⠀',
|
77
|
+
'⠅⠀',
|
78
|
+
'⢃⠀',
|
79
|
+
'⡃⠀',
|
80
|
+
'⠍⠀',
|
81
|
+
'⢋⠀',
|
82
|
+
'⡋⠀',
|
83
|
+
'⠍⠁',
|
84
|
+
'⢋⠁',
|
85
|
+
'⡋⠁',
|
86
|
+
'⠍⠉',
|
87
|
+
'⠋⠉',
|
88
|
+
'⠋⠉',
|
89
|
+
'⠉⠙',
|
90
|
+
'⠉⠙',
|
91
|
+
'⠉⠩',
|
92
|
+
'⠈⢙',
|
93
|
+
'⠈⡙',
|
94
|
+
'⢈⠩',
|
95
|
+
'⡀⢙',
|
96
|
+
'⠄⡙',
|
97
|
+
'⢂⠩',
|
98
|
+
'⡂⢘',
|
99
|
+
'⠅⡘',
|
100
|
+
'⢃⠨',
|
101
|
+
'⡃⢐',
|
102
|
+
'⠍⡐',
|
103
|
+
'⢋⠠',
|
104
|
+
'⡋⢀',
|
105
|
+
'⠍⡁',
|
106
|
+
'⢋⠁',
|
107
|
+
'⡋⠁',
|
108
|
+
'⠍⠉',
|
109
|
+
'⠋⠉',
|
110
|
+
'⠋⠉',
|
111
|
+
'⠉⠙',
|
112
|
+
'⠉⠙',
|
113
|
+
'⠉⠩',
|
114
|
+
'⠈⢙',
|
115
|
+
'⠈⡙',
|
116
|
+
'⠈⠩',
|
117
|
+
'⠀⢙',
|
118
|
+
'⠀⡙',
|
119
|
+
'⠀⠩',
|
120
|
+
'⠀⢘',
|
121
|
+
'⠀⡘',
|
122
|
+
'⠀⠨',
|
123
|
+
'⠀⢐',
|
124
|
+
'⠀⡐',
|
125
|
+
'⠀⠠',
|
126
|
+
'⠀⢀',
|
127
|
+
'⠀⡀'
|
128
|
+
]
|
129
|
+
}
|
130
|
+
}
|
131
|
+
LINE = {
|
132
|
+
line: {
|
133
|
+
interval: 130,
|
134
|
+
frames: %w[- \\ | /]
|
135
|
+
}
|
136
|
+
}
|
137
|
+
LINE2 = {
|
138
|
+
line2: {
|
139
|
+
interval: 100,
|
140
|
+
frames: %w[⠂ - – — – -]
|
141
|
+
}
|
142
|
+
}
|
143
|
+
PIPE = {
|
144
|
+
pipe: {
|
145
|
+
interval: 100,
|
146
|
+
frames: %w[┤ ┘ ┴ └ ├ ┌ ┬ ┐]
|
147
|
+
}
|
148
|
+
}
|
149
|
+
SIMPLE_DOTS = {
|
150
|
+
simpleDots: {
|
151
|
+
interval: 400,
|
152
|
+
frames: [
|
153
|
+
'. ',
|
154
|
+
'.. ',
|
155
|
+
'...',
|
156
|
+
' '
|
157
|
+
]
|
158
|
+
}
|
159
|
+
}
|
160
|
+
SIMPLE_DOTS_SCROLLING = {
|
161
|
+
simpleDotsScrolling: {
|
162
|
+
interval: 200,
|
163
|
+
frames: [
|
164
|
+
'. ',
|
165
|
+
'.. ',
|
166
|
+
'...',
|
167
|
+
' ..',
|
168
|
+
' .',
|
169
|
+
' '
|
170
|
+
]
|
171
|
+
}
|
172
|
+
}
|
173
|
+
STAR = {
|
174
|
+
star: {
|
175
|
+
interval: 70,
|
176
|
+
frames: %w[✶ ✸ ✹ ✺ ✹ ✷]
|
177
|
+
}
|
178
|
+
}
|
179
|
+
STAR2 = {
|
180
|
+
star2: {
|
181
|
+
interval: 80,
|
182
|
+
frames: %w[+ x *]
|
183
|
+
}
|
184
|
+
}
|
185
|
+
FLIP = {
|
186
|
+
flip: {
|
187
|
+
interval: 70,
|
188
|
+
frames: %w[_ _ _ - ` ` ' ´ - _ _ _]
|
189
|
+
}
|
190
|
+
}
|
191
|
+
HAMBURGER = {
|
192
|
+
hamburger: {
|
193
|
+
interval: 100,
|
194
|
+
frames: %w[☱ ☲ ☴]
|
195
|
+
}
|
196
|
+
}
|
197
|
+
GROW_VERTICAL = {
|
198
|
+
growVertical: {
|
199
|
+
interval: 120,
|
200
|
+
frames: %w[▁ ▃ ▄ ▅ ▆ ▇ ▆ ▅ ▄ ▃]
|
201
|
+
}
|
202
|
+
}
|
203
|
+
GROW_HORIZONTAL = {
|
204
|
+
growHorizontal: {
|
205
|
+
interval: 120,
|
206
|
+
frames: %w[▏ ▎ ▍ ▌ ▋ ▊ ▉ ▊ ▋ ▌ ▍ ▎]
|
207
|
+
}
|
208
|
+
}
|
209
|
+
BALLOON = {
|
210
|
+
balloon: {
|
211
|
+
interval: 140,
|
212
|
+
frames: [
|
213
|
+
' ',
|
214
|
+
'.',
|
215
|
+
'o',
|
216
|
+
'O',
|
217
|
+
'@',
|
218
|
+
'*',
|
219
|
+
' '
|
220
|
+
]
|
221
|
+
}
|
222
|
+
}
|
223
|
+
BALLOON2 = {
|
224
|
+
balloon2: {
|
225
|
+
interval: 120,
|
226
|
+
frames: %w[. o O ° O o .]
|
227
|
+
}
|
228
|
+
}
|
229
|
+
NOISE = {
|
230
|
+
noise: {
|
231
|
+
interval: 100,
|
232
|
+
frames: %w[▓ ▒ ░]
|
233
|
+
}
|
234
|
+
}
|
235
|
+
BOUNCE = {
|
236
|
+
bounce: {
|
237
|
+
interval: 120,
|
238
|
+
frames: %w[⠁ ⠂ ⠄ ⠂]
|
239
|
+
}
|
240
|
+
}
|
241
|
+
BOX_BOUNCE = {
|
242
|
+
boxBounce: {
|
243
|
+
interval: 120,
|
244
|
+
frames: %w[▖ ▘ ▝ ▗]
|
245
|
+
}
|
246
|
+
}
|
247
|
+
BOX_BOUNCE2 = {
|
248
|
+
boxBounce2: {
|
249
|
+
interval: 100,
|
250
|
+
frames: %w[▌ ▀ ▐ ▄]
|
251
|
+
}
|
252
|
+
}
|
253
|
+
TRIANGLE = {
|
254
|
+
triangle: {
|
255
|
+
interval: 50,
|
256
|
+
frames: %w[◢ ◣ ◤ ◥]
|
257
|
+
}
|
258
|
+
}
|
259
|
+
ARC = {
|
260
|
+
arc: {
|
261
|
+
interval: 100,
|
262
|
+
frames: %w[◜ ◠ ◝ ◞ ◡ ◟]
|
263
|
+
}
|
264
|
+
}
|
265
|
+
CIRCLE = {
|
266
|
+
circle: {
|
267
|
+
interval: 120,
|
268
|
+
frames: %w[◡ ⊙ ◠]
|
269
|
+
}
|
270
|
+
}
|
271
|
+
SQUARE_CORNERS = {
|
272
|
+
squareCorners: {
|
273
|
+
interval: 180,
|
274
|
+
frames: %w[◰ ◳ ◲ ◱]
|
275
|
+
}
|
276
|
+
}
|
277
|
+
CIRCLE_QUARTERS = {
|
278
|
+
circleQuarters: {
|
279
|
+
interval: 120,
|
280
|
+
frames: %w[◴ ◷ ◶ ◵]
|
281
|
+
}
|
282
|
+
}
|
283
|
+
CIRCLE_HALVES = {
|
284
|
+
circleHalves: {
|
285
|
+
interval: 50,
|
286
|
+
frames: %w[◐ ◓ ◑ ◒]
|
287
|
+
}
|
288
|
+
}
|
289
|
+
SQUISH = {
|
290
|
+
squish: {
|
291
|
+
interval: 100,
|
292
|
+
frames: %w[╫ ╪]
|
293
|
+
}
|
294
|
+
}
|
295
|
+
TOGGLE = {
|
296
|
+
toggle: {
|
297
|
+
interval: 250,
|
298
|
+
frames: %w[⊶ ⊷]
|
299
|
+
}
|
300
|
+
}
|
301
|
+
TOGGLE2 = {
|
302
|
+
toggle2: {
|
303
|
+
interval: 80,
|
304
|
+
frames: %w[▫ ▪]
|
305
|
+
}
|
306
|
+
}
|
307
|
+
TOGGLE3 = {
|
308
|
+
toggle3: {
|
309
|
+
interval: 120,
|
310
|
+
frames: %w[□ ■]
|
311
|
+
}
|
312
|
+
}
|
313
|
+
TOGGLE4 = {
|
314
|
+
toggle4: {
|
315
|
+
interval: 100,
|
316
|
+
frames: %w[■ □ ▪ ▫]
|
317
|
+
}
|
318
|
+
}
|
319
|
+
TOGGLE5 = {
|
320
|
+
toggle5: {
|
321
|
+
interval: 100,
|
322
|
+
frames: %w[▮ ▯]
|
323
|
+
}
|
324
|
+
}
|
325
|
+
TOGGLE6 = {
|
326
|
+
toggle6: {
|
327
|
+
interval: 300,
|
328
|
+
frames: %w[ဝ ၀]
|
329
|
+
}
|
330
|
+
}
|
331
|
+
TOGGLE7 = {
|
332
|
+
toggle7: {
|
333
|
+
interval: 80,
|
334
|
+
frames: %w[⦾ ⦿]
|
335
|
+
}
|
336
|
+
}
|
337
|
+
TOGGLE8 = {
|
338
|
+
toggle8: {
|
339
|
+
interval: 100,
|
340
|
+
frames: %w[◍ ◌]
|
341
|
+
}
|
342
|
+
}
|
343
|
+
TOGGLE9 = {
|
344
|
+
toggle9: {
|
345
|
+
interval: 100,
|
346
|
+
frames: %w[◉ ◎]
|
347
|
+
}
|
348
|
+
}
|
349
|
+
TOGGLE10 = {
|
350
|
+
toggle10: {
|
351
|
+
interval: 100,
|
352
|
+
frames: %w[㊂ ㊀ ㊁]
|
353
|
+
}
|
354
|
+
}
|
355
|
+
TOGGLE11 = {
|
356
|
+
toggle11: {
|
357
|
+
interval: 50,
|
358
|
+
frames: %w[⧇ ⧆]
|
359
|
+
}
|
360
|
+
}
|
361
|
+
TOGGLE12 = {
|
362
|
+
toggle12: {
|
363
|
+
interval: 120,
|
364
|
+
frames: %w[☗ ☖]
|
365
|
+
}
|
366
|
+
}
|
367
|
+
TOGGLE13 = {
|
368
|
+
toggle13: {
|
369
|
+
interval: 80,
|
370
|
+
frames: %w[= * -]
|
371
|
+
}
|
372
|
+
}
|
373
|
+
ARROW = {
|
374
|
+
arrow: {
|
375
|
+
interval: 100,
|
376
|
+
frames: %w[← ↖ ↑ ↗ → ↘ ↓ ↙]
|
377
|
+
}
|
378
|
+
}
|
379
|
+
ARROW2 = {
|
380
|
+
arrow2: {
|
381
|
+
interval: 80,
|
382
|
+
frames: [
|
383
|
+
'⬆️ ',
|
384
|
+
'↗️ ',
|
385
|
+
'➡️ ',
|
386
|
+
'↘️ ',
|
387
|
+
'⬇️ ',
|
388
|
+
'↙️ ',
|
389
|
+
'⬅️ ',
|
390
|
+
'↖️ '
|
391
|
+
]
|
392
|
+
}
|
393
|
+
}
|
394
|
+
ARROW3 = {
|
395
|
+
arrow3: {
|
396
|
+
interval: 120,
|
397
|
+
frames: [
|
398
|
+
'▹▹▹▹▹',
|
399
|
+
'▸▹▹▹▹',
|
400
|
+
'▹▸▹▹▹',
|
401
|
+
'▹▹▸▹▹',
|
402
|
+
'▹▹▹▸▹',
|
403
|
+
'▹▹▹▹▸'
|
404
|
+
]
|
405
|
+
}
|
406
|
+
}
|
407
|
+
BOUNCING_BAR = {
|
408
|
+
bouncingBar: {
|
409
|
+
interval: 80,
|
410
|
+
frames: [
|
411
|
+
'[ ]',
|
412
|
+
'[= ]',
|
413
|
+
'[== ]',
|
414
|
+
'[=== ]',
|
415
|
+
'[ ===]',
|
416
|
+
'[ ==]',
|
417
|
+
'[ =]',
|
418
|
+
'[ ]',
|
419
|
+
'[ =]',
|
420
|
+
'[ ==]',
|
421
|
+
'[ ===]',
|
422
|
+
'[====]',
|
423
|
+
'[=== ]',
|
424
|
+
'[== ]',
|
425
|
+
'[= ]'
|
426
|
+
]
|
427
|
+
}
|
428
|
+
}
|
429
|
+
BOUNCING_BALL = {
|
430
|
+
bouncingBall: {
|
431
|
+
interval: 80,
|
432
|
+
frames: [
|
433
|
+
'( ● )',
|
434
|
+
'( ● )',
|
435
|
+
'( ● )',
|
436
|
+
'( ● )',
|
437
|
+
'( ●)',
|
438
|
+
'( ● )',
|
439
|
+
'( ● )',
|
440
|
+
'( ● )',
|
441
|
+
'( ● )',
|
442
|
+
'(● )'
|
443
|
+
]
|
444
|
+
}
|
445
|
+
}
|
446
|
+
SMILEY = {
|
447
|
+
smiley: {
|
448
|
+
interval: 200,
|
449
|
+
frames: [
|
450
|
+
'😄 ',
|
451
|
+
'😝 '
|
452
|
+
]
|
453
|
+
}
|
454
|
+
}
|
455
|
+
MONKEY = {
|
456
|
+
monkey: {
|
457
|
+
interval: 300,
|
458
|
+
frames: [
|
459
|
+
'🙈 ',
|
460
|
+
'🙈 ',
|
461
|
+
'🙉 ',
|
462
|
+
'🙊 '
|
463
|
+
]
|
464
|
+
}
|
465
|
+
}
|
466
|
+
HEARTS = {
|
467
|
+
hearts: {
|
468
|
+
interval: 100,
|
469
|
+
frames: [
|
470
|
+
'💛 ',
|
471
|
+
'💙 ',
|
472
|
+
'💜 ',
|
473
|
+
'💚 ',
|
474
|
+
'❤️ '
|
475
|
+
]
|
476
|
+
}
|
477
|
+
}
|
478
|
+
CLOCK = {
|
479
|
+
clock: {
|
480
|
+
interval: 100,
|
481
|
+
frames: [
|
482
|
+
'🕛 ',
|
483
|
+
'🕐 ',
|
484
|
+
'🕑 ',
|
485
|
+
'🕒 ',
|
486
|
+
'🕓 ',
|
487
|
+
'🕔 ',
|
488
|
+
'🕕 ',
|
489
|
+
'🕖 ',
|
490
|
+
'🕗 ',
|
491
|
+
'🕘 ',
|
492
|
+
'🕙 ',
|
493
|
+
'🕚 '
|
494
|
+
]
|
495
|
+
}
|
496
|
+
}
|
497
|
+
EARTH = {
|
498
|
+
earth: {
|
499
|
+
interval: 180,
|
500
|
+
frames: [
|
501
|
+
'🌍 ',
|
502
|
+
'🌎 ',
|
503
|
+
'🌏 '
|
504
|
+
]
|
505
|
+
}
|
506
|
+
}
|
507
|
+
MOON = {
|
508
|
+
moon: {
|
509
|
+
interval: 80,
|
510
|
+
frames: [
|
511
|
+
'🌑 ',
|
512
|
+
'🌒 ',
|
513
|
+
'🌓 ',
|
514
|
+
'🌔 ',
|
515
|
+
'🌕 ',
|
516
|
+
'🌖 ',
|
517
|
+
'🌗 ',
|
518
|
+
'🌘 '
|
519
|
+
]
|
520
|
+
}
|
521
|
+
}
|
522
|
+
RUNNER = {
|
523
|
+
runner: {
|
524
|
+
interval: 140,
|
525
|
+
frames: [
|
526
|
+
'🚶 ',
|
527
|
+
'🏃 '
|
528
|
+
]
|
529
|
+
}
|
530
|
+
}
|
531
|
+
PONG = {
|
532
|
+
pong: {
|
533
|
+
interval: 80,
|
534
|
+
frames: [
|
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
|
+
SHARK = {
|
569
|
+
shark: {
|
570
|
+
interval: 120,
|
571
|
+
frames: [
|
572
|
+
'▐|\\____________▌',
|
573
|
+
'▐_|\\___________▌',
|
574
|
+
'▐__|\\__________▌',
|
575
|
+
'▐___|\\_________▌',
|
576
|
+
'▐____|\\________▌',
|
577
|
+
'▐_____|\\_______▌',
|
578
|
+
'▐______|\\______▌',
|
579
|
+
'▐_______|\\_____▌',
|
580
|
+
'▐________|\\____▌',
|
581
|
+
'▐_________|\\___▌',
|
582
|
+
'▐__________|\\__▌',
|
583
|
+
'▐___________|\\_▌',
|
584
|
+
'▐____________|\\▌',
|
585
|
+
'▐____________/|▌',
|
586
|
+
'▐___________/|_▌',
|
587
|
+
'▐__________/|__▌',
|
588
|
+
'▐_________/|___▌',
|
589
|
+
'▐________/|____▌',
|
590
|
+
'▐_______/|_____▌',
|
591
|
+
'▐______/|______▌',
|
592
|
+
'▐_____/|_______▌',
|
593
|
+
'▐____/|________▌',
|
594
|
+
'▐___/|_________▌',
|
595
|
+
'▐__/|__________▌',
|
596
|
+
'▐_/|___________▌',
|
597
|
+
'▐/|____________▌'
|
598
|
+
]
|
599
|
+
}
|
600
|
+
}
|
601
|
+
DQPB = {
|
602
|
+
dqpb: {
|
603
|
+
interval: 100,
|
604
|
+
frames: %w[d q p b]
|
605
|
+
}
|
606
|
+
}
|
607
|
+
WEATHER = {
|
608
|
+
weather: {
|
609
|
+
interval: 100,
|
610
|
+
frames: [
|
611
|
+
'☀️ ',
|
612
|
+
'☀️ ',
|
613
|
+
'☀️ ',
|
614
|
+
'🌤 ',
|
615
|
+
'⛅️ ',
|
616
|
+
'🌥 ',
|
617
|
+
'☁️ ',
|
618
|
+
'🌧 ',
|
619
|
+
'🌨 ',
|
620
|
+
'🌧 ',
|
621
|
+
'🌨 ',
|
622
|
+
'🌧 ',
|
623
|
+
'🌨 ',
|
624
|
+
'⛈ ',
|
625
|
+
'🌨 ',
|
626
|
+
'🌧 ',
|
627
|
+
'🌨 ',
|
628
|
+
'☁️ ',
|
629
|
+
'🌥 ',
|
630
|
+
'⛅️ ',
|
631
|
+
'🌤 ',
|
632
|
+
'☀️ ',
|
633
|
+
'☀️ '
|
634
|
+
]
|
635
|
+
}
|
636
|
+
}
|
637
|
+
CHRISTMAS = {
|
638
|
+
christmas: {
|
639
|
+
interval: 400,
|
640
|
+
frames: %w[🌲 🎄]
|
641
|
+
}
|
642
|
+
}
|
643
|
+
GRENADE = {
|
644
|
+
grenade: {
|
645
|
+
interval: 80,
|
646
|
+
frames: [
|
647
|
+
'، ',
|
648
|
+
'′ ',
|
649
|
+
' ´ ',
|
650
|
+
' ‾ ',
|
651
|
+
' ⸌',
|
652
|
+
' ⸊',
|
653
|
+
' |',
|
654
|
+
' ⁎',
|
655
|
+
' ⁕',
|
656
|
+
' ෴ ',
|
657
|
+
' ⁓',
|
658
|
+
' ',
|
659
|
+
' ',
|
660
|
+
' '
|
661
|
+
]
|
662
|
+
}
|
663
|
+
}
|
664
|
+
POINT = {
|
665
|
+
point: {
|
666
|
+
interval: 125,
|
667
|
+
frames: [
|
668
|
+
'∙∙∙',
|
669
|
+
'●∙∙',
|
670
|
+
'∙●∙',
|
671
|
+
'∙∙●',
|
672
|
+
'∙∙∙'
|
673
|
+
]
|
674
|
+
}
|
675
|
+
}
|
676
|
+
LAYER = {
|
677
|
+
layer: {
|
678
|
+
interval: 150,
|
679
|
+
frames: %w[- = ≡]
|
680
|
+
}
|
681
|
+
}
|
682
|
+
end
|
data/spinners.gemspec
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "spinners/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "rb-spinners"
|
8
|
+
spec.version = Spinners::VERSION
|
9
|
+
spec.authors = ["KaitoAkita"]
|
10
|
+
spec.email = ["kaitokun07@icloud.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{More than 60 spinners for terminal, ruby wrapper for amazing node library cli-spinners and python library py-spinners}
|
13
|
+
spec.description = %q{More than 60 spinners for terminal, ruby wrapper for amazing node library cli-spinners and python library py-spinners}
|
14
|
+
spec.homepage = "https://github.com/takezyou/rb-spinner"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
21
|
+
spec.metadata["source_code_uri"] = spec.homepage
|
22
|
+
else
|
23
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
24
|
+
"public gem pushes."
|
25
|
+
end
|
26
|
+
|
27
|
+
# Specify which files should be added to the gem when it is released.
|
28
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
29
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
30
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
31
|
+
end
|
32
|
+
spec.bindir = "exe"
|
33
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
34
|
+
spec.require_paths = ["lib"]
|
35
|
+
|
36
|
+
spec.required_ruby_version = ">= 2.3.0"
|
37
|
+
|
38
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
39
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
40
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
41
|
+
spec.add_development_dependency "coveralls"
|
42
|
+
spec.add_development_dependency "tty-cursor"
|
43
|
+
end
|
metadata
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rb-spinners
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- KaitoAkita
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-05-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.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.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: coveralls
|
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
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: tty-cursor
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: More than 60 spinners for terminal, ruby wrapper for amazing node library
|
84
|
+
cli-spinners and python library py-spinners
|
85
|
+
email:
|
86
|
+
- kaitokun07@icloud.com
|
87
|
+
executables: []
|
88
|
+
extensions: []
|
89
|
+
extra_rdoc_files: []
|
90
|
+
files:
|
91
|
+
- ".coveralls.yml"
|
92
|
+
- ".gitignore"
|
93
|
+
- ".travis.yml"
|
94
|
+
- Gemfile
|
95
|
+
- LICENSE.txt
|
96
|
+
- README.md
|
97
|
+
- Rakefile
|
98
|
+
- bin/console
|
99
|
+
- bin/setup
|
100
|
+
- example/example.rb
|
101
|
+
- lib/spinners.rb
|
102
|
+
- lib/spinners/version.rb
|
103
|
+
- spinners.gemspec
|
104
|
+
homepage: https://github.com/takezyou/rb-spinner
|
105
|
+
licenses:
|
106
|
+
- MIT
|
107
|
+
metadata:
|
108
|
+
homepage_uri: https://github.com/takezyou/rb-spinner
|
109
|
+
source_code_uri: https://github.com/takezyou/rb-spinner
|
110
|
+
post_install_message:
|
111
|
+
rdoc_options: []
|
112
|
+
require_paths:
|
113
|
+
- lib
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - ">="
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 2.3.0
|
119
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
requirements: []
|
125
|
+
rubyforge_project:
|
126
|
+
rubygems_version: 2.7.6
|
127
|
+
signing_key:
|
128
|
+
specification_version: 4
|
129
|
+
summary: More than 60 spinners for terminal, ruby wrapper for amazing node library
|
130
|
+
cli-spinners and python library py-spinners
|
131
|
+
test_files: []
|