whirly 0.2.0 → 0.2.1

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
2
  SHA1:
3
- metadata.gz: 49d0b7549d709f596eb1371e60ca6955f27f40ae
4
- data.tar.gz: cedb70f10956ebb3197642ba3470435c4e9f7cf1
3
+ metadata.gz: d86b20b619830ad0f5a6a91233f718d2ec5013b2
4
+ data.tar.gz: 01f56d888e248d61c3f8a93963cd39280a836482
5
5
  SHA512:
6
- metadata.gz: 17b9d7c49c44f18471b72d4af58a5eea30da8a7b3a7a03b9ea38abed6324a09d8ec5a2238e9a9908f43c08c799fa93cc2f596f5762b11709d5f15f54f4ae8f3f
7
- data.tar.gz: 7afee607c939d42eff7aa0f3d9bf68780c395896e46fb8bc830a2e195c4ce9babccbf41ff9ff5b108757d86b773256c3cf5fb9ec7496a92b587ed4836a286a92
6
+ metadata.gz: e959c6a547673ad48be7e05370c15ac0e7ac0e93e0a7ef4f7dc95a9ec64ffcbe86a0409c524d0f07ef6f6bec07e4219e08c19f87e12e18eb8dd4d02ada1aca24
7
+ data.tar.gz: 345b15765db9728785617f8031881c7569596a559f8ad17db0367986efe59a706d09c28072de0b5ead41986f979cbff59c8c7eb7f2b3d354aa739199a1644d20
data/.CHANGELOG.md.swp ADDED
Binary file
data/.travis.yml CHANGED
@@ -22,4 +22,5 @@ cache:
22
22
  matrix:
23
23
  allow_failures:
24
24
  - rvm: jruby-head
25
+ - rvm: jruby-9000
25
26
  - rvm: rbx-2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 0.2.1
4
+
5
+ - Use macOS terminal app compatible ANSI sequences
6
+
3
7
  ### 0.2.0
4
8
 
5
9
  - Make paint dependency optional
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.png)](https://travis-ci.org/janlelis/whirly)
1
+ # Whirly 😀 [![[version]](https://badge.fury.io/rb/whirly.svg)](http://badge.fury.io/rb/whirly) [![[travis]](https://travis-ci.org/janlelis/whirly.png)](https://travis-ci.org/janlelis/whirly)
2
2
 
3
3
  A simple, colorful and customizable terminal spinner library for Ruby. It comes with 17 custom spinners and also includes those from the [cli-spinners](https://github.com/sindresorhus/cli-spinners) project.
4
4
 
@@ -62,6 +62,8 @@ Whirly.start spinner: "pong", use_color: false, status: "The Game of Pong" do
62
62
  end
63
63
  ```
64
64
 
65
+ Also see the [examples directory](https://github.com/janlelis/whirly/tree/master/examples) for example scripts.
66
+
65
67
  ### Configuring Whirly
66
68
 
67
69
  You can pass the same options you would pass to `.start` to `.configure` instead to create a persistent configuration that will be used by `.start`:
Binary file
@@ -1,4 +1,4 @@
1
1
  module Whirly
2
- VERSION = "0.2.0".freeze
2
+ VERSION = "0.2.1".freeze
3
3
  end
4
4
 
data/lib/whirly.rb CHANGED
@@ -220,14 +220,14 @@ module Whirly
220
220
  def self.render_prefix
221
221
  res = ""
222
222
  res << "\n" if @options[:position] == "below"
223
- res << "\e[s" if @options[:ansi_escape_mode] == "restore"
223
+ res << "\e7" if @options[:ansi_escape_mode] == "restore"
224
224
  res << "\e[G" if @options[:ansi_escape_mode] == "line"
225
225
  res
226
226
  end
227
227
 
228
228
  def self.render_suffix
229
229
  res = ""
230
- res << "\e[u" if @options[:ansi_escape_mode] == "restore"
230
+ res << "\e8" if @options[:ansi_escape_mode] == "restore"
231
231
  res << "\e[1A" if @options[:position] == "below"
232
232
  res
233
233
  end
Binary file
data/spec/whirly_spec.rb CHANGED
@@ -4,11 +4,11 @@ require "minitest/autorun"
4
4
  require "stringio"
5
5
 
6
6
  def short_sleep
7
- sleep 0.1
7
+ sleep 0.15
8
8
  end
9
9
 
10
10
  def medium_sleep
11
- sleep 0.4
11
+ sleep 0.5
12
12
  end
13
13
 
14
14
  def long_sleep
@@ -117,7 +117,7 @@ describe Whirly do
117
117
  short_sleep
118
118
  Whirly.stop
119
119
 
120
- assert_match /\e\[u\n\z/, @capture.string
120
+ assert_match /\e8\n\z/, @capture.string
121
121
  end
122
122
  end
123
123
 
@@ -202,7 +202,7 @@ describe Whirly do
202
202
  Whirly.start
203
203
  short_sleep
204
204
  Whirly.stop
205
- assert_match /\e\[s.*\e\[u/m, @capture.string
205
+ assert_match /\e7.*\e8/m, @capture.string
206
206
  end
207
207
 
208
208
  it "will use beginning of line and clear line ANSI sequences when 'line' is given" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whirly
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
@@ -32,6 +32,7 @@ executables: []
32
32
  extensions: []
33
33
  extra_rdoc_files: []
34
34
  files:
35
+ - ".CHANGELOG.md.swp"
35
36
  - ".gitignore"
36
37
  - ".gitmodules"
37
38
  - ".travis.yml"
@@ -50,11 +51,13 @@ files:
50
51
  - examples/multi_lines.rb
51
52
  - examples/single.rb
52
53
  - examples/status.rb
54
+ - lib/.whirly.rb.swp
53
55
  - lib/whirly.rb
54
56
  - lib/whirly/spinners.rb
55
57
  - lib/whirly/spinners/cli.rb
56
58
  - lib/whirly/spinners/whirly.rb
57
59
  - lib/whirly/version.rb
60
+ - spec/.whirly_spec.rb.swp
58
61
  - spec/whirly_spec.rb
59
62
  - whirly.gemspec
60
63
  homepage: https://github.com/janlelis/whirly
@@ -82,4 +85,5 @@ signing_key:
82
85
  specification_version: 4
83
86
  summary: 'Whirly: The friendly terminal spinner'
84
87
  test_files:
88
+ - spec/.whirly_spec.rb.swp
85
89
  - spec/whirly_spec.rb