Theatre_Explorer 0.1.2 → 0.1.3

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: 134109ee7200cac59cad155755d0781e43d65d9ff4c4e965ccb506d6b6388198
4
- data.tar.gz: 964162f84098cb9aa2ec1b72e2bc5319821227a01b6f223fd4081a897c3c0907
3
+ metadata.gz: fb8ff8b53dcdc89a0053e2624f99f0c7a653dcd23f52f94612f6bca46554805c
4
+ data.tar.gz: ac6db16a9b4bed75080bd5bc2e3fcef9b87e00e02ad0dd8b1f6f7d70725e3017
5
5
  SHA512:
6
- metadata.gz: dc887e32b46c533f1b974e71147646a5503e872c060c7552b0567364ebaad91247575a711643c3cc0e8453db3aa99d652a98d9026ca1c63dce2170c4a5c91410
7
- data.tar.gz: 85b5323730e245a8dca4ed7f7d90e3bd8fa10abd2d6047e27f30ee6c79488c0eca12d8c70cb63e0d1c2d55c55a591c6a8c148cf594c8dbf65ea30b96fbbb156b
6
+ metadata.gz: 58fc0394bc25cb51cfde4dc1f4a1875c1946ec4195711370ff39f0d02aef47161649963d0c54c37584790072eb374a01316d9096011184c20e78619b68920b24
7
+ data.tar.gz: 274f253ff9b366b9cb688bc5a50cc75ebfb7b4f4ee2128c1df2ef194d0cea308e452bfcc1002bb6605c86139a70d6b611dfc6641f3aed336185d5e3bb7f8357b
@@ -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
- selection = options[options.keys[input - 1]]
99
- #Scrapes and instantiates production object based on selection.
100
- show = Scraper.new.production("https://www.broadwayworld.com#{selection}")
101
- show.print
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."
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TheatreExplorer
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: Theatre_Explorer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Drew Keat