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 +4 -4
- data/.DS_Store +0 -0
- data/Gemfile.lock +1 -1
- data/README.md +7 -3
- data/lib/.DS_Store +0 -0
- data/lib/what_to_watch/best_movies.rb +0 -4
- data/lib/what_to_watch/best_tv.rb +0 -4
- data/lib/what_to_watch/cli.rb +5 -8
- data/lib/what_to_watch/recently_added.rb +0 -4
- data/lib/what_to_watch/show.rb +2 -2
- data/lib/what_to_watch/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: 8ab76582498e810e9b39c700e7e7a0e7a364eb82624cdefac298f6956922fed5
|
4
|
+
data.tar.gz: 797a9fbe7264072c45630225cb5a42b4d29516f1a9234192d219c6df7fc1ccba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0fdb3956132b494e1c354488ab8ddb880ff3d27c5a32c162c5f6ca9ffaa98cefa5e6a2ffe0116eb675ce13a451a7e5769034560deddc2319a8d932febe3dfbeb
|
7
|
+
data.tar.gz: 997a43210c9196a1ccfae0dfb311ce0c6ed6fe0500677273e9bd0d532f11a8af3433aef621ef97d30cf86eb2547949f0ae135108c47579579bbbdf885a0d9c56
|
data/.DS_Store
CHANGED
Binary file
|
data/Gemfile.lock
CHANGED
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
|
-
|
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
|
data/lib/what_to_watch/cli.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
103
|
+
end
|
107
104
|
end
|
108
105
|
exit
|
109
106
|
end
|
data/lib/what_to_watch/show.rb
CHANGED
@@ -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}"
|