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 +5 -5
- data/README.md +14 -0
- data/lib/ba_upload/connection.rb +10 -0
- data/lib/ba_upload/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 1c3d318a7143720be35bdd9460675ffa7eeed8d8ebd592c6c120d00067e3893e
|
|
4
|
+
data.tar.gz: 67bbda23c6a00cd00e3b5e1f0310ff27833f782303f37e75e9e7a18b68783986
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
+
[](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
|
|
data/lib/ba_upload/connection.rb
CHANGED
|
@@ -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
|
data/lib/ba_upload/version.rb
CHANGED
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.
|
|
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:
|
|
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
|
|
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)
|