xml-smart 0.4.4 → 0.5.0

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: '0082580453384e4fc3faf5b355f6aa8ce68d77e620fc520b4712659190e900b1'
4
- data.tar.gz: 6e690294fe78c3d3a28f7be10a147f498ec0775a324ae63c02e786ed35972e55
3
+ metadata.gz: 7442401013fd975d2ffb250e156372e4fc7a6e6d9fba5776c07d643e5c91f8bd
4
+ data.tar.gz: 1a98c2d2cf23fe2980f75fda07935fb92e802f0411647a8ea3e034731a8365d3
5
5
  SHA512:
6
- metadata.gz: a009c08c31957a69772a05764ab7334ce878d6d009f779c248715fb4cd40595f034b4cba04d03fb656d20cb31ceaa690e65f265d98a7cba54f7af625b78b1ba2
7
- data.tar.gz: 94475b9125ff888bf800e6e466b99892833de16d99f0b5417f995853454c66e7987f5070f5650983f02f468a3154a20b90a35f7e578b80dda42827a33cb10b9e
6
+ metadata.gz: 10c1b36e9d1f8323ed955dbb7e416a47f6501915e9d2ceb68085e83befabc131b514069f44753185711b213f3b8a791305356a46762516b3e725c8bea3c700f8
7
+ data.tar.gz: 829844fea52e292815884037cb004e609f28e447edeecb995bca58d15d271475b22bbb36e2135e16e125f38efcbbeda6c67424c6b2512549696cbed033c8a4e7
@@ -1,4 +1,4 @@
1
- == XML::Smart - A Ruby class for fast and simple XML access
1
+ ## XML::Smart - A Ruby class for fast and simple XML access
2
2
 
3
3
  Copyright (C) 2004-2012 Jürgen Mangler <juergen.mangler@univie.ac.at>
4
4
 
@@ -6,74 +6,84 @@ Ruby/XML/Smart is freely distributable according to the terms of the GNU Lesser
6
6
 
7
7
  This program is distributed without any warranty. See the file 'COPYING' for details.
8
8
 
9
- == Installation
9
+ ## Installation
10
10
 
11
11
  - Based on Nokogiri 1.5.5
12
12
  - Thus works for MRI ruby 1.8.7, 1.9.x, JRuby (basically everything that is Nokogiri ready)
13
13
  - Works on Linux, OSX, Windows
14
14
 
15
- == Features
15
+ ## Features
16
16
 
17
- === Principle of least surprise
17
+ ### Principle of least surprise
18
18
 
19
19
  - Nokogiri is messy - violence always is
20
20
  - libxml smells like old-school C-Binding ;-)
21
21
  - rex is ... strange
22
22
 
23
- === Inherits Nokogiris GREAT compatibility for platforms and Ruby interpreters
23
+ ### Inherits Nokogiris GREAT compatibility for platforms and Ruby interpreters
24
24
 
25
- === XML only
25
+ ### XML only
26
26
 
27
27
  Sorry, no css selectors, html, ... go to Nokogiri if you look for these.
28
28
 
29
- === Great and convenient namespace support, compared to everything else out there
29
+ ### Great and convenient namespace support, compared to everything else out there
30
30
 
31
31
  Use namespaces in xpaths without any additional work:
32
32
 
33
+ ```ruby
33
34
  doc = XML::Smart.string('<test xmlns:aaa="uri:aaa"><aaa:test/></test>')
34
35
  doc.find('string(aaa:test)')
35
36
  doc.close
37
+ ```
36
38
 
37
39
  Register your own shortcusts to be available in all XPaths:
38
40
 
41
+ ```ruby
39
42
  doc = XML::Smart.string('<test xmlns:aaa="uri:aaa"><aaa:test/></test>')
40
43
  doc.register_namespace :a, 'uri:aaa'
41
44
  doc.find('string(a:test)')
42
45
  doc.close
46
+ ```
43
47
 
44
- === NFS safe file locking while editing / reading from an XML file
48
+ ### NFS safe file locking while editing / reading from an XML file
45
49
 
50
+ ```ruby
46
51
  XML::Smart.modify("EXAMPLE.xml","<test><names/></test>") do |doc|
47
52
  doc.root.add "test_node"
48
53
  end
54
+ ```
49
55
 
50
- === check against relaxng and xml schema
56
+ ### check against relaxng and xml schema
51
57
 
52
58
  Libxml2, the basis for nokogiri has only partial xml-schema support, but full
53
59
  relaxng support. Thus checking against xml-schema with nokogiri may return
54
60
  positive results, although it is a lie. XML::Smart internally converts
55
61
  xml-schema to relaxng, thus allowing for seamless schema usage:
56
62
 
63
+ ```ruby
57
64
  doc = XML::Smart.string('<test xmlns:aaa="uri:aaa"><aaa:test/></test>')
58
65
  doc.validate_against(XML::Smart.open_unprotected('xmlschema.xml'))
59
66
  doc.validate_against(XML::Smart.open_unprotected('xmlschema.xml'))
60
67
  doc.find('string(a:test)')
61
68
  doc.close
69
+ ```
62
70
 
63
- === xinclude
71
+ ### xinclude
64
72
 
65
- Libxml2, the basis for nokogiri does not support https xincludes. Nokogiri may
66
- impelement this in the future (issue
67
- https://github.com/sparklemotion/nokogiri/issues/1321), but for now we do
68
- support it:
73
+ Libxml2, the basis for nokogiri does not support https xincludes. Nokogiri may impelement this in the future (issue
74
+ https://github.com/sparklemotion/nokogiri/issues/1321), but for now we do support it:
69
75
 
76
+ ```ruby
70
77
  doc.xinclude!
78
+ ```
71
79
 
72
80
  or
73
-
81
+
82
+ ```ruby
74
83
  doc.find('//someelement').first.xinclude!
84
+ ```
75
85
 
76
- == Changes since 0.2.x (see Changelog)
86
+ ## Changes since 0.2.x (see Changelog)
77
87
 
78
88
  - qname instead of name
79
89
  - #register_namespace instead of #namespaces= to register shortcuts
@@ -81,6 +91,6 @@ or
81
91
  - signals removed
82
92
  - pull parser removed
83
93
 
84
- == Documentation
94
+ ## Documentation
85
95
 
86
96
  Sorry, no inline code documentation yet. We have an extensive test suite, look for examples there for now.
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">2020-06-05 23:34:48 +0200</name>
3
+ <name team="0" a="3">2021-11-03 02:24:58 +0100</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 +1,7 @@
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>
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>
data/xml-smart.gemspec CHANGED
@@ -1,22 +1,22 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "xml-smart"
3
- s.version = "0.4.4"
3
+ s.version = "0.5.0"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.license = "LGPL-3.0"
6
- s.summary = "An xml library that doesn't suck - since 2004."
6
+ s.summary = "An xml library that doesn't suck (for me) - since 2004."
7
7
 
8
8
  s.description = "An xml library that doesn't suck (since 2004). Based on Nokogiri since 2012. For more info check out the Documentation link below."
9
9
 
10
- s.files = Dir['{lib/**/*,example/**/*}'] + %w(COPYING Rakefile xml-smart.gemspec README.rdoc AUTHORS)
10
+ s.files = Dir['{lib/**/*,example/**/*}'] + %w(COPYING Rakefile xml-smart.gemspec README.md AUTHORS)
11
11
  s.require_path = 'lib'
12
- s.extra_rdoc_files = ['README.rdoc']
12
+ s.extra_rdoc_files = ['README.md']
13
13
  s.test_files = Dir['test/tc_*.rb','test/*.xml','test/*.rng','test/*.xsd','test/smartrunner.rb','minitest/*']
14
14
  s.bindir = 'example'
15
15
  s.executables = ['xpath_visual']
16
16
 
17
17
  s.authors = ['Juergen eTM Mangler']
18
18
  s.email = 'juergen.mangler@gmail.com'
19
- s.homepage = 'http://www.wst.univie.ac.at/~mangler/xml-smart/'
19
+ s.homepage = 'https://github.com/etm/xml-smart/'
20
20
 
21
21
  s.required_ruby_version = '>=1.9.3'
22
22
 
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.4.4
4
+ version: 0.5.0
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: 2021-12-08 00:00:00.000000000 Z
11
+ date: 2023-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -77,11 +77,11 @@ executables:
77
77
  - xpath_visual
78
78
  extensions: []
79
79
  extra_rdoc_files:
80
- - README.rdoc
80
+ - README.md
81
81
  files:
82
82
  - AUTHORS
83
83
  - COPYING
84
- - README.rdoc
84
+ - README.md
85
85
  - Rakefile
86
86
  - example/CARD.xml
87
87
  - example/EXAMPLE.xml
@@ -145,7 +145,7 @@ files:
145
145
  - test/tc_xpath_root.rb
146
146
  - test/tc_xsl.rb
147
147
  - xml-smart.gemspec
148
- homepage: http://www.wst.univie.ac.at/~mangler/xml-smart/
148
+ homepage: https://github.com/etm/xml-smart/
149
149
  licenses:
150
150
  - LGPL-3.0
151
151
  metadata: {}
@@ -164,10 +164,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  - !ruby/object:Gem::Version
165
165
  version: '0'
166
166
  requirements: []
167
- rubygems_version: 3.2.22
167
+ rubygems_version: 3.4.6
168
168
  signing_key:
169
169
  specification_version: 4
170
- summary: An xml library that doesn't suck - since 2004.
170
+ summary: An xml library that doesn't suck (for me) - since 2004.
171
171
  test_files:
172
172
  - test/tc_add.rb
173
173
  - test/tc_basic.rb