reapack-index 1.2.3 → 1.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +5 -1
- data/README.md +1 -1
- data/lib/reapack/index/cli.rb +1 -1
- data/lib/reapack/index/gem_version.rb +1 -1
- data/lib/reapack/index/scanner.rb +1 -2
- data/lib/reapack/index.rb +1 -0
- data/reapack-index.gemspec +2 -2
- data/test/cli/test_check.rb +16 -2
- data/test/cli/test_metadata.rb +2 -2
- data/test/cli/test_scan.rb +2 -2
- data/test/index/test_metadata.rb +2 -2
- data/test/index/test_provides.rb +8 -5
- data/test/index/test_scan.rb +2 -2
- data/test/scanner/test_makeurl.rb +7 -7
- data/test/scanner/test_validation.rb +5 -5
- data/test/test_cdetector.rb +1 -1
- data/test/test_changelog.rb +1 -1
- data/test/test_cli.rb +2 -2
- data/test/test_git.rb +1 -1
- data/test/test_index.rb +1 -1
- data/test/test_metadata.rb +1 -1
- data/test/test_named_node.rb +1 -1
- data/test/test_package.rb +1 -1
- data/test/test_parsers.rb +1 -1
- data/test/test_provides.rb +1 -1
- data/test/test_scanner.rb +3 -3
- data/test/test_source.rb +4 -4
- data/test/test_version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8870ea144c45a078d42c2820e0006ed8442e6f68781cf4ca33e5d43f3db2990e
|
4
|
+
data.tar.gz: 691b6185227d02a13cf7de88cdf78f0a47a856fbc594705b6e7495bf21cbe4af
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 318e737d716535a7068120ab8b4e14f5cdb15ed65855b3e9b4daecdf4eb0eb11db4fdc8af6936bd80fe98e9472b51ef450154662338f1c6d57215c394c35e5be
|
7
|
+
data.tar.gz: 4c043e3db109d871fcc52c55ec60fdaac80c7ec1e0352032d7400868ae86f287c76632ea41569ec3fd3707b232c7bd36919d50b23a2a65aea9c72a98f21e2a66
|
data/.github/workflows/test.yml
CHANGED
@@ -3,6 +3,10 @@ on: [push, pull_request]
|
|
3
3
|
jobs:
|
4
4
|
rake:
|
5
5
|
runs-on: ubuntu-latest
|
6
|
+
strategy:
|
7
|
+
fail-fast: false
|
8
|
+
matrix:
|
9
|
+
ruby: [2.4, 2.7, '3.0', head]
|
6
10
|
steps:
|
7
11
|
- name: Fetch repository
|
8
12
|
uses: actions/checkout@v2
|
@@ -12,6 +16,6 @@ jobs:
|
|
12
16
|
uses: ruby/setup-ruby@v1
|
13
17
|
with:
|
14
18
|
bundler-cache: true
|
15
|
-
ruby-version:
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
16
20
|
- name: Run tests
|
17
21
|
run: bundle exec rake
|
data/README.md
CHANGED
@@ -9,7 +9,7 @@ Subproject: [https://github.com/cfillion/metaheader](https://github.com/cfillion
|
|
9
9
|
|
10
10
|
### Installation
|
11
11
|
|
12
|
-
Ruby v2.
|
12
|
+
Ruby v2.4 or newer must be installed on your computer in order to install
|
13
13
|
and use this software.
|
14
14
|
Run the following command from a command prompt (eg. cmd.exe, Terminal.app,
|
15
15
|
XTerm) to install reapack-index:
|
data/lib/reapack/index/cli.rb
CHANGED
@@ -161,9 +161,8 @@ class ReaPack::Index
|
|
161
161
|
files.map {|file|
|
162
162
|
if line.target
|
163
163
|
if line.target =~ /[\/\\\.]+\z/
|
164
|
-
new_dir = ReaPack::Index.expand line.target, ''
|
165
164
|
base_file = File.basename file
|
166
|
-
target =
|
165
|
+
target = File.join line.target, base_file
|
167
166
|
else
|
168
167
|
target = line.target
|
169
168
|
end
|
data/lib/reapack/index.rb
CHANGED
data/reapack-index.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.required_ruby_version = '>= 2.
|
21
|
+
spec.required_ruby_version = '>= 2.4'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
24
24
|
spec.add_development_dependency 'minitest', '~> 5.8'
|
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
|
|
30
30
|
spec.add_runtime_dependency 'gitable', '~> 0.3'
|
31
31
|
spec.add_runtime_dependency 'metaheader', '~> 2.0'
|
32
32
|
spec.add_runtime_dependency 'nokogiri', '~> 1.7'
|
33
|
-
spec.add_runtime_dependency 'pandoc-ruby', '
|
33
|
+
spec.add_runtime_dependency 'pandoc-ruby', '2.1.4'
|
34
34
|
spec.add_runtime_dependency 'rugged', '~> 1.0'
|
35
35
|
spec.add_runtime_dependency 'stable_sort', '~> 1.1'
|
36
36
|
end
|
data/test/cli/test_check.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require File.expand_path '../../helper', __FILE__
|
2
2
|
|
3
|
-
TestCLI ||= Class.new
|
3
|
+
TestCLI ||= Class.new Minitest::Test
|
4
4
|
|
5
|
-
class TestCLI::Check <
|
5
|
+
class TestCLI::Check < Minitest::Test
|
6
6
|
include CLIHelper
|
7
7
|
|
8
8
|
def test_pass
|
@@ -189,4 +189,18 @@ Finished checks for 2 packages with 1 failure
|
|
189
189
|
|
190
190
|
assert_match 'Finished checks for 0 packages with 0 failures', stderr
|
191
191
|
end
|
192
|
+
|
193
|
+
def test_dotfiles
|
194
|
+
setup = proc { mkfile 'index.xml', '<index name="test"/>' }
|
195
|
+
|
196
|
+
_, stderr = capture_io do
|
197
|
+
wrapper ['--check'], setup: setup do
|
198
|
+
mkfile 'Foo/.gitkeep'
|
199
|
+
mkfile 'Chunky/Bacon.lua', "@version 1.0\n@provides ../Foo/.gitkeep"
|
200
|
+
@cli.run
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
assert_match 'Finished checks for 1 package with 0 failures', stderr
|
205
|
+
end
|
192
206
|
end
|
data/test/cli/test_metadata.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require File.expand_path '../../helper', __FILE__
|
2
2
|
|
3
|
-
TestCLI ||= Class.new
|
3
|
+
TestCLI ||= Class.new Minitest::Test
|
4
4
|
|
5
|
-
class TestCLI::Metadata <
|
5
|
+
class TestCLI::Metadata < Minitest::Test
|
6
6
|
include CLIHelper
|
7
7
|
|
8
8
|
def test_website_link
|
data/test/cli/test_scan.rb
CHANGED
data/test/index/test_metadata.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require File.expand_path '../../helper', __FILE__
|
2
2
|
|
3
|
-
TestIndex ||= Class.new
|
3
|
+
TestIndex ||= Class.new Minitest::Test
|
4
4
|
|
5
|
-
class TestIndex::Metadata <
|
5
|
+
class TestIndex::Metadata < Minitest::Test
|
6
6
|
include IndexHelper
|
7
7
|
|
8
8
|
def test_add_anonymous_link
|
data/test/index/test_provides.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require File.expand_path '../../helper', __FILE__
|
2
2
|
|
3
|
-
TestIndex ||= Class.new
|
3
|
+
TestIndex ||= Class.new Minitest::Test
|
4
4
|
|
5
|
-
class TestIndex::Provides <
|
5
|
+
class TestIndex::Provides < Minitest::Test
|
6
6
|
include IndexHelper
|
7
7
|
|
8
8
|
def test_simple
|
@@ -372,8 +372,9 @@ class TestIndex::Provides < MiniTest::Test
|
|
372
372
|
@version 1.0
|
373
373
|
@provides
|
374
374
|
source.lua > target.lua
|
375
|
-
source.png > target.png
|
375
|
+
source.png > ./target.png
|
376
376
|
source*.jpg > target_dir/
|
377
|
+
source*.jpg > ../target_dir/
|
377
378
|
sub/source.txt > .
|
378
379
|
IN
|
379
380
|
|
@@ -382,10 +383,12 @@ class TestIndex::Provides < MiniTest::Test
|
|
382
383
|
xml = File.read index.path
|
383
384
|
|
384
385
|
assert_match 'file="target.lua"', xml
|
385
|
-
assert_match 'file="target.png"', xml
|
386
|
+
assert_match 'file="./target.png"', xml
|
386
387
|
assert_match 'file="target_dir/source1.jpg"', xml
|
387
388
|
assert_match 'file="target_dir/source2.jpg"', xml
|
388
|
-
assert_match 'file="
|
389
|
+
assert_match 'file="../target_dir/source1.jpg"', xml
|
390
|
+
assert_match 'file="../target_dir/source2.jpg"', xml
|
391
|
+
assert_match 'file="./source.txt"', xml
|
389
392
|
refute_match 'file="source.png"', xml
|
390
393
|
|
391
394
|
assert_equal 1,
|
data/test/index/test_scan.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require File.expand_path '../../helper', __FILE__
|
2
2
|
|
3
|
-
TestIndex ||= Class.new
|
3
|
+
TestIndex ||= Class.new Minitest::Test
|
4
4
|
|
5
|
-
class TestIndex::Scan <
|
5
|
+
class TestIndex::Scan < Minitest::Test
|
6
6
|
include IndexHelper
|
7
7
|
|
8
8
|
def test_ignore_unknown_type
|
@@ -1,22 +1,22 @@
|
|
1
1
|
require File.expand_path '../../helper', __FILE__
|
2
2
|
|
3
|
-
TestScanner ||= Class.new
|
3
|
+
TestScanner ||= Class.new Minitest::Test
|
4
4
|
|
5
|
-
class TestScanner::TestMakeUrl <
|
5
|
+
class TestScanner::TestMakeUrl < Minitest::Test
|
6
6
|
def setup
|
7
|
-
@cat =
|
7
|
+
@cat = Minitest::Mock.new
|
8
8
|
|
9
|
-
@pkg =
|
9
|
+
@pkg = Minitest::Mock.new
|
10
10
|
@pkg.expect :path, 'Hello/World.lua'
|
11
11
|
@pkg.expect :path, 'Hello/World.lua'
|
12
12
|
|
13
|
-
@ver =
|
13
|
+
@ver = Minitest::Mock.new
|
14
14
|
@ver.expect :name, '1.0'
|
15
15
|
|
16
|
-
@cdetector =
|
16
|
+
@cdetector = Minitest::Mock.new
|
17
17
|
@cdetector.expect :[], nil, ['Hello/World.lua']
|
18
18
|
|
19
|
-
@index =
|
19
|
+
@index = Minitest::Mock.new
|
20
20
|
@index.expect :cdetector, @cdetector
|
21
21
|
|
22
22
|
@scanner = ReaPack::Index::Scanner.new @cat, @pkg, nil, @index
|
@@ -1,24 +1,24 @@
|
|
1
1
|
require File.expand_path '../../helper', __FILE__
|
2
2
|
|
3
|
-
TestScanner ||= Class.new
|
3
|
+
TestScanner ||= Class.new Minitest::Test
|
4
4
|
|
5
|
-
class TestScanner::TestValidation <
|
5
|
+
class TestScanner::TestValidation < Minitest::Test
|
6
6
|
def setup
|
7
|
-
@pkg =
|
7
|
+
@pkg = Minitest::Mock.new
|
8
8
|
@pkg.expect :type, :script
|
9
9
|
@pkg.expect :path, 'cat/test'
|
10
10
|
|
11
11
|
@mh = MetaHeader.new
|
12
12
|
@mh[:version] = '1.0'
|
13
13
|
|
14
|
-
@index =
|
14
|
+
@index = Minitest::Mock.new
|
15
15
|
@index.expect :cdetector, ReaPack::Index::ConflictDetector.new
|
16
16
|
|
17
17
|
@scanner = ReaPack::Index::Scanner.new nil, @pkg, @mh, @index
|
18
18
|
end
|
19
19
|
|
20
20
|
def test_validation
|
21
|
-
mh_mock =
|
21
|
+
mh_mock = Minitest::Mock.new
|
22
22
|
mh_mock.expect :alias, nil, [Hash]
|
23
23
|
mh_mock.expect :validate, ['first', 'second'], [Hash, false]
|
24
24
|
|
data/test/test_cdetector.rb
CHANGED
data/test/test_changelog.rb
CHANGED
data/test/test_cli.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.expand_path '../helper', __FILE__
|
2
2
|
|
3
|
-
class TestCLI <
|
3
|
+
class TestCLI < Minitest::Test
|
4
4
|
include CLIHelper
|
5
5
|
|
6
6
|
def test_help
|
@@ -153,7 +153,7 @@ class TestCLI < MiniTest::Test
|
|
153
153
|
end
|
154
154
|
|
155
155
|
def test_config_unmatched_quote
|
156
|
-
assert_output '', /unmatched double quote/i do
|
156
|
+
assert_output '', /unmatched (double )?quote/i do
|
157
157
|
catch :stop do
|
158
158
|
wrapper [], setup: proc {
|
159
159
|
mkfile '.reapack-index.conf', '--output "'
|
data/test/test_git.rb
CHANGED
data/test/test_index.rb
CHANGED
data/test/test_metadata.rb
CHANGED
data/test/test_named_node.rb
CHANGED
data/test/test_package.rb
CHANGED
data/test/test_parsers.rb
CHANGED
data/test/test_provides.rb
CHANGED
data/test/test_scanner.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
require File.expand_path '../helper', __FILE__
|
2
2
|
|
3
|
-
class TestScanner <
|
3
|
+
class TestScanner < Minitest::Test
|
4
4
|
include XMLHelper
|
5
5
|
|
6
6
|
def setup
|
7
|
-
@mock =
|
7
|
+
@mock = Minitest::Mock.new
|
8
8
|
|
9
9
|
@mh = MetaHeader.new
|
10
10
|
@mh[:version] = '1.0'
|
@@ -17,7 +17,7 @@ class TestScanner < MiniTest::Test
|
|
17
17
|
|
18
18
|
@pkg = ReaPack::Index::Package.new @doc.css('reapack').first
|
19
19
|
|
20
|
-
@index =
|
20
|
+
@index = Minitest::Mock.new
|
21
21
|
@index.expect :cdetector, ReaPack::Index::ConflictDetector.new
|
22
22
|
@index.expect :url_template, 'https://google.com/$path'
|
23
23
|
@index.expect :files, ['Hello/World.lua']
|
data/test/test_source.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.expand_path '../helper', __FILE__
|
2
2
|
|
3
|
-
class TestSource <
|
3
|
+
class TestSource < Minitest::Test
|
4
4
|
include XMLHelper
|
5
5
|
|
6
6
|
def test_escape_url
|
@@ -156,7 +156,7 @@ class TestSource < MiniTest::Test
|
|
156
156
|
end
|
157
157
|
|
158
158
|
def test_auto_main_pkg_type
|
159
|
-
pkg =
|
159
|
+
pkg = Minitest::Mock.new
|
160
160
|
pkg.expect :type, :script
|
161
161
|
pkg.expect :topdir, 'Category'
|
162
162
|
|
@@ -168,7 +168,7 @@ class TestSource < MiniTest::Test
|
|
168
168
|
end
|
169
169
|
|
170
170
|
def test_auto_main_type_override
|
171
|
-
pkg =
|
171
|
+
pkg = Minitest::Mock.new
|
172
172
|
pkg.expect :topdir, 'Category'
|
173
173
|
|
174
174
|
src = ReaPack::Index::Source.new 'http://host/'
|
@@ -180,7 +180,7 @@ class TestSource < MiniTest::Test
|
|
180
180
|
end
|
181
181
|
|
182
182
|
def test_auto_main_midi_editor
|
183
|
-
pkg =
|
183
|
+
pkg = Minitest::Mock.new
|
184
184
|
src = ReaPack::Index::Source.new 'http://host/'
|
185
185
|
|
186
186
|
{
|
data/test/test_version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reapack-index
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- cfillion
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -140,16 +140,16 @@ dependencies:
|
|
140
140
|
name: pandoc-ruby
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- -
|
143
|
+
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version:
|
145
|
+
version: 2.1.4
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- -
|
150
|
+
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
152
|
+
version: 2.1.4
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rugged
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -244,14 +244,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
244
244
|
requirements:
|
245
245
|
- - ">="
|
246
246
|
- !ruby/object:Gem::Version
|
247
|
-
version: '2.
|
247
|
+
version: '2.4'
|
248
248
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
249
249
|
requirements:
|
250
250
|
- - ">="
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '0'
|
253
253
|
requirements: []
|
254
|
-
rubygems_version: 3.
|
254
|
+
rubygems_version: 3.4.10
|
255
255
|
signing_key:
|
256
256
|
specification_version: 4
|
257
257
|
summary: Package indexer for git-based ReaPack repositories
|