roadtrip_adventures 0.1.0 → 0.2.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/Gemfile.lock +1 -1
- data/lib/roadtrip_adventures/cli.rb +12 -12
- data/lib/roadtrip_adventures/version.rb +1 -1
- data/roadtrip_adventures-0.1.0.gem +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5fe1ac3fdfbe908a3967ffcc6bdccddcbbd815ea01af5a9ebd997c11c390ab7d
|
|
4
|
+
data.tar.gz: 6f51ae2ef130e41e4b81b42bb261497ed08ff29713ba0c80ec60c572d8745f43
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2975512d02b4dd42b23485843cbca269b109979ebb6efe468e26327f7eaefab6972050dbd0e2ee33caf8592528f3f36fa4ca05ea8a07587a7ee0616963cd0981
|
|
7
|
+
data.tar.gz: 6ea95d4479e31b55ce3b5b84281607d059ebf73195afb8ba105a87ac5b4220b5e89a1c7d7b82e11faadc3b4eeb1c79c6653025f94b1fe44327aaa55640b65d8e
|
data/Gemfile.lock
CHANGED
|
@@ -4,6 +4,7 @@ class RoadtripAdventures::CLI
|
|
|
4
4
|
welcome
|
|
5
5
|
RoadtripAdventures::Scraper.scrape_destinations
|
|
6
6
|
list_destinations
|
|
7
|
+
select_destination
|
|
7
8
|
end
|
|
8
9
|
|
|
9
10
|
def welcome
|
|
@@ -12,33 +13,32 @@ class RoadtripAdventures::CLI
|
|
|
12
13
|
|
|
13
14
|
def list_destinations
|
|
14
15
|
puts "**********DESTINATIONS**********\n".colorize(:blue)
|
|
15
|
-
destination_arr = RoadtripAdventures::Destination.all
|
|
16
|
-
puts destination_arr.map.with_index{|destination, index| "\t#{index+1}. #{destination.name}"}
|
|
16
|
+
@destination_arr = RoadtripAdventures::Destination.all
|
|
17
|
+
puts @destination_arr.map.with_index{|destination, index| "\t#{index+1}. #{destination.name}"}
|
|
17
18
|
puts "\n********************************".colorize(:blue)
|
|
18
19
|
puts "Select a destination from 1-10:".colorize(:yellow)
|
|
19
20
|
puts "********************************".colorize(:blue)
|
|
20
|
-
select_destination(destination_arr)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
def select_destination
|
|
23
|
+
def select_destination
|
|
24
24
|
input = nil
|
|
25
25
|
|
|
26
26
|
while input != 'exit'
|
|
27
|
-
input = gets.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
destination_url = destination_arr[input-1].url
|
|
32
|
-
# puts "\nHere are the top 6 adventures for #{destination_name}\n".colorize(:yellow)
|
|
27
|
+
input = gets.strip
|
|
28
|
+
if input.to_i > 0 && input.to_i < 11
|
|
29
|
+
destination_name = @destination_arr[input.to_i-1].name.strip
|
|
30
|
+
destination_url = @destination_arr[input.to_i-1].url
|
|
33
31
|
puts "******************** ".colorize(:blue) + "#{destination_name.upcase} ADVENTURES".colorize(:yellow) + " ********************\n".colorize(:blue)
|
|
34
32
|
list_adventures(destination_name)
|
|
35
33
|
puts "**********************************************************".colorize(:blue)
|
|
36
|
-
|
|
34
|
+
elsif input != 'exit'
|
|
37
35
|
puts "You've made an invalid choice! Make a selection from 1-10 or 'exit' to leave".colorize(:light_blue)
|
|
36
|
+
list_destinations
|
|
38
37
|
input = gets.strip
|
|
38
|
+
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
|
-
goodbye
|
|
41
|
+
goodbye
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
def list_adventures(destination_name)
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: roadtrip_adventures
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jason Stone
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-02-
|
|
11
|
+
date: 2019-02-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -124,6 +124,7 @@ files:
|
|
|
124
124
|
- lib/roadtrip_adventures/destination.rb
|
|
125
125
|
- lib/roadtrip_adventures/scraper.rb
|
|
126
126
|
- lib/roadtrip_adventures/version.rb
|
|
127
|
+
- roadtrip_adventures-0.1.0.gem
|
|
127
128
|
- roadtrip_adventures.gemspec
|
|
128
129
|
homepage: https://github.com/jstone18/roadtrip-adventures-gem
|
|
129
130
|
licenses:
|