tripadvisor_best 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: 93628745e00cfa40e25fcd447bd27658ab78fbbc
4
- data.tar.gz: 9b022fd04f47f899827fbd99309e8ec8880c00ca
3
+ metadata.gz: e9131933a25c7c0616640a7672176dc267fdfabe
4
+ data.tar.gz: ec5e0a9066b9975267eb5b18e9cfcae9c2c0261c
5
5
  SHA512:
6
- metadata.gz: d71891a3f5da862d12ca9accd9479a45cf389adf38b9913bc9c3e25faafbfec7b80210faa2b1aa19313e142b797c1ab659e8122d0a215ecda4977b840afceda3
7
- data.tar.gz: 7aae0ad169d783978a25086fbafc0242268c3fd74f990583d2347b66a8d8e72ab5b856ca25aba0cffeed73899e8b14c229a4d7dea66facbe7a22133eec1e0cdf
6
+ metadata.gz: 0e790f0cfcef956fd3bf81345ad4c723db47cff8756685fa6c21bbce45a2b99090db7ddeb5c27eef123930b8a7f09b841be03e9a9498031fc0e5dbf09d83ae2d
7
+ data.tar.gz: eda73868bdc0d2c54b91e8c600eb5715f52beff7daa19c30d5efaafbba032f39a24a4030b8cc66a6c090147ec3cc3ab08acc7c66c9714c76b2d25964f9542a39
@@ -8,7 +8,6 @@ class TripAdvisorBest::CLI
8
8
  {class_name: TripAdvisorBest::Landmark, url: "https://www.tripadvisor.com/TravelersChoice-Landmarks"}
9
9
  ]
10
10
  make_highlights
11
- add_highlight_details
12
11
  end
13
12
 
14
13
  def make_highlights
@@ -20,22 +19,13 @@ class TripAdvisorBest::CLI
20
19
  end
21
20
  end
22
21
 
23
- def add_highlight_details
24
- puts "It's gonna be great!"
25
- self.sites.each do |site|
26
- site[:class_name].all.each do |highlight|
27
- attributes = TripAdvisorBest::Scraper.new.scrap_details_page(highlight.url)
28
- highlight.add_highlight_attributes(attributes)
29
- end
30
- end
31
- end
32
-
33
22
  def call
34
23
  welcome
35
24
  menu
36
25
  end
37
26
 
38
27
  def welcome
28
+ puts ""
39
29
  puts "The TripAdvisor Traveler's Choice Awards are out.".colorize(:red)
40
30
  puts ""
41
31
  puts "Are you ready to travel the world?"
@@ -74,11 +64,13 @@ class TripAdvisorBest::CLI
74
64
 
75
65
  def list_options
76
66
  puts "Currently you can see..."
67
+ puts ""
77
68
  puts <<-DOC
78
69
  1. Top 25 Museums
79
70
  2. Top 25 Attractions
80
71
  3. Top 25 Landmarks
81
72
  DOC
73
+ puts ""
82
74
  puts "Which would you like to see?"
83
75
  end
84
76
 
@@ -94,6 +86,9 @@ class TripAdvisorBest::CLI
94
86
 
95
87
  if input.between?(1, 25)
96
88
  highlight = class_name.find(input - 1)
89
+
90
+ add_highlight_details(highlight)
91
+
97
92
  highlight_details(class_name, highlight)
98
93
  else
99
94
  puts "I didn't get that..."
@@ -114,6 +109,11 @@ class TripAdvisorBest::CLI
114
109
  end
115
110
  end
116
111
 
112
+ def add_highlight_details(highlight)
113
+ attributes = TripAdvisorBest::Scraper.new.scrap_details_page(highlight.url)
114
+ highlight.add_highlight_attributes(attributes)
115
+ end
116
+
117
117
  def goodbye
118
118
  puts "Bon voyage!"
119
119
  end
@@ -1,3 +1,3 @@
1
1
  module TripAdvisorBest
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tripadvisor_best
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "'Andrew Bonner'"