concurso_hub 0.2.1 → 0.2.3

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
  SHA256:
3
- metadata.gz: f99628e279ee08c6946acef5af57235d817ad60f21c34ea0c479f8d613ea72ca
4
- data.tar.gz: fe45e6e0222417e0668f5919bb7cd489b1948a19a5ddae842636cc45c2e1e4b5
3
+ metadata.gz: 7bb6aed88afa66665607ef2f7fad0b386a65d6ad66e1fee43ecc8ad58baeef59
4
+ data.tar.gz: 2f3a97ae0c990b2be2f75724a5a4a98549c31934e0607b0cada890c4519929c0
5
5
  SHA512:
6
- metadata.gz: c4ab516996fcb6e9db83f9c7cad653fcfe9bf1debf5afcc9da77631a512a779f90404749238a0392b6370ea0710478131be21f2881c5218f329b3d1d5bc12de7
7
- data.tar.gz: 35f768dd828eb2d0adb259fb3e91896855c50f3fc82f4125a372224e607ff0cd2522f4e8a9be8070d8e9619b1da717bf829d9ade7424eaa3c7e9a06bcf824ebe
6
+ metadata.gz: be8afc3bc7aeca3ebabab392d7b3a83495d8aa7436b19d68b98c19de651f5acd1b3babb481de4aea5ec52700e721d13daa5b86a5703b641640b78c7846d4a263
7
+ data.tar.gz: 6b8740ff4c22aa6287fb9250d4818ff0c7a391125d6c856184c663d939812426c4260c4022bb4376a99ed387e2f20d62c3fed58017590fa32dd3d0f22203f597
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConcursoHub
4
- VERSION = '0.2.1'
4
+ VERSION = '0.2.3'
5
5
  end
data/lib/concurso_hub.rb CHANGED
@@ -68,8 +68,7 @@ module ConcursoHub
68
68
  def self.provas(url)
69
69
  repository = build_repository
70
70
  edital = fetch_edital_hash(url, repository)
71
-
72
- raise "Nenhuma prova disponível para este concurso." unless edital[:provas_url]
71
+ return [] unless edital[:provas_url]
73
72
 
74
73
  fetch_provas_array(edital[:provas_url], repository)
75
74
  end
@@ -87,7 +87,7 @@ module Infrastructure
87
87
  end
88
88
 
89
89
  def build_concurso_encerrado(el)
90
- link = el.css('div.ca > a[href^="/concurso/"]').first
90
+ link = el.css('div.ca > a').first
91
91
  return nil unless link
92
92
 
93
93
  state = el.css('div.cc').first&.text&.strip || ''
@@ -106,7 +106,7 @@ module Infrastructure
106
106
  )
107
107
  end
108
108
  def build_concurso(el, state)
109
- link = el.css('div.ca > a[href^="/concurso/"]').first
109
+ link = el.css('div.ca > a').first
110
110
  return nil unless link
111
111
 
112
112
  vagas, salario = parse_vagas_salario(el)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: concurso_hub
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Longo