travel_inspiration 0.1.2 → 0.1.3

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: 8242a582935be0ca87e96785d76cfe5ff4418f1e
4
- data.tar.gz: 071ff8f5cb3e78cedd2e6c0adc68ae4887f0fc05
3
+ metadata.gz: 463d9760f32d7a22f5e32205ecaf438106f38e0d
4
+ data.tar.gz: d5b545d638140f88c5645ea0aeef3a7d651f2b51
5
5
  SHA512:
6
- metadata.gz: 6ff8b1c0fb0072ddd27b6e55319800ba623e8dddc5054424597d9349b136a7cfd687c538bf3d26ff02db9897a43c2919fe2bbf7e6464eba6da6ab9bc9a8f322d
7
- data.tar.gz: d5ebbf2d7c274e4507347c3e42afa2268106b5a141439c5feefd77cb907a89da5e357e3b086763e5c17ec654072b9564620e59c4cc6147dbededbd3786d046f1
6
+ metadata.gz: 506a5afe5d05db299f68a77e1c3b6cd7c33b7fd2f023fcbe936622ee97b140d16d7c88525f7a0c54f3812329717e2d3c69ab0150e94ed52c6eba61e2b41be4e1
7
+ data.tar.gz: 8923b3a3eae24701c5ed9a08e6b0984d34a8193cfeabbb67f0bfeaaa8409d8630f95e9700e70fd2038472058dac1328770095b46b02ea2d6c83fd96c9a6f1e62
@@ -1,4 +1,3 @@
1
- require 'pry'
2
1
  require_relative 'themes.rb'
3
2
  require_relative 'destinations.rb'
4
3
  require_relative 'country.rb'
@@ -16,9 +16,9 @@ module TravelInspiration
16
16
  scrape_info #set country name, summary_quote and details
17
17
 
18
18
  puts "\t#{@best_visit_season}!
19
- #{@high_season}\n
19
+ #{@high_season}
20
20
  #{@low_season}\n"
21
- puts "#{@summary_quote}".blue.on_yellow
21
+ puts "\n#{@summary_quote}".blue.bold
22
22
  puts @details
23
23
  end
24
24
 
@@ -41,7 +41,7 @@ module TravelInspiration
41
41
  }
42
42
 
43
43
  @details = subtitles.map.with_index{|title, index|
44
- "\n" + title.upcase + "\n" + descriptions[index] + "\n"
44
+ "\n" + title.upcase.red + "\n" + descriptions[index] + "\n"
45
45
  }
46
46
  end
47
47
 
@@ -61,7 +61,9 @@ module TravelInspiration
61
61
  end
62
62
 
63
63
  def url
64
- "https://www.lonelyplanet.com/" + @name.downcase.sub(" ", "-")
64
+ downcased = @name.downcase
65
+ dasherized = downcased.gsub(/[\s,]+/,"-")
66
+ "https://www.lonelyplanet.com/" + dasherized
65
67
  end
66
68
  end
67
69
  end
@@ -25,7 +25,7 @@ module TravelInspiration
25
25
  end
26
26
 
27
27
  def self.url_for_theme_name(theme_name)
28
- "https://www.lonelyplanet.com/#{theme_name.downcase.sub(" ", "-")}/"
28
+ "https://www.lonelyplanet.com/#{theme_name.downcase.gsub!(/[\s,]+/,"-")}/"
29
29
  end
30
30
  end
31
31
  end
@@ -1,3 +1,3 @@
1
1
  module TravelInspiration
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/spec.md ADDED
@@ -0,0 +1,19 @@
1
+ # Specifications for the CLI Assessment
2
+
3
+ Specs:
4
+ - **[x] Have a CLI for interfacing with the application**
5
+
6
+ My CLI logic is defined in lib/clib.rb file. Once a user installs the gem and executes ```inspire_me``` file, he/she will be prompted with two questions:
7
+
8
+ 1. "Hello! Which travel inspiration will you like to explore for your next trip?"
9
+ 2. "Here are the top 6 destinations for (theme). Please select a destination from 1 - 6"
10
+
11
+ User input is then captured, and used to select an inspiration theme and destination. Finally, more information for the selected country will be displayed.
12
+
13
+ - **[x] Pull data from an external source**
14
+
15
+ In my gem, I am scraping data from [Lonely Planet](https://www.lonelyplanet.com) homepage. Scraper logic are defined in three files: lib/themes.rb, lib/destinations.rb, lib/country.rb.
16
+
17
+ - **[x] Implement both list and detail views**
18
+ There are two layers of list views: Travel inspiration themes, and the 6 destinations per theme.
19
+ User can drill down into a specific destination, a "country" and review more details.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: travel_inspiration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lisa Huang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-12 00:00:00.000000000 Z
11
+ date: 2017-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -103,6 +103,7 @@ files:
103
103
  - lib/travel_inspiration/destinations.rb
104
104
  - lib/travel_inspiration/themes.rb
105
105
  - lib/travel_inspiration/version.rb
106
+ - spec.md
106
107
  - travel_inspiration.gemspec
107
108
  homepage: https://github.com/lisaychuang/travel_inspiration_gem
108
109
  licenses: