bookworm_buddy 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -7
- data/bin/bookworm_buddy +1 -1
- data/lib/bookworm_buddy/book.rb +0 -5
- data/lib/bookworm_buddy/category.rb +1 -2
- data/lib/bookworm_buddy/cli.rb +5 -0
- data/lib/bookworm_buddy/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e34ef3bfc7c100c10838e5963cf58a7d585d107d
|
4
|
+
data.tar.gz: 9c55454579c95614bcecc16cf15f8d3fba222d31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28bb8cea8cc0e888f40fcbe72a4925daa209340742375cbf7b55675b4de0b469ee96cc10b72b12e17bbe95d2e52e5b59e6f636c0eea36f2b631016bd7d636be3
|
7
|
+
data.tar.gz: 4005d163d4f210310c200747d27c586709ba2a170cbc8fe44a305c649a8b20574b520423bf66daf8ecf5533dcf390ab2bcd3df3734329ad91b0d5b9a8e2ebf31
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,17 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bookworm_buddy (0.1.
|
4
|
+
bookworm_buddy (0.1.5)
|
5
5
|
colorize (~> 0.8.1)
|
6
6
|
nokogiri
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
coderay (1.1.2)
|
12
11
|
colorize (0.8.1)
|
13
|
-
method_source (0.9.0)
|
14
12
|
mini_portile2 (2.3.0)
|
15
13
|
nokogiri (1.8.2)
|
16
14
|
mini_portile2 (~> 2.3.0)
|
17
|
-
pry (0.11.3)
|
18
|
-
coderay (~> 1.1.0)
|
19
|
-
method_source (~> 0.9.0)
|
20
15
|
rake (10.5.0)
|
21
16
|
|
22
17
|
PLATFORMS
|
@@ -25,7 +20,6 @@ PLATFORMS
|
|
25
20
|
DEPENDENCIES
|
26
21
|
bookworm_buddy!
|
27
22
|
bundler (~> 1.16)
|
28
|
-
pry
|
29
23
|
rake (~> 10.0)
|
30
24
|
|
31
25
|
BUNDLED WITH
|
data/bin/bookworm_buddy
CHANGED
data/lib/bookworm_buddy/book.rb
CHANGED
@@ -13,12 +13,7 @@ class BookwormBuddy::Book
|
|
13
13
|
|
14
14
|
def self.list_books_by_category(category_number)
|
15
15
|
puts BookwormBuddy::Category::ALL[category_number.to_i - 1].name.colorize(:magenta)
|
16
|
-
if ALL == []
|
17
|
-
puts "\n""So sorry, that category seems to be empty at the moment. Check back soon!".colorize(:red)
|
18
|
-
BookwormBuddy::CLI.new.main_menu
|
19
|
-
else
|
20
16
|
ALL.each_with_index {|book, index| puts "#{index+1}. \"#{book.title}\" - by: #{book.author} - #{book.price}"}
|
21
|
-
end
|
22
17
|
end
|
23
18
|
|
24
19
|
def self.list_title(book)
|
data/lib/bookworm_buddy/cli.rb
CHANGED
@@ -46,11 +46,16 @@ class BookwormBuddy::CLI
|
|
46
46
|
input = gets.strip
|
47
47
|
if input.to_i.between?(1, 50)
|
48
48
|
BookwormBuddy::Scraper.get_books_by_category(input)
|
49
|
+
if BookwormBuddy::Book::ALL.empty?
|
50
|
+
puts "\n""So sorry, that category seems to be empty at the moment. Please try another category!".colorize(:red)
|
51
|
+
bestsellers
|
52
|
+
else
|
49
53
|
BookwormBuddy::Book.list_books_by_category(input)
|
50
54
|
puts "\n""----------------------------------------".colorize(:cyan)
|
51
55
|
puts "\n""To see the summary of a title that interests you, enter that number below. Otherwise, enter 'list' to return to the list of categories, or 'exit' to exit.".colorize(:green)
|
52
56
|
puts "\n""----------------------------------------""\n".colorize(:cyan)
|
53
57
|
description
|
58
|
+
end
|
54
59
|
elsif input == "list"
|
55
60
|
list
|
56
61
|
elsif input == "exit"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bookworm_buddy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kristen Leach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|