ubl 0.1.5 → 0.1.8
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/LICENSE.txt +1 -1
- data/README.md +0 -14
- data/lib/ubl/validate.rb +1 -1
- data/lib/ubl/version.rb +1 -1
- metadata +6 -53
- data/.standard.yml +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 61b9907dd5483c3e822a11f705c5a204d9da412ee3c95f40b752e8f8bba791c7
|
|
4
|
+
data.tar.gz: 19ef30684a2b87684cf30f01616491e82d4c2f00b16f900db9b5a737b4b2b763
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 83e487ee59b50e7636262a2eb564bd12557c5677f6612a1e1652fb6f50f2ddc541d42933e82e4f07f7fbc15eb9b35b3a8835db474d32dcbdd20a8cd5e9ca0e42
|
|
7
|
+
data.tar.gz: 5f06dca890d337b953d1650baf0dafa37140e4ec6be2dcddeec876b63e4a4bed0940407f09d9444ae8bb06f40064e19b9da7ba48d578f8c7dcb94a30209392a4
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -54,26 +54,12 @@ If you need the UBL.BE version:
|
|
|
54
54
|
invoice = Ubl::Invoice.new("UBL_BE")
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
You can also validate the result.
|
|
58
|
-
You need Docker for the schematron validation. (https://github.com/mooroe/peppol_schematron)
|
|
59
|
-
With `schematron: false` you can disable this and only the xsd validation will run.
|
|
60
|
-
```ruby
|
|
61
|
-
Tempfile.create("invoice.xml") do |invoice_file|
|
|
62
|
-
File.write(invoice_file, content)
|
|
63
|
-
p Ubl.validate_invoice(invoice_file.path, extension: "UBL_BE", schematron: true)
|
|
64
|
-
end
|
|
65
|
-
```
|
|
66
|
-
|
|
67
57
|
## development
|
|
68
58
|
|
|
69
59
|
after checking out the repo, run `bin/setup` to install dependencies. then, run `rake test` to run the tests. you can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
70
60
|
|
|
71
61
|
to install this gem onto your local machine, run `bundle exec rake install`. to release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
72
62
|
|
|
73
|
-
## contributing
|
|
74
|
-
|
|
75
|
-
bug reports and pull requests are welcome on github at https://github.com/mooroe/ubl.
|
|
76
|
-
|
|
77
63
|
## license
|
|
78
64
|
|
|
79
65
|
the gem is available as open source under the terms of the [mit license](https://opensource.org/licenses/mit).
|
data/lib/ubl/validate.rb
CHANGED
|
@@ -48,7 +48,7 @@ module Ubl
|
|
|
48
48
|
|
|
49
49
|
def validate_schematron(invoice_file)
|
|
50
50
|
env = @ubl_be ? "-e UBL_BE=true" : ""
|
|
51
|
-
cmd = "docker run --rm #{env} -v #{invoice_file}:/app/invoice.xml:ro
|
|
51
|
+
cmd = "docker run --rm #{env} -v #{invoice_file}:/app/invoice.xml:ro peppol_schematron:latest 2>/dev/null"
|
|
52
52
|
# puts cmd
|
|
53
53
|
svrl_content = `#{cmd}`
|
|
54
54
|
parse_svrl_errors(svrl_content)
|
data/lib/ubl/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,65 +1,20 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ubl
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
|
-
-
|
|
7
|
+
- roeland
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
-
dependencies:
|
|
12
|
-
- !ruby/object:Gem::Dependency
|
|
13
|
-
name: nokogiri
|
|
14
|
-
requirement: !ruby/object:Gem::Requirement
|
|
15
|
-
requirements:
|
|
16
|
-
- - "~>"
|
|
17
|
-
- !ruby/object:Gem::Version
|
|
18
|
-
version: '1.18'
|
|
19
|
-
type: :runtime
|
|
20
|
-
prerelease: false
|
|
21
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
-
requirements:
|
|
23
|
-
- - "~>"
|
|
24
|
-
- !ruby/object:Gem::Version
|
|
25
|
-
version: '1.18'
|
|
26
|
-
- !ruby/object:Gem::Dependency
|
|
27
|
-
name: base64
|
|
28
|
-
requirement: !ruby/object:Gem::Requirement
|
|
29
|
-
requirements:
|
|
30
|
-
- - "~>"
|
|
31
|
-
- !ruby/object:Gem::Version
|
|
32
|
-
version: 0.3.0
|
|
33
|
-
type: :runtime
|
|
34
|
-
prerelease: false
|
|
35
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
-
requirements:
|
|
37
|
-
- - "~>"
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: 0.3.0
|
|
40
|
-
- !ruby/object:Gem::Dependency
|
|
41
|
-
name: colorize
|
|
42
|
-
requirement: !ruby/object:Gem::Requirement
|
|
43
|
-
requirements:
|
|
44
|
-
- - "~>"
|
|
45
|
-
- !ruby/object:Gem::Version
|
|
46
|
-
version: '1.1'
|
|
47
|
-
type: :runtime
|
|
48
|
-
prerelease: false
|
|
49
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
50
|
-
requirements:
|
|
51
|
-
- - "~>"
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
version: '1.1'
|
|
54
|
-
description: Generate and validate UBL (Universal Business Language) documents, such
|
|
55
|
-
as invoices and credit notes, compliant with the Peppol network.
|
|
11
|
+
dependencies: []
|
|
56
12
|
email:
|
|
57
13
|
- roeland@webding.org
|
|
58
14
|
executables: []
|
|
59
15
|
extensions: []
|
|
60
16
|
extra_rdoc_files: []
|
|
61
17
|
files:
|
|
62
|
-
- ".standard.yml"
|
|
63
18
|
- LICENSE.txt
|
|
64
19
|
- README.md
|
|
65
20
|
- Rakefile
|
|
@@ -148,12 +103,9 @@ files:
|
|
|
148
103
|
- xsd/maindoc/UBL-UnawardedNotification-2.1.xsd
|
|
149
104
|
- xsd/maindoc/UBL-UtilityStatement-2.1.xsd
|
|
150
105
|
- xsd/maindoc/UBL-Waybill-2.1.xsd
|
|
151
|
-
homepage: https://github.com/mooroe/ubl
|
|
152
106
|
licenses:
|
|
153
107
|
- MIT
|
|
154
|
-
metadata:
|
|
155
|
-
homepage_uri: https://github.com/mooroe/ubl
|
|
156
|
-
source_code_uri: https://github.com/mooroe/ubl
|
|
108
|
+
metadata: {}
|
|
157
109
|
rdoc_options: []
|
|
158
110
|
require_paths:
|
|
159
111
|
- lib
|
|
@@ -170,5 +122,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
170
122
|
requirements: []
|
|
171
123
|
rubygems_version: 3.6.7
|
|
172
124
|
specification_version: 4
|
|
173
|
-
summary: Generate and validate UBL documents
|
|
125
|
+
summary: Generate and validate UBL (Universal Business Language) documents, such as
|
|
126
|
+
invoices and credit notes, compliant with the Peppol network.
|
|
174
127
|
test_files: []
|
data/.standard.yml
DELETED