sphyg 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/Gemfile.lock +1 -1
- data/README.md +19 -4
- data/lib/sphyg.rb +5 -1
- data/lib/sphyg/pulse.rb +2 -2
- data/lib/sphyg/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13e0fcf2c3419135646ab226f0ade0d32737330efc77e8c3d410f03c5a3345ae
|
4
|
+
data.tar.gz: 0f3b3ac10c36be44cdd2bf4639aa187ca0e5e746e22b4025b8dbed52d077f30a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e34ddd9e7caa9f18e8ce56c3c8ae8e16a29320cc41304c11c45c1c2461af316e5b12557885bcf51b49d0ef34a51d7940c963bfb6f0748ddfed4932fe9815957
|
7
|
+
data.tar.gz: 5c0e3bfd8cefd0d397464b7a7859ef948223829a41ec465a6336e561879a1a5c747626e218fa19f5ca9d13e069d94a773e4847086a9264b05cf5e9429d8e4090
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file.
|
3
|
+
|
4
|
+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
|
5
|
+
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
|
6
|
+
|
7
|
+
## Unreleased
|
8
|
+
### Added
|
9
|
+
- None
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
- None
|
13
|
+
|
14
|
+
### Fixed
|
15
|
+
|
16
|
+
## 0.2.0 (2017-12-30)
|
17
|
+
### Added
|
18
|
+
- Convenience method `::Sphyg.pulse`
|
19
|
+
|
20
|
+
### Changed
|
21
|
+
- None
|
22
|
+
|
23
|
+
### Fixed
|
24
|
+
- None
|
25
|
+
|
26
|
+
## 0.1.0 (2017-12-29)
|
27
|
+
### Added
|
28
|
+
- Everything
|
29
|
+
|
30
|
+
### Changed
|
31
|
+
- None
|
32
|
+
|
33
|
+
### Fixed
|
34
|
+
- None
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Sphyg
|
2
2
|
|
3
3
|
'Sphygmos' is the Greek word for 'pulse'. Sphyg provides [throbbers](https://en.wikipedia.org/wiki/Throbber)
|
4
|
-
|
4
|
+
to indicate that your long-running command line program still has a pulse.
|
5
5
|
|
6
6
|
## Installation
|
7
7
|
|
@@ -21,16 +21,31 @@ Or install it yourself as:
|
|
21
21
|
|
22
22
|
## Usage
|
23
23
|
|
24
|
+
Pass the _message_ you want to display while your command is running
|
25
|
+
and a _block_ containing your long-running command to `Sphyg.pulse`.
|
26
|
+
|
24
27
|
```ruby
|
25
|
-
> ::Sphyg
|
28
|
+
> ::Sphyg.pulse('Please wait') { sleep }
|
26
29
|
Please wait ⡀ ⠄ ⠂ ⠁ ⠂ ⠄ # animated
|
27
30
|
```
|
28
31
|
|
29
32
|
### Options
|
30
33
|
|
31
|
-
|
34
|
+
You can also pass an _options_ hash to `::Sphyg.pulse` using the following keys:
|
35
|
+
|
36
|
+
#### `:kind`
|
37
|
+
|
38
|
+
Configure which kind of throbber you would like to use. Available kinds and their associated frames:
|
32
39
|
|
33
|
-
|
40
|
+
| Kind | Frames |
|
41
|
+
| ---- | ------ |
|
42
|
+
| `:ascii` | \| / - \ |
|
43
|
+
| `:elipsis` | . .. ... .. |
|
44
|
+
| `:heart` | ❤️ 🧡 💛 💚 💙 💜 |
|
45
|
+
| `:heroku` | ⣾ ⣽ ⣻ ⢿ ⡿ ⣟ ⣯ ⣷ |
|
46
|
+
| `:moon` | 🌑 🌒 🌓 🌔 🌕 🌖 🌗 🌘 |
|
47
|
+
| `:time` | 🕛 🕐 🕒 🕓 🕔 🕕 🕖 🕗 🕘 🕙 🕚 |
|
48
|
+
| `:wave` | ⡀ ⠄ ⠂ ⠁ ⠂ ⠄ |
|
34
49
|
|
35
50
|
## Development
|
36
51
|
|
data/lib/sphyg.rb
CHANGED
data/lib/sphyg/pulse.rb
CHANGED
@@ -2,10 +2,10 @@ require 'sphyg/frames'
|
|
2
2
|
|
3
3
|
module Sphyg
|
4
4
|
class Pulse
|
5
|
-
def initialize(message, options = {})
|
5
|
+
def initialize(message, options = { kind: :wave })
|
6
6
|
@message = message
|
7
7
|
@options = options
|
8
|
-
@frames = Sphyg::FRAMES[options[:kind]]
|
8
|
+
@frames = Sphyg::FRAMES[options[:kind]]
|
9
9
|
end
|
10
10
|
|
11
11
|
def run(&blk)
|
data/lib/sphyg/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sphyg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shane Cavanaugh
|
@@ -60,6 +60,7 @@ extensions: []
|
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
62
|
- ".gitignore"
|
63
|
+
- CHANGELOG.md
|
63
64
|
- CODE_OF_CONDUCT.md
|
64
65
|
- Gemfile
|
65
66
|
- Gemfile.lock
|