jobparser 0.13.4 → 0.13.5
Sign up to get free protection for your applications and to get access to all the features.
data/lib/jobparser.rb
CHANGED
@@ -61,14 +61,15 @@ module JobParser
|
|
61
61
|
field f.to_sym, :type => String
|
62
62
|
end
|
63
63
|
|
64
|
-
field :url,
|
65
|
-
field :salary,
|
66
|
-
field :title,
|
67
|
-
field :apply,
|
64
|
+
field :url, :type => String
|
65
|
+
field :salary, :type => Array
|
66
|
+
field :title, :type => String
|
67
|
+
field :apply, :type => String
|
68
68
|
field :salary_string, :type => String
|
69
|
-
field :location,
|
70
|
-
field :deadline,
|
71
|
-
field :
|
69
|
+
field :location, :type => String
|
70
|
+
field :deadline, :type => String
|
71
|
+
field :job_postcode, :type => String
|
72
|
+
field :schema, :type => Boolean, : default => false
|
72
73
|
|
73
74
|
end
|
74
75
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module JobParser
|
2
|
+
module Facets
|
3
|
+
class Postcode < Facet
|
4
|
+
def parse
|
5
|
+
postcode_regex = /([A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]?\s?[0-9][ABD-HJLN-UW-Z]{2}|GIR 0AA)/
|
6
|
+
postcode_regex.match(@plain_text.gsub("\n", " ")) { |m|
|
7
|
+
return m[0]
|
8
|
+
}
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
data/lib/jobparser/parsehtml.rb
CHANGED
data/lib/jobparser/parser.rb
CHANGED
data/lib/jobparser/version.rb
CHANGED
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.13.
|
4
|
+
version: 0.13.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-08-
|
12
|
+
date: 2013-08-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -155,6 +155,7 @@ files:
|
|
155
155
|
- lib/jobparser/facets/deadline.rb
|
156
156
|
- lib/jobparser/facets/facet.rb
|
157
157
|
- lib/jobparser/facets/location.rb
|
158
|
+
- lib/jobparser/facets/postcode.rb
|
158
159
|
- lib/jobparser/facets/salary.rb
|
159
160
|
- lib/jobparser/facets/salarystring.rb
|
160
161
|
- lib/jobparser/facets/title.rb
|