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 +4 -4
- data/lib/travel_inspiration/cli.rb +0 -1
- data/lib/travel_inspiration/country.rb +6 -4
- data/lib/travel_inspiration/themes.rb +1 -1
- data/lib/travel_inspiration/version.rb +1 -1
- data/spec.md +19 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 463d9760f32d7a22f5e32205ecaf438106f38e0d
|
4
|
+
data.tar.gz: d5b545d638140f88c5645ea0aeef3a7d651f2b51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 506a5afe5d05db299f68a77e1c3b6cd7c33b7fd2f023fcbe936622ee97b140d16d7c88525f7a0c54f3812329717e2d3c69ab0150e94ed52c6eba61e2b41be4e1
|
7
|
+
data.tar.gz: 8923b3a3eae24701c5ed9a08e6b0984d34a8193cfeabbb67f0bfeaaa8409d8630f95e9700e70fd2038472058dac1328770095b46b02ea2d6c83fd96c9a6f1e62
|
@@ -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}
|
19
|
+
#{@high_season}
|
20
20
|
#{@low_season}\n"
|
21
|
-
puts "#{@summary_quote}".blue.
|
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
|
-
|
64
|
+
downcased = @name.downcase
|
65
|
+
dasherized = downcased.gsub(/[\s,]+/,"-")
|
66
|
+
"https://www.lonelyplanet.com/" + dasherized
|
65
67
|
end
|
66
68
|
end
|
67
69
|
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.
|
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-
|
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:
|