liberic 1.2.0 → 1.3.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 +4 -4
- data/CHANGELOG.md +11 -0
- data/README.md +2 -2
- data/lib/liberic/boot.rb +1 -1
- data/lib/liberic/certificate.rb +1 -2
- data/lib/liberic/process.rb +1 -3
- data/lib/liberic/sdk/types.rb +8 -8
- data/lib/liberic/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 036f583f24d5fee5d7347517bd3a2424c6155ff9a4fecc6f8241e6cc7710570a
|
4
|
+
data.tar.gz: e6d5801322f6e2a06dee3d72ffebf2455114c29722de46e89dce242c87c60695
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab255189575cf06a9a5f391a270de090db67e342c745f493c10c40ce2afad633faf5e3cd700d04ed6fa8070cd7b19171c31d1ca8163d28b9bf227733ba893c2f
|
7
|
+
data.tar.gz: 4f0cca686bf98eb4e82dcce6bda52f2fc7b99dbdcbf7e137eb78c82d186014d22bbcd06cc293478efb46ad17b60f6e7429dcbfa13e96f8442caa28d24a52c67a
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [1.3.0]
|
9
|
+
|
10
|
+
Support for ERIC 40.
|
11
|
+
|
12
|
+
### Deprecated
|
13
|
+
|
14
|
+
These features were removed from the ERIC SDK.
|
15
|
+
|
16
|
+
- `abrufCode` in `encryption_params`
|
17
|
+
- `cover_page` (`ersteSeite`) in `print_params`
|
18
|
+
|
8
19
|
## [1.2.0]
|
9
20
|
|
10
21
|
Add support to sign a submission with a POZ (Portalzertifikat)
|
data/README.md
CHANGED
@@ -40,13 +40,13 @@ include/
|
|
40
40
|
lib/
|
41
41
|
```
|
42
42
|
|
43
|
-
Currently, the environment variable `
|
43
|
+
Currently, the environment variable `ERIC_HOME_40` needs to be set to this
|
44
44
|
folder or the gem will not find the library files.
|
45
45
|
|
46
46
|
For example:
|
47
47
|
|
48
48
|
```sh
|
49
|
-
$ export
|
49
|
+
$ export ERIC_HOME_40=/opt/ERiC-40.3.4.0/Linux-x86_64
|
50
50
|
```
|
51
51
|
|
52
52
|
The gem will raise an `Liberic::InitializationError` if the environment variable is not set.
|
data/lib/liberic/boot.rb
CHANGED
@@ -19,7 +19,7 @@ module Liberic
|
|
19
19
|
File.expand_path("libericapi.#{suffix}", ERIC_LIB_FOLDER)
|
20
20
|
end
|
21
21
|
|
22
|
-
ERIC_HOME = ENV['
|
22
|
+
ERIC_HOME = ENV['ERIC_HOME_40'] || raise(InitializationError.new('ERIC_HOME_40 environment variable not found (set it to the path to the ERiC libraries)'))
|
23
23
|
ERIC_LIB_FOLDER = File.expand_path('lib', ERIC_HOME)
|
24
24
|
|
25
25
|
def check_eric_version!
|
data/lib/liberic/certificate.rb
CHANGED
@@ -43,10 +43,9 @@ module Liberic
|
|
43
43
|
def encryption_params
|
44
44
|
params = SDK::Types::VerschluesselungsParameter.new
|
45
45
|
|
46
|
-
params[:version] =
|
46
|
+
params[:version] = 3
|
47
47
|
params[:zertifikatHandle] = @handle
|
48
48
|
params[:pin] = FFI::MemoryPointer.from_string(@pin).address
|
49
|
-
params[:abrufCode] = nil
|
50
49
|
|
51
50
|
params
|
52
51
|
end
|
data/lib/liberic/process.rb
CHANGED
@@ -37,7 +37,6 @@ module Liberic
|
|
37
37
|
# * +:filename+ (set a filename including path where to store the PDF file)
|
38
38
|
# * +:draft+ (set to +false+ to remove the the text "*** ENTWURF ***" on every page)
|
39
39
|
# * +:footer+ (set a string that will be printed on ever page footer)
|
40
|
-
# * +:cover_page+ (set to +true+ to include a cover page)
|
41
40
|
# * +:duplex+ (set to +true+ to generate pages for duplex printing (alternating margin left and right)
|
42
41
|
#
|
43
42
|
# Other options
|
@@ -93,8 +92,7 @@ module Liberic
|
|
93
92
|
# TODO: check for updates regarding version
|
94
93
|
def create_print_params(options)
|
95
94
|
params = SDK::Types::DruckParameter.new
|
96
|
-
params[:version] =
|
97
|
-
params[:ersteSeite] = options[:cover_page] ? 1 : 0
|
95
|
+
params[:version] = 4
|
98
96
|
params[:duplexDruck] = options[:duplex] ? 1 : 0
|
99
97
|
params[:vorschau] = options.has_key?(:draft) ? (options[:draft] ? 1 : 0) : 1
|
100
98
|
{pdfName: :filename,
|
data/lib/liberic/sdk/types.rb
CHANGED
@@ -4,9 +4,8 @@ module Liberic
|
|
4
4
|
extend FFI::Library
|
5
5
|
|
6
6
|
class DruckParameter < FFI::Struct
|
7
|
-
layout :version, :uint, # Set version to
|
7
|
+
layout :version, :uint, # Set version to 4
|
8
8
|
:vorschau, :uint,
|
9
|
-
:ersteSeite, :uint,
|
10
9
|
:duplexDruck, :uint,
|
11
10
|
:pdfName, :pointer,
|
12
11
|
:fussText, :pointer,
|
@@ -14,10 +13,9 @@ module Liberic
|
|
14
13
|
end
|
15
14
|
|
16
15
|
class VerschluesselungsParameter < FFI::Struct
|
17
|
-
layout :version, :uint, # Set version to
|
16
|
+
layout :version, :uint, # Set version to 3
|
18
17
|
:zertifikatHandle, :uint,
|
19
|
-
:pin, :pointer
|
20
|
-
:abrufCode, :pointer
|
18
|
+
:pin, :pointer
|
21
19
|
end
|
22
20
|
|
23
21
|
class ZertifikatParameter < FFI::Struct
|
@@ -33,9 +31,11 @@ module Liberic
|
|
33
31
|
end
|
34
32
|
|
35
33
|
BearbeitungFlag = enum(
|
36
|
-
:validiere,
|
37
|
-
:sende,
|
38
|
-
:drucke,
|
34
|
+
:validiere, (1 << 1),
|
35
|
+
:sende, (1 << 2),
|
36
|
+
:drucke, (1 << 5),
|
37
|
+
:pruefe_hinweise, (1 << 7),
|
38
|
+
:validiere_ohne_freigabedatum, (1 << 8),
|
39
39
|
:sende_auth, ('00100110'.to_i(2)) # triggers all three: valiediere, sende and drucke
|
40
40
|
)
|
41
41
|
|
data/lib/liberic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: liberic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Malte Münchert
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ffi
|
@@ -124,7 +124,7 @@ homepage: https://www.github.com/mpm/liberic-ruby
|
|
124
124
|
licenses:
|
125
125
|
- MIT
|
126
126
|
metadata: {}
|
127
|
-
post_install_message:
|
127
|
+
post_install_message:
|
128
128
|
rdoc_options: []
|
129
129
|
require_paths:
|
130
130
|
- lib
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubygems_version: 3.5.6
|
143
|
-
signing_key:
|
143
|
+
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Ruby bindings for ELSTER/ERiC (German Tax Authority Service)
|
146
146
|
test_files: []
|