upcoming_movies_in_the_park 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/environment.rb +2 -2
- data/lib/upcoming_movies_in_the_park/cli.rb +8 -10
- data/lib/upcoming_movies_in_the_park/gate.rb +0 -2
- data/lib/upcoming_movies_in_the_park/park.rb +1 -2
- data/lib/upcoming_movies_in_the_park/showing.rb +0 -4
- data/lib/upcoming_movies_in_the_park/super.rb +5 -5
- data/lib/upcoming_movies_in_the_park/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5f37dcb723f9a53dfe02a91d7d85eb6a6fbfa4d
|
4
|
+
data.tar.gz: 7846e309fa3d1f5204fa56a304421734b0be62d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0473de5dd70d938fec7e386681dd198d1f47d57c8ff4ddecfca861aab175f8004535bb4fec6614ee7cb9cd1eb025ab60632f0fec6a664757f7985464dc8899af
|
7
|
+
data.tar.gz: c01f1f9ffeb380ee0613aea95093482120525e8da1dadacc92185c8690a1c32c4c841d1c7e0dc263db06de92f6e81bc5910bf56fdb1da0193ffe8917c36c558b
|
data/config/environment.rb
CHANGED
@@ -3,9 +3,9 @@ require 'open-uri'
|
|
3
3
|
require 'colorize'
|
4
4
|
|
5
5
|
require_relative '../lib/upcoming_movies_in_the_park/version'
|
6
|
+
require_relative '../lib/upcoming_movies_in_the_park/super'
|
6
7
|
require_relative '../lib/upcoming_movies_in_the_park/cli'
|
7
8
|
require_relative '../lib/upcoming_movies_in_the_park/showing'
|
8
9
|
require_relative '../lib/upcoming_movies_in_the_park/park'
|
9
10
|
require_relative '../lib/upcoming_movies_in_the_park/gate'
|
10
|
-
require_relative '../lib/upcoming_movies_in_the_park/scraper'
|
11
|
-
require_relative '../lib/upcoming_movies_in_the_park/super'
|
11
|
+
require_relative '../lib/upcoming_movies_in_the_park/scraper'
|
@@ -1,5 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
1
|
class UpcomingMoviesInThePark::CLI
|
4
2
|
|
5
3
|
def call
|
@@ -107,8 +105,7 @@ class UpcomingMoviesInThePark::CLI
|
|
107
105
|
date.list_showings
|
108
106
|
puts "\n"
|
109
107
|
by_date_instructions_2
|
110
|
-
|
111
|
-
by_date_path_2
|
108
|
+
by_date_path_2(date)
|
112
109
|
elsif input == "back"
|
113
110
|
menu
|
114
111
|
break
|
@@ -119,7 +116,8 @@ class UpcomingMoviesInThePark::CLI
|
|
119
116
|
end
|
120
117
|
end
|
121
118
|
|
122
|
-
def by_date_path_2
|
119
|
+
def by_date_path_2(date)
|
120
|
+
input = nil
|
123
121
|
while input != "return"
|
124
122
|
input = gets.strip
|
125
123
|
if input.to_i > 0 && input.to_i <= date.showings.length
|
@@ -174,8 +172,7 @@ class UpcomingMoviesInThePark::CLI
|
|
174
172
|
park.list_showings
|
175
173
|
puts "\n"
|
176
174
|
by_park_instructions_2
|
177
|
-
|
178
|
-
by_park_path_2
|
175
|
+
by_park_path_2(park)
|
179
176
|
elsif input == "back"
|
180
177
|
menu
|
181
178
|
break
|
@@ -186,7 +183,8 @@ class UpcomingMoviesInThePark::CLI
|
|
186
183
|
end
|
187
184
|
end
|
188
185
|
|
189
|
-
def by_park_path_2
|
186
|
+
def by_park_path_2(park)
|
187
|
+
input = nil
|
190
188
|
while input != "return"
|
191
189
|
input = gets.strip
|
192
190
|
if input.to_i > 0 && input.to_i <= park.showings.length
|
@@ -211,7 +209,7 @@ class UpcomingMoviesInThePark::CLI
|
|
211
209
|
def by_park_instructions_1
|
212
210
|
print "Enter ".colorize(:green)
|
213
211
|
print "a number"
|
214
|
-
puts " to get a list of movies playing in that park".colorize(:green)
|
212
|
+
puts " to get a list of movies playing in that park ".colorize(:green)
|
215
213
|
print "or enter ".colorize(:green)
|
216
214
|
print "back"
|
217
215
|
puts " to go back to the main menu.".colorize(:green)
|
@@ -223,7 +221,7 @@ class UpcomingMoviesInThePark::CLI
|
|
223
221
|
puts " to get the showing details for that movie".colorize(:cyan)
|
224
222
|
print "or enter ".colorize(:cyan)
|
225
223
|
print "return"
|
226
|
-
print " to return to the list of parks".colorize(:cyan)
|
224
|
+
print " to return to the list of parks ".colorize(:cyan)
|
227
225
|
puts "in which upcoming movies are playing.".colorize(:cyan)
|
228
226
|
end
|
229
227
|
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require_relative './super'
|
2
|
-
|
3
1
|
class UpcomingMoviesInThePark::Park
|
4
2
|
attr_accessor :name, :showings
|
5
3
|
include UpcomingMoviesInThePark::Super::InstanceMethods
|
@@ -7,6 +5,7 @@ class UpcomingMoviesInThePark::Park
|
|
7
5
|
|
8
6
|
@@all =[]
|
9
7
|
|
8
|
+
|
10
9
|
def self.all
|
11
10
|
@@all
|
12
11
|
end
|
@@ -6,11 +6,6 @@ module UpcomingMoviesInThePark::Super
|
|
6
6
|
self.class.all << self
|
7
7
|
end
|
8
8
|
|
9
|
-
def list_showings
|
10
|
-
self.showings.each_with_index {|showing, i|
|
11
|
-
puts "#{i +1}. #{showing.name}".colorize(:cyan)}
|
12
|
-
end
|
13
|
-
|
14
9
|
end
|
15
10
|
|
16
11
|
module GateParkInstanceMethods
|
@@ -18,6 +13,11 @@ module UpcomingMoviesInThePark::Super
|
|
18
13
|
def add_showing(showing)
|
19
14
|
self.showings << showing
|
20
15
|
end
|
16
|
+
|
17
|
+
def list_showings
|
18
|
+
self.showings.each_with_index {|showing, i|
|
19
|
+
puts "#{i +1}. #{showing.name}".colorize(:cyan)}
|
20
|
+
end
|
21
21
|
|
22
22
|
end
|
23
23
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: upcoming_movies_in_the_park
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sgibson47
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|