xcop 0.8.0 → 0.9.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.
data/lib/xcop/cli.rb CHANGED
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2017-2025 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2017-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  require 'nokogiri'
22
5
  require 'differ'
@@ -26,14 +9,22 @@ require_relative 'document'
26
9
 
27
10
  # Command line interface.
28
11
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
29
- # Copyright:: Copyright (c) 2017-2025 Yegor Bugayenko
12
+ # Copyright:: Copyright (c) 2017-2026 Yegor Bugayenko
30
13
  # License:: MIT
31
14
  class Xcop::CLI
15
+ # Extensions recognized when a directory is passed as input.
16
+ EXTENSIONS = %w[xml xsd xhtml xsl html].freeze
17
+
32
18
  def initialize(files, nocolor: false)
33
- @files = files
19
+ @files = files.flat_map { |f| File.directory?(f) ? Xcop::CLI.expand(f) : [f] }
34
20
  @nocolor = nocolor
35
21
  end
36
22
 
23
+ # Recursively collect XML-like files inside a directory.
24
+ def self.expand(dir)
25
+ EXTENSIONS.flat_map { |ext| Dir.glob(File.join(dir, '**', "*.#{ext}")) }.sort
26
+ end
27
+
37
28
  def run
38
29
  @files.each do |f|
39
30
  doc = Xcop::Document.new(f)
data/lib/xcop/document.rb CHANGED
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2017-2025 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2017-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  require 'nokogiri'
22
5
  require 'differ'
@@ -25,7 +8,7 @@ require_relative 'version'
25
8
 
26
9
  # One document.
27
10
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
28
- # Copyright:: Copyright (c) 2017-2025 Yegor Bugayenko
11
+ # Copyright:: Copyright (c) 2017-2026 Yegor Bugayenko
29
12
  # License:: MIT
30
13
  class Xcop::Document
31
14
  # Ctor.
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2017-2025 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2017-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  require 'rake'
22
5
  require 'rake/tasklib'
@@ -24,7 +7,7 @@ require_relative '../xcop/cli'
24
7
 
25
8
  # Xcop rake task.
26
9
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
27
- # Copyright:: Copyright (c) 2017-2025 Yegor Bugayenko
10
+ # Copyright:: Copyright (c) 2017-2026 Yegor Bugayenko
28
11
  # License:: MIT
29
12
  class Xcop::RakeTask < Rake::TaskLib
30
13
  attr_accessor :name, :fail_on_error, :excludes, :includes, :quiet
data/lib/xcop/version.rb CHANGED
@@ -1,27 +1,10 @@
1
- # Copyright (c) 2017-2025 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2017-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  # Xcop main module.
22
5
  # Author:: Yegor Bugayenko (yegor256@gmail.com)
23
- # Copyright:: Copyright (c) 2017-2025 Yegor Bugayenko
6
+ # Copyright:: Copyright (c) 2017-2026 Yegor Bugayenko
24
7
  # License:: MIT
25
8
  module Xcop
26
- VERSION = '0.8.0'.freeze
9
+ VERSION = '0.9.0'.freeze
27
10
  end
data/xcop.gemspec CHANGED
@@ -1,22 +1,5 @@
1
- # Copyright (c) 2017-2025 Yegor Bugayenko
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the 'Software'), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in all
11
- # copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19
- # SOFTWARE.
1
+ # SPDX-FileCopyrightText: Copyright (c) 2017-2026 Yegor Bugayenko
2
+ # SPDX-License-Identifier: MIT
20
3
 
21
4
  require 'English'
22
5
 
@@ -35,13 +18,13 @@ Gem::Specification.new do |s|
35
18
  s.description = 'Validates XML-like documents for proper formatting'
36
19
  s.authors = ['Yegor Bugayenko']
37
20
  s.email = 'yegor256@gmail.com'
38
- s.homepage = 'http://github.com/yegor256/xcop'
39
- s.files = `git ls-files`.split($RS)
21
+ s.homepage = 'https://github.com/yegor256/xcop'
22
+ s.files = `git ls-files | grep -v -E '^(test/|\\.|renovate)'`.split($RS)
40
23
  s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
41
24
  s.rdoc_options = ['--charset=UTF-8']
42
25
  s.extra_rdoc_files = ['README.md', 'LICENSE.txt']
43
26
  s.add_dependency 'differ', '~>0.1.2'
44
- s.add_dependency 'nokogiri', '~>1.10'
27
+ s.add_dependency 'nokogiri', '~>1.8'
45
28
  s.add_dependency 'rainbow', '~>3.0'
46
29
  s.add_dependency 'slop', '~>4.4'
47
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xcop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.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: 2025-02-18 00:00:00.000000000 Z
11
+ date: 2026-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: differ
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.10'
33
+ version: '1.8'
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: '1.10'
40
+ version: '1.8'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rainbow
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -75,22 +75,12 @@ extra_rdoc_files:
75
75
  - README.md
76
76
  - LICENSE.txt
77
77
  files:
78
- - ".0pdd.yml"
79
- - ".gitattributes"
80
- - ".github/workflows/actionlint.yml"
81
- - ".github/workflows/copyrights.yml"
82
- - ".github/workflows/pdd.yml"
83
- - ".github/workflows/rake.yml"
84
- - ".github/workflows/xcop.yml"
85
- - ".github/workflows/yamllint.yml"
86
- - ".gitignore"
87
- - ".pdd"
88
- - ".rubocop.yml"
89
- - ".rultor.yml"
90
- - ".simplecov"
91
78
  - Gemfile
79
+ - Gemfile.lock
92
80
  - LICENSE.txt
81
+ - LICENSES/MIT.txt
93
82
  - README.md
83
+ - REUSE.toml
94
84
  - Rakefile
95
85
  - bin/xcop
96
86
  - cucumber.yml
@@ -104,12 +94,8 @@ files:
104
94
  - lib/xcop/rake_task.rb
105
95
  - lib/xcop/version.rb
106
96
  - logo.svg
107
- - renovate.json
108
- - test/test__helper.rb
109
- - test/test_document.rb
110
- - test/test_rake_task.rb
111
97
  - xcop.gemspec
112
- homepage: http://github.com/yegor256/xcop
98
+ homepage: https://github.com/yegor256/xcop
113
99
  licenses:
114
100
  - MIT
115
101
  metadata:
data/.0pdd.yml DELETED
@@ -1,31 +0,0 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2017-2025 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
- ---
23
- errors:
24
- - yegor256@gmail.com
25
- # alerts:
26
- # github:
27
- # - yegor256
28
-
29
- tags:
30
- - pdd
31
- - bug
data/.gitattributes DELETED
@@ -1,7 +0,0 @@
1
- # Check out all text files in UNIX format, with LF as end of line
2
- # Don't change this file. If you have any ideas about it, please
3
- # submit a separate issue about it and we'll discuss.
4
-
5
- * text=auto eol=lf
6
- *.java ident
7
- *.xml ident
@@ -1,44 +0,0 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2017-2025 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
- ---
23
- # yamllint disable rule:line-length
24
- name: actionlint
25
- 'on':
26
- push:
27
- branches:
28
- - master
29
- pull_request:
30
- branches:
31
- - master
32
- jobs:
33
- actionlint:
34
- timeout-minutes: 15
35
- runs-on: ubuntu-24.04
36
- steps:
37
- - uses: actions/checkout@v4
38
- - name: Download actionlint
39
- id: get_actionlint
40
- run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
41
- shell: bash
42
- - name: Check workflow files
43
- run: ${{ steps.get_actionlint.outputs.executable }} -color
44
- shell: bash
@@ -1,38 +0,0 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2017-2025 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
- ---
23
- # yamllint disable rule:line-length
24
- name: copyrights
25
- 'on':
26
- push:
27
- branches:
28
- - master
29
- pull_request:
30
- branches:
31
- - master
32
- jobs:
33
- copyrights:
34
- timeout-minutes: 15
35
- runs-on: ubuntu-24.04
36
- steps:
37
- - uses: actions/checkout@v4
38
- - uses: yegor256/copyrights-action@0.0.8
@@ -1,34 +0,0 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2017-2025 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
- ---
23
- # yamllint disable rule:line-length
24
- name: pdd
25
- on:
26
- push:
27
- pull_request:
28
- jobs:
29
- pdd:
30
- timeout-minutes: 15
31
- runs-on: ubuntu-24.04
32
- steps:
33
- - uses: actions/checkout@v4
34
- - uses: volodya-lombrozo/pdd-action@master
@@ -1,45 +0,0 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2017-2025 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
- ---
23
- # yamllint disable rule:line-length
24
- name: rake
25
- on:
26
- push:
27
- branches:
28
- - master
29
- pull_request:
30
- branches:
31
- - master
32
- jobs:
33
- test:
34
- strategy:
35
- matrix:
36
- os: [ubuntu-24.04, macos-15]
37
- ruby: ['2.7', '3.0']
38
- runs-on: ${{ matrix.os }}
39
- steps:
40
- - uses: actions/checkout@v4
41
- - uses: ruby/setup-ruby@v1
42
- with:
43
- ruby-version: ${{ matrix.ruby }}
44
- - run: bundle update
45
- - run: bundle exec rake
@@ -1,34 +0,0 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2017-2025 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
- ---
23
- # yamllint disable rule:line-length
24
- name: xcop
25
- on:
26
- push:
27
- pull_request:
28
- jobs:
29
- xcop:
30
- timeout-minutes: 15
31
- runs-on: ubuntu-24.04
32
- steps:
33
- - uses: actions/checkout@v4
34
- - uses: g4s8/xcop-action@master
@@ -1,38 +0,0 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2017-2025 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
- ---
23
- # yamllint disable rule:line-length
24
- name: yamllint
25
- 'on':
26
- push:
27
- branches:
28
- - master
29
- pull_request:
30
- branches:
31
- - master
32
- jobs:
33
- yamllint:
34
- timeout-minutes: 15
35
- runs-on: ubuntu-24.04
36
- steps:
37
- - uses: actions/checkout@v4
38
- - uses: ibiqlik/action-yamllint@v3
data/.gitignore DELETED
@@ -1,7 +0,0 @@
1
- coverage/
2
- Gemfile.lock
3
- .idea/
4
- *.gem
5
- .bundle/
6
- .DS_Store
7
- rdoc/
data/.pdd DELETED
@@ -1,7 +0,0 @@
1
- --source=.
2
- --verbose
3
- --exclude target/**/*
4
- --exclude coverage/**/*
5
- --rule min-words:20
6
- --rule min-estimate:15
7
- --rule max-estimate:90
data/.rubocop.yml DELETED
@@ -1,45 +0,0 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2017-2025 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
- ---
23
- AllCops:
24
- Exclude:
25
- - 'bin/**/*'
26
- - 'assets/**/*'
27
- DisplayCopNames: true
28
- TargetRubyVersion: 2.2
29
- NewCops: enable
30
- SuggestExtensions: false
31
- Metrics/CyclomaticComplexity:
32
- Max: 10
33
- Metrics/MethodLength:
34
- Enabled: false
35
- Layout/MultilineMethodCallIndentation:
36
- Enabled: false
37
- Metrics/AbcSize:
38
- Enabled: false
39
- Metrics/BlockLength:
40
- Max: 50
41
- Layout/EmptyLineAfterGuardClause:
42
- Enabled: false
43
- Style/ClassAndModuleChildren:
44
- Enabled: false
45
- require: []
data/.rultor.yml DELETED
@@ -1,45 +0,0 @@
1
- # (The MIT License)
2
- #
3
- # Copyright (c) 2017-2025 Yegor Bugayenko
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the 'Software'), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in all
13
- # copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- # SOFTWARE.
22
- ---
23
- assets:
24
- rubygems.yml: yegor256/home#assets/rubygems.yml
25
- install: |
26
- pdd -f /dev/null
27
- sudo bundle install --no-color "--gemfile=$(pwd)/Gemfile"
28
- release:
29
- pre: false
30
- script: |-
31
- bundle exec rake
32
- rm -rf *.gem
33
- sed -i "s/0\.0\.0/${tag}/g" lib/xcop/version.rb
34
- git add lib/xcop/version.rb
35
- git commit -m "version set to ${tag}"
36
- gem build xcop.gemspec
37
- chmod 0600 ../rubygems.yml
38
- gem push *.gem --config-file ../rubygems.yml
39
- merge:
40
- script: |-
41
- bundle exec rake
42
- deploy:
43
- script: |-
44
- echo "There is nothing to deploy"
45
- exit -1