xembly 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/codecov.yml +21 -0
- data/.github/workflows/pdd.yml +15 -0
- data/.github/workflows/rake.yml +24 -0
- data/.github/workflows/xcop.yml +11 -0
- data/.rubocop.yml +1 -0
- data/.rultor.yml +4 -5
- data/.simplecov +2 -5
- data/Gemfile +8 -1
- data/LICENSE.txt +1 -1
- data/README.md +2 -5
- data/Rakefile +1 -1
- data/bin/xembly +3 -3
- data/features/step_definitions/steps.rb +6 -8
- data/features/support/env.rb +2 -2
- data/lib/xembly/add.rb +2 -2
- data/lib/xembly/addif.rb +2 -2
- data/lib/xembly/attr.rb +2 -2
- data/lib/xembly/base.rb +79 -0
- data/lib/xembly/directives.rb +10 -10
- data/lib/xembly/remove.rb +2 -2
- data/lib/xembly/set.rb +2 -2
- data/lib/xembly/strict.rb +2 -1
- data/lib/xembly/up.rb +2 -1
- data/lib/xembly/version.rb +3 -3
- data/lib/xembly/xembler.rb +2 -2
- data/lib/xembly/xpath.rb +2 -1
- data/lib/xembly.rb +5 -57
- data/renovate.json +6 -0
- data/test/test__helper.rb +3 -3
- data/test/test_add.rb +2 -2
- data/test/test_addif.rb +2 -2
- data/test/test_attr.rb +2 -2
- data/test/test_directives.rb +2 -2
- data/test/test_remove.rb +2 -2
- data/test/test_set.rb +2 -2
- data/test/test_xembler.rb +3 -3
- data/test/test_xembly.rb +5 -5
- data/xembly.gemspec +5 -14
- metadata +19 -127
- data/.github/ISSUE_TEMPLATE.md +0 -12
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -11
- data/.travis.yml +0 -15
- data/appveyor.yml +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fc7bc216b94a2958fd5e606eeb05998280317b19294bb243914da4ff0bc88f54
|
4
|
+
data.tar.gz: 7cabfc0600484c9f201b9c188b0b740f36040bfb64c2e0f71a0f5d99f9161882
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f37de6ab8d6093803de32605df1b014ffb7f181ef6a83f8cea9d2f7204bc9036764d9f457aa99eb84eb443c1e3061469d7455c3b5ccd23e6e1719e43d1ec2015
|
7
|
+
data.tar.gz: 3f24551da450d598e87a1fba24b6341582ecc409733687e1f3e22e6af26554bf3f3a20873bcd509d3bd37d318d2fbb4d1f8a3d186a4e46babced6bea42780d71
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
name: codecov
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
jobs:
|
8
|
+
codecov:
|
9
|
+
runs-on: ubuntu-22.04
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
12
|
+
- uses: ruby/setup-ruby@v1
|
13
|
+
with:
|
14
|
+
ruby-version: 3.3
|
15
|
+
- run: bundle update
|
16
|
+
- run: bundle exec rake
|
17
|
+
- uses: codecov/codecov-action@v4.0.0-beta.3
|
18
|
+
with:
|
19
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
20
|
+
file: coverage/.resultset.json
|
21
|
+
fail_ci_if_error: true
|
@@ -0,0 +1,24 @@
|
|
1
|
+
---
|
2
|
+
name: rake
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
branches:
|
9
|
+
- master
|
10
|
+
jobs:
|
11
|
+
rake:
|
12
|
+
name: test
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
os: [ubuntu-22.04, macos-12]
|
16
|
+
ruby: [3.3]
|
17
|
+
runs-on: ${{ matrix.os }}
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
|
20
|
+
- uses: ruby/setup-ruby@v1
|
21
|
+
with:
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
- run: bundle update
|
24
|
+
- run: bundle exec rake
|
data/.rubocop.yml
CHANGED
data/.rultor.yml
CHANGED
@@ -1,9 +1,12 @@
|
|
1
|
+
docker:
|
2
|
+
image: yegor256/rultor-image:1.22.0
|
1
3
|
assets:
|
2
4
|
rubygems.yml: yegor256/home#assets/rubygems.yml
|
3
5
|
install: |
|
4
6
|
pdd -f /dev/null
|
5
|
-
|
7
|
+
bundle install --no-color
|
6
8
|
release:
|
9
|
+
pre: false
|
7
10
|
script: |-
|
8
11
|
bundle exec rake clean test rubocop copyright
|
9
12
|
sed -i "s/1\.0\.snapshot/${tag}/g" lib/xembly/version.rb
|
@@ -15,7 +18,3 @@ release:
|
|
15
18
|
merge:
|
16
19
|
script: |-
|
17
20
|
bundle exec rake clean test rubocop copyright
|
18
|
-
deploy:
|
19
|
-
script: |-
|
20
|
-
echo "There is nothing to deploy"
|
21
|
-
exit -1
|
data/.simplecov
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,8 +21,6 @@
|
|
21
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
|
-
require 'coveralls'
|
25
|
-
|
26
24
|
if Gem.win_platform?
|
27
25
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
|
28
26
|
SimpleCov::Formatter::HTMLFormatter
|
@@ -33,8 +31,7 @@ if Gem.win_platform?
|
|
33
31
|
end
|
34
32
|
else
|
35
33
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new [
|
36
|
-
SimpleCov::Formatter::HTMLFormatter
|
37
|
-
Coveralls::SimpleCov::Formatter
|
34
|
+
SimpleCov::Formatter::HTMLFormatter
|
38
35
|
]
|
39
36
|
SimpleCov.start do
|
40
37
|
add_filter '/test/'
|
data/Gemfile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -23,3 +23,10 @@
|
|
23
23
|
|
24
24
|
source 'https://rubygems.org'
|
25
25
|
gemspec
|
26
|
+
gem 'cucumber', '9.1.2', require: false
|
27
|
+
gem 'minitest', '5.22.2', require: false
|
28
|
+
gem 'rdoc', '6.6.2', require: false
|
29
|
+
gem 'rspec-rails', '6.1.1', require: false
|
30
|
+
gem 'rubocop', '1.60.2', require: false
|
31
|
+
gem 'rubocop-rspec', '2.26.1', require: false
|
32
|
+
gem 'simplecov', '0.22.0', require: false
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,14 +1,11 @@
|
|
1
|
-
<img src="
|
1
|
+
<img src="https://www.xembly.org/logo.png" width="64px" height="64px" />
|
2
2
|
|
3
|
-
[![Managed by Zerocracy](http://www.zerocracy.com/badge.svg)](http://www.zerocracy.com)
|
4
3
|
[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/xembly-gem)](http://www.rultor.com/p/yegor256/xembly-gem)
|
5
4
|
[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)
|
6
5
|
|
7
|
-
[![Build Status](https://travis-ci.org/yegor256/xembly-gem.svg)](https://travis-ci.org/yegor256/xembly-gem)
|
8
|
-
[![Build status](https://ci.appveyor.com/api/projects/status/8e5dsjjemymfg510?svg=true)](https://ci.appveyor.com/project/yegor256/xembly-gem)
|
9
6
|
[![Gem Version](https://badge.fury.io/rb/xembly.svg)](http://badge.fury.io/rb/xembly)
|
10
7
|
[![Maintainability](https://api.codeclimate.com/v1/badges/f26349e81b04628d8bf7/maintainability)](https://codeclimate.com/github/yegor256/xembly-gem/maintainability)
|
11
|
-
[![Coverage
|
8
|
+
[![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/xembly-gem.svg)](https://codecov.io/github/yegor256/xembly-gem?branch=master)
|
12
9
|
|
13
10
|
Xembly is assembly for XML.
|
14
11
|
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
data/bin/xembly
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
4
|
#
|
5
|
-
# Copyright (c) 2016-
|
5
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
6
6
|
#
|
7
7
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
8
8
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -24,9 +24,9 @@
|
|
24
24
|
|
25
25
|
$stdout.sync = true
|
26
26
|
|
27
|
-
require 'xembly'
|
28
|
-
require 'xembly/version'
|
29
27
|
require 'slop'
|
28
|
+
require_relative '../lib/xembly'
|
29
|
+
require_relative '../lib/xembly/version'
|
30
30
|
|
31
31
|
opts = Slop.parse(ARGV, strict: true, help: true) do |o|
|
32
32
|
o.banner = "Usage (#{Xembly::VERSION}): xembly [options] [directives]"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,29 +21,27 @@
|
|
21
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
|
-
require 'xembly'
|
25
24
|
require 'nokogiri'
|
26
25
|
require 'tmpdir'
|
27
26
|
require 'slop'
|
28
27
|
require 'English'
|
28
|
+
require_relative '../../lib/xembly'
|
29
29
|
|
30
30
|
Before do
|
31
31
|
@cwd = Dir.pwd
|
32
32
|
@dir = Dir.mktmpdir('test')
|
33
|
-
FileUtils.mkdir_p(@dir)
|
33
|
+
FileUtils.mkdir_p(@dir)
|
34
34
|
Dir.chdir(@dir)
|
35
35
|
end
|
36
36
|
|
37
37
|
After do
|
38
38
|
Dir.chdir(@cwd)
|
39
|
-
FileUtils.rm_rf(@dir)
|
39
|
+
FileUtils.rm_rf(@dir)
|
40
40
|
end
|
41
41
|
|
42
42
|
Given(/^I have a "([^"]*)" file with content:$/) do |file, text|
|
43
43
|
FileUtils.mkdir_p(File.dirname(file)) unless File.exist?(file)
|
44
|
-
File.
|
45
|
-
f.write(text.gsub(/\\xFF/, 0xff.chr))
|
46
|
-
end
|
44
|
+
File.write(file, text.gsub('\\xFF', 0xff.chr))
|
47
45
|
end
|
48
46
|
|
49
47
|
Then(/^XML matches "([^"]+)"$/) do |xpath|
|
@@ -69,7 +67,7 @@ Then(/^XML file "([^"]+)" matches "((?:[^"]|\\")+)"$/) do |file, xpath|
|
|
69
67
|
|
70
68
|
xml = Nokogiri::XML.parse(File.read(file))
|
71
69
|
xml.remove_namespaces!
|
72
|
-
raise "XML file #{file} doesn't match \"#{xpath}\":\n#{xml}" if xml.xpath(xpath.gsub(
|
70
|
+
raise "XML file #{file} doesn't match \"#{xpath}\":\n#{xml}" if xml.xpath(xpath.gsub('\\"', '"')).empty?
|
73
71
|
end
|
74
72
|
|
75
73
|
Then(/^Exit code is zero$/) do
|
data/features/support/env.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -22,4 +22,4 @@
|
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
24
|
require 'simplecov'
|
25
|
-
|
25
|
+
require_relative '../../lib/xembly'
|
data/lib/xembly/add.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,8 +21,8 @@
|
|
21
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
|
-
require 'xembly'
|
25
24
|
require 'nokogiri'
|
25
|
+
require_relative '../xembly/base'
|
26
26
|
|
27
27
|
module Xembly
|
28
28
|
# ADD directive
|
data/lib/xembly/addif.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,8 +21,8 @@
|
|
21
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
|
-
require 'xembly'
|
25
24
|
require 'nokogiri'
|
25
|
+
require_relative '../xembly/base'
|
26
26
|
|
27
27
|
module Xembly
|
28
28
|
# ADDIF directive
|
data/lib/xembly/attr.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,7 +21,7 @@
|
|
21
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
|
-
|
24
|
+
require_relative '../xembly/base'
|
25
25
|
|
26
26
|
module Xembly
|
27
27
|
# ATTR directive
|
data/lib/xembly/base.rb
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
#
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
|
+
#
|
6
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
+
# of this software and associated documentation files (the 'Software'), to deal
|
8
|
+
# in the Software without restriction, including without limitation the rights
|
9
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
+
# copies of the Software, and to permit persons to whom the Software is
|
11
|
+
# furnished to do so, subject to the following conditions:
|
12
|
+
#
|
13
|
+
# The above copyright notice and this permission notice shall be included in all
|
14
|
+
# copies or substantial portions of the Software.
|
15
|
+
#
|
16
|
+
# THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
|
19
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
|
+
# SOFTWARE.
|
23
|
+
|
24
|
+
require 'nokogiri'
|
25
|
+
require 'logger'
|
26
|
+
require 'time'
|
27
|
+
|
28
|
+
# Xembly main module.
|
29
|
+
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
30
|
+
# Copyright:: Copyright (c) 2016-2024 Yegor Bugayenko
|
31
|
+
# License:: MIT
|
32
|
+
module Xembly
|
33
|
+
# Get logger.
|
34
|
+
def self.log
|
35
|
+
unless @logger
|
36
|
+
@logger = Logger.new($stdout)
|
37
|
+
@logger.formatter = proc { |severity, _, _, msg|
|
38
|
+
"#{severity}: #{msg.dump}\n"
|
39
|
+
}
|
40
|
+
@logger.level = Logger::ERROR
|
41
|
+
end
|
42
|
+
@logger
|
43
|
+
end
|
44
|
+
|
45
|
+
class << self
|
46
|
+
attr_writer :logger
|
47
|
+
end
|
48
|
+
|
49
|
+
# Code base abstraction
|
50
|
+
class Base
|
51
|
+
# Ctor.
|
52
|
+
# +opts+:: Options
|
53
|
+
def initialize(opts)
|
54
|
+
@opts = opts
|
55
|
+
Xembly.log.level = Logger::INFO if @opts.verbose?
|
56
|
+
Xembly.log.info "my version is #{Xembly::VERSION}"
|
57
|
+
Xembly.log.info "Ruby version is #{RUBY_VERSION} at #{RUBY_PLATFORM}"
|
58
|
+
end
|
59
|
+
|
60
|
+
# Generate XML.
|
61
|
+
def xml
|
62
|
+
if @opts.xml?
|
63
|
+
xml = File.read(@opts[:xml])
|
64
|
+
Xembly.log.info "reading #{@opts[:xml]}"
|
65
|
+
else
|
66
|
+
xml = $stdin.read
|
67
|
+
Xembly.log.info 'reading STDIN'
|
68
|
+
end
|
69
|
+
if @opts.dirs?
|
70
|
+
Xembly.log.info "reading directives from #{@opts[:dirs]}"
|
71
|
+
dirs = File.read(@opts[:dirs])
|
72
|
+
else
|
73
|
+
Xembly.log.info "#{@opts.arguments.length} directives in command line"
|
74
|
+
dirs = @opts.arguments.join
|
75
|
+
end
|
76
|
+
Xembler.new(Directives.new(dirs)).apply(xml).to_xml
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
data/lib/xembly/directives.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,14 +21,14 @@
|
|
21
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
24
|
+
require_relative 'add'
|
25
|
+
require_relative 'addif'
|
26
|
+
require_relative 'attr'
|
27
|
+
require_relative 'remove'
|
28
|
+
require_relative 'set'
|
29
|
+
require_relative 'strict'
|
30
|
+
require_relative 'up'
|
31
|
+
require_relative 'xpath'
|
32
32
|
|
33
33
|
module Xembly
|
34
34
|
# Directives
|
@@ -39,7 +39,7 @@ module Xembly
|
|
39
39
|
@array = text
|
40
40
|
.strip
|
41
41
|
.scan(/([A-Za-z]+)(?:\s+"([^"]+)")?(?:\s*,\s*"([^"]+)")*\s*;/)
|
42
|
-
.map
|
42
|
+
.map(&:compact)
|
43
43
|
.map { |t| Directives.map(t) }
|
44
44
|
end
|
45
45
|
|
data/lib/xembly/remove.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,7 +21,7 @@
|
|
21
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
|
-
|
24
|
+
require_relative '../xembly/base'
|
25
25
|
|
26
26
|
module Xembly
|
27
27
|
# REMOVE directive
|
data/lib/xembly/set.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -22,7 +22,7 @@
|
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
24
|
require 'nokogiri'
|
25
|
-
|
25
|
+
require_relative '../xembly/base'
|
26
26
|
|
27
27
|
module Xembly
|
28
28
|
# SET directive
|
data/lib/xembly/strict.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -22,6 +22,7 @@
|
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
24
|
require 'nokogiri'
|
25
|
+
require_relative '../xembly/base'
|
25
26
|
|
26
27
|
module Xembly
|
27
28
|
# STRICT directive
|
data/lib/xembly/up.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -22,6 +22,7 @@
|
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
24
|
require 'nokogiri'
|
25
|
+
require_relative '../xembly/base'
|
25
26
|
|
26
27
|
module Xembly
|
27
28
|
# UP directive
|
data/lib/xembly/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -23,8 +23,8 @@
|
|
23
23
|
|
24
24
|
# Xembly main module.
|
25
25
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
26
|
-
# Copyright:: Copyright (c) 2016-
|
26
|
+
# Copyright:: Copyright (c) 2016-2024 Yegor Bugayenko
|
27
27
|
# License:: MIT
|
28
28
|
module Xembly
|
29
|
-
VERSION = '0.
|
29
|
+
VERSION = '0.5.0'
|
30
30
|
end
|
data/lib/xembly/xembler.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,7 +21,7 @@
|
|
21
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
|
-
|
24
|
+
require_relative '../xembly/base'
|
25
25
|
|
26
26
|
module Xembly
|
27
27
|
# Xembler
|
data/lib/xembly/xpath.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -22,6 +22,7 @@
|
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
24
|
require 'nokogiri'
|
25
|
+
require_relative '../xembly/base'
|
25
26
|
|
26
27
|
module Xembly
|
27
28
|
# XPATH directive
|
data/lib/xembly.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -21,62 +21,10 @@
|
|
21
21
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
22
22
|
# SOFTWARE.
|
23
23
|
|
24
|
-
require 'xembly/version'
|
25
|
-
require 'xembly/xembler'
|
26
|
-
require 'xembly/directives'
|
27
24
|
require 'nokogiri'
|
28
25
|
require 'logger'
|
29
26
|
require 'time'
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
# License:: MIT
|
35
|
-
module Xembly
|
36
|
-
# Get logger.
|
37
|
-
def self.log
|
38
|
-
unless @logger
|
39
|
-
@logger = Logger.new($stdout)
|
40
|
-
@logger.formatter = proc { |severity, _, _, msg|
|
41
|
-
"#{severity}: #{msg.dump}\n"
|
42
|
-
}
|
43
|
-
@logger.level = Logger::ERROR
|
44
|
-
end
|
45
|
-
@logger
|
46
|
-
end
|
47
|
-
|
48
|
-
class << self
|
49
|
-
attr_writer :logger
|
50
|
-
end
|
51
|
-
|
52
|
-
# Code base abstraction
|
53
|
-
class Base
|
54
|
-
# Ctor.
|
55
|
-
# +opts+:: Options
|
56
|
-
def initialize(opts)
|
57
|
-
@opts = opts
|
58
|
-
Xembly.log.level = Logger::INFO if @opts.verbose?
|
59
|
-
Xembly.log.info "my version is #{Xembly::VERSION}"
|
60
|
-
Xembly.log.info "Ruby version is #{RUBY_VERSION} at #{RUBY_PLATFORM}"
|
61
|
-
end
|
62
|
-
|
63
|
-
# Generate XML.
|
64
|
-
def xml
|
65
|
-
if @opts.xml?
|
66
|
-
xml = File.read(@opts[:xml])
|
67
|
-
Xembly.log.info "reading #{@opts[:xml]}"
|
68
|
-
else
|
69
|
-
xml = $stdin.read
|
70
|
-
Xembly.log.info 'reading STDIN'
|
71
|
-
end
|
72
|
-
if @opts.dirs?
|
73
|
-
Xembly.log.info "reading directives from #{@opts[:dirs]}"
|
74
|
-
dirs = File.read(@opts[:dirs])
|
75
|
-
else
|
76
|
-
Xembly.log.info "#{@opts.arguments.length} directives in command line"
|
77
|
-
dirs = @opts.arguments.join
|
78
|
-
end
|
79
|
-
Xembler.new(Directives.new(dirs)).apply(xml).to_xml
|
80
|
-
end
|
81
|
-
end
|
82
|
-
end
|
27
|
+
require_relative 'xembly/version'
|
28
|
+
require_relative 'xembly/xembler'
|
29
|
+
require_relative 'xembly/directives'
|
30
|
+
require_relative 'xembly/base'
|
data/renovate.json
ADDED
data/test/test__helper.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -23,12 +23,12 @@
|
|
23
23
|
|
24
24
|
require 'simplecov'
|
25
25
|
require 'nokogiri'
|
26
|
-
require 'xembly'
|
27
26
|
require 'minitest/autorun'
|
27
|
+
require_relative '../lib/xembly'
|
28
28
|
|
29
29
|
# Xembly test, parent class.
|
30
30
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
31
|
-
# Copyright:: Copyright (c) 2016-
|
31
|
+
# Copyright:: Copyright (c) 2016-2024 Yegor Bugayenko
|
32
32
|
# License:: MIT
|
33
33
|
class XeTest < Minitest::Test
|
34
34
|
def matches(xml, xpaths)
|
data/test/test_add.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -26,7 +26,7 @@ require 'test__helper'
|
|
26
26
|
|
27
27
|
# Xembly::Add tests.
|
28
28
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
29
|
-
# Copyright:: Copyright (c) 2016-
|
29
|
+
# Copyright:: Copyright (c) 2016-2024 Yegor Bugayenko
|
30
30
|
# License:: MIT
|
31
31
|
class TestAdd < XeTest
|
32
32
|
def test_adds_nodes
|
data/test/test_addif.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -26,7 +26,7 @@ require 'test__helper'
|
|
26
26
|
|
27
27
|
# Xembly::AddIf tests.
|
28
28
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
29
|
-
# Copyright:: Copyright (c) 2016-
|
29
|
+
# Copyright:: Copyright (c) 2016-2024 Yegor Bugayenko
|
30
30
|
# License:: MIT
|
31
31
|
class TestAddIf < XeTest
|
32
32
|
def test_skips_nodes
|
data/test/test_attr.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -26,7 +26,7 @@ require 'test__helper'
|
|
26
26
|
|
27
27
|
# Xembly::Attr tests.
|
28
28
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
29
|
-
# Copyright:: Copyright (c) 2016-
|
29
|
+
# Copyright:: Copyright (c) 2016-2024 Yegor Bugayenko
|
30
30
|
# License:: MIT
|
31
31
|
class TestAttr < XeTest
|
32
32
|
def test_sets_attributes
|
data/test/test_directives.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -27,7 +27,7 @@ require 'xembly/directives'
|
|
27
27
|
|
28
28
|
# Xembly::Directives module tests.
|
29
29
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
30
|
-
# Copyright:: Copyright (c) 2016-
|
30
|
+
# Copyright:: Copyright (c) 2016-2024 Yegor Bugayenko
|
31
31
|
# License:: MIT
|
32
32
|
class TestDirectives < Minitest::Test
|
33
33
|
def test_parses_directives
|
data/test/test_remove.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -26,7 +26,7 @@ require 'test__helper'
|
|
26
26
|
|
27
27
|
# Xembly::Remove tests.
|
28
28
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
29
|
-
# Copyright:: Copyright (c) 2016-
|
29
|
+
# Copyright:: Copyright (c) 2016-2024 Yegor Bugayenko
|
30
30
|
# License:: MIT
|
31
31
|
class TestRemove < XeTest
|
32
32
|
def test_adds_nodes
|
data/test/test_set.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -26,7 +26,7 @@ require 'test__helper'
|
|
26
26
|
|
27
27
|
# Xembly::Set tests.
|
28
28
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
29
|
-
# Copyright:: Copyright (c) 2016-
|
29
|
+
# Copyright:: Copyright (c) 2016-2024 Yegor Bugayenko
|
30
30
|
# License:: MIT
|
31
31
|
class TestSet < XeTest
|
32
32
|
def test_sets_values
|
data/test/test_xembler.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -25,11 +25,11 @@ require 'minitest/autorun'
|
|
25
25
|
require 'nokogiri'
|
26
26
|
require 'xembly/xembler'
|
27
27
|
require 'xembly/directives'
|
28
|
-
|
28
|
+
require_relative 'test__helper'
|
29
29
|
|
30
30
|
# Xembly::Xembler module tests.
|
31
31
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
32
|
-
# Copyright:: Copyright (c) 2016-
|
32
|
+
# Copyright:: Copyright (c) 2016-2024 Yegor Bugayenko
|
33
33
|
# License:: MIT
|
34
34
|
class TestXembler < XeTest
|
35
35
|
def test_modifies_xml
|
data/test/test_xembly.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -23,14 +23,14 @@
|
|
23
23
|
|
24
24
|
require 'minitest/autorun'
|
25
25
|
require 'nokogiri'
|
26
|
-
require 'xembly'
|
27
26
|
require 'tmpdir'
|
28
27
|
require 'slop'
|
29
|
-
|
28
|
+
require_relative '../lib/xembly'
|
29
|
+
require_relative 'test__helper'
|
30
30
|
|
31
31
|
# Xembly main module test.
|
32
32
|
# Author:: Yegor Bugayenko (yegor256@gmail.com)
|
33
|
-
# Copyright:: Copyright (c) 2016-
|
33
|
+
# Copyright:: Copyright (c) 2016-2024 Yegor Bugayenko
|
34
34
|
# License:: MIT
|
35
35
|
class TestXembly < XeTest
|
36
36
|
def test_basic
|
@@ -69,7 +69,7 @@ class TestXembly < XeTest
|
|
69
69
|
private
|
70
70
|
|
71
71
|
def opts(args)
|
72
|
-
Slop.parse
|
72
|
+
Slop.parse(args, help: true) do |o|
|
73
73
|
o.on '-v', '--verbose'
|
74
74
|
o.string '-x', '--xml', argument: :required
|
75
75
|
o.string '-d', '--dirs', argument: :required
|
data/xembly.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#
|
4
|
-
# Copyright (c) 2016-
|
4
|
+
# Copyright (c) 2016-2024 Yegor Bugayenko
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
7
|
# of this software and associated documentation files (the 'Software'), to deal
|
@@ -26,9 +26,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
26
26
|
require 'xembly/version'
|
27
27
|
|
28
28
|
Gem::Specification.new do |s|
|
29
|
-
s.specification_version = 2 if s.respond_to? :specification_version=
|
30
29
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
31
|
-
s.rubygems_version = '2.2'
|
32
30
|
s.required_ruby_version = '>= 2.5'
|
33
31
|
s.name = 'xembly'
|
34
32
|
s.version = Xembly::VERSION
|
@@ -40,17 +38,10 @@ Gem::Specification.new do |s|
|
|
40
38
|
s.homepage = 'http://github.com/yegor256/xembly-gem'
|
41
39
|
s.files = `git ls-files`.split($RS)
|
42
40
|
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
43
|
-
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
44
41
|
s.rdoc_options = ['--charset=UTF-8']
|
45
42
|
s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
|
46
|
-
s.add_runtime_dependency 'nokogiri', '1.
|
47
|
-
s.add_runtime_dependency 'rake', '13.0
|
48
|
-
s.add_runtime_dependency 'slop', '4.
|
49
|
-
s.
|
50
|
-
s.add_development_dependency 'cucumber', '7.0.0'
|
51
|
-
s.add_development_dependency 'minitest', '5.14.4'
|
52
|
-
s.add_development_dependency 'rdoc', '6.3.2'
|
53
|
-
s.add_development_dependency 'rspec-rails', '5.0.2'
|
54
|
-
s.add_development_dependency 'rubocop', '1.19.1'
|
55
|
-
s.add_development_dependency 'rubocop-rspec', '2.4.0'
|
43
|
+
s.add_runtime_dependency 'nokogiri', '1.16.2'
|
44
|
+
s.add_runtime_dependency 'rake', '13.1.0'
|
45
|
+
s.add_runtime_dependency 'slop', '4.10.1'
|
46
|
+
s.metadata['rubygems_mfa_required'] = 'true'
|
56
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xembly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yegor Bugayenko
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -16,140 +16,42 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.16.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.16.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 13.0
|
33
|
+
version: 13.1.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 13.0
|
40
|
+
version: 13.1.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: slop
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '='
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 4.
|
47
|
+
version: 4.10.1
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - '='
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 4.
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: coveralls
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - '='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: 0.8.23
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - '='
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: 0.8.23
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: cucumber
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - '='
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: 7.0.0
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - '='
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 7.0.0
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: minitest
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - '='
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 5.14.4
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - '='
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: 5.14.4
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rdoc
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - '='
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: 6.3.2
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - '='
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 6.3.2
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rspec-rails
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - '='
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: 5.0.2
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - '='
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: 5.0.2
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rubocop
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - '='
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: 1.19.1
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - '='
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: 1.19.1
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: rubocop-rspec
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - '='
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: 2.4.0
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - '='
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: 2.4.0
|
54
|
+
version: 4.10.1
|
153
55
|
description: Command Line XML Manipulator
|
154
56
|
email: yegor256@gmail.com
|
155
57
|
executables:
|
@@ -162,19 +64,19 @@ files:
|
|
162
64
|
- ".0pdd.yml"
|
163
65
|
- ".coveralls.yml"
|
164
66
|
- ".gitattributes"
|
165
|
-
- ".github/
|
166
|
-
- ".github/
|
67
|
+
- ".github/workflows/codecov.yml"
|
68
|
+
- ".github/workflows/pdd.yml"
|
69
|
+
- ".github/workflows/rake.yml"
|
70
|
+
- ".github/workflows/xcop.yml"
|
167
71
|
- ".gitignore"
|
168
72
|
- ".pdd"
|
169
73
|
- ".rubocop.yml"
|
170
74
|
- ".rultor.yml"
|
171
75
|
- ".simplecov"
|
172
|
-
- ".travis.yml"
|
173
76
|
- Gemfile
|
174
77
|
- LICENSE.txt
|
175
78
|
- README.md
|
176
79
|
- Rakefile
|
177
|
-
- appveyor.yml
|
178
80
|
- bin/xembly
|
179
81
|
- cucumber.yml
|
180
82
|
- features/cli.feature
|
@@ -185,6 +87,7 @@ files:
|
|
185
87
|
- lib/xembly/add.rb
|
186
88
|
- lib/xembly/addif.rb
|
187
89
|
- lib/xembly/attr.rb
|
90
|
+
- lib/xembly/base.rb
|
188
91
|
- lib/xembly/directives.rb
|
189
92
|
- lib/xembly/remove.rb
|
190
93
|
- lib/xembly/set.rb
|
@@ -193,6 +96,7 @@ files:
|
|
193
96
|
- lib/xembly/version.rb
|
194
97
|
- lib/xembly/xembler.rb
|
195
98
|
- lib/xembly/xpath.rb
|
99
|
+
- renovate.json
|
196
100
|
- test/test__helper.rb
|
197
101
|
- test/test_add.rb
|
198
102
|
- test/test_addif.rb
|
@@ -206,7 +110,8 @@ files:
|
|
206
110
|
homepage: http://github.com/yegor256/xembly-gem
|
207
111
|
licenses:
|
208
112
|
- MIT
|
209
|
-
metadata:
|
113
|
+
metadata:
|
114
|
+
rubygems_mfa_required: 'true'
|
210
115
|
post_install_message:
|
211
116
|
rdoc_options:
|
212
117
|
- "--charset=UTF-8"
|
@@ -223,21 +128,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
223
128
|
- !ruby/object:Gem::Version
|
224
129
|
version: '0'
|
225
130
|
requirements: []
|
226
|
-
rubygems_version: 3.
|
131
|
+
rubygems_version: 3.4.10
|
227
132
|
signing_key:
|
228
|
-
specification_version:
|
133
|
+
specification_version: 4
|
229
134
|
summary: Xembly Gem
|
230
|
-
test_files:
|
231
|
-
- features/cli.feature
|
232
|
-
- features/gem_package.feature
|
233
|
-
- features/step_definitions/steps.rb
|
234
|
-
- features/support/env.rb
|
235
|
-
- test/test__helper.rb
|
236
|
-
- test/test_add.rb
|
237
|
-
- test/test_addif.rb
|
238
|
-
- test/test_attr.rb
|
239
|
-
- test/test_directives.rb
|
240
|
-
- test/test_remove.rb
|
241
|
-
- test/test_set.rb
|
242
|
-
- test/test_xembler.rb
|
243
|
-
- test/test_xembly.rb
|
135
|
+
test_files: []
|
data/.github/ISSUE_TEMPLATE.md
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
Make sure the title of the issue explains the problem you are having. Also, the description of the issue must clearly explain what is broken, not what you want us to implement. Go through this checklist and make sure you answer "YES" to all points:
|
2
|
-
|
3
|
-
- You have all pre-requisites listed in README.md installed
|
4
|
-
- You are sure that you are not reporting a duplicate (search all issues)
|
5
|
-
- You say "is broken" or "doesn't work" in the title
|
6
|
-
- You tell us what you are trying to do
|
7
|
-
- You explain the results you are getting
|
8
|
-
- You suggest an alternative result you would like to see
|
9
|
-
|
10
|
-
This article will help you understand what we are looking for: http://www.yegor256.com/2014/11/24/principles-of-bug-tracking.html
|
11
|
-
|
12
|
-
Thank you for your contribution!
|
@@ -1,11 +0,0 @@
|
|
1
|
-
Many thanks for your contribution, we truly appreciate it. We will appreciate it even more, if you make sure that you can say "YES" to each point in this short checklist:
|
2
|
-
|
3
|
-
- You made a small amount of changes (less than 100 lines, less than 10 files)
|
4
|
-
- You made changes related to only one bug (create separate PRs for separate problems)
|
5
|
-
- You are ready to defend your changes (there will be a code review)
|
6
|
-
- You don't touch what you don't understand
|
7
|
-
- You ran the build locally and it passed
|
8
|
-
|
9
|
-
This article will help you understand what we are looking for: http://www.yegor256.com/2015/02/09/serious-code-reviewer.html
|
10
|
-
|
11
|
-
Thank you for your contribution!
|
data/.travis.yml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
rvm:
|
3
|
-
- 2.6.0
|
4
|
-
cache: bundler
|
5
|
-
branches:
|
6
|
-
only:
|
7
|
-
- master
|
8
|
-
install:
|
9
|
-
- gem install pdd -v 0.20.5
|
10
|
-
- travis_retry bundle update
|
11
|
-
script:
|
12
|
-
- pdd -f /dev/null
|
13
|
-
- bundle exec rake
|
14
|
-
after_success:
|
15
|
-
- "bash <(curl -s https://codecov.io/bash)"
|
data/appveyor.yml
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
version: '{build}'
|
2
|
-
skip_tags: true
|
3
|
-
clone_depth: 10
|
4
|
-
branches:
|
5
|
-
only:
|
6
|
-
- master
|
7
|
-
except:
|
8
|
-
- gh-pages
|
9
|
-
os: Windows Server 2012
|
10
|
-
install:
|
11
|
-
- cmd: SET PATH=C:\Ruby200\bin;%PATH%
|
12
|
-
- cmd: ruby --version
|
13
|
-
build_script:
|
14
|
-
- bundle update
|
15
|
-
- bundle install
|
16
|
-
test_script:
|
17
|
-
- rake
|
18
|
-
cache:
|
19
|
-
- C:\Ruby200\bin -> xembly.gemspec
|
20
|
-
- C:\Ruby200\lib\ruby\gems\2.0.0 -> xembly.gemspec
|