top_25_travel_destinations 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba88b84e56e971ea46d5e721abecb8c922d3d989
4
- data.tar.gz: c0884303f5da3ee49350fa3bfcbc483eb00ae461
3
+ metadata.gz: 76775d3dc18fe7a0dfd13d030db82ff852741e45
4
+ data.tar.gz: 23f6095ce6c81b551da96a6062564e223ea05ac3
5
5
  SHA512:
6
- metadata.gz: 6e25fad3f52a7389d0f81696031aa649f461cefad657caaed458fd68bc477a7c452315f04531683573b3c55b2a056e094b2e5186e3df94dfbb7a7a3535445386
7
- data.tar.gz: 8b913654439105d4d9419c2c2cd55fdc0c0db1fa7ddd55d6f3056865511e1c15d347d54523aed1570c3832d57b6907d42c82b102ff42c4264d595654b4a969de
6
+ metadata.gz: 86003c6eb09af444a433d8f50027f5da9939b6f9fddfe0520af8348ec12ab1ba2579bbfdf86ff9d4b1d11c74ade9b31bef4630925dab05941c787a7440522238
7
+ data.tar.gz: 63539166c02e0c7f1f4fab196ace64e4d303557e2c8fa9af599467c7a789215ac0554f2b6a8583394956e29448547581938894e038eb8bc2d599d4dfee75e384
@@ -3,34 +3,8 @@
3
3
  class Top25TravelDestinations::CLI
4
4
 
5
5
  def call
6
- puts "Discover the top 25 travel destinations"
7
- #choose_destination
6
+ puts "Discover the top 25 travel destinations according to TripAdvisor!"
8
7
  Destination.new.list_destinations
9
8
  Destination.new.choose_destination
10
-
11
-
12
-
13
-
14
9
  end
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
10
  end #ends our Class
@@ -3,7 +3,7 @@ class Destination
3
3
  attr_accessor :rank, :city, :country, :city_description, :list_destinations
4
4
 
5
5
  def choose_destination
6
- puts "Choose the city that you would like more information on, or type 'exit'"
6
+ puts "Type the city that you would like more information on, or type 'exit'"
7
7
  input = nil #need this so that our while loop can function
8
8
  while input != "exit"
9
9
  input = gets.strip.downcase
@@ -91,8 +91,6 @@ class Destination
91
91
  puts array
92
92
  end
93
93
 
94
-
95
-
96
94
  def destination_1
97
95
  dest = []
98
96
  get_destinations.css('#1').each do |x|
@@ -105,6 +103,7 @@ class Destination
105
103
  dest << d.css('div.description p').text.gsub("Learn More >", "")
106
104
 
107
105
  end
106
+
108
107
  input = nil
109
108
  until input == "menu"
110
109
  puts "What would you like to know about #{dest[1]}?"
@@ -127,9 +126,7 @@ class Destination
127
126
  list_destinations
128
127
  choose_destination
129
128
  else
130
- puts "Incorrect input, please try again"
131
-
132
-
129
+ puts "Incorrect input, please try again"
133
130
  end
134
131
  end
135
132
  end
@@ -1,3 +1,3 @@
1
1
  module Top25TravelDestinations
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: top_25_travel_destinations
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - aenser
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-01-27 00:00:00.000000000 Z
11
+ date: 2016-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -101,8 +101,8 @@ files:
101
101
  - lib/top_25_travel_destinations.rb
102
102
  - lib/top_25_travel_destinations/cli.rb
103
103
  - lib/top_25_travel_destinations/destination.rb
104
- - lib/top_25_travel_destinations/scraper.rb
105
104
  - lib/top_25_travel_destinations/version.rb
105
+ - top_25_travel_destinations-0.1.0.gem
106
106
  - top_25_travel_destinations.gemspec
107
107
  homepage: https://github.com/aenser/top-25-travel-destinations.git
108
108
  licenses:
@@ -1,29 +0,0 @@
1
-
2
-
3
- # class Scraper
4
-
5
- # def get_page
6
- # Nokogiri::HTML(open("http://www.tripadvisor.com/TravelersChoice-Destinations"))
7
- # end
8
-
9
-
10
- # def get_destinations
11
- # self.get_page.css('.tcDest.clickable')
12
- # end
13
-
14
- # def create_destination
15
- # get_destinations.each do |dest|
16
- # destination = Destination.new
17
- # destination.rank = dest.css("div.tcRank").text
18
- # destination.city = dest.css("div.tcWinner.tcCity").text
19
- # destination.country = dest.css("dic.tcWinner.toCountry").text
20
- # destination.description = dest.css("div.description p").text
21
- # #destination.weather = dest.css("").text
22
- # end
23
- # end
24
-
25
-
26
-
27
-
28
-
29
- # end #ends class Scraper