ufc_schedule 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 +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +63 -0
- data/LICENSE.txt +21 -0
- data/README.md +46 -0
- data/Rakefile +6 -0
- data/bin/console +13 -0
- data/bin/setup +8 -0
- data/bin/ufc_schedule +6 -0
- data/lib/api.rb +41 -0
- data/lib/command_line_interface.rb +101 -0
- data/lib/event_fight.rb +19 -0
- data/lib/events.rb +53 -0
- data/lib/shared_methods/shared_cli_methods.rb +3 -0
- data/lib/ufc_schedule/version.rb +3 -0
- data/lib/ufc_schedule.rb +13 -0
- data/ufc_schedule.gemspec +31 -0
- metadata +163 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 6f2a6dc38201e04b48486a2dd81bf541d54a1517f37718b5244fa379bd1e6e47
|
4
|
+
data.tar.gz: df1f24a5921d6cb0a6eac88866537f7f9147291a435895ad8a9196d86e229177
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ea04b0da7f10a968a495abe3917091de8b25210cddedae8217ebbfe08cd1cd579891bb38f360b2098741e165a6ce2031484b462d169d12023ea557e9e69e1240
|
7
|
+
data.tar.gz: 3d0513ad75d92fc366c8ddb76c2f7a20717eb1146aa7bd2ede7481751fc53476f51130ddc6fd318fe8bb11534a0a01169f26a2e2b2c445b9eb00139a4d5e3b1e
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at joequattrone5@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ufc_schedule (0.1.0)
|
5
|
+
json
|
6
|
+
nokogiri (= 1.6.6.2)
|
7
|
+
rest-client
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
coderay (1.1.2)
|
13
|
+
diff-lcs (1.3)
|
14
|
+
domain_name (0.5.20180417)
|
15
|
+
unf (>= 0.0.5, < 1.0.0)
|
16
|
+
http-cookie (1.0.3)
|
17
|
+
domain_name (~> 0.5)
|
18
|
+
json (2.1.0)
|
19
|
+
method_source (0.9.2)
|
20
|
+
mime-types (3.2.2)
|
21
|
+
mime-types-data (~> 3.2015)
|
22
|
+
mime-types-data (3.2018.0812)
|
23
|
+
mini_portile (0.6.2)
|
24
|
+
netrc (0.11.0)
|
25
|
+
nokogiri (1.6.6.2)
|
26
|
+
mini_portile (~> 0.6.0)
|
27
|
+
pry (0.12.2)
|
28
|
+
coderay (~> 1.1.0)
|
29
|
+
method_source (~> 0.9.0)
|
30
|
+
rake (10.5.0)
|
31
|
+
rest-client (2.0.2)
|
32
|
+
http-cookie (>= 1.0.2, < 2.0)
|
33
|
+
mime-types (>= 1.16, < 4.0)
|
34
|
+
netrc (~> 0.8)
|
35
|
+
rspec (3.8.0)
|
36
|
+
rspec-core (~> 3.8.0)
|
37
|
+
rspec-expectations (~> 3.8.0)
|
38
|
+
rspec-mocks (~> 3.8.0)
|
39
|
+
rspec-core (3.8.0)
|
40
|
+
rspec-support (~> 3.8.0)
|
41
|
+
rspec-expectations (3.8.2)
|
42
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
+
rspec-support (~> 3.8.0)
|
44
|
+
rspec-mocks (3.8.0)
|
45
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
46
|
+
rspec-support (~> 3.8.0)
|
47
|
+
rspec-support (3.8.0)
|
48
|
+
unf (0.1.4)
|
49
|
+
unf_ext
|
50
|
+
unf_ext (0.0.7.5)
|
51
|
+
|
52
|
+
PLATFORMS
|
53
|
+
ruby
|
54
|
+
|
55
|
+
DEPENDENCIES
|
56
|
+
bundler (~> 1.17)
|
57
|
+
pry
|
58
|
+
rake (~> 10.0)
|
59
|
+
rspec (~> 3.0)
|
60
|
+
ufc_schedule!
|
61
|
+
|
62
|
+
BUNDLED WITH
|
63
|
+
1.17.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Joe Quattrone
|
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,46 @@
|
|
1
|
+
# UFC Schedule
|
2
|
+
|
3
|
+
Welcome to the ufc_schedule gem! This gem is made for fans who want to view real time UFC data through their command line. This gem will allow you to view upcoming UFC events, the fighters on those events, and stats of each fighter competing.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'ufc_schedule'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install ufc_schedule
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
Upon installation of ufc_schedule, you will be given clear directions on usage from the main-menu
|
24
|
+
|
25
|
+
## Development
|
26
|
+
|
27
|
+
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.
|
28
|
+
|
29
|
+
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).
|
30
|
+
|
31
|
+
## Contributing
|
32
|
+
|
33
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/JoeQuattrone/ufc_schedule. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
34
|
+
|
35
|
+
## License
|
36
|
+
|
37
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
38
|
+
|
39
|
+
## Code of Conduct
|
40
|
+
|
41
|
+
Everyone interacting in the UFC Schedule project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/JoeQuattrone/ufc_schedule/blob/master/CODE_OF_CONDUCT.md).
|
42
|
+
|
43
|
+
|
44
|
+
## Copyright
|
45
|
+
|
46
|
+
All rights belong to WME-IMG.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
require "bundler/setup"
|
3
|
+
require "ufc_schedule"
|
4
|
+
|
5
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
6
|
+
# with your gem easier. You can also use a different console, if you like.
|
7
|
+
|
8
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
9
|
+
require "pry"
|
10
|
+
Pry.start
|
11
|
+
|
12
|
+
# require "irb"
|
13
|
+
# IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/bin/ufc_schedule
ADDED
data/lib/api.rb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
class Concerns::API
|
2
|
+
def self.get_categories
|
3
|
+
cats = RestClient.get('http://ufc-data-api.ufc.com/api/v1/us/events')
|
4
|
+
@data = JSON.parse(cats)
|
5
|
+
|
6
|
+
@data.each do |events|
|
7
|
+
Concerns::Events.new_from_api(events)
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.scrape_fights(array_of_events)
|
12
|
+
#for each event id this will scrape event data iterate through the fights and create EventFight objects for each fight on the event and associate those fights to an event
|
13
|
+
#binding.pry
|
14
|
+
array_of_events.each do |event|
|
15
|
+
|
16
|
+
doc = Nokogiri::HTML(open("http://ufc-data-api.ufc.com/api/v1/us/events/#{event.id}"))
|
17
|
+
|
18
|
+
doc.css('.flipcard-front-pre').each do |card|
|
19
|
+
red_name = card.css('.fighter-name-red').text.strip
|
20
|
+
|
21
|
+
blue_name = card.css('.fighter-name-blue').text.strip
|
22
|
+
|
23
|
+
#takes valid data and makes a hash out of it
|
24
|
+
fight_stats = card.css('.fight-card-match-up td').map {|stat| stat.text}.select {|stat| stat != stat.empty?}
|
25
|
+
|
26
|
+
fight_hash = {}
|
27
|
+
fight_hash[:red_record] = fight_stats.first
|
28
|
+
fight_hash[:blue_record] = fight_stats[2]
|
29
|
+
fight_hash[:red_height] = fight_stats[3]
|
30
|
+
fight_hash[:blue_height] = fight_stats[5]
|
31
|
+
fight_hash[:red_weight] = fight_stats[6]
|
32
|
+
fight_hash[:blue_weight] = fight_stats[8]
|
33
|
+
#creates new fight and passes names and stat values to it
|
34
|
+
new_fight = Concerns::EventFight.new(red_name, blue_name, fight_hash)
|
35
|
+
#adds the fight to the Events.event_fights array
|
36
|
+
event.event_fights << new_fight
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
class Concerns::CommandLineInterface
|
2
|
+
extend Concerns::SharedCLIMethods
|
3
|
+
|
4
|
+
def run
|
5
|
+
greeting
|
6
|
+
choose_to_view_schedule
|
7
|
+
goodbye
|
8
|
+
end
|
9
|
+
|
10
|
+
def greeting
|
11
|
+
#greets the user and makes a call to the UFC API to request schedule data
|
12
|
+
puts "Hello fight fan, welcome to your UFC gem! To view a list of upcoming UFC events enter '1'. To exit this gem at any time, enter 'exit'."
|
13
|
+
puts ""
|
14
|
+
Concerns::API.get_categories
|
15
|
+
end
|
16
|
+
|
17
|
+
def choose_to_view_schedule
|
18
|
+
#Takes user input and returns schedule if input == "1"
|
19
|
+
input = nil
|
20
|
+
|
21
|
+
while input != "exit"
|
22
|
+
input = gets.strip
|
23
|
+
if input == "1"
|
24
|
+
list_schedule
|
25
|
+
#breaks the loop so person only has to type 'exit' once to leave the program
|
26
|
+
break
|
27
|
+
elsif input != "exit" && input != "1"
|
28
|
+
invalid_command_response
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
def list_schedule
|
34
|
+
#List current UFC events from API data and prompts user to learn more info on the events
|
35
|
+
Concerns::Events.list_events
|
36
|
+
puts ""
|
37
|
+
puts "To learn more about who's fighting, enter the number of the fight card you'd like more info on."
|
38
|
+
puts ""
|
39
|
+
choose_fight_card
|
40
|
+
end
|
41
|
+
|
42
|
+
def choose_fight_card
|
43
|
+
#Scrapes all the fights from all of the events listed on the schedule and creates fight objects related to each event. Allows user to choose an event, if valid, it will list fights for that event
|
44
|
+
Concerns::API.scrape_fights(Concerns::Events.all)
|
45
|
+
|
46
|
+
input = nil
|
47
|
+
|
48
|
+
while input != "exit"
|
49
|
+
input = gets.strip
|
50
|
+
if input.to_i > 0 && input.to_i <= Concerns::Events.all.size
|
51
|
+
list_fights(input.to_i)
|
52
|
+
else
|
53
|
+
invalid_command_response
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def list_fights(input)
|
59
|
+
#finds an event and lists the fights on that event and calls the choose_fight function
|
60
|
+
find_event = Concerns::Events.all[input - 1]
|
61
|
+
|
62
|
+
find_event.event_fights.each_with_index do |fight, index|
|
63
|
+
puts "#{index +1 }. #{fight.red_name} vs. #{fight.blue_name} - #{fight.red_weight}"
|
64
|
+
end
|
65
|
+
choose_fight(find_event)
|
66
|
+
end
|
67
|
+
|
68
|
+
def choose_fight(event)
|
69
|
+
#Allows user to choose a specific fight and pulls stats on fighters in that fight
|
70
|
+
puts ""
|
71
|
+
puts "To see stats of the fighters, enter the number of their corresponding fight"
|
72
|
+
|
73
|
+
input = nil
|
74
|
+
while input != "exit"
|
75
|
+
input = gets.strip
|
76
|
+
|
77
|
+
if input.to_i <= event.event_fights.count
|
78
|
+
specific_fight = event.event_fights[input.to_i - 1]
|
79
|
+
puts "Name: #{specific_fight.red_name} #{specific_fight.blue_name}"
|
80
|
+
puts "Record: #{specific_fight.red_record} #{specific_fight.blue_record}"
|
81
|
+
puts "Height: #{specific_fight.red_height} #{specific_fight.blue_height}"
|
82
|
+
puts "Weight: #{specific_fight.red_weight} #{specific_fight.blue_weight}"
|
83
|
+
break
|
84
|
+
|
85
|
+
elsif input.to_i <= 0 || input.to_i > event.event_fights.count
|
86
|
+
invalid_command_response
|
87
|
+
choose_fight(event)
|
88
|
+
break
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
def goodbye
|
94
|
+
puts "Goodbye"
|
95
|
+
end
|
96
|
+
|
97
|
+
def invalid_command_response
|
98
|
+
puts "Please enter a valid command."
|
99
|
+
end
|
100
|
+
|
101
|
+
end
|
data/lib/event_fight.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
class Concerns::EventFight
|
2
|
+
attr_accessor :red_name, :red_record, :red_weight, :red_height, :blue_name, :blue_record, :blue_weight, :blue_height, :event, :fights
|
3
|
+
|
4
|
+
@@all = []
|
5
|
+
|
6
|
+
def initialize(red_name = nil, blue_name = nil, fight_hash = nil)
|
7
|
+
@red_name = red_name
|
8
|
+
@blue_name = blue_name
|
9
|
+
fight_hash.each do |key, value|
|
10
|
+
self.send("#{key}=", value)
|
11
|
+
end
|
12
|
+
@@all << self
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.all
|
16
|
+
@@all
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
data/lib/events.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
class Concerns::Events
|
2
|
+
attr_accessor :id, :title, :tag_line, :date, :time, :arena, :location, :event_fights
|
3
|
+
|
4
|
+
@@all = []
|
5
|
+
|
6
|
+
def self.new_from_api(events)
|
7
|
+
#parses future and past ufc events and only creates objects of events that are happening in the future
|
8
|
+
if Time.parse(events["event_date"]) >= Time.now == true
|
9
|
+
self.new(
|
10
|
+
events["id"],
|
11
|
+
events["base_title"],
|
12
|
+
events["title_tag_line"],
|
13
|
+
events["event_date"],
|
14
|
+
events["subtitle"],
|
15
|
+
events["arena"],
|
16
|
+
events["location"]
|
17
|
+
)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def initialize(id = nil, title = nil, tag_line = nil, date = nil, how_to_watch = nil, arena = nil,location = nil)
|
22
|
+
@id = id
|
23
|
+
@title = title
|
24
|
+
@tag_line = tag_line
|
25
|
+
@date = date
|
26
|
+
@how_to_watch = how_to_watch
|
27
|
+
@location = location
|
28
|
+
@event_fights = []
|
29
|
+
@@all << self
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.all
|
33
|
+
@@all
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.list_events
|
37
|
+
#1. UFC 232: Jones vs Gustafsson 2 - December 29, 2018. Las Vegas, Nevada.
|
38
|
+
self.all.each_with_index do |event, index|
|
39
|
+
puts "#{index + 1}. #{event.title}: #{event.tag_line} - #{self.fix_date(event)}. #{self.determine_location(event)}."
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.determine_location(event)
|
44
|
+
#sets location to "TBD" if location is empty
|
45
|
+
event.location.empty? ? "TBD" : event.location
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.fix_date(event)
|
49
|
+
#parses through the event's date and changes it to a more readable format. Ex: January 19, 2019
|
50
|
+
Time.parse(event.date).strftime("%B %d, %Y")
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
data/lib/ufc_schedule.rb
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'pry'
|
2
|
+
require 'nokogiri'
|
3
|
+
require 'open-uri'
|
4
|
+
require 'rest-client'
|
5
|
+
require 'json'
|
6
|
+
module Concerns
|
7
|
+
end
|
8
|
+
require_relative "api"
|
9
|
+
require_relative "./shared_methods/shared_cli_methods"
|
10
|
+
require_relative "./ufc_schedule/version"
|
11
|
+
require_relative "command_line_interface"
|
12
|
+
require_relative "events"
|
13
|
+
require_relative "event_fight"
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "ufc_schedule/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ufc_schedule"
|
8
|
+
spec.version = UfcSchedule::VERSION
|
9
|
+
spec.authors = ["Joe Quattrone"]
|
10
|
+
spec.email = ["joequattrone5@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{This is a gem that will allow you to view the Ultimate Fighting Championship (UFC) schedule as well as statistics related to the scheduled fights}
|
13
|
+
spec.homepage = "https://github.com/JoeQuattroneufc_schedule"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
17
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
end
|
19
|
+
spec.bindir = "bin"
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.17"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
26
|
+
spec.add_development_dependency 'pry'
|
27
|
+
spec.add_dependency 'nokogiri', '1.6.6.2'
|
28
|
+
spec.add_dependency 'json'
|
29
|
+
spec.add_dependency 'rest-client'
|
30
|
+
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,163 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ufc_schedule
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Joe Quattrone
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-12-21 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.17'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.17'
|
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: 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: 1.6.6.2
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.6.6.2
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: json
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rest-client
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
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
|
+
- joequattrone5@gmail.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".gitignore"
|
119
|
+
- ".rspec"
|
120
|
+
- ".travis.yml"
|
121
|
+
- CODE_OF_CONDUCT.md
|
122
|
+
- Gemfile
|
123
|
+
- Gemfile.lock
|
124
|
+
- LICENSE.txt
|
125
|
+
- README.md
|
126
|
+
- Rakefile
|
127
|
+
- bin/console
|
128
|
+
- bin/setup
|
129
|
+
- bin/ufc_schedule
|
130
|
+
- lib/api.rb
|
131
|
+
- lib/command_line_interface.rb
|
132
|
+
- lib/event_fight.rb
|
133
|
+
- lib/events.rb
|
134
|
+
- lib/shared_methods/shared_cli_methods.rb
|
135
|
+
- lib/ufc_schedule.rb
|
136
|
+
- lib/ufc_schedule/version.rb
|
137
|
+
- ufc_schedule.gemspec
|
138
|
+
homepage: https://github.com/JoeQuattroneufc_schedule
|
139
|
+
licenses:
|
140
|
+
- MIT
|
141
|
+
metadata: {}
|
142
|
+
post_install_message:
|
143
|
+
rdoc_options: []
|
144
|
+
require_paths:
|
145
|
+
- lib
|
146
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
requirements: []
|
157
|
+
rubyforge_project:
|
158
|
+
rubygems_version: 2.7.8
|
159
|
+
signing_key:
|
160
|
+
specification_version: 4
|
161
|
+
summary: This is a gem that will allow you to view the Ultimate Fighting Championship
|
162
|
+
(UFC) schedule as well as statistics related to the scheduled fights
|
163
|
+
test_files: []
|