dachsfisch 0.1.0 → 0.2.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 +4 -4
- data/Gemfile.lock +6 -6
- data/lib/dachsfisch/json2_xml_converter.rb +2 -1
- data/lib/dachsfisch/version.rb +1 -1
- data/lib/dachsfisch/xml2_json_converter.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9b770b4fa107d42b19b2cccbf725b0677d63176f2bae0754e8d3b566b642ab99
|
|
4
|
+
data.tar.gz: a83446b885e9596e174f79e45337d08f97925f7bcb7ad76d8bbfa74c27a5228c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f15b9899108feb5971a743ac490bd1107849990a7a1381c581ef46e12adabdd484f559a8a099dd13e7e5414a9251c86466a01683376a5f63d920d5c9f4c9ab54
|
|
7
|
+
data.tar.gz: 2e45884b0a96d04f39b72003e80bed357ea44d8846f470b7a46ef7da4642e29abfb8c28e17e626afd66f5010f6aeb3dede170f702cca5943ee6ae44627f01eaa
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
dachsfisch (0.
|
|
4
|
+
dachsfisch (0.2.0)
|
|
5
5
|
nokogiri (>= 1.14.1, < 2.0.0)
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -48,7 +48,7 @@ GEM
|
|
|
48
48
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
49
49
|
rspec-support (~> 3.12.0)
|
|
50
50
|
rspec-support (3.12.1)
|
|
51
|
-
rubocop (1.56.
|
|
51
|
+
rubocop (1.56.4)
|
|
52
52
|
base64 (~> 0.1.1)
|
|
53
53
|
json (~> 2.3)
|
|
54
54
|
language_server-protocol (>= 3.17.0)
|
|
@@ -62,14 +62,14 @@ GEM
|
|
|
62
62
|
unicode-display_width (>= 2.4.0, < 3.0)
|
|
63
63
|
rubocop-ast (1.29.0)
|
|
64
64
|
parser (>= 3.2.1.0)
|
|
65
|
-
rubocop-capybara (2.
|
|
65
|
+
rubocop-capybara (2.19.0)
|
|
66
66
|
rubocop (~> 1.41)
|
|
67
|
-
rubocop-factory_bot (2.
|
|
67
|
+
rubocop-factory_bot (2.24.0)
|
|
68
68
|
rubocop (~> 1.33)
|
|
69
|
-
rubocop-performance (1.19.
|
|
69
|
+
rubocop-performance (1.19.1)
|
|
70
70
|
rubocop (>= 1.7.0, < 2.0)
|
|
71
71
|
rubocop-ast (>= 0.4.0)
|
|
72
|
-
rubocop-rspec (2.
|
|
72
|
+
rubocop-rspec (2.24.1)
|
|
73
73
|
rubocop (~> 1.33)
|
|
74
74
|
rubocop-capybara (~> 2.17)
|
|
75
75
|
rubocop-factory_bot (~> 2.22)
|
|
@@ -31,7 +31,8 @@ module Dachsfisch
|
|
|
31
31
|
def add_node(xml, key, element)
|
|
32
32
|
case element
|
|
33
33
|
when Hash
|
|
34
|
-
|
|
34
|
+
# underscore is used to disambiguate tag names from ruby methods
|
|
35
|
+
node = xml.send("#{key}_") { add_element(xml, element) }
|
|
35
36
|
handle_attribute_and_namespaces(node, element)
|
|
36
37
|
when Array
|
|
37
38
|
element.each do |sub_element|
|
data/lib/dachsfisch/version.rb
CHANGED
|
@@ -77,7 +77,7 @@ module Dachsfisch
|
|
|
77
77
|
end
|
|
78
78
|
|
|
79
79
|
def add_namespaces_to_active_namespaces(node)
|
|
80
|
-
node.namespaces.transform_keys {|k| convert_namespace_key(k) }
|
|
80
|
+
node.namespaces.reject {|k, v| node.parent.namespaces[k] == v }.transform_keys {|k| convert_namespace_key(k) }
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
def convert_namespace_key(key)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dachsfisch
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Karol
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-10-03 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|
|
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
79
79
|
- !ruby/object:Gem::Version
|
|
80
80
|
version: '0'
|
|
81
81
|
requirements: []
|
|
82
|
-
rubygems_version: 3.4.
|
|
82
|
+
rubygems_version: 3.4.6
|
|
83
83
|
signing_key:
|
|
84
84
|
specification_version: 4
|
|
85
85
|
summary: Badgerfish implementation
|