nyc-theater-discounts 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: 3f203e6b7b2882843853d1e6397d0d5c94e2935c
4
- data.tar.gz: 6cd39076c7d298eaa31b4315541eff91bb097b2f
3
+ metadata.gz: a46497a1269b4e2a5bbf155cfec5662a378d2ac4
4
+ data.tar.gz: 5a3acb6780a3a28ffaf5c45e48f82d022172da86
5
5
  SHA512:
6
- metadata.gz: 05494f671086c4af309611e8436e7c47a43f8bfbf7d1f1419d7860ae02ca55ac1929d5ed880500383c91a2070aed05b7bc580142fc38beff289025ade9ff009e
7
- data.tar.gz: 27accf4a9890f211e66467ee18a19065acd44eb99640ea1099b243928b6ede287868163144ac942931e13536954d499e65f30cee7f5ca90c87f71e19e29860e2
6
+ metadata.gz: d6b6ea36f673fb6d206da60abd668487c79b3d23d3067a736fddef0948c2f79f9fb8325420226bc3a2c2ec92ea8ad65abbf964a510ed9b245812f05158b94d38
7
+ data.tar.gz: e2ff6d272e18ca2d14c255f185fd936503e65936ec078b646ad24a65a2b8437a440619eaab205e22044857fd384de7bb471f229abf787e19d25dee4a425d8169
@@ -3,4 +3,5 @@
3
3
  require_relative '../config/environment'
4
4
  require_relative '../lib/nyc_theater_discounts.rb'
5
5
 
6
- NYCTheaterDiscounts::CLI.new.call
6
+ NYCTheaterDiscounts::CLI.new.call
7
+
@@ -4,10 +4,11 @@ require 'pry'
4
4
  class NYCTheaterDiscounts::CLI
5
5
 
6
6
  def call
7
+ puts "*** Loading Deals ***"
7
8
  NYCTheaterDiscounts::Scraper.load_TodayTix
8
9
  NYCTheaterDiscounts::Scraper.load_Theatermania
9
10
  NYCTheaterDiscounts::Scraper.load_BroadwayBox
10
- puts "Hello theater nerd! Here are the discount sources available:"
11
+ puts "Hello theater nerd! Here are the discount sources available today:"
11
12
  list_vendors
12
13
  puts "To see a list of deals for each vendor type the number of the vendor. To search by show type 'by show'. To quit, type 'exit'."
13
14
  starting_menu
@@ -13,7 +13,7 @@ class NYCTheaterDiscounts::Scraper
13
13
  deals_page.css("div.shows_hero_container a.heroTile.grid").each do |show|
14
14
 
15
15
  title = show.css('header span.title').text
16
- link = "http://www.todaytix.com/" + show['href']
16
+ link = "http://www.todaytix.com" + show['href']
17
17
  price = show['data-min-price']
18
18
  price = "$" + price.to_s
19
19
 
@@ -37,7 +37,7 @@ class NYCTheaterDiscounts::Scraper
37
37
  deals_page.css("div#listings_right div#result div.list div.show.logo").each do |show|
38
38
 
39
39
  title = show.css('a.show-title span.show-name').text
40
- link = "http://www.theatermania.com/" + show.css('a.show-title')[0]['href']
40
+ link = "http://www.theatermania.com" + show.css('a.show-title')[0]['href']
41
41
  price = show.css("div strong").text
42
42
 
43
43
  newshow = NYCTheaterDiscounts::Show.new(title, price, link)
@@ -7,29 +7,21 @@ class NYCTheaterDiscounts::Show
7
7
 
8
8
  @@all = []
9
9
 
10
- def initialize(name, price, deal_url)
11
- @name = name
12
- @price = price
13
- @deal_url = deal_url
10
+ def initialize(show_name, show_price, url)
11
+ @name = show_name
12
+ @price = show_price
13
+ @deal_url = url
14
14
  @vendors = []
15
15
  @@all << self
16
16
  end
17
+
17
18
 
18
19
  def self.all
19
- if @@all.uniq == @@all
20
- @@all
21
- else
22
- @@all.uniq!
23
- end
20
+ @@all
24
21
  end
25
22
 
26
23
  def vendors
27
- if @vendors.uniq == @vendors
28
- @vendors
29
- else
30
- @vendors.uniq!
31
- end
32
- return @vendors
24
+ @vendors
33
25
  end
34
26
 
35
27
  def find_by_name(nameval)
@@ -7,28 +7,18 @@ class NYCTheaterDiscounts::Vendor
7
7
 
8
8
  @@all = []
9
9
 
10
- def initialize(name, path)
11
- @name = name
10
+ def initialize( vendor_name, path)
11
+ @name = vendor_name
12
12
  @url = path
13
13
  @shows = []
14
14
  @@all << self
15
15
  end
16
16
 
17
17
  def self.all
18
- if @@all.uniq == @@all
19
- @@all
20
- else
21
- @@all.uniq!
22
- end
18
+ @@all
23
19
  end
24
20
 
25
21
  def shows
26
- if @shows.uniq == @shows
27
- @shows
28
- else
29
- @shows.uniq!
30
- end
31
- return @shows
22
+ @shows
32
23
  end
33
-
34
24
  end
@@ -1,3 +1,3 @@
1
1
  module NYCTheaterDiscounts
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nyc-theater-discounts
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
  - Kaileigh McCrea
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-02 00:00:00.000000000 Z
11
+ date: 2016-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -107,6 +107,7 @@ files:
107
107
  - lib/nyc_theater_discounts/version.rb
108
108
  - nyc-theater-discounts-0.1.0.gem
109
109
  - nyc-theater-discounts-0.1.1.gem
110
+ - nyc-theater-discounts-0.1.2.gem
110
111
  - nyc-theater-discounts.gemspec
111
112
  homepage: https://github.com/kaileighrose/nyc-theater-discounts-cli-gem
112
113
  licenses: