ooxml_parser 0.18.1 → 0.19.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fd9cd17bc24141fd5500ae8233240e5a8370fcc7aa8606211dfbdd7638b720af
4
- data.tar.gz: a460aaf4e3216c0e627520c133d821b9310307c783712b6fd0f7c2f8879bf164
3
+ metadata.gz: 671e659de64bdde6bca41c908243249142b13c1befbc8eb3700bb349cecd763a
4
+ data.tar.gz: ddac347c46aaf664a93f7350f06a03926dcb3a1b9aa664e78916b75dec1ee306
5
5
  SHA512:
6
- metadata.gz: 39a1f7298c1c51da2e27f313cd6873924896c8dc71f46fa40760f520e746532cf6c50ba8d70829b4a36873f543e8dec8ceb920013531d1ac1d44c9ea44ce7706
7
- data.tar.gz: ea140f577de7d3f47b37dcaf1909c2e1ae90b28356085c380caa6eecb508d205e95dccc198100cbd513918b7fecfb65e34df2877434c184b3b8ece431a695ef8
6
+ metadata.gz: 38222b44da13b5cbc3fe2bbd0fb49b2cd8cd2e7ae2482586781a725d481c90144f39c0263d0c183db6094b11eebd065f57e9808a4c5dbe915a1854a436d97d33
7
+ data.tar.gz: 1e7e3c540f2e9a441a4e65209c3ee12fe920d2ee2e663af7fb4a52aedb8d68d956fe548384644ed1fa6b0c8c5ad59b739c800ecfc1ff0851a0ae343d661af886
@@ -16,7 +16,7 @@ module OoxmlParser
16
16
  # @param [Nokogiri::XML:Node] node with ParagraphSpacing
17
17
  # @return [ParagraphSpacing] result of parsing
18
18
  def parse(node)
19
- node.attributes.each do |key, value|
19
+ sorted_attributes(node).each do |key, value|
20
20
  case key
21
21
  when 'before'
22
22
  @before = OoxmlSize.new(value.value.to_f)
@@ -34,5 +34,17 @@ module OoxmlParser
34
34
  end
35
35
  self
36
36
  end
37
+
38
+ private
39
+
40
+ # This is dirty workaround for situations
41
+ # Then @line_rule parsed after @line so getting
42
+ # @line value is totally screwed up
43
+ # @param [Nokogiri::XML:Node] node with ParagraphSpacing
44
+ # @return [Hash] hash with sorted values
45
+ # TODO: Totally redone parsing of spacing to remove this workaround
46
+ def sorted_attributes(node)
47
+ node.attributes.sort.reverse.to_h
48
+ end
37
49
  end
38
50
  end
@@ -4,6 +4,6 @@ module OoxmlParser
4
4
  # This module holds the RuboCop version information.
5
5
  module Version
6
6
  # [String] Version of Gem
7
- STRING = '0.18.1'
7
+ STRING = '0.19.0'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ooxml_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.18.1
4
+ version: 0.19.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ONLYOFFICE
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-11-11 00:00:00.000000000 Z
13
+ date: 2021-11-17 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri
@@ -579,6 +579,7 @@ metadata:
579
579
  documentation_uri: https://www.rubydoc.info/gems/ooxml_parser
580
580
  homepage_uri: https://github.com/onlyoffice/ooxml_parser
581
581
  source_code_uri: https://github.com/onlyoffice/ooxml_parser
582
+ rubygems_mfa_required: 'true'
582
583
  post_install_message:
583
584
  rdoc_options: []
584
585
  require_paths: