sapling-dialogue 0.1.1 → 0.1.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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sapling/dialogue.rb +6 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3acc37ddfad7efb3df53deafd404aea470df1fc7
4
- data.tar.gz: ce6e29ac7f95c6c0db76cfeffb2e3ba86c1ba81f
3
+ metadata.gz: 65949c605f5d3e972a42bfcebd90100b9e395b5d
4
+ data.tar.gz: a45eb06d4d4254f0504af2c15976cdce6efde9d4
5
5
  SHA512:
6
- metadata.gz: efe7c71965dc68be6471cf121102678c9a54a2c77bc379016db257c89a8bbb25d74300fc1eecb5f1cf3be62e01bfc9908a0730fc1951a3e6d3f55f15bb8aaed7
7
- data.tar.gz: ecfa454ac7df9d6f4e2d21b6a31051a20d690beb2df16a69cfab249e6af97f0d94559be0bc0ce61b1f3652ee2dfbad3624ed4b4c49ef5ba5a4f8f88f5efb7763
6
+ metadata.gz: ce60ff39713fc0092a10992ee59a300a42b956dd6ed303c98ea016ced37a1a0ee77221487e083852291e2cd3d74840e550f9a15808bf4599377dabdb689d38ec
7
+ data.tar.gz: dac6ef640a8f22350e44be4fdee09a232b94f09780915f58f90c4ea6d8f75d64bd97faab8effd78a3878d8ac3410c82878b31c85784eb69730ae42285e21429e
@@ -84,16 +84,15 @@ module Dialogue
84
84
 
85
85
  print "\n[#{valid_options}]> "
86
86
  STDOUT.flush
87
- response = STDIN.gets.chomp.to_i
87
+ response = STDIN.gets.chomp
88
88
 
89
- until branch['options'].keys.include?(response) || response.zero?
90
- print '[## Invalid options. '
91
- print "Valid options are #{valid_options}, or 0 to exit."
92
- print "\n[#{valid_options}]> "
93
- response = STDIN.gets.chomp.to_i
89
+ until valid_options.include?(response) || response.to_i.zero?
90
+ print "[## Invalid options. Valid options are #{valid_options}," \
91
+ "or 0 to exit.\n[#{valid_options}]> "
92
+ response = STDIN.gets.chomp
94
93
  end
95
94
 
96
- response
95
+ response.to_i
97
96
  end
98
97
 
99
98
  # Check if a branch is terminal
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sapling-dialogue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bill Niblock