upcoming_concerts 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +42 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/bin/upcoming-concerts +7 -0
- data/lib/upcoming_concerts/cli.rb +146 -0
- data/lib/upcoming_concerts/concerts.rb +175 -0
- data/lib/upcoming_concerts/version.rb +3 -0
- data/lib/upcoming_concerts.rb +10 -0
- data/upcoming_concerts.gemspec +36 -0
- metadata +129 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: 5bc436aa49abe696b6c2165b979edab48c7dd7e7
|
|
4
|
+
data.tar.gz: b781dfac7fc86fe73cdcc7e4486db96a844e357d
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: ee939f5cb4aa877df820b5fcec994c026f90b341225a9fd9e1ff2675ac4f035dd15ee3815ed520261b3dea4630692f558159e1b46b0dcf056f76fc7b52e6db75
|
|
7
|
+
data.tar.gz: 6befe623d6380a04a9d6aee261812c771de8ee2ceeeef3edd07e13610886a288888fd9f4fcefa8393afd1379cbf52bd8f8ea65bd76bcff56cb4896edf745ff9b
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 benser1
|
|
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
|
|
13
|
+
all 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
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# UpcomingConcerts
|
|
2
|
+
|
|
3
|
+
Welcome to UpcomingConcerts. This Ruby Gem provides a CLI to view the next 5 upcoming concerts in Phoenix, AZ. This gem is specifically targeted towards people who are looking for upcoming concerts in Phoenix, AZ area. I have set this up to automatically show the next five concerts in PHX. Once the list appears, the user can then interact with the gem to get more information about the concert. This information will include the artist, date, and venue location.
|
|
4
|
+
|
|
5
|
+
In order for the user to interact with this information, they will need to fork this repo, then in their terminal they will need to load the following folder: 'bin/upcoming-concerts'
|
|
6
|
+
|
|
7
|
+
Please feel free to fork this repo and make changes that you feel would make this gem run more smoothly or add any information you feel is missing.
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
Add this line to your application's Gemfile:
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
gem 'upcoming_concerts'
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
And then execute:
|
|
17
|
+
|
|
18
|
+
$ bundle
|
|
19
|
+
|
|
20
|
+
Or install it yourself as:
|
|
21
|
+
|
|
22
|
+
$ gem install upcoming_concerts
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
TODO: Write usage instructions here
|
|
27
|
+
|
|
28
|
+
## Development
|
|
29
|
+
|
|
30
|
+
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.
|
|
31
|
+
|
|
32
|
+
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).
|
|
33
|
+
|
|
34
|
+
## Contributing
|
|
35
|
+
|
|
36
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/upcoming_concerts.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
|
42
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "upcoming_concerts"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# This is our CLI Controller
|
|
2
|
+
|
|
3
|
+
class UpcomingConcerts::CLI
|
|
4
|
+
|
|
5
|
+
def call
|
|
6
|
+
show_concerts
|
|
7
|
+
menu
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def show_concerts
|
|
11
|
+
puts "Here are the next five concerts in the Phoenix Area:"
|
|
12
|
+
|
|
13
|
+
Concerts.all.each_with_index do |num, x|
|
|
14
|
+
x = 1
|
|
15
|
+
puts "#{x}. " + Concerts.concert_1[:artist]
|
|
16
|
+
puts "#{x + 1}. " + Concerts.concert_2[:artist]
|
|
17
|
+
puts "#{x + 2}. " + Concerts.concert_3[:artist]
|
|
18
|
+
puts "#{x + 3}. " + Concerts.concert_4[:artist]
|
|
19
|
+
puts "#{x + 4}. " + Concerts.concert_5[:artist]
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def menu ##### This will redirect the user to the concert they are interested in ######
|
|
24
|
+
input = nil
|
|
25
|
+
while input != "exit"
|
|
26
|
+
puts "Which concert would you like to know more about? Type 1 - 5, list, or type exit."
|
|
27
|
+
input = gets.strip.downcase
|
|
28
|
+
|
|
29
|
+
if input == "1"
|
|
30
|
+
loop do
|
|
31
|
+
puts "What would you like to know? Please Type: Date, Venue, City, Time, Day, All, or exit"
|
|
32
|
+
one = gets.strip.downcase
|
|
33
|
+
if one == "exit"
|
|
34
|
+
break
|
|
35
|
+
elsif one == "date"
|
|
36
|
+
puts "Concert Date: " + Concerts.concert_1[:date]
|
|
37
|
+
elsif one == "venue"
|
|
38
|
+
puts "Venue Location: " + Concerts.concert_1[:venue_name]
|
|
39
|
+
elsif one == "city"
|
|
40
|
+
puts "City: " + Concerts.concert_1[:city]
|
|
41
|
+
elsif one == "time"
|
|
42
|
+
puts "Concert Time: " + Concerts.concert_1[:time]
|
|
43
|
+
elsif one == "day"
|
|
44
|
+
puts "Concert Day: " + Concerts.concert_1[:day]
|
|
45
|
+
elsif one == "all"
|
|
46
|
+
puts Concerts.call_1
|
|
47
|
+
break
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
elsif input == "2"
|
|
51
|
+
loop do
|
|
52
|
+
puts "What would you like to know? Please Type: Date, Venue, City, Time, Day, All, or exit"
|
|
53
|
+
one = gets.strip.downcase
|
|
54
|
+
if one == "exit"
|
|
55
|
+
break
|
|
56
|
+
elsif one == "date"
|
|
57
|
+
puts "Concert Date: " + Concerts.concert_2[:date]
|
|
58
|
+
elsif one == "venue"
|
|
59
|
+
puts "Venue Location: " + Concerts.concert_2[:venue_name]
|
|
60
|
+
elsif one == "city"
|
|
61
|
+
puts "City: " + Concerts.concert_2[:city]
|
|
62
|
+
elsif one == "time"
|
|
63
|
+
puts "Concert Time: " + Concerts.concert_2[:time]
|
|
64
|
+
elsif one == "day"
|
|
65
|
+
puts "Concert Day: " + Concerts.concert_2[:day]
|
|
66
|
+
elsif one == "all"
|
|
67
|
+
puts Concerts.call_2
|
|
68
|
+
break
|
|
69
|
+
end
|
|
70
|
+
end
|
|
71
|
+
elsif input == "3"
|
|
72
|
+
loop do
|
|
73
|
+
puts "What would you like to know? Please Type: Date, Venue, City, Time, Day, All, or exit"
|
|
74
|
+
one = gets.strip.downcase
|
|
75
|
+
if one == "exit"
|
|
76
|
+
break
|
|
77
|
+
elsif one == "date"
|
|
78
|
+
puts "Concert Date: " + Concerts.concert_3[:date]
|
|
79
|
+
elsif one == "venue"
|
|
80
|
+
puts "Venue Location: " + Concerts.concert_3[:venue_name]
|
|
81
|
+
elsif one == "city"
|
|
82
|
+
puts "City: " + Concerts.concert_3[:city]
|
|
83
|
+
elsif one == "time"
|
|
84
|
+
puts "Concert Time: " + Concerts.concert_3[:time]
|
|
85
|
+
elsif one == "day"
|
|
86
|
+
puts "Concert Day: " + Concerts.concert_3[:day]
|
|
87
|
+
elsif one == "all"
|
|
88
|
+
puts Concerts.call_3
|
|
89
|
+
break
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
elsif input == "4"
|
|
93
|
+
loop do
|
|
94
|
+
puts "What would you like to know? Please Type: Date, Venue, City, Time, Day, All, or exit"
|
|
95
|
+
one = gets.strip.downcase
|
|
96
|
+
if one == "exit"
|
|
97
|
+
break
|
|
98
|
+
elsif one == "date"
|
|
99
|
+
puts "Concert Date: " + Concerts.concert_4[:date]
|
|
100
|
+
elsif one == "venue"
|
|
101
|
+
puts "Venue Location: " + Concerts.concert_4[:venue_name]
|
|
102
|
+
elsif one == "city"
|
|
103
|
+
puts "City: " + Concerts.concert_4[:city]
|
|
104
|
+
elsif one == "time"
|
|
105
|
+
puts "Concert Time: " + Concerts.concert_4[:time]
|
|
106
|
+
elsif one == "day"
|
|
107
|
+
puts "Concert Day: " + Concerts.concert_4[:day]
|
|
108
|
+
elsif one == "all"
|
|
109
|
+
puts Concerts.call_4
|
|
110
|
+
break
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
elsif input == "5"
|
|
114
|
+
loop do
|
|
115
|
+
puts "What would you like to know? Please Type: Date, Venue, City, Time, Day, All, or exit"
|
|
116
|
+
one = gets.strip.downcase
|
|
117
|
+
if one == "exit"
|
|
118
|
+
break
|
|
119
|
+
elsif one == "date"
|
|
120
|
+
puts "Concert Date: " + Concerts.concert_5[:date]
|
|
121
|
+
elsif one == "venue"
|
|
122
|
+
puts "Venue Location: " + Concerts.concert_5[:venue_name]
|
|
123
|
+
elsif one == "city"
|
|
124
|
+
puts "City: " + Concerts.concert_5[:city]
|
|
125
|
+
elsif one == "time"
|
|
126
|
+
puts "Concert Time: " + Concerts.concert_5[:time]
|
|
127
|
+
elsif one == "day"
|
|
128
|
+
puts "Concert Day: " + Concerts.concert_5[:day]
|
|
129
|
+
elsif one == "all"
|
|
130
|
+
puts Concerts.call_5
|
|
131
|
+
break
|
|
132
|
+
end
|
|
133
|
+
end
|
|
134
|
+
elsif input == "list"
|
|
135
|
+
show_concerts
|
|
136
|
+
elsif input == "exit"
|
|
137
|
+
goodbye
|
|
138
|
+
end
|
|
139
|
+
end
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def goodbye
|
|
144
|
+
puts "Come back to see the upcoming concerts in Phoenix!"
|
|
145
|
+
end
|
|
146
|
+
end
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
require 'pry'
|
|
2
|
+
class Concerts
|
|
3
|
+
|
|
4
|
+
attr_accessor :name, :date, :ticket, :url, :venue
|
|
5
|
+
|
|
6
|
+
def self.all
|
|
7
|
+
|
|
8
|
+
doc = Nokogiri::HTML(open("http://www.bigstub.com/phoenix-az-concerts.aspx"))
|
|
9
|
+
|
|
10
|
+
artist = {}
|
|
11
|
+
|
|
12
|
+
doc.css(".tn_results").each do |concert|
|
|
13
|
+
artist = {
|
|
14
|
+
:artist => doc.css(".tn_results_event_text span")[0..4].text
|
|
15
|
+
}
|
|
16
|
+
end
|
|
17
|
+
artist
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def self.concert_1
|
|
21
|
+
doc = Nokogiri::HTML(open("http://www.bigstub.com/phoenix-az-concerts.aspx"))
|
|
22
|
+
|
|
23
|
+
concerts = {}
|
|
24
|
+
|
|
25
|
+
doc.css(".tn_results").each do |concert|
|
|
26
|
+
concerts = {
|
|
27
|
+
:artist => doc.css(".tn_results_event_text span")[0].text,
|
|
28
|
+
:venue_name => doc.css(".tn_results_venue_text [itemprop = 'name']")[0].text,
|
|
29
|
+
:city => doc.css(".tn_results_location_text")[0].text,
|
|
30
|
+
:day => doc.css(".tn_results_day_text")[0].text,
|
|
31
|
+
:date => doc.css(".tn_results_date_text")[0].text,
|
|
32
|
+
:time => doc.css(".tn_results_time_text")[0].text
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
concerts
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def self.concert_2
|
|
39
|
+
doc = Nokogiri::HTML(open("http://www.bigstub.com/phoenix-az-concerts.aspx"))
|
|
40
|
+
|
|
41
|
+
concerts = {}
|
|
42
|
+
|
|
43
|
+
doc.css(".tn_results").each do |concert|
|
|
44
|
+
concerts = {
|
|
45
|
+
:artist => doc.css(".tn_results_event_text span")[1].text,
|
|
46
|
+
:venue_name => doc.css(".tn_results_venue_text [itemprop = 'name']")[1].text,
|
|
47
|
+
:city => doc.css(".tn_results_location_text")[1].text,
|
|
48
|
+
:day => doc.css(".tn_results_day_text")[1].text,
|
|
49
|
+
:date => doc.css(".tn_results_date_text")[1].text,
|
|
50
|
+
:time => doc.css(".tn_results_time_text")[1].text
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
concerts
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def self.concert_3
|
|
57
|
+
doc = Nokogiri::HTML(open("http://www.bigstub.com/phoenix-az-concerts.aspx"))
|
|
58
|
+
|
|
59
|
+
concerts = {}
|
|
60
|
+
|
|
61
|
+
doc.css(".tn_results").each do |concert|
|
|
62
|
+
concerts = {
|
|
63
|
+
:artist => doc.css(".tn_results_event_text span")[2].text,
|
|
64
|
+
:venue_name => doc.css(".tn_results_venue_text [itemprop = 'name']")[2].text,
|
|
65
|
+
:city => doc.css(".tn_results_location_text")[2].text,
|
|
66
|
+
:day => doc.css(".tn_results_day_text")[2].text,
|
|
67
|
+
:date => doc.css(".tn_results_date_text")[2].text,
|
|
68
|
+
:time => doc.css(".tn_results_time_text")[2].text
|
|
69
|
+
}
|
|
70
|
+
end
|
|
71
|
+
concerts
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def self.concert_4
|
|
75
|
+
doc = Nokogiri::HTML(open("http://www.bigstub.com/phoenix-az-concerts.aspx"))
|
|
76
|
+
|
|
77
|
+
concerts = {}
|
|
78
|
+
|
|
79
|
+
doc.css(".tn_results").each do |concert|
|
|
80
|
+
concerts = {
|
|
81
|
+
:artist => doc.css(".tn_results_event_text span")[3].text,
|
|
82
|
+
:venue_name => doc.css(".tn_results_venue_text [itemprop = 'name']")[3].text,
|
|
83
|
+
:city => doc.css(".tn_results_location_text")[3].text,
|
|
84
|
+
:day => doc.css(".tn_results_day_text")[3].text,
|
|
85
|
+
:date => doc.css(".tn_results_date_text")[3].text,
|
|
86
|
+
:time => doc.css(".tn_results_time_text")[3].text
|
|
87
|
+
}
|
|
88
|
+
end
|
|
89
|
+
concerts
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
def self.concert_5
|
|
93
|
+
doc = Nokogiri::HTML(open("http://www.bigstub.com/phoenix-az-concerts.aspx"))
|
|
94
|
+
|
|
95
|
+
concerts = {}
|
|
96
|
+
|
|
97
|
+
doc.css(".tn_results").each do |concert|
|
|
98
|
+
concerts = {
|
|
99
|
+
:artist => doc.css(".tn_results_event_text span")[4].text,
|
|
100
|
+
:venue_name => doc.css(".tn_results_venue_text [itemprop = 'name']")[4].text,
|
|
101
|
+
:city => doc.css(".tn_results_location_text")[4].text,
|
|
102
|
+
:day => doc.css(".tn_results_day_text")[4].text,
|
|
103
|
+
:date => doc.css(".tn_results_date_text")[4].text,
|
|
104
|
+
:time => doc.css(".tn_results_time_text")[4].text
|
|
105
|
+
}
|
|
106
|
+
end
|
|
107
|
+
concerts
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
def self.call_1
|
|
111
|
+
puts ""
|
|
112
|
+
puts "Information for " + Concerts.concert_1[:artist] + " concert:"
|
|
113
|
+
puts "--------------------------------------------"
|
|
114
|
+
puts "Artist: " + Concerts.concert_1[:artist]
|
|
115
|
+
puts "Venue: " + Concerts.concert_1[:venue_name]
|
|
116
|
+
puts "City: " + Concerts.concert_1[:city]
|
|
117
|
+
puts "Day: " + Concerts.concert_1[:day]
|
|
118
|
+
puts "Date: " + Concerts.concert_1[:date]
|
|
119
|
+
puts "Time: " + Concerts.concert_1[:time]
|
|
120
|
+
puts "--------------------------------------------"
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
def self.call_2
|
|
124
|
+
puts ""
|
|
125
|
+
puts "Information for " + Concerts.concert_2[:artist] + " concert:"
|
|
126
|
+
puts "--------------------------------------------"
|
|
127
|
+
puts "Artist: " + Concerts.concert_2[:artist]
|
|
128
|
+
puts "Venue: " + Concerts.concert_2[:venue_name]
|
|
129
|
+
puts "City: " + Concerts.concert_2[:city]
|
|
130
|
+
puts "Day: " + Concerts.concert_2[:day]
|
|
131
|
+
puts "Date: " + Concerts.concert_2[:date]
|
|
132
|
+
puts "Time: " + Concerts.concert_2[:time]
|
|
133
|
+
puts "--------------------------------------------"
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def self.call_3
|
|
137
|
+
puts ""
|
|
138
|
+
puts "Information for " + Concerts.concert_3[:artist] + " concert:"
|
|
139
|
+
puts "--------------------------------------------"
|
|
140
|
+
puts "Artist: " + Concerts.concert_3[:artist]
|
|
141
|
+
puts "Venue: " + Concerts.concert_3[:venue_name]
|
|
142
|
+
puts "City: " + Concerts.concert_3[:city]
|
|
143
|
+
puts "Day: " + Concerts.concert_3[:day]
|
|
144
|
+
puts "Date: " + Concerts.concert_3[:date]
|
|
145
|
+
puts "Time: " + Concerts.concert_3[:time]
|
|
146
|
+
puts "--------------------------------------------"
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
def self.call_4
|
|
150
|
+
puts ""
|
|
151
|
+
puts "Information for " + Concerts.concert_4[:artist] + " concert:"
|
|
152
|
+
puts "--------------------------------------------"
|
|
153
|
+
puts "Artist: " + Concerts.concert_4[:artist]
|
|
154
|
+
puts "Venue: " + Concerts.concert_4[:venue_name]
|
|
155
|
+
puts "City: " + Concerts.concert_4[:city]
|
|
156
|
+
puts "Day: " + Concerts.concert_4[:day]
|
|
157
|
+
puts "Date: " + Concerts.concert_4[:date]
|
|
158
|
+
puts "Time: " + Concerts.concert_4[:time]
|
|
159
|
+
puts "--------------------------------------------"
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
def self.call_5
|
|
163
|
+
puts ""
|
|
164
|
+
puts "Information for " + Concerts.concert_5[:artist] + " concert:"
|
|
165
|
+
puts "--------------------------------------------"
|
|
166
|
+
puts "Artist: " + Concerts.concert_5[:artist]
|
|
167
|
+
puts "Venue: " + Concerts.concert_5[:venue_name]
|
|
168
|
+
puts "City: " + Concerts.concert_5[:city]
|
|
169
|
+
puts "Day: " + Concerts.concert_5[:day]
|
|
170
|
+
puts "Date: " + Concerts.concert_5[:date]
|
|
171
|
+
puts "Time: " + Concerts.concert_5[:time]
|
|
172
|
+
puts "--------------------------------------------"
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
end
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
require 'nokogiri'
|
|
2
|
+
require 'pry'
|
|
3
|
+
require 'open-uri'
|
|
4
|
+
require 'upcoming_concerts'
|
|
5
|
+
|
|
6
|
+
require_relative "./upcoming_concerts/version"
|
|
7
|
+
require_relative './upcoming_concerts/cli'
|
|
8
|
+
require_relative './upcoming_concerts/concerts'
|
|
9
|
+
|
|
10
|
+
# This file will require all other files, because the other files will point to this one
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'upcoming_concerts/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "upcoming_concerts"
|
|
8
|
+
spec.version = UpcomingConcerts::VERSION
|
|
9
|
+
spec.authors = ["benser1"]
|
|
10
|
+
spec.email = ["briganenser28@gmail.com"]
|
|
11
|
+
|
|
12
|
+
spec.summary = %q{This gem shows the next 5 concerts in Phoenix, AZ area.}
|
|
13
|
+
# spec.description = %q{TODO: Write a longer description or delete this line.}
|
|
14
|
+
spec.homepage = "https://github.com/benser1/cli-upcoming-concerts"
|
|
15
|
+
spec.license = "MIT"
|
|
16
|
+
|
|
17
|
+
# Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
|
|
18
|
+
# delete this section to allow pushing this gem to any host.
|
|
19
|
+
# if spec.respond_to?(:metadata)
|
|
20
|
+
# spec.metadata['allowed_push_host'] = "https://rubygems.org"
|
|
21
|
+
# else
|
|
22
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
|
23
|
+
# end
|
|
24
|
+
|
|
25
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
26
|
+
spec.bindir = "exe"
|
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
28
|
+
spec.require_paths = ["lib"]
|
|
29
|
+
|
|
30
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
|
31
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
|
32
|
+
spec.add_development_dependency "rspec"
|
|
33
|
+
spec.add_development_dependency "pry"
|
|
34
|
+
|
|
35
|
+
spec.add_dependency "nokogiri"
|
|
36
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: upcoming_concerts
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- benser1
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2016-01-27 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.10'
|
|
20
|
+
type: :development
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - "~>"
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '1.10'
|
|
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: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: pry
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: nokogiri
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :runtime
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
description:
|
|
84
|
+
email:
|
|
85
|
+
- briganenser28@gmail.com
|
|
86
|
+
executables: []
|
|
87
|
+
extensions: []
|
|
88
|
+
extra_rdoc_files: []
|
|
89
|
+
files:
|
|
90
|
+
- ".gitignore"
|
|
91
|
+
- ".rspec"
|
|
92
|
+
- ".travis.yml"
|
|
93
|
+
- Gemfile
|
|
94
|
+
- LICENSE.txt
|
|
95
|
+
- README.md
|
|
96
|
+
- Rakefile
|
|
97
|
+
- bin/console
|
|
98
|
+
- bin/setup
|
|
99
|
+
- bin/upcoming-concerts
|
|
100
|
+
- lib/upcoming_concerts.rb
|
|
101
|
+
- lib/upcoming_concerts/cli.rb
|
|
102
|
+
- lib/upcoming_concerts/concerts.rb
|
|
103
|
+
- lib/upcoming_concerts/version.rb
|
|
104
|
+
- upcoming_concerts.gemspec
|
|
105
|
+
homepage: https://github.com/benser1/cli-upcoming-concerts
|
|
106
|
+
licenses:
|
|
107
|
+
- MIT
|
|
108
|
+
metadata: {}
|
|
109
|
+
post_install_message:
|
|
110
|
+
rdoc_options: []
|
|
111
|
+
require_paths:
|
|
112
|
+
- lib
|
|
113
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - ">="
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '0'
|
|
118
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
|
+
requirements:
|
|
120
|
+
- - ">="
|
|
121
|
+
- !ruby/object:Gem::Version
|
|
122
|
+
version: '0'
|
|
123
|
+
requirements: []
|
|
124
|
+
rubyforge_project:
|
|
125
|
+
rubygems_version: 2.4.5.1
|
|
126
|
+
signing_key:
|
|
127
|
+
specification_version: 4
|
|
128
|
+
summary: This gem shows the next 5 concerts in Phoenix, AZ area.
|
|
129
|
+
test_files: []
|