gamefic-tty 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7727ff76e6d99f185d104a500d1da91868062c852ae8fc340026ac0829b5d4a9
4
- data.tar.gz: 718beb405d92d0b45bf551f3dca48ae54538c35afa2873e97fda9c559a4909e0
3
+ metadata.gz: ac6d80d81bfdeb6188299d401d4e728585cbf02143eb78685c9d1b4c24fc7d66
4
+ data.tar.gz: 89187ba8fb00f0bb105bbb2418836efe24b003c77c4b30e1b3d511609da11870
5
5
  SHA512:
6
- metadata.gz: 55ecfab661beff414d0bf7a06178ef23802206e03b0cf85fc2fb109342d4a6c45ea674807a5e912422fe9e9b412bcd5ab54081b6b49b114f3867bc0574588206
7
- data.tar.gz: bae7168adddd34eb26291aeb1f64ec450ca5be09007c57ec1c3e6d08243874e7101bc3d645c079a4607a2c1e777711635040be5159d70497475f330f433f322a
6
+ metadata.gz: 2b03ed10e8d213f68d3de7eab1425e234b2bbdfdc95bf3c9da4e3095645c5944424979fa964c75fbf0089d225f5896149c1dbab63acec7c79cf5d5c680910658
7
+ data.tar.gz: 8710c4cbc2d574acc8ef82d4884fc5b19a3c0554293b0cbe634737b384292a8dbcee1df9a67d830901fbc7c1586a7b9f20f65f3f7ec795b8d12bf0ec38c6cfb8
@@ -22,7 +22,7 @@ jobs:
22
22
  runs-on: ubuntu-latest
23
23
  strategy:
24
24
  matrix:
25
- ruby-version: ['2.7', '3.0', '3.1']
25
+ ruby-version: ['2.7', '3.0', '3.1', '3.3']
26
26
 
27
27
  steps:
28
28
  - uses: actions/checkout@v3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 3.0.1 - September 10, 2024
2
+ - Skip empty options in output
3
+
1
4
  ## 3.0.0 - January 27, 2024
2
5
  - Updates for Gamefic 3.0
3
6
 
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in gamefic-tty.gemspec
4
- gemspec
1
+ source "https://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in gamefic-tty.gemspec
4
+ gemspec
@@ -21,7 +21,7 @@ module Gamefic
21
21
 
22
22
  # Update the user with a hash of data representing the current game state.
23
23
  #
24
- # @param data [Hash]
24
+ # @param state [Hash]
25
25
  # @return [void]
26
26
  def update state
27
27
  @output.write state_to_text(state)
@@ -29,7 +29,7 @@ module Gamefic
29
29
 
30
30
  def state_to_text state
31
31
  output = state[:messages].to_s
32
- unless state[:options].nil?
32
+ unless state[:options].nil? || state[:options].empty?
33
33
  list = '<ol class="multiple_choice">'
34
34
  state[:options].each { |o|
35
35
  list += "<li><a href=\"#\" rel=\"gamefic\" data-command=\"#{o}\">#{o}</a></li>"
@@ -1,5 +1,5 @@
1
1
  module Gamefic
2
2
  module Tty
3
- VERSION = '3.0.0'.freeze
3
+ VERSION = '3.0.1'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gamefic-tty
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-27 00:00:00.000000000 Z
11
+ date: 2024-09-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gamefic