xml_laborabrechnungsdaten 0.1.1 → 0.1.2
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/Gemfile.lock +8 -0
- data/lib/xml_laborabrechnungsdaten/version.rb +1 -1
- data/lib/xml_laborabrechnungsdaten.rb +24 -12
- metadata +16 -3
- data/xml_laborabrechnungsdaten.gemspec +0 -33
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5a8e903c290b278af9f61b5c633ef9dcab8208dad20ff60e46b5ace80669bacf
|
|
4
|
+
data.tar.gz: b9a7137600e5b74e3b50b3b1d8293b0ac03e851bb80f2398033765a9a2502385
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7ffeada21fdb5b042b5c01df920a22a639e5bbe3130757e86a1e8378d5fe998228e9d0e93d3f49de2fbcde38bcc469bf5e6270bfda1a005df7503ceaec2cf776
|
|
7
|
+
data.tar.gz: 0623443b215b984d0df993a1d8357d465932b1990e964dbd62bace533b646af720196957aa4652abbe61f1a7476b865f82a1458eafe3ec7a91de876c758aece6
|
data/Gemfile.lock
CHANGED
|
@@ -18,12 +18,19 @@ GEM
|
|
|
18
18
|
pp (>= 0.6.0)
|
|
19
19
|
rdoc (>= 4.0.0)
|
|
20
20
|
reline (>= 0.4.2)
|
|
21
|
+
mini_portile2 (2.8.9)
|
|
22
|
+
nokogiri (1.19.3)
|
|
23
|
+
mini_portile2 (~> 2.8.2)
|
|
24
|
+
racc (~> 1.4)
|
|
25
|
+
nokogiri (1.19.3-arm64-darwin)
|
|
26
|
+
racc (~> 1.4)
|
|
21
27
|
pp (0.6.2)
|
|
22
28
|
prettyprint
|
|
23
29
|
prettyprint (0.2.0)
|
|
24
30
|
psych (5.2.4)
|
|
25
31
|
date
|
|
26
32
|
stringio
|
|
33
|
+
racc (1.8.1)
|
|
27
34
|
rake (13.2.1)
|
|
28
35
|
rdoc (6.13.1)
|
|
29
36
|
psych (>= 4.0.0)
|
|
@@ -50,6 +57,7 @@ PLATFORMS
|
|
|
50
57
|
|
|
51
58
|
DEPENDENCIES
|
|
52
59
|
debug (>= 1.0.0)
|
|
60
|
+
nokogiri
|
|
53
61
|
rake (~> 13.0)
|
|
54
62
|
rspec (~> 3.0)
|
|
55
63
|
xml_laborabrechnungsdaten!
|
|
@@ -15,29 +15,41 @@ module XmlLaborabrechnungsdaten
|
|
|
15
15
|
# @return [String] Version of the XML schema
|
|
16
16
|
member :version, type: String, default: "4.5"
|
|
17
17
|
|
|
18
|
+
DEFAULT_SCHEMA_LOCATION = "Laborabrechnungsdaten_(KZBV-VDZI-VDDS)_(V4-5).xsd"
|
|
19
|
+
|
|
18
20
|
# @!attribute rechnung
|
|
19
21
|
# @return [Rechnung] The invoice details
|
|
20
22
|
member :rechnung, type: Rechnung
|
|
21
23
|
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
# @!attribute schema_location
|
|
25
|
+
# @return [String, nil] xsi:noNamespaceSchemaLocation value; set to nil to omit the attribute
|
|
26
|
+
member :schema_location, type: String, default: DEFAULT_SCHEMA_LOCATION
|
|
27
|
+
|
|
28
|
+
# @!attribute line_endings
|
|
29
|
+
# @return [Symbol] :lf (default) or :crlf for Windows compatibility
|
|
30
|
+
member :line_endings, type: Symbol, default: :lf
|
|
31
|
+
|
|
32
|
+
# @!attribute bom
|
|
33
|
+
# @return [Boolean] prepend UTF-8 BOM (EF BB BF); default false
|
|
34
|
+
member :bom, type: [TrueClass, FalseClass], default: false
|
|
35
|
+
|
|
36
|
+
UTF8_BOM = "\xEF\xBB\xBF"
|
|
37
|
+
|
|
26
38
|
def to_xml(indent: 2, target: "")
|
|
27
39
|
xml = Builder::XmlMarkup.new(indent: indent, target: target)
|
|
28
40
|
xml.instruct! :xml, version: "1.0", encoding: "UTF-8"
|
|
29
41
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
) do
|
|
36
|
-
# Add the invoice if it exists
|
|
42
|
+
root_attrs = {}
|
|
43
|
+
root_attrs["xsi:noNamespaceSchemaLocation"] = schema_location if schema_location
|
|
44
|
+
root_attrs["xmlns:xsi"] = "http://www.w3.org/2001/XMLSchema-instance"
|
|
45
|
+
root_attrs["Version"] = version
|
|
46
|
+
|
|
47
|
+
xml.Laborabrechnung(root_attrs) do
|
|
37
48
|
rechnung&.to_xml(xml)
|
|
38
49
|
end
|
|
39
50
|
|
|
40
|
-
target
|
|
51
|
+
target.gsub!("\n", "\r\n") if line_endings == :crlf
|
|
52
|
+
bom ? UTF8_BOM + target : target
|
|
41
53
|
end
|
|
42
54
|
end
|
|
43
55
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xml_laborabrechnungsdaten
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Florian Görsdorf
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-08 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: builder
|
|
@@ -38,6 +38,20 @@ dependencies:
|
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: 1.0.0
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: nokogiri
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
41
55
|
description: A ruby gem to generate XML for invoice exchange between dental lab and
|
|
42
56
|
dentist practices following the standard from VDDS, KZBV and VDZI.
|
|
43
57
|
email:
|
|
@@ -63,7 +77,6 @@ files:
|
|
|
63
77
|
- lib/xml_laborabrechnungsdaten/rechnung.rb
|
|
64
78
|
- lib/xml_laborabrechnungsdaten/version.rb
|
|
65
79
|
- sig/vdds_laborabrechnungsdaten_xml.rbs
|
|
66
|
-
- xml_laborabrechnungsdaten.gemspec
|
|
67
80
|
homepage: https://github.com/florian2/xml_laborabrechnungsdaten
|
|
68
81
|
licenses:
|
|
69
82
|
- MIT
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require_relative "lib/xml_laborabrechnungsdaten/version"
|
|
4
|
-
|
|
5
|
-
Gem::Specification.new do |spec|
|
|
6
|
-
spec.name = "xml_laborabrechnungsdaten"
|
|
7
|
-
spec.version = XmlLaborabrechnungsdaten::VERSION
|
|
8
|
-
spec.authors = ["Florian Görsdorf"]
|
|
9
|
-
spec.email = ["florian.goersdorf@dentatool.de"]
|
|
10
|
-
|
|
11
|
-
spec.summary = "Library to create XML invoice representations of dental labs invoices following the german VDDS XML exchange standart between dental practices and dental labs"
|
|
12
|
-
spec.description = "A ruby gem to generate XML for invoice exchange between dental lab and dentist practices following the standard from VDDS, KZBV and VDZI."
|
|
13
|
-
spec.homepage = "https://github.com/florian2/xml_laborabrechnungsdaten"
|
|
14
|
-
spec.license = "MIT"
|
|
15
|
-
spec.required_ruby_version = ">= 2.6.0"
|
|
16
|
-
|
|
17
|
-
spec.metadata["homepage_uri"] = spec.homepage
|
|
18
|
-
spec.metadata["source_code_uri"] = spec.homepage
|
|
19
|
-
|
|
20
|
-
# Specify which files should be added to the gem when it is released.
|
|
21
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
22
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
23
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
|
24
|
-
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
spec.bindir = "exe"
|
|
28
|
-
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
29
|
-
spec.require_paths = ["lib"]
|
|
30
|
-
|
|
31
|
-
spec.add_dependency "builder", "~> 3.2"
|
|
32
|
-
spec.add_development_dependency "debug", ">= 1.0.0"
|
|
33
|
-
end
|