Theatre_Explorer 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/Theatre_Explorer/cli.rb +11 -5
- data/lib/Theatre_Explorer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb8ff8b53dcdc89a0053e2624f99f0c7a653dcd23f52f94612f6bca46554805c
|
4
|
+
data.tar.gz: ac6db16a9b4bed75080bd5bc2e3fcef9b87e00e02ad0dd8b1f6f7d70725e3017
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58fc0394bc25cb51cfde4dc1f4a1875c1946ec4195711370ff39f0d02aef47161649963d0c54c37584790072eb374a01316d9096011184c20e78619b68920b24
|
7
|
+
data.tar.gz: 274f253ff9b366b9cb688bc5a50cc75ebfb7b4f4ee2128c1df2ef194d0cea308e452bfcc1002bb6605c86139a70d6b611dfc6641f3aed336185d5e3bb7f8357b
|
data/lib/Theatre_Explorer/cli.rb
CHANGED
@@ -95,15 +95,21 @@ class CLI
|
|
95
95
|
options.keys.each.with_index(1) {|option, index| puts "#{index}) \t #{option}"}
|
96
96
|
puts "Which result would you like to explore?"
|
97
97
|
input = gets.strip.to_i
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
98
|
+
if input.between?(1,options.keys.size)
|
99
|
+
selection = options[options.keys[input - 1]]
|
100
|
+
#Scrapes and instantiates production object based on selection.
|
101
|
+
show = Scraper.new.production("https://www.broadwayworld.com#{selection}")
|
102
|
+
show.print
|
103
|
+
else
|
104
|
+
puts "Input error"
|
105
|
+
sleep(1)
|
106
|
+
production_search
|
107
|
+
end
|
102
108
|
end
|
103
109
|
continue_prompt
|
104
110
|
end
|
105
111
|
end
|
106
|
-
|
112
|
+
#Error to raise in case of empty search results
|
107
113
|
class SearchError < StandardError
|
108
114
|
def message
|
109
115
|
"Search yielded no results."
|