ansi-select 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: 31facd9c408f0836c2f8ab324fc26995701a433d
4
- data.tar.gz: f6dc35cd7b1ea27db706eaba87912afe22abb5f9
3
+ metadata.gz: c56f7576f128137af467047313b06291bfeb55f0
4
+ data.tar.gz: ebec5d1e147709d3ca99b52150f180a3ce0437f9
5
5
  SHA512:
6
- metadata.gz: c13549de88f3ddc5905ea2813122140b1b0fec2a58a87a35c911e0fea365181867fa8fd2c8a06be1f4bd0b9668956aa267e3465f7d2e4a545d8b972cc4e2f14a
7
- data.tar.gz: df044fe624e21523b04bccc32bf76e7565b055171d0cb946fbf84f68c30ceeecbe5637d2df1c88f20abf127e903e16d1b68653d9bf888c879c29079fed9b5395
6
+ metadata.gz: cb07f1c7398f1b1e86987ef1a0ca96b49f3b4f8148c2ea82393b4ab6546cac3f77e90bd5a182c280c213c462d33e3b7061a600d9bb3fd8f4ca5562747c4f16e5
7
+ data.tar.gz: db5ad003478555319c6821f617f231891c792e5d55b6f53401be3914c37138e22815dbde10f0e86d4863df56b34b2332806519130ee902c5a4cdfe0589c0271a
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 0.2.1
2
+
3
+ * Prefix options with spaces.
4
+ * Call `#to_s` on options.
5
+
1
6
  ### 0.2.0
2
7
 
3
8
  * Add multi select.
@@ -89,9 +89,9 @@ module Ansi
89
89
  go_to_line(index)
90
90
 
91
91
  if highlight
92
- tty.print(CODES[:standout_mode] + prefix(index) + @options[index] + CODES[:exit_standout_mode])
92
+ tty.print(CODES[:standout_mode] + prefix(index) + @options[index].to_s + CODES[:exit_standout_mode])
93
93
  else
94
- tty.print(prefix(index) + @options[index])
94
+ tty.print(prefix(index) + @options[index].to_s)
95
95
  end
96
96
  end
97
97
 
@@ -13,7 +13,7 @@ module Ansi
13
13
  private
14
14
 
15
15
  def prefix(index)
16
- @selected_options[index] ? '[x] ' : '[ ] '
16
+ @selected_options[index] ? ' [x] ' : ' [ ] '
17
17
  end
18
18
 
19
19
  def space_handler
@@ -1,5 +1,5 @@
1
1
  module Ansi
2
2
  class Selector
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ansi-select
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
  - Volodymyr Shatskyi