arbetsformedlingen 0.1.2 → 0.2.0

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: ea85b7b35f047bfc915bac702d55a4e5b7ba33bf
4
- data.tar.gz: 6496279caf6161727c7ca4e63986d5196b0efd72
3
+ metadata.gz: 2a4e58a260599331e94848908320e079550f9418
4
+ data.tar.gz: ee0be5981d236c6e23bb0bf593b02f5c8874dffe
5
5
  SHA512:
6
- metadata.gz: 5acf1213aab26f10d9aea1a62f9d9d125792cc080e9b139b4370f1f02c9e28df52144bb2dc52eab50a58b1334788c0cdea5a4a17f7d0b344719565439608ca2b
7
- data.tar.gz: 5260d139d14fc49c7e2b8f0012f8c5c37d804b8f83ef6e0b7c3070592b7329cb80b704ac919b7c09fef2727947fb283b0cc55ec6d3053f26ac5cf667e9fc9c3d
6
+ metadata.gz: b37da20b192b30d9b097673ffd104ed0851398adefcb93fce1c1790a0551ccde0f716876ee15f82d70e3ec267e09ef388fb717335c275171b2c794d2dbef4e50
7
+ data.tar.gz: 7c5a7f8b2453d0bc84d8c813ae99a038cc59d1ada3d3dd28c64b81ff636253c427c4ded3794d4e6b433eb82bf2340d1fb6d861d0d97a0358f0a64f9831cfd6e8
data/README.md CHANGED
@@ -93,7 +93,14 @@ position = Position.new(
93
93
  application_method: application_method,
94
94
  attributes: {
95
95
  title: 'A title',
96
- purpose: 'A purpose'
96
+ purpose: 'A purpose',
97
+ address: {
98
+ country_code: 'SE',
99
+ zip: '11356',
100
+ municipality: 'Stockholm',
101
+ street: 'Birger Jarlsgatan 57',
102
+ city: 'stockholm'
103
+ }
97
104
  }
98
105
  )
99
106
 
@@ -122,6 +129,12 @@ output = OutputBuilder.new(packet)
122
129
  File.write('output.xml', output.to_xml)
123
130
  ```
124
131
 
132
+ ## Arbetsförmedlingen TaxonomyService
133
+
134
+ Some requests had to be made to Arbetsförmedlingens TaxonomyService in order to fetch the data for the occupation codes. You can find that (plus some more) here :point_down: Postman.
135
+
136
+ [![Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/9a27ec2518c1005f8aea)
137
+
125
138
  ## Development
126
139
 
127
140
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -11,7 +11,8 @@ module Arbetsformedlingen
11
11
 
12
12
  required(:name, Types::StrippedString).filled
13
13
  required(:cin, Types::CIN).filled(:str?, :cin?)
14
- required(:description, Types::StrippedString).filled
14
+
15
+ optional(:description, Types::StrippedString).filled
15
16
 
16
17
  required(:address).schema do
17
18
  required(:municipality, Types::Municipality).filled(:municipality?)
@@ -60,7 +60,9 @@ module Arbetsformedlingen
60
60
 
61
61
  pos.JPPExtension do |jpp|
62
62
  company = position.fetch(:company)
63
- jpp.HiringOrgDescription(company.fetch(:description))
63
+ if description = company.fetch(:description, nil)
64
+ jpp.HiringOrgDescription(description)
65
+ end
64
66
  jpp.OccupationGroup(code: packet_data.fetch(:occupation), codename: 'OccupationNameID')
65
67
  end
66
68
  end
@@ -1,3 +1,3 @@
1
1
  module Arbetsformedlingen
2
- VERSION = '0.1.2'.freeze
2
+ VERSION = '0.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: arbetsformedlingen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jacob Burenstam
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-20 00:00:00.000000000 Z
11
+ date: 2017-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -173,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
173
173
  version: '0'
174
174
  requirements: []
175
175
  rubyforge_project:
176
- rubygems_version: 2.6.11
176
+ rubygems_version: 2.6.13
177
177
  signing_key:
178
178
  specification_version: 4
179
179
  summary: Arbetsförmedlingen API client