gigs 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.DS_Store +0 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +55 -0
- data/LICENSE +21 -0
- data/NOTES.md +43 -0
- data/README.md +30 -0
- data/Rakefile +6 -0
- data/bin/chromedriver +0 -0
- data/bin/gigs +8 -0
- data/bin/setup +8 -0
- data/gigs.gemspec +41 -0
- data/lib/gigs.rb +15 -0
- data/lib/gigs/artist.rb +20 -0
- data/lib/gigs/cli.rb +82 -0
- data/lib/gigs/concerns/findable.rb +43 -0
- data/lib/gigs/concerts.rb +36 -0
- data/lib/gigs/scraper.rb +38 -0
- data/lib/gigs/venue.rb +28 -0
- data/lib/gigs/version.rb +3 -0
- data/spec.md +0 -0
- data/spec/gigs_spec.rb +9 -0
- data/spec/spec_helper.rb +14 -0
- metadata +167 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ff3811ea9dba7a05571138664422cb787e418211de4ff0633436e39b020cbabc
|
4
|
+
data.tar.gz: 6922743445e9804486aed08972f54c8cbe08ee338d378334f8443c2add842eb0
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 8479b65a31bed8de05ee554d0be14b428f61253f547d80cec79ad3d957ebcaad03978d98671c4061f7ab7f507a9191e81f6530135d317e1c38c8300d9eb0575a
|
7
|
+
data.tar.gz: 6ac426ac4570f7903b83d1b7aee86179c47dc50bf9185e9fbbc854134cb0f1812ae217374ef1d2594f2e20c6916d7782e5db1b9568fa23771eddd53e0255557d
|
data/.DS_Store
ADDED
Binary file
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
gigs (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
childprocess (0.9.0)
|
10
|
+
ffi (~> 1.0, >= 1.0.11)
|
11
|
+
coderay (1.1.2)
|
12
|
+
colorize (0.8.1)
|
13
|
+
diff-lcs (1.3)
|
14
|
+
ffi (1.9.25)
|
15
|
+
method_source (0.9.0)
|
16
|
+
mini_portile2 (2.3.0)
|
17
|
+
nokogiri (1.8.4)
|
18
|
+
mini_portile2 (~> 2.3.0)
|
19
|
+
pry (0.11.3)
|
20
|
+
coderay (~> 1.1.0)
|
21
|
+
method_source (~> 0.9.0)
|
22
|
+
rake (10.5.0)
|
23
|
+
rspec (3.7.0)
|
24
|
+
rspec-core (~> 3.7.0)
|
25
|
+
rspec-expectations (~> 3.7.0)
|
26
|
+
rspec-mocks (~> 3.7.0)
|
27
|
+
rspec-core (3.7.1)
|
28
|
+
rspec-support (~> 3.7.0)
|
29
|
+
rspec-expectations (3.7.0)
|
30
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
+
rspec-support (~> 3.7.0)
|
32
|
+
rspec-mocks (3.7.0)
|
33
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
34
|
+
rspec-support (~> 3.7.0)
|
35
|
+
rspec-support (3.7.1)
|
36
|
+
rubyzip (1.2.1)
|
37
|
+
selenium-webdriver (3.13.1)
|
38
|
+
childprocess (~> 0.5)
|
39
|
+
rubyzip (~> 1.2)
|
40
|
+
|
41
|
+
PLATFORMS
|
42
|
+
ruby
|
43
|
+
|
44
|
+
DEPENDENCIES
|
45
|
+
bundler (~> 1.16)
|
46
|
+
colorize (~> 0.8)
|
47
|
+
gigs!
|
48
|
+
nokogiri (~> 1.8)
|
49
|
+
pry
|
50
|
+
rake (~> 10.0)
|
51
|
+
rspec (~> 3.0)
|
52
|
+
selenium-webdriver (~> 3.13)
|
53
|
+
|
54
|
+
BUNDLED WITH
|
55
|
+
1.16.2
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2018 Kenneth R. Kutschera
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/NOTES.md
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
RUBY CLI Project:
|
2
|
+
|
3
|
+
- Create a CLI project that scrapes websites for information on where and when bands/artists/DJs are playing. This application will show a list of artist, venues and dates to where and when they are touring.(The website that will be scraped from will be bigstub.com).
Gigs CLI should function as follows:
|
4
|
+
- Welcome notification
|
5
|
+
- Asks the user for their favorite artist or any other artist.
|
6
|
+
- The program accepts an input and modifies it is so that it can place it into the website string where it will search for the specific band.
|
7
|
+
- Site is scraped.
|
8
|
+
- Information is displayed.
|
9
|
+
- After the initial artist has been displayed the user can then search for a different artist or see previous searches.
|
10
|
+
- User can exit program anytime by typing ‘exit’ then pressing enter.
|
11
|
+
|
12
|
+
- Create the CLI project using OO. There should be a class for each important attribute for the concert.
Classes are as follows:
|
13
|
+
- Concert: contains all the concerts
|
14
|
+
- Artists: contains all the artists
|
15
|
+
- Venue: contains all the venues and dates
|
16
|
+
|
17
|
+
- Scraper Class:
|
18
|
+
- It will scrape information such as artist, venue, and date.
|
19
|
+
- After scraping the information we will create an instance Concert object for each concert and assign its attributes to these data values.
|
20
|
+
|
21
|
+
- Concert Class:
|
22
|
+
- The class has four attributes and will be used by our Scraper class to create instance objects.
|
23
|
+
- This class has 4 class methods show concerts from a user input, create concert objects, and print past searches.
|
24
|
+
|
25
|
+
- Artist Class
|
26
|
+
- Creates an artist object with a venue attribute.
|
27
|
+
|
28
|
+
- Venue Class
|
29
|
+
- Creates a Venue object with an artist and date attribute.
|
30
|
+
|
31
|
+
- CLI Class
|
32
|
+
- Controls our UI and conditional sequence.
|
33
|
+
|
34
|
+
- Findable Class
|
35
|
+
- Contains repetitive code that most classes use.
|
36
|
+
|
37
|
+
|
38
|
+
- Dependencies Used:
|
39
|
+
- selenium-webdriver: For scraping JS rendered HTML. Creates an open headless browser and waits 5 seconds before throwing an exception. If we find our class name for scraping the headless driver quits and the source page gets saved. If however our class name doesn't exist the user has searched for an artist that doesn't exist or currently not touring.
|
40
|
+
|
41
|
+
- nokogiri: For scraping HTML. Various data is scraped by using the '.css()' method.
|
42
|
+
|
43
|
+
- colorize: For putting color in our CLI.
|
data/README.md
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Gigs
|
2
|
+
|
3
|
+
Welcome to gigs! The CLI gem where you can find out if your favorite artist, or any artist, is touring or not.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'gigs'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or you can install this gem via ```gem install gigs``` on a command line. The ```gigs``` CLI will be installed and you can run ```gigs``` to get a list of any artist, band or DJ's touring schedule.
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
Run: ```gigs``` after installing gem.
|
21
|
+
|
22
|
+
## Development
|
23
|
+
|
24
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
25
|
+
|
26
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
27
|
+
|
28
|
+
## Contributing
|
29
|
+
|
30
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/kenkuts/gigs-cli-app.
|
data/Rakefile
ADDED
data/bin/chromedriver
ADDED
Binary file
|
data/bin/gigs
ADDED
data/bin/setup
ADDED
data/gigs.gemspec
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "gigs/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "gigs"
|
8
|
+
spec.version = Gigs::VERSION
|
9
|
+
spec.authors = ["Kenneth R. Kutschera"]
|
10
|
+
spec.email = ["kennethchoi19@gmail.com"]
|
11
|
+
spec.licenses = ["MIT"]
|
12
|
+
spec.summary = %q{This gem generates a list of tour dates to where your favorite band,artist or DJ is going to perform.}
|
13
|
+
spec.description = %q{}
|
14
|
+
spec.homepage = "https://github.com/kenkuts/gigs-cli-app"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
# if spec.respond_to?(:metadata)
|
19
|
+
# spec.metadata["allowed_push_host"] = "TO DO: Set to 'http://mygemserver.com'"
|
20
|
+
# else
|
21
|
+
# raise "RubyGems 2.0 or newer is required to protect against " \
|
22
|
+
# "public gem pushes."
|
23
|
+
# end
|
24
|
+
|
25
|
+
# Specify which files should be added to the gem when it is released.
|
26
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
|
+
spec.files = `git ls-files`.split($\)#Dir.chdir(File.expand_path('..', __FILE__)) do
|
28
|
+
# `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
29
|
+
# end
|
30
|
+
# spec.bindir = "exe"
|
31
|
+
spec.executables = ["gigs"] #spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ["lib", "lib/gigs"]
|
33
|
+
|
34
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
35
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
36
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
37
|
+
spec.add_development_dependency "nokogiri", "~> 1.8"
|
38
|
+
spec.add_development_dependency "selenium-webdriver", "~> 3.13"
|
39
|
+
spec.add_development_dependency "colorize", "~> 0.8"
|
40
|
+
spec.add_development_dependency "pry", "~> 0"
|
41
|
+
end
|
data/lib/gigs.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
# environment file
|
2
|
+
require 'open-uri'
|
3
|
+
require 'nokogiri'
|
4
|
+
require 'selenium-webdriver'
|
5
|
+
require 'colorize'
|
6
|
+
require 'pry'
|
7
|
+
|
8
|
+
require_relative './gigs/concerns/findable'
|
9
|
+
require_relative './gigs/artist'
|
10
|
+
require_relative './gigs/artist'
|
11
|
+
require_relative './gigs/venue'
|
12
|
+
require_relative './gigs/concerts'
|
13
|
+
require_relative './gigs/version'
|
14
|
+
require_relative './gigs/scraper'
|
15
|
+
require_relative './gigs/cli'
|
data/lib/gigs/artist.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require_relative 'concerns/findable'
|
2
|
+
|
3
|
+
class Artist
|
4
|
+
include Concerns::InstanceMethods
|
5
|
+
extend Concerns::ClassMethods
|
6
|
+
extend Concerns::Findable
|
7
|
+
attr_accessor :name, :venues
|
8
|
+
|
9
|
+
@@all = []
|
10
|
+
|
11
|
+
def initialize(name)
|
12
|
+
super(name)
|
13
|
+
@venues = []
|
14
|
+
end
|
15
|
+
|
16
|
+
# def add_venue(venue)
|
17
|
+
# @venues << venue unless @venues.any?(venue)
|
18
|
+
# end
|
19
|
+
|
20
|
+
end
|
data/lib/gigs/cli.rb
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
class Gigs::CLI
|
2
|
+
|
3
|
+
def run
|
4
|
+
welcome
|
5
|
+
scrape_data
|
6
|
+
end
|
7
|
+
|
8
|
+
def welcome
|
9
|
+
puts <<~HEREDOC
|
10
|
+
=======================================================================================
|
11
|
+
Welcome to Gigs! The CLI gem where you can find out if your favorite artist is touring!
|
12
|
+
Please type in an artist, band or DJ's name to find out where they're touring.
|
13
|
+
To quit program just type 'exit' then press enter. Which artist are you interested in seeing?
|
14
|
+
=======================================================================================
|
15
|
+
HEREDOC
|
16
|
+
.colorize(:cyan)
|
17
|
+
end
|
18
|
+
|
19
|
+
def scrape_data
|
20
|
+
puts "Enter any artist, band or DJ:".colorize(:cyan)
|
21
|
+
input = gets.chomp
|
22
|
+
|
23
|
+
goodbye if input == "exit"
|
24
|
+
concerts = Scraper.scrape_site(input)
|
25
|
+
|
26
|
+
while concerts == nil
|
27
|
+
puts "Unfortunately #{input} doesn't have any gigs lined up.".colorize(:red)
|
28
|
+
puts "Please enter another artist".colorize(:red)
|
29
|
+
scrape_data
|
30
|
+
end
|
31
|
+
|
32
|
+
Concerts.create_concert_obj(concerts)
|
33
|
+
puts "===================#{input.split.map(&:capitalize).join(" ")}'s Gigs===================".colorize(:cyan)
|
34
|
+
Concerts.print_concerts(input)
|
35
|
+
after_initial_artist
|
36
|
+
end
|
37
|
+
|
38
|
+
def after_initial_artist
|
39
|
+
puts "What would you like to do next?".colorize(:cyan)
|
40
|
+
puts "To find another artist, band or DJ type 'search'".colorize(:cyan)
|
41
|
+
puts "To look up past searches type 'list'".colorize(:cyan)
|
42
|
+
puts "To quit type 'exit'".colorize(:cyan)
|
43
|
+
input = gets.chomp
|
44
|
+
|
45
|
+
case input
|
46
|
+
when 'search'
|
47
|
+
scrape_data
|
48
|
+
when 'list'
|
49
|
+
list
|
50
|
+
when 'exit'
|
51
|
+
goodbye
|
52
|
+
else
|
53
|
+
puts "Please make a valid selection".colorize(:red)
|
54
|
+
after_initial_artist
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
58
|
+
|
59
|
+
def list
|
60
|
+
puts "===================Past Searches===================".colorize(:cyan)
|
61
|
+
Concerts.print_past_searches.each { |artist| puts artist.colorize(:red) }
|
62
|
+
puts "Which of these past searches would you like to look at?".colorize(:cyan)
|
63
|
+
input = gets.chomp
|
64
|
+
goodbye if input == "exit"
|
65
|
+
|
66
|
+
unless Concerts.print_past_searches.any? { |artist| artist.casecmp?(input)}
|
67
|
+
puts "===================================================".colorize(:cyan)
|
68
|
+
puts "Please make a valid selection".colorize(:red)
|
69
|
+
list
|
70
|
+
else
|
71
|
+
puts "===================#{input.split.map(&:capitalize).join(" ")}'s Gigs===================".colorize(:cyan)
|
72
|
+
Concerts.print_concerts(input)
|
73
|
+
end
|
74
|
+
|
75
|
+
after_initial_artist
|
76
|
+
end
|
77
|
+
|
78
|
+
def goodbye
|
79
|
+
puts "Thank you for using Gigs! We hope to see you again!".colorize(:cyan)
|
80
|
+
exit
|
81
|
+
end
|
82
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module Concerns
|
2
|
+
|
3
|
+
module Findable
|
4
|
+
def find_by_name(name)
|
5
|
+
all.find { |obj| obj.name == name }
|
6
|
+
end
|
7
|
+
|
8
|
+
def find_or_create_by_name(name)
|
9
|
+
find_by_name(name) || create(name)
|
10
|
+
end
|
11
|
+
|
12
|
+
def list_all_names
|
13
|
+
all.collect { |obj| obj.name }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
module InstanceMethods
|
18
|
+
def initialize(name)
|
19
|
+
@name = name
|
20
|
+
save
|
21
|
+
end
|
22
|
+
|
23
|
+
def save
|
24
|
+
self.class.class_variable_get(:@@all) << self
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
module ClassMethods
|
29
|
+
def all
|
30
|
+
self.class_variable_get(:@@all)
|
31
|
+
end
|
32
|
+
|
33
|
+
def destroy_all
|
34
|
+
all.clear
|
35
|
+
end
|
36
|
+
|
37
|
+
def create(name)
|
38
|
+
new_obj = self.new(name)
|
39
|
+
new_obj
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
class Concerts
|
3
|
+
|
4
|
+
extend Concerns::ClassMethods
|
5
|
+
|
6
|
+
attr_accessor :input, :artist, :venue, :date
|
7
|
+
@@all = []
|
8
|
+
|
9
|
+
def initialize(data)
|
10
|
+
data.each { |key, value| self.send(("#{key}="),value) }
|
11
|
+
@@all << self
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.print_concerts(artist)
|
15
|
+
all.each do |data|
|
16
|
+
if data.input.casecmp?(artist)
|
17
|
+
puts "===================================================".colorize(:color => :cyan)
|
18
|
+
puts "Artist: #{data.artist.name}".colorize(:red)
|
19
|
+
puts "Venue: #{data.venue.name}".colorize(:white)
|
20
|
+
puts "Date: #{data.date}".colorize(:blue)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
puts "===================================================".colorize(:color => :cyan)
|
24
|
+
end
|
25
|
+
|
26
|
+
def self.print_past_searches
|
27
|
+
all.map { |name| name.input.split.map(&:capitalize).join(" ") }.uniq
|
28
|
+
end
|
29
|
+
|
30
|
+
def self.create_concert_obj(data)
|
31
|
+
data.each do |data|
|
32
|
+
Concerts.new(data)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
data/lib/gigs/scraper.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
class Scraper
|
2
|
+
def self.scrape_site(input)
|
3
|
+
link = input.gsub(" ", "-")
|
4
|
+
|
5
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
6
|
+
options.add_argument('--headless')
|
7
|
+
driver = Selenium::WebDriver.for :chrome, options: options
|
8
|
+
driver.get "http://www.bigstub.com/#{link}-tickets.aspx"
|
9
|
+
|
10
|
+
begin
|
11
|
+
wait = Selenium::WebDriver::Wait.new(:timeout => 5)
|
12
|
+
wait.until { /title-holder/.match(driver.page_source) }
|
13
|
+
rescue Selenium::WebDriver::Error::TimeOutError
|
14
|
+
return nil
|
15
|
+
end
|
16
|
+
|
17
|
+
doc = Nokogiri::HTML(driver.page_source)
|
18
|
+
driver.quit
|
19
|
+
|
20
|
+
concerts = []
|
21
|
+
doc.css("div#upcomingEventsList div.item2").each do |info|
|
22
|
+
artist = info.css('div.title-holder h3 a').text
|
23
|
+
venue = info.css('div.title-holder strong.title').text
|
24
|
+
date = info.css('div.ueDate span.midline1').text
|
25
|
+
|
26
|
+
concerts << {
|
27
|
+
input: input,
|
28
|
+
artist: Artist.find_or_create_by_name(artist),
|
29
|
+
venue: Venue.find_or_create_by_name(venue),
|
30
|
+
date: date
|
31
|
+
}
|
32
|
+
|
33
|
+
# Venue.find_or_create_by_name(venue).add_date(date)
|
34
|
+
end
|
35
|
+
concerts
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
data/lib/gigs/venue.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require_relative 'concerns/findable'
|
2
|
+
|
3
|
+
class Venue
|
4
|
+
include Concerns::InstanceMethods
|
5
|
+
extend Concerns::ClassMethods
|
6
|
+
extend Concerns::Findable
|
7
|
+
|
8
|
+
attr_accessor :name
|
9
|
+
attr_reader :artist, :dates
|
10
|
+
|
11
|
+
@@all = []
|
12
|
+
|
13
|
+
def initialize(name)
|
14
|
+
super(name)
|
15
|
+
@dates = []
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
def add_date(date)
|
20
|
+
@dates << date unless @dates.detect { |saved_dates| saved_dates == date }
|
21
|
+
end
|
22
|
+
#
|
23
|
+
# def add_artist(artist)
|
24
|
+
# @artist = artist if artist == nil
|
25
|
+
# artist.add_venue(self)
|
26
|
+
# end
|
27
|
+
|
28
|
+
end
|
data/lib/gigs/version.rb
ADDED
data/spec.md
ADDED
File without changes
|
data/spec/gigs_spec.rb
ADDED
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
require "bundler/setup"
|
2
|
+
require "gigs"
|
3
|
+
|
4
|
+
RSpec.configure do |config|
|
5
|
+
# Enable flags like --only-failures and --next-failure
|
6
|
+
config.example_status_persistence_file_path = ".rspec_status"
|
7
|
+
|
8
|
+
# Disable RSpec exposing methods globally on `Module` and `main`
|
9
|
+
config.disable_monkey_patching!
|
10
|
+
|
11
|
+
config.expect_with :rspec do |c|
|
12
|
+
c.syntax = :expect
|
13
|
+
end
|
14
|
+
end
|
metadata
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gigs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kenneth R. Kutschera
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-08-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: nokogiri
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.8'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: selenium-webdriver
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.13'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.13'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: colorize
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.8'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.8'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: ''
|
112
|
+
email:
|
113
|
+
- kennethchoi19@gmail.com
|
114
|
+
executables:
|
115
|
+
- gigs
|
116
|
+
extensions: []
|
117
|
+
extra_rdoc_files: []
|
118
|
+
files:
|
119
|
+
- ".DS_Store"
|
120
|
+
- Gemfile
|
121
|
+
- Gemfile.lock
|
122
|
+
- LICENSE
|
123
|
+
- NOTES.md
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- bin/chromedriver
|
127
|
+
- bin/gigs
|
128
|
+
- bin/setup
|
129
|
+
- gigs.gemspec
|
130
|
+
- lib/gigs.rb
|
131
|
+
- lib/gigs/artist.rb
|
132
|
+
- lib/gigs/cli.rb
|
133
|
+
- lib/gigs/concerns/findable.rb
|
134
|
+
- lib/gigs/concerts.rb
|
135
|
+
- lib/gigs/scraper.rb
|
136
|
+
- lib/gigs/venue.rb
|
137
|
+
- lib/gigs/version.rb
|
138
|
+
- spec.md
|
139
|
+
- spec/gigs_spec.rb
|
140
|
+
- spec/spec_helper.rb
|
141
|
+
homepage: https://github.com/kenkuts/gigs-cli-app
|
142
|
+
licenses:
|
143
|
+
- MIT
|
144
|
+
metadata: {}
|
145
|
+
post_install_message:
|
146
|
+
rdoc_options: []
|
147
|
+
require_paths:
|
148
|
+
- lib
|
149
|
+
- lib/gigs
|
150
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - ">="
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '0'
|
155
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
requirements: []
|
161
|
+
rubyforge_project:
|
162
|
+
rubygems_version: 2.7.3
|
163
|
+
signing_key:
|
164
|
+
specification_version: 4
|
165
|
+
summary: This gem generates a list of tour dates to where your favorite band,artist
|
166
|
+
or DJ is going to perform.
|
167
|
+
test_files: []
|