terminal_rb 0.17.1 → 0.17.2

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
  SHA256:
3
- metadata.gz: 3ccb3312146fca100bd13e4c079e5cf6f4a33e73ef9eb526765df1309ae5168e
4
- data.tar.gz: ce4f5679183067ac7f7d84196db0ad9a06a22878fda79ec302fbacc8047699fa
3
+ metadata.gz: b65682d28124ce6b98d36529cf9eca06274f773c57e6282de858b7315ad4bccc
4
+ data.tar.gz: 774c2f114d5fb2049226abbafd926b8bd5f5da8661f5a31182322ee015079c14
5
5
  SHA512:
6
- metadata.gz: 8a898bce2dc22f5b1d873ace6cef5ea53046318d68bc80062898ec7be43553acde5a7709c1b1043666533e91fbecec3e66dd0372c0adb1642803b4273f0c91d0
7
- data.tar.gz: d9a06bd5ef76f97a0331bb2e05681fae5103dbe69a21c8e5ac0b97cb7342a6569d0e595b90b00744f22ed9253fc858fdbcd8e81e37ce595bfd1bb830c5cea2b9
6
+ metadata.gz: 53b711bfccc5b09faafe235a1ddf38ab422157fc95942e4be91e3cc0b4d1b35388a98f5f382cd206ae7435cc41499c4a44ef630b3a59d282d93e8b18569b1232
7
+ data.tar.gz: 71138798500123c3aa36c5eb2b470150f392294828da4fb6bca972613228cc2b777aa4f4c9d0e5178798efd3bbbc3497c943445de651a51c2a03e2263a40bbe5
data/README.md CHANGED
@@ -4,7 +4,7 @@ Terminal.rb supports you with input and output on your terminal. Simple [BBCode]
4
4
 
5
5
  - Gem: [rubygems.org](https://rubygems.org/gems/terminal_rb)
6
6
  - Source: [codeberg.org](https://codeberg.org/mblumtritt/Terminal.rb)
7
- - Help: [rubydoc.info](https://rubydoc.info/gems/terminal_rb/index)
7
+ - Help: [rubydoc.info](https://rubydoc.info/gems/terminal_rb/Terminal)
8
8
 
9
9
  ## Features
10
10
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  module Terminal
4
4
  # The version number of the gem.
5
- VERSION = '0.17.1'
5
+ VERSION = '0.17.2'
6
6
  end
data/lib/terminal.rb CHANGED
@@ -224,10 +224,9 @@ module Terminal
224
224
  # @param bbcode [true|false] whether to interpret embedded BBCode
225
225
  # @return [nil]
226
226
  def print(*objects, bbcode: true)
227
- return unless @out
227
+ return if @out.nil? || objects.empty?
228
228
  return @out.print(*objects) unless bbcode
229
- objects.each { @out.write(Ansi.bbcode(_1)) }
230
- nil
229
+ @out.print(*objects.map! { Ansi.bbcode(_1) })
231
230
  rescue IOError
232
231
  @out = nil
233
232
  end
@@ -243,10 +242,9 @@ module Terminal
243
242
  # @return (see print)
244
243
  def puts(*objects, bbcode: true)
245
244
  return unless @out
246
- return @out.puts if objects.empty?
247
- return @out.puts(objects) unless bbcode
245
+ return @out.puts(objects.empty? ? nil : objects) unless bbcode
248
246
  objects.flatten!
249
- objects.empty? ? @out.puts : @out.puts(objects.map! { Ansi.bbcode(_1) })
247
+ @out.puts(objects.empty? ? nil : objects.map! { Ansi.bbcode(_1) })
250
248
  rescue IOError
251
249
  @out = nil
252
250
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terminal_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.1
4
+ version: 0.17.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Blumtritt
@@ -67,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  requirements: []
70
- rubygems_version: 3.7.2
70
+ rubygems_version: 4.0.1
71
71
  specification_version: 4
72
72
  summary: Fast terminal access with ANSI, CSIu, mouse events, BBCode, word-wise line
73
73
  break support and much more.