xml-smart 0.5.1 → 0.5.3

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: 1ef2345393e6ca23b1d18729a0de7078c91b31adb1e375a60f35c93ed30f4175
4
- data.tar.gz: 95b2254eb1fb662dfec507b772a079dfe9241be0e7f67d4ae3beffffaee5fa98
3
+ metadata.gz: 1aa0c1eb175a7fffab97dfffca54c2f477e52319eff70e5e7a9ee520db5285c2
4
+ data.tar.gz: 4458cd907d7d63ec5ec95e398f39d657a167c22c22cbd804315108613aa59cd7
5
5
  SHA512:
6
- metadata.gz: 6367982acc8b9fcaecaf42d852bab0a883349d2e2fe27ea3aa96c7bf83336a0b0853ea82884c1cb3b7149cb8688ea1eff551ee6cc2b1d8930534309c3ac08b18
7
- data.tar.gz: d604c543a275931059d4e282a8f502f3a48d65edd00f4786c96402a471753d3922c7d2dc7aa496c84526b62a51d08374e6d91a3fab27ea357ecc66f463bf8a10
6
+ metadata.gz: c043a8f1727d6f6f8c2f812700da29d1768e72a26563bdf65c106c582ad717b7421fa3e06238657982968e2a59628e776d9b858ffe6c471a342437ce356e1010
7
+ data.tar.gz: 98c7b47d441903da0a2d5f6d26f80720986a30d4f69849656efe31719271ab8e9197899b06090c144e30ae8aa8aa5052b4009afd03aed08205ba65e6d26501de
data/example/xpath_visual CHANGED
@@ -40,7 +40,7 @@ if ARGV.length < 2
40
40
  else
41
41
  # xpath expression that should be visualised
42
42
  xpath = ARGV[1..-1].join(' ') || "/"
43
- unless File.exists?(ARGV[0])
43
+ unless File.exist?(ARGV[0])
44
44
  help
45
45
  end
46
46
  doc = XML::Smart.open_unprotected(ARGV[0])
@@ -30,7 +30,14 @@ module XML
30
30
  self.add(name,value)
31
31
  end
32
32
 
33
- def add(name,value)
33
+ def add(a,b=nil)
34
+ if b.nil?
35
+ name = nil
36
+ value = a
37
+ else
38
+ name = a
39
+ value = b
40
+ end
34
41
  if (name.respond_to?(:to_s) || name.nil?) && value.respond_to?(:to_s)
35
42
  nnod = Nokogiri::XML::Node.new(@node.name,@node.document)
36
43
  nnew = Element.new(nnod)
data/test/EXAMPLE.xml CHANGED
@@ -1,6 +1,6 @@
1
1
  <test xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xml:lang="de">
2
2
  <names>
3
- <name team="0" a="3">2021-11-03 02:24:58 +0100</name>
3
+ <name team="0" a="3">2023-06-11 19:39:57 +0200</name>
4
4
  <name team="1">Jürgen</name>
5
5
  <name team="1">Michel</name>
6
6
  <name team="1">Raphi</name>
data/test/concurrent.xml CHANGED
@@ -1,7 +1 @@
1
- <solutions>
2
- <solution matnr="9906264" name="mangler" secid="1" when="2021-11-03T02:24:55+01:00" assessment="16">
3
- <question block="1" question="2"/>
4
- <question block="2" question="4"/>
5
- <question block="3" question="6"/>
6
- </solution>
7
- </solutions>
1
+ <solutions><solution matnr="9906264" name="mangler" secid="1" assessment="16"><question block="1" question="2"/><question block="2" question="4"/><question block="3" question="6"/></solution></solutions>
data/test/tc_create.rb CHANGED
@@ -6,7 +6,7 @@ class TestCreate < Minitest::Test
6
6
  # When a string as second paramter is provided, then a empty
7
7
  # xml file is created if it not exists. A block has to be supplied
8
8
  #
9
- # XML::Smart.modify(FILE,STRING) {} ... create file if !exists?
9
+ # XML::Smart.modify(FILE,STRING) {} ... create file if !exist?
10
10
  # XML::Smart.modify(FILE) {} ... just open file change and write back (LOCKTIMEOUT defaults to 7)
11
11
 
12
12
  File.unlink ::File.dirname(__FILE__) + "/EXAMPLE.tmp.xml" rescue nil
data/xml-smart.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "xml-smart"
3
- s.version = "0.5.1"
3
+ s.version = "0.5.3"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
6
  s.summary = "An xml library that doesn't suck (for me) - since 2004."
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xml-smart
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juergen eTM Mangler
8
8
  autorequire:
9
9
  bindir: example
10
10
  cert_chain: []
11
- date: 2023-03-21 00:00:00.000000000 Z
11
+ date: 2025-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
- rubygems_version: 3.4.6
167
+ rubygems_version: 3.5.22
168
168
  signing_key:
169
169
  specification_version: 4
170
170
  summary: An xml library that doesn't suck (for me) - since 2004.