eancom 1.5.4 → 1.5.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d853116bd905dabb24c927d8ee0bee2cb59bfe46becc50680d71f55354d31626
4
- data.tar.gz: 3975843d777b84f24826be8aa8c7288bdd01dbb36253633da2ea8c11ab62d558
3
+ metadata.gz: 28d0ac841ab2d2b574ec0bc021c80822967d89ce5b1a15ef001ce336c68b9792
4
+ data.tar.gz: f79c78ca706ce396af0ebdf305464aa1f3d6118d70a3c7b8d04f71b75977e63f
5
5
  SHA512:
6
- metadata.gz: 73688e62d1e3e6704b169f9d299da9a4c78af20f4cbbba520298e128b18861cd5fd1b0d3e9e416d4e1479be96c7cf77cdb94029060fb6fd32b59feadab51407e
7
- data.tar.gz: 9f0cb4f52529a9c575f599ba81db8b5ca81168516c45f63e8b3577fb401d7dc05dbd97b93042a7e241fd4d6d3df014eede3d69c67bcc8e906f44a12c49a2c26b
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/
@@ -149,22 +149,6 @@ item_characteristic_code = Eancom::Edifact::Data.new(
149
149
  description: 'Season code',
150
150
  identifier: 'season_code'
151
151
  },
152
- 'SPR' => { # This is only here because Bliss generates erronous PRICATs, omitting the C272 composite.
153
- description: 'Bliss Season Name',
154
- identifier: 'bliss_season_name'
155
- },
156
- 'SMR' => { # This is only here because Bliss generates erronous PRICATs, omitting the C272 composite.
157
- description: 'Bliss Season Name',
158
- identifier: 'bliss_season_name'
159
- },
160
- 'AUT' => { # This is only here because Bliss generates erronous PRICATs, omitting the C272 composite.
161
- description: 'Bliss Season Name',
162
- identifier: 'bliss_season_name'
163
- },
164
- 'WNT' => { # This is only here because Bliss generates erronous PRICATs, omitting the C272 composite.
165
- description: 'Bliss Season Name',
166
- identifier: 'bliss_season_name'
167
- },
168
152
  },
169
153
  description: "Item characteristic code",
170
154
  required: true
@@ -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.4'
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.4
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-05 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: []