stelling_banjos 1.0.0 → 1.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
  SHA256:
3
- metadata.gz: 4122058233a8d1c53113d419875b147a7854d0a9a5619163f80e7e48ed1ab1c2
4
- data.tar.gz: b2f5566a513d651b2bf7be972b735a6044b3ad19540847a6ce2661501228ef4f
3
+ metadata.gz: 82d0087d7cdaf23b08bc1b02f628da848d5d2e24d98aa246e739bd6d5f60f4f5
4
+ data.tar.gz: 7c6fd21f7591def299593c3edb6cc6d8f6a9871ab6b0296a450ac3cbd47088fe
5
5
  SHA512:
6
- metadata.gz: a690d0b7fcc872d7d7a5051f4099e31a5eb48df66d468a5d6753bd1c31e1ecc428b7d96decd3af11d2cb611dc1d55f8505246f9d2e45da7d55398be44a6edc10
7
- data.tar.gz: 2eaa41ddeca2775a4721dfc1ffd02aada71298ed1b562d5b4a435ffb3fb5a8059438a11ff63fc79bc9f535432c424f153d4337215b52b599f7c6feca919df320
6
+ metadata.gz: 4898c1de89c9693b2fc18d5b5bc7c8d62f85d62ee42d2485262662df4280aade05087ee021c8739c471e4174f10ed5c11d1fd6f98a184421eeb18ae249c34547
7
+ data.tar.gz: 93624c393e7082f8eb335542a4766c2caf04d43cadef43fc41225840941592ba72b92b19cca31be565e40398a00560a1e8fb49f6980cf32a6c3c1e704c6c799c
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # StellingBanjos
2
2
 
3
3
  The StellingBanjos gem provides the user with a list of Stelling Banjos (the best banjos) for sale
4
- from the website https://www.elderly.com using a CLI. The catelog displays each banjo name, the price,
4
+ from the website https://www.elderly.com using a CLI. The catalog displays each banjo name, the price,
5
5
  and whether or not it is in stock.
6
6
 
7
7
  The user can then make a specific banjo selection to view more information about a banjo and can follow
@@ -25,7 +25,7 @@ Or install it yourself as:
25
25
 
26
26
  ## Usage
27
27
 
28
- Simply enter the CLI by running ruby bin/banjo and follow the on-screen instructions.
28
+ Start the CLI by entering "banjo" into the terminal.
29
29
 
30
30
  ## Development
31
31
 
@@ -11,7 +11,7 @@ class StellingBanjos::Banjos
11
11
  @@all << self
12
12
  end
13
13
 
14
- def self.create_from_catelog(array)
14
+ def self.create_from_catalog(array)
15
15
  array.each do |hash|
16
16
  self.new(hash[:name], hash[:price], hash[:link], hash[:sold_out])
17
17
  end
@@ -12,7 +12,7 @@ class StellingBanjos::Cli
12
12
  puts " ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚════╝ ╚═════╝ ╚══════╝╚═╝".colorize(:green)
13
13
  puts " ██████████████████████████████████████████████████████".colorize(:green)
14
14
  puts ""
15
- puts " Hello! Welcome to the Stelling Banjos catelog! The best banjos in the world!"
15
+ puts " Hello! Welcome to the Stelling Banjos catalog! The best banjos in the world!"
16
16
  first_menu
17
17
  end
18
18
 
@@ -20,7 +20,7 @@ class StellingBanjos::Cli
20
20
  puts ""
21
21
  puts " MENU"
22
22
  puts " ══════════════════════════════════"
23
- puts " -Press 'Enter' to view the catelog".colorize(:green)
23
+ puts " -Press 'Enter' to view the catalog".colorize(:green)
24
24
  puts " -Type 'Exit' to leave".colorize(:red)
25
25
  puts " ══════════════════════════════════"
26
26
 
@@ -40,18 +40,18 @@ class StellingBanjos::Cli
40
40
  end
41
41
 
42
42
  def create_banjos
43
- StellingBanjos::Scraper.scrape_catelog_page(LINK)
44
- StellingBanjos::Banjos.create_from_catelog(StellingBanjos::Scraper.all)
43
+ StellingBanjos::Scraper.scrape_catalog_page(LINK)
44
+ StellingBanjos::Banjos.create_from_catalog(StellingBanjos::Scraper.all)
45
45
  end
46
46
 
47
47
  def display_banjos
48
48
  puts ""
49
- puts " ██████╗ █████╗ ████████╗███████╗██╗ ██████╗ ██████╗ ".colorize(:green)
50
- puts " ██╔════╝██╔══██╗╚══██╔══╝██╔════╝██║ ██╔═══██╗██╔════╝ ".colorize(:green)
51
- puts " ██║ ███████║ ██║ █████╗ ██║ ██║ ██║██║ ███╗".colorize(:green)
52
- puts " ██║ ██╔══██║ ██║ ██╔══╝ ██║ ██║ ██║██║ ██║".colorize(:green)
53
- puts " ╚██████╗██║ ██║ ██║ ███████╗███████╗╚██████╔╝╚██████╔╝".colorize(:green)
54
- puts " ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝ ╚═════╝ ╚═════╝ ".colorize(:green)
49
+ puts " ██████╗ █████╗ ████████╗ █████╗ ██╗ ██████╗ ██████╗ ".colorize(:green)
50
+ puts " ██╔════╝██╔══██╗╚══██╔══╝██╔══██╗██║ ██╔═══██╗██╔════╝ ".colorize(:green)
51
+ puts " ██║ ███████║ ██║ ███████║██║ ██║ ██║██║ ███╗".colorize(:green)
52
+ puts " ██║ ██╔══██║ ██║ ██╔══██║██║ ██║ ██║██║ ██║".colorize(:green)
53
+ puts " ╚██████╗██║ ██║ ██║ ██║ ██║███████╗╚██████╔╝╚██████╔╝".colorize(:green)
54
+ puts " ╚═════╝╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═════╝ ".colorize(:green)
55
55
  puts " ███████████████████████████████████████████████████████████".colorize(:green)
56
56
  puts " ~ Supplied by www.elderly.com ~".colorize(:red)
57
57
  puts ""
@@ -118,7 +118,7 @@ class StellingBanjos::Cli
118
118
  puts " MENU"
119
119
  puts " ══════════════════════════════════════════"
120
120
  puts " -Enter another banjo number".colorize(:green)
121
- puts " -Type 'Catelog' to view the catelog again".colorize(:green)
121
+ puts " -Type 'Catalog' to view the catalog again".colorize(:green)
122
122
  puts " -Type 'Exit' to exit".colorize(:red)
123
123
  puts " ══════════════════════════════════════════"
124
124
  puts ""
@@ -129,7 +129,7 @@ class StellingBanjos::Cli
129
129
  elsif input.to_i.between?(1, StellingBanjos::Banjos.all.length)
130
130
  puts " Loading...".colorize(:red)
131
131
  info_page_display(input)
132
- elsif input.downcase == "catelog"
132
+ elsif input.downcase == "catalog"
133
133
  display_banjos
134
134
  else
135
135
  puts ""
@@ -2,9 +2,9 @@ class StellingBanjos::Scraper
2
2
 
3
3
  @@all = []
4
4
 
5
- def self.scrape_catelog_page(link)
6
- catelog = Nokogiri::HTML(open(link))
7
- catelog.css("div.ProductItem").each do |banjo|
5
+ def self.scrape_catalog_page(link)
6
+ catalog = Nokogiri::HTML(open(link))
7
+ catalog.css("div.ProductItem").each do |banjo|
8
8
  name = banjo.css("h2").text.strip
9
9
  if banjo.css("span").text.strip.include?("Sold out")
10
10
  sold_out = "Yes"
@@ -1,3 +1,3 @@
1
1
  module StellingBanjos
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.1"
3
3
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stelling_banjos
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "'Riley Slayden'"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-19 00:00:00.000000000 Z
11
+ date: 2019-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -81,7 +81,6 @@ files:
81
81
  - LICENSE.txt
82
82
  - README.md
83
83
  - Rakefile
84
- - banjo_deals-0.1.0.gem
85
84
  - bin/banjo
86
85
  - bin/console
87
86
  - bin/setup
@@ -91,6 +90,7 @@ files:
91
90
  - lib/stelling_banjos/scraper.rb
92
91
  - lib/stelling_banjos/version.rb
93
92
  - stelling_banjos-0.1.0.gem
93
+ - stelling_banjos-1.0.0.gem
94
94
  - stelling_banjos.gemspec
95
95
  homepage: https://github.com/slaydenriley/stelling_banjos
96
96
  licenses:
Binary file