what_to_watch 0.2.0 → 0.3.0

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: fbfe166abd42a6387b8c3995350e532366eb82d84fd8ab8a6845a6ff108d5286
4
- data.tar.gz: 868807cd813ffb33713f9acac79c10ece8a3a899a3ecd4e7fcd020b30c215be1
3
+ metadata.gz: 8ab76582498e810e9b39c700e7e7a0e7a364eb82624cdefac298f6956922fed5
4
+ data.tar.gz: 797a9fbe7264072c45630225cb5a42b4d29516f1a9234192d219c6df7fc1ccba
5
5
  SHA512:
6
- metadata.gz: 02c62adc09567322c2d7c552bb6ed0035571cc7cd649efa92d40b49fc4db09f943fd8d44918c724b14658724a544f6a8bae9cf9e991084ea4f7990aeea1b13e5
7
- data.tar.gz: e45ac8e60277c17fa10a1842bd1786e3a487702fbf9725ee5529e39636d1868bc90d0bba993a378fd5af1f7bd060f5a12739364efb18a627ff2fc976435a9307
6
+ metadata.gz: 0fdb3956132b494e1c354488ab8ddb880ff3d27c5a32c162c5f6ca9ffaa98cefa5e6a2ffe0116eb675ce13a451a7e5769034560deddc2319a8d932febe3dfbeb
7
+ data.tar.gz: 997a43210c9196a1ccfae0dfb311ce0c6ed6fe0500677273e9bd0d532f11a8af3433aef621ef97d30cf86eb2547949f0ae135108c47579579bbbdf885a0d9c56
data/.DS_Store CHANGED
Binary file
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- what_to_watch (0.1.3)
4
+ what_to_watch (0.3.0)
5
5
  nokogiri
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -15,7 +15,7 @@ gem 'what_to_watch'
15
15
 
16
16
  ### And then execute:
17
17
 
18
- $ bundle
18
+ $ bundle install
19
19
 
20
20
 
21
21
  ### Or install it yourself as:
@@ -24,9 +24,13 @@ gem 'what_to_watch'
24
24
 
25
25
  ## Usage
26
26
 
27
- Type the below and follow the on screen prompts.
27
+ After installing from the command line, use the executable to run the application.
28
28
 
29
29
  $ what_to_watch
30
+
31
+ From within your own application's code, start the CLI Controller.
32
+
33
+ $ WhatToWatch::CLI.new.start
30
34
 
31
35
  ## Development
32
36
 
@@ -45,4 +49,4 @@ This project is intended to be a safe, welcoming space for collaboration, and co
45
49
 
46
50
  ## License
47
51
 
48
- The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
52
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/lib/.DS_Store CHANGED
Binary file
@@ -6,10 +6,6 @@ class WhatToWatch::BestMovies < WhatToWatch::Show
6
6
  @@all
7
7
  end
8
8
 
9
- def self.reset!
10
- @@all = []
11
- end
12
-
13
9
  def self.section
14
10
  3
15
11
  end
@@ -6,10 +6,6 @@ class WhatToWatch::BestTV < WhatToWatch::Show
6
6
  @@all
7
7
  end
8
8
 
9
- def self.reset!
10
- @@all = []
11
- end
12
-
13
9
  def self.section
14
10
  2
15
11
  end
@@ -24,9 +24,9 @@ class WhatToWatch::CLI
24
24
  end
25
25
 
26
26
  def start
27
- while !exit?
28
27
  which_streaming_services
29
28
  while !exit?
29
+ catch(:main_menu) do
30
30
  main_commands
31
31
  while !exit?
32
32
  case @input
@@ -43,8 +43,7 @@ class WhatToWatch::CLI
43
43
  options
44
44
  break
45
45
  elsif @input == "n"
46
- WhatToWatch::BestMovies.reset!
47
- start
46
+ throw(:main_menu)
48
47
  else
49
48
  invalid_command
50
49
  end
@@ -66,8 +65,7 @@ class WhatToWatch::CLI
66
65
  options
67
66
  break
68
67
  elsif @input == "n"
69
- WhatToWatch::BestTV.reset!
70
- start
68
+ throw(:main_menu)
71
69
  else
72
70
  invalid_command
73
71
  end
@@ -89,8 +87,7 @@ class WhatToWatch::CLI
89
87
  options
90
88
  break
91
89
  elsif @input == "n"
92
- WhatToWatch::RecentlyAdded.reset!
93
- start
90
+ throw(:main_menu)
94
91
  else
95
92
  invalid_command
96
93
  end
@@ -103,7 +100,7 @@ class WhatToWatch::CLI
103
100
  invalid_command
104
101
  end
105
102
  end
106
- end
103
+ end
107
104
  end
108
105
  exit
109
106
  end
@@ -6,10 +6,6 @@ class WhatToWatch::RecentlyAdded < WhatToWatch::Show
6
6
  @@all
7
7
  end
8
8
 
9
- def self.reset!
10
- @@all = []
11
- end
12
-
13
9
  def self.section
14
10
  0
15
11
  end
@@ -12,7 +12,7 @@ attr_accessor :title, :streaming_service, :url, :description, :genre_year, :cast
12
12
  end
13
13
 
14
14
  def self.add_shows
15
- WhatToWatch::Scraper.scrape_vulture(self)
15
+ WhatToWatch::Scraper.scrape_vulture(self) if self.all == []
16
16
  end
17
17
 
18
18
  #Determine Display Based On User Input Recorded in CLI.streaming_services
@@ -45,7 +45,7 @@ attr_accessor :title, :streaming_service, :url, :description, :genre_year, :cast
45
45
 
46
46
  def self.print_item(input)
47
47
  object = self.all[input.to_i-1]
48
- WhatToWatch::Scraper.scrape_imdb(object)
48
+ WhatToWatch::Scraper.scrape_imdb(object) if object.url == nil
49
49
  puts ""
50
50
  puts "===================================="
51
51
  puts " #{object.title.upcase}"
@@ -1,3 +1,3 @@
1
1
  module WhatToWatch
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: what_to_watch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - "'George Pianka'"