ba_upload 0.1.0 → 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
- SHA1:
3
- metadata.gz: bc3deda2d99beece55b44a02744d0d7eaa3bfaa6
4
- data.tar.gz: 25c10ec48c2c8066fcab6129c06ce16ae9e94481
2
+ SHA256:
3
+ metadata.gz: 1c3d318a7143720be35bdd9460675ffa7eeed8d8ebd592c6c120d00067e3893e
4
+ data.tar.gz: 67bbda23c6a00cd00e3b5e1f0310ff27833f782303f37e75e9e7a18b68783986
5
5
  SHA512:
6
- metadata.gz: 64f2cd4028d7b65e9ae48ee9a65d3d41954af9fd715dbffef4ad222a1232c4a0fa2bbb57eca13263902730566dfd8b1829793172c8aa263bd51a3182e17c9701
7
- data.tar.gz: cff9576502685a48c1d75a2dd92dde54ff8f01bfc71c314fcec61911994a05bf49bc03bf2076faa7967b5cbc9e525f9786220cf531de95416661e52dd9924cc7
6
+ metadata.gz: 5a797ecf7a9fed238ecf08706adefa033f3ebdce51e2007a9215a77faf0a6d51cce0d143d7c1a1f19b2abf020437459e67cea69207474cacf00eaf96a54831e6
7
+ data.tar.gz: ceb746f9650c23e19b46a14c6f1d5d3837b4e80af1c4dba5e684cf744448f60ad88cbb520bb26561775f2c584f6a34d6e4b5794c55846187d8d8ab4565144eec
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Bundesagentur fuer Arbeit upload
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/ba_upload.svg)](https://badge.fury.io/rb/ba_upload)
4
+
3
5
  This is a Ruby Gem that aids to simplify interaction with the API of the Arbeitsagentur of Germany.
4
6
 
5
7
  Since early 2016 Arbeitsagentur switched to a HTTPS client certificate (hrbaxml.arbeitsagentur.de) instead their beloved FTP upload tool. The OpenSSL library helps to convert that cert to a format Mechanize/curl can understand.
@@ -55,6 +57,18 @@ connection.upload(file: File.open(ARGV[0]))
55
57
  Save to a file and just run it with the xml file as argument
56
58
 
57
59
 
60
+ ### Downloading "misc" files
61
+
62
+ BA provides a often updated Position description databae ("VAM" Berufe). The Gem can help to download it:
63
+
64
+ ```
65
+ connection.misc.each do |link|
66
+ target = "vendor/ba/#{link.href}"
67
+ next if File.exist?(target)
68
+ response = link.click
69
+ File.open(target, "wb+") { |f| f.write(response.body) }
70
+ end
71
+ ```
58
72
 
59
73
  ## License
60
74
 
@@ -28,5 +28,15 @@ module BaUpload
28
28
  ErrorFile.new(link)
29
29
  end
30
30
  end
31
+
32
+ def misc
33
+ m.get 'https://hrbaxml.arbeitsagentur.de/'
34
+ m.page.links_with(text: /sonstiges/).first.click
35
+ m.page.links.reject { |i| i.href[/^\?|mailto:/] || i.href == '/' }
36
+ end
37
+
38
+ def shutdown
39
+ m.shutdown
40
+ end
31
41
  end
32
42
  end
@@ -1,3 +1,3 @@
1
1
  module BaUpload
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ba_upload
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Wienert
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-23 00:00:00.000000000 Z
11
+ date: 2021-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.6.13
94
+ rubygems_version: 2.7.6
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Upload API for Bundesagentur fuer Arbeit (hrbaxml.arbeitsagentur)