eancom 1.5.5 → 1.5.6

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
2
  SHA256:
3
- metadata.gz: 6c5b7b190b71d11d44c7e7ee8517d42210de62af2d9cf7db2753a806964a6807
4
- data.tar.gz: 96c97f166dbf1a43124998eceda1d108debbe655c3089484369a8b1e075a807b
3
+ metadata.gz: 28d0ac841ab2d2b574ec0bc021c80822967d89ce5b1a15ef001ce336c68b9792
4
+ data.tar.gz: f79c78ca706ce396af0ebdf305464aa1f3d6118d70a3c7b8d04f71b75977e63f
5
5
  SHA512:
6
- metadata.gz: c0b9ee99cead92c3a79e23957c506247345d15f679b69684cd0a6a04152f3cfd55fa86661114f1988bd789fa8fc3663f104459b3683a196175df7558506881bf
7
- data.tar.gz: '0919d32a690c9b53a6e4107825c950e9eca7c18edaf816e9646ede9a5eb92ab68342e8471596c232107d01d86a23796c3d400acd308baf5bd2393faea3105cb1'
6
+ metadata.gz: 2fa8099abfc90d8e89504faa5e010084ab09abdaf4986db52c8bd66d14e7cb155d5f609ce744d78c98a9c8f47bb38dc96016f82393f6b001ef9711fcfdcd76cb
7
+ data.tar.gz: 12187f1d4f64e62c6d1751dbbe8b70665f0d2752506f9809ca3c24928918ae939c199b06e3e28b324f7165162f0597aa513408ed787b3ffcb919b2d2ce42dc48
data/.tool-versions CHANGED
@@ -1 +1 @@
1
- ruby 2.7.6
1
+ ruby 3.0.2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- eancom (1.4.0)
4
+ eancom (1.5.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -11,21 +11,18 @@ module Eancom
11
11
  end
12
12
 
13
13
  def self.initialize_by_components(structure, array)
14
- begin
15
- new(structure.build_hash(array))
16
- rescue StandardError => e
17
- raise SegmentParserError.new(
18
- "'Parser Error in structure #{structure.tag} with array #{array}.\n \
19
- 'Inside Structure: \n \ '#{structure.to_s}.\n \
14
+ new(**structure.build_hash(array))
15
+ rescue StandardError => e
16
+ raise SegmentParserError, "'Parser Error in structure #{structure.tag} with array #{array}.\n \
17
+ 'Inside Structure: \n \ '#{structure}.\n \
20
18
  'Error:\n \
21
19
  '#{e}"
22
- )
23
- end
24
20
  end
25
21
 
26
22
  def validate_structure
27
23
  attributes.each do |key, value|
28
24
  next if value.nil?
25
+
29
26
  structure.validate!(key, value)
30
27
  end
31
28
  end
@@ -42,6 +39,7 @@ module Eancom
42
39
  string = array.map do |e|
43
40
  e = e.compact
44
41
  next if e.empty?
42
+
45
43
  [e.join(component_delimiter)]
46
44
  end.join(data_delimiter)
47
45
  clean_end_string(string)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Eancom
4
- VERSION = '1.5.5'
4
+ VERSION = '1.5.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eancom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fadendaten GmbH
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-06 00:00:00.000000000 Z
11
+ date: 2023-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -122,7 +122,7 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- description:
125
+ description:
126
126
  email:
127
127
  - support@fadendaten.ch
128
128
  executables: []
@@ -233,7 +233,7 @@ licenses:
233
233
  - MIT
234
234
  metadata:
235
235
  homepage_uri: https://fadendaten.ch
236
- post_install_message:
236
+ post_install_message:
237
237
  rdoc_options: []
238
238
  require_paths:
239
239
  - lib
@@ -248,8 +248,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
248
248
  - !ruby/object:Gem::Version
249
249
  version: '0'
250
250
  requirements: []
251
- rubygems_version: 3.1.6
252
- signing_key:
251
+ rubygems_version: 3.2.22
252
+ signing_key:
253
253
  specification_version: 4
254
254
  summary: EDIFACT Generator for the EANCOM Subset
255
255
  test_files: []