nom-xml 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +24 -0
- data/lib/nom/xml/decorators/terminology.rb +11 -3
- data/lib/nom/xml/nokogiri_extension.rb +1 -3
- data/lib/nom/xml/term.rb +1 -1
- data/lib/nom/xml/version.rb +1 -1
- data/nom-xml.gemspec +0 -1
- metadata +7 -22
- data/.travis.yml +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 2b2ab72999bcce7d9fc1173c01393e03d8e2388428d90943e2fe1831f8b52563
|
4
|
+
data.tar.gz: 6c1c4a29b276fc07afe6bfd241f4a2a29105e49a9e20c39801f15577dc512889
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91ac790f990da5482c3489d3e57d0c014e01f9684ad408e5202e792d8f581d0412df55b427435aa320250ef9398a2f774c81c1abfda151f0ba7a55c94d20e8a9
|
7
|
+
data.tar.gz: 0ecd92b30918cde11a15197ea58edc6ccbc2d479a7a2f7d010789eee303f55edfac4cff0525dfbe972349f72cc49e4d4d43fc82ccb16422b343ae2a3593cbcea
|
@@ -0,0 +1,24 @@
|
|
1
|
+
name: CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches: [ master ]
|
6
|
+
pull_request:
|
7
|
+
branches: [ master ]
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
tests:
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
strategy:
|
13
|
+
matrix:
|
14
|
+
ruby: [jruby-9.2.12.0, 2.4, 2.5, 2.6, 2.7, 3.0]
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v2
|
17
|
+
- name: Set up Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: ${{ matrix.ruby }}
|
21
|
+
- name: Install dependencies
|
22
|
+
run: bundle install
|
23
|
+
- name: Run tests
|
24
|
+
run: bundle exec rake
|
@@ -82,9 +82,7 @@ module Nom::XML::Decorators::Terminology
|
|
82
82
|
end
|
83
83
|
|
84
84
|
def lookup_term term, *args
|
85
|
-
|
86
|
-
|
87
|
-
args += options.map { |key, value| %{#{key}="#{value.gsub(/"/, '\\\"') }"} }
|
85
|
+
args = extract_term_options(*args)
|
88
86
|
|
89
87
|
xpath = term.local_xpath
|
90
88
|
|
@@ -99,4 +97,14 @@ module Nom::XML::Decorators::Terminology
|
|
99
97
|
|
100
98
|
result.values_for_term(term)
|
101
99
|
end
|
100
|
+
|
101
|
+
def extract_term_options(*args)
|
102
|
+
if args.last.is_a? Hash
|
103
|
+
h = args.pop
|
104
|
+
|
105
|
+
args + h.map { |key, value| %(#{key}="#{value.gsub(/"/, '\\\"')}") }
|
106
|
+
else
|
107
|
+
args
|
108
|
+
end
|
109
|
+
end
|
102
110
|
end
|
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'active_support/core_ext/array'
|
2
|
-
|
3
1
|
module Nom::XML
|
4
2
|
module NokogiriExtension
|
5
3
|
|
@@ -24,7 +22,7 @@ module Nom::XML
|
|
24
22
|
# Set the terminology accessors for this document
|
25
23
|
def set_terminology options = {}, &block
|
26
24
|
@terminology = Nom::XML::Terminology.new(self, options, &block)
|
27
|
-
|
25
|
+
|
28
26
|
self
|
29
27
|
end
|
30
28
|
|
data/lib/nom/xml/term.rb
CHANGED
data/lib/nom/xml/version.rb
CHANGED
data/nom-xml.gemspec
CHANGED
@@ -12,7 +12,6 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.summary = %q{ A library to help you tame sprawling XML schemas. }
|
13
13
|
s.description = %q{ NOM allows you to define a “terminology” to ease translation between XML and ruby objects }
|
14
14
|
|
15
|
-
s.add_dependency 'activesupport', '>= 3.2.18' # could be rails/AS 3 or 4+, but we don't support old insecure versions
|
16
15
|
s.add_dependency 'i18n'
|
17
16
|
s.add_dependency 'nokogiri'
|
18
17
|
|
metadata
CHANGED
@@ -1,30 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nom-xml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
8
8
|
- Michael B. Klein
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-01-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: activesupport
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - ">="
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: 3.2.18
|
21
|
-
type: :runtime
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - ">="
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: 3.2.18
|
28
14
|
- !ruby/object:Gem::Dependency
|
29
15
|
name: i18n
|
30
16
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,9 +104,9 @@ extra_rdoc_files:
|
|
118
104
|
- LICENSE
|
119
105
|
- README.md
|
120
106
|
files:
|
107
|
+
- ".github/workflows/ruby.yml"
|
121
108
|
- ".gitignore"
|
122
109
|
- ".rspec"
|
123
|
-
- ".travis.yml"
|
124
110
|
- Gemfile
|
125
111
|
- LICENSE
|
126
112
|
- README.md
|
@@ -154,7 +140,7 @@ files:
|
|
154
140
|
homepage: http://github.com/cbeer/nom-xml
|
155
141
|
licenses: []
|
156
142
|
metadata: {}
|
157
|
-
post_install_message:
|
143
|
+
post_install_message:
|
158
144
|
rdoc_options: []
|
159
145
|
require_paths:
|
160
146
|
- lib
|
@@ -169,9 +155,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
155
|
- !ruby/object:Gem::Version
|
170
156
|
version: '0'
|
171
157
|
requirements: []
|
172
|
-
|
173
|
-
|
174
|
-
signing_key:
|
158
|
+
rubygems_version: 3.2.32
|
159
|
+
signing_key:
|
175
160
|
specification_version: 4
|
176
161
|
summary: A library to help you tame sprawling XML schemas.
|
177
162
|
test_files:
|