fix standings without logo.

This commit is contained in:
snogrammer 2021-03-26 17:30:33 -06:00
parent f3bdbfb282
commit 20a29a68bd
3 changed files with 31 additions and 25 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@
# rspec failure tracking
.rspec_status
.DS_Store

View File

@ -2,51 +2,56 @@ PATH
remote: .
specs:
ncaa (0.1.0)
activesupport (~> 5.1)
multi_json (~> 1.13)
nokogiri (~> 1.10)
rest-client (~> 2.0)
activesupport (>= 5.1)
multi_json (>= 1.13)
nokogiri (>= 1.10)
rest-client (>= 2.0)
GEM
remote: https://rubygems.org/
specs:
activesupport (5.2.2)
activesupport (6.1.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
coderay (1.1.2)
concurrent-ruby (1.1.4)
concurrent-ruby (1.1.8)
crack (0.4.3)
safe_yaml (~> 1.0.0)
diff-lcs (1.3)
docile (1.3.1)
domain_name (0.5.20180417)
domain_name (0.5.20190701)
unf (>= 0.0.5, < 1.0.0)
hashdiff (0.3.8)
http-accept (1.7.0)
http-cookie (1.0.3)
domain_name (~> 0.5)
i18n (1.5.2)
i18n (1.8.8)
concurrent-ruby (~> 1.0)
json (2.1.0)
method_source (0.9.2)
mime-types (3.2.2)
mime-types (3.3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2018.0812)
mini_portile2 (2.4.0)
minitest (5.11.3)
multi_json (1.13.1)
mime-types-data (3.2020.1104)
mini_portile2 (2.5.0)
minitest (5.14.3)
multi_json (1.15.0)
netrc (0.11.0)
nokogiri (1.10.1)
mini_portile2 (~> 2.4.0)
nokogiri (1.11.1)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
pry (0.12.2)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
public_suffix (3.0.3)
racc (1.5.2)
rake (12.3.2)
rest-client (2.0.2)
rest-client (2.1.0)
http-accept (>= 1.7.0, < 2.0)
http-cookie (>= 1.0.2, < 2.0)
mime-types (>= 1.16, < 4.0)
netrc (~> 0.8)
@ -69,16 +74,16 @@ GEM
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unf (0.1.4)
unf_ext
unf_ext (0.0.7.5)
unf_ext (0.0.7.7)
webmock (3.5.1)
addressable (>= 2.3.6)
crack (>= 0.3.2)
hashdiff
zeitwerk (2.4.2)
PLATFORMS
ruby
@ -93,4 +98,4 @@ DEPENDENCIES
webmock (~> 3.4)
BUNDLED WITH
1.16.3
1.17.2

View File

@ -46,7 +46,7 @@ module Ncaa
{
school: standings[0].text.strip,
school_image_url: standings[0].css('img').attr('src').value,
school_image_url: standings[0]&.css('img')&.attr('src')&.value,
conference: {
wins: standings[1].text.to_i,
losses: standings[2].text.to_i,