shiritori 0.0.8 → 0.0.9
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 +4 -4
- data/lib/shiritori/command.rb +6 -0
- data/lib/shiritori/shiritori.rb +15 -5
- data/lib/shiritori/version.rb +1 -1
- data/lib/shiritori.rb +5 -1
- data/spec/spec_helper.rb +1 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e383ccc9d88bc174196bd9467449017be10e894
|
4
|
+
data.tar.gz: 2159df33eeb83af9a4cd9a1e3519e095a6c0bd53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 320fd05178c0ec755f92c891d4bb3b36eff039299062a9b49a77139774e14c5a68163926d2ecd56a4a776f65e6d9679c35e2cf778a440b634a10fcd459c83934
|
7
|
+
data.tar.gz: 9bd078e3f011e11435455f22beebe298a181f63f0fe828e1d1fe9e7334b0329b58132aa9533a8beca9e09fb61a8d7cf65eaf115bd60bdc893415c90abd73ab43
|
data/lib/shiritori/shiritori.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'pp'
|
2
|
+
require 'readline'
|
2
3
|
|
3
4
|
module Shiritori
|
4
5
|
class Main
|
@@ -42,11 +43,16 @@ module Shiritori
|
|
42
43
|
@success = false
|
43
44
|
|
44
45
|
loop do
|
45
|
-
|
46
|
+
|
47
|
+
if Shiritori::ENV == :development
|
48
|
+
print "Please input first object > "
|
49
|
+
command = $stdin.gets
|
50
|
+
else
|
51
|
+
command = Readline.readline("Please input first object > ", true)
|
52
|
+
end
|
46
53
|
|
47
54
|
begin
|
48
|
-
|
49
|
-
@current_object = eval(str)
|
55
|
+
@current_object = eval(command.chomp)
|
50
56
|
@current_chain << @current_object.to_ss
|
51
57
|
@success = true
|
52
58
|
break
|
@@ -78,8 +84,12 @@ module Shiritori
|
|
78
84
|
|
79
85
|
new_line
|
80
86
|
|
81
|
-
|
82
|
-
|
87
|
+
if Shiritori::ENV == :development
|
88
|
+
print "Please input first object > "
|
89
|
+
command = $stdin.gets
|
90
|
+
else
|
91
|
+
command = Readline.readline("Please input first object > ", true)
|
92
|
+
end
|
83
93
|
|
84
94
|
break if command.nil?
|
85
95
|
redo if command.blank?
|
data/lib/shiritori/version.rb
CHANGED
data/lib/shiritori.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shiritori
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- siman-man
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- Rakefile
|
97
97
|
- bin/shiritori
|
98
98
|
- lib/shiritori.rb
|
99
|
+
- lib/shiritori/command.rb
|
99
100
|
- lib/shiritori/convert.rb
|
100
101
|
- lib/shiritori/error.rb
|
101
102
|
- lib/shiritori/search_method.rb
|