uniara_virtual_parser 0.1.0 → 0.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97eb2e21845e53de997a97b908ca5afde22afc13
4
- data.tar.gz: 423524f471502b2393d56364158de064624e1172
3
+ metadata.gz: 1e78d5561e644fcfaa5d9581ce078e3a1498832a
4
+ data.tar.gz: 0983750aacdbe49dbc7a5162b77287a6b0b06846
5
5
  SHA512:
6
- metadata.gz: ce360c10f0f6fe0b07409b821ac8f3f2d3b77bf38ae1d703d59209bcab672d812796d48a577ab91073ae9a53aab1b78322bbce50064a9d416516cf281a50110a
7
- data.tar.gz: 4861f14449ef2541900c012b48396743c793072f1dfff8895714a6bcd741f7b94bd6277f1d59ad31ee48022877971aca089463c8f4adf5a3968f6c8ce799026f
6
+ metadata.gz: 80c8c9902cd40774072c32309d24905b7b708c58d001e24d0c616c33d870d655831356ec2dea71c511b3b3d0c875aa5d0c80cd7f3767c4b1fc902a6959e1e017
7
+ data.tar.gz: 891da7a860184437f449c6a5f500e1b83a3ee684bae84d5d53c5d5fbb9b0fa5d3e891853083cba46631f3eaf1bb5cbf6e9fa3330adc8b93634c7c0e2fa170358
@@ -10,8 +10,9 @@ module UniaraVirtualParser
10
10
 
11
11
  def parse_student_profile(html)
12
12
  doc = Nokogiri::HTML(html)
13
- name = doc.css("b:contains('Bom Dia')").first.text.match(/Bom Dia, (.*)/)[1]
14
- student = Models::Student.new(name: name)
13
+ name = doc.css("b:contains('Bom Dia')").first
14
+ return '' unless name
15
+ student = Models::Student.new(name: name.text.match(/Bom Dia, (.*)/)[1])
15
16
  student
16
17
  end
17
18
  end
@@ -1,3 +1,3 @@
1
1
  module UniaraVirtualParser
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uniara_virtual_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Ribeiro