jobparser 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module JobParser
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
data/lib/jobparser.rb CHANGED
@@ -13,6 +13,15 @@ require "jobparser/facets/location"
13
13
  require "jobparser/facets/apply"
14
14
  require "jobparser/facets/title"
15
15
 
16
+ require "open-uri"
17
+
16
18
  module JobParser
17
- # Your code goes here...
19
+ def self.parser(url)
20
+ html = open(url, :allow_redirections => :safe).read
21
+ if html.include?("http://schema.org/JobPosting")
22
+ ParseSchema.new(html, url)
23
+ else
24
+ ParseHtml.new(html, url)
25
+ end
26
+ end
18
27
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jobparser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: