reapack-index 1.2.3 → 1.2.5

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: 395a21482f9f7c57d34491efa4afd7a32fa16f3fca18d42dff99b2ca3ef0cddf
4
- data.tar.gz: d9f769fbcf286a5541efbeb8eb4f1a70ffb2308349249706d85cad27b7b3ec46
3
+ metadata.gz: bf73255682cca9aa882eacb480eec085e349d6a877d0aff74da7f2859efdf03f
4
+ data.tar.gz: 42669bcfbf0b11edf021ec660f55493e33d8e9aacf11cfd0dacbaa862dd501d9
5
5
  SHA512:
6
- metadata.gz: 5b21099ed8e39ced20a19bf40df2f21a919bc66fd30dd3876d27d19b22a1aad8f9ed235ed6f548f8cf3fd4bd1d885c601d21fd2e0eef1de4ecafef8d50f40e66
7
- data.tar.gz: 3910b7e2954e9246b692a28621156418cbeaec0d74f6f62fcb42f42c168cb2c24a0532795d435e78ce77487262e2503e178adfe07680afcb2f925d46f6959f99
6
+ metadata.gz: f99838c3e8b91e9e7267e4202a709dee3df0ad9d78a36bed139ba133e02de8d24e38819850551367dc8cb0c64453a3269cd96f7ef7062677a9cac4ba6ba452ff
7
+ data.tar.gz: d6e89871ffc3aef3f97edeca383affe581fd7fb1a7eeb1a804095bc17d108a1d89e19edce1be082ab853c82e0fdfe4cc41f646e4774a0a0443b12fbb2e088ae2
@@ -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: 2.7
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.3 or newer must be installed on your computer in order to install
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:
@@ -209,7 +209,7 @@ private
209
209
  @index.clear
210
210
  failures = []
211
211
 
212
- pkgs = Hash[Dir.glob("#{Regexp.quote(@git.path)}/**/*").sort.map {|abs|
212
+ pkgs = Hash[Find.find(@git.path).sort.map {|abs|
213
213
  rel = @git.relative_path abs
214
214
  @index.files << rel
215
215
 
@@ -1,5 +1,5 @@
1
1
  module ReaPack
2
2
  class Index
3
- VERSION = '1.2.3'
3
+ VERSION = '1.2.5'
4
4
  end
5
5
  end
@@ -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 = new_dir.empty? ? base_file : File.join(new_dir, base_file)
165
+ target = File.join line.target, base_file
167
166
  else
168
167
  target = line.target
169
168
  end
@@ -8,7 +8,7 @@ class ReaPack::Index
8
8
 
9
9
  PLATFORMS = {
10
10
  all: nil,
11
- windows: :all, win32: :windows, win64: :windows,
11
+ windows: :all, win32: :windows, win64: :windows, 'windows-arm64ec': :windows,
12
12
  darwin: :all, darwin32: :darwin, darwin64: :darwin, 'darwin-arm64': :darwin,
13
13
  linux: :all, linux32: :linux, linux64: :linux,
14
14
  'linux-armv7l': :linux, 'linux-aarch64': :linux
data/lib/reapack/index.rb CHANGED
@@ -3,6 +3,7 @@ require 'reapack/index/gem_version'
3
3
  require 'addressable'
4
4
  require 'colorize'
5
5
  require 'fileutils'
6
+ require 'find'
6
7
  require 'gitable'
7
8
  require 'io/console'
8
9
  require 'metaheader'
@@ -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.3'
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', '~> 2.0'
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
@@ -1,8 +1,8 @@
1
1
  require File.expand_path '../../helper', __FILE__
2
2
 
3
- TestCLI ||= Class.new MiniTest::Test
3
+ TestCLI ||= Class.new Minitest::Test
4
4
 
5
- class TestCLI::Check < MiniTest::Test
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
@@ -1,8 +1,8 @@
1
1
  require File.expand_path '../../helper', __FILE__
2
2
 
3
- TestCLI ||= Class.new MiniTest::Test
3
+ TestCLI ||= Class.new Minitest::Test
4
4
 
5
- class TestCLI::Metadata < MiniTest::Test
5
+ class TestCLI::Metadata < Minitest::Test
6
6
  include CLIHelper
7
7
 
8
8
  def test_website_link
@@ -1,8 +1,8 @@
1
1
  require File.expand_path '../../helper', __FILE__
2
2
 
3
- TestCLI ||= Class.new MiniTest::Test
3
+ TestCLI ||= Class.new Minitest::Test
4
4
 
5
- class TestCLI::Scan < MiniTest::Test
5
+ class TestCLI::Scan < Minitest::Test
6
6
  include CLIHelper
7
7
 
8
8
  def test_initial_commit
@@ -1,8 +1,8 @@
1
1
  require File.expand_path '../../helper', __FILE__
2
2
 
3
- TestIndex ||= Class.new MiniTest::Test
3
+ TestIndex ||= Class.new Minitest::Test
4
4
 
5
- class TestIndex::Metadata < MiniTest::Test
5
+ class TestIndex::Metadata < Minitest::Test
6
6
  include IndexHelper
7
7
 
8
8
  def test_add_anonymous_link
@@ -1,8 +1,8 @@
1
1
  require File.expand_path '../../helper', __FILE__
2
2
 
3
- TestIndex ||= Class.new MiniTest::Test
3
+ TestIndex ||= Class.new Minitest::Test
4
4
 
5
- class TestIndex::Provides < MiniTest::Test
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="source.txt"', xml
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,
@@ -1,8 +1,8 @@
1
1
  require File.expand_path '../../helper', __FILE__
2
2
 
3
- TestIndex ||= Class.new MiniTest::Test
3
+ TestIndex ||= Class.new Minitest::Test
4
4
 
5
- class TestIndex::Scan < MiniTest::Test
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 MiniTest::Test
3
+ TestScanner ||= Class.new Minitest::Test
4
4
 
5
- class TestScanner::TestMakeUrl < MiniTest::Test
5
+ class TestScanner::TestMakeUrl < Minitest::Test
6
6
  def setup
7
- @cat = MiniTest::Mock.new
7
+ @cat = Minitest::Mock.new
8
8
 
9
- @pkg = MiniTest::Mock.new
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 = MiniTest::Mock.new
13
+ @ver = Minitest::Mock.new
14
14
  @ver.expect :name, '1.0'
15
15
 
16
- @cdetector = MiniTest::Mock.new
16
+ @cdetector = Minitest::Mock.new
17
17
  @cdetector.expect :[], nil, ['Hello/World.lua']
18
18
 
19
- @index = MiniTest::Mock.new
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 MiniTest::Test
3
+ TestScanner ||= Class.new Minitest::Test
4
4
 
5
- class TestScanner::TestValidation < MiniTest::Test
5
+ class TestScanner::TestValidation < Minitest::Test
6
6
  def setup
7
- @pkg = MiniTest::Mock.new
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 = MiniTest::Mock.new
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 = MiniTest::Mock.new
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
 
@@ -1,4 +1,4 @@
1
- class TestConflictDetector < MiniTest::Test
1
+ class TestConflictDetector < Minitest::Test
2
2
  include XMLHelper
3
3
 
4
4
  def test_unique
@@ -1,6 +1,6 @@
1
1
  require File.expand_path '../helper', __FILE__
2
2
 
3
- class TestChangelog < MiniTest::Test
3
+ class TestChangelog < Minitest::Test
4
4
  include XMLHelper
5
5
 
6
6
  def test_create
data/test/test_cli.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require File.expand_path '../helper', __FILE__
2
2
 
3
- class TestCLI < MiniTest::Test
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
@@ -1,6 +1,6 @@
1
1
  require File.expand_path '../helper', __FILE__
2
2
 
3
- class TestGit < MiniTest::Test
3
+ class TestGit < Minitest::Test
4
4
  include GitHelper
5
5
 
6
6
  def setup
data/test/test_index.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require File.expand_path '../helper', __FILE__
2
2
 
3
- class TestIndex < MiniTest::Test
3
+ class TestIndex < Minitest::Test
4
4
  include IndexHelper
5
5
 
6
6
  def test_is_type
@@ -1,6 +1,6 @@
1
1
  require File.expand_path '../helper', __FILE__
2
2
 
3
- class TestMetadata < MiniTest::Test
3
+ class TestMetadata < Minitest::Test
4
4
  include XMLHelper
5
5
 
6
6
  def test_website_link
@@ -1,6 +1,6 @@
1
1
  require File.expand_path '../helper', __FILE__
2
2
 
3
- class TestNamedNode < MiniTest::Test
3
+ class TestNamedNode < Minitest::Test
4
4
  include XMLHelper
5
5
 
6
6
  def setup
data/test/test_package.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require File.expand_path '../helper', __FILE__
2
2
 
3
- class TestPackage < MiniTest::Test
3
+ class TestPackage < Minitest::Test
4
4
  include XMLHelper
5
5
 
6
6
  def test_change_type
data/test/test_parsers.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require File.expand_path '../helper', __FILE__
2
2
 
3
- class TestParsers < MiniTest::Test
3
+ class TestParsers < Minitest::Test
4
4
  def test_wordpress
5
5
  input = <<-IN
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  require File.expand_path '../helper', __FILE__
2
2
 
3
- class TestProvides < MiniTest::Test
3
+ class TestProvides < Minitest::Test
4
4
  def test_parse_all
5
5
  enum = ReaPack::Index::Provides.parse_each "file1\nfile2"
6
6
  assert_equal 2, enum.to_a.size
@@ -33,13 +33,14 @@ class TestProvides < MiniTest::Test
33
33
  end
34
34
 
35
35
  def test_platforms
36
- assert_equal [:windows, :win32, :win64,
36
+ assert_equal [:windows, :win32, :win64, :'windows-arm64ec',
37
37
  :darwin, :darwin32, :darwin64, :'darwin-arm64',
38
38
  :linux, :linux32, :linux64, :'linux-armv7l', :'linux-aarch64'],
39
39
  [
40
40
  '[windows] file',
41
41
  '[win32] file',
42
42
  '[win64] file',
43
+ '[windows-arm64ec] file',
43
44
  '[Darwin]file',
44
45
  ' [ darwin32 ] file',
45
46
  '[win32 darwin64] file',
data/test/test_scanner.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  require File.expand_path '../helper', __FILE__
2
2
 
3
- class TestScanner < MiniTest::Test
3
+ class TestScanner < Minitest::Test
4
4
  include XMLHelper
5
5
 
6
6
  def setup
7
- @mock = MiniTest::Mock.new
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 = MiniTest::Mock.new
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 < MiniTest::Test
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 = MiniTest::Mock.new
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 = MiniTest::Mock.new
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 = MiniTest::Mock.new
183
+ pkg = Minitest::Mock.new
184
184
  src = ReaPack::Index::Source.new 'http://host/'
185
185
 
186
186
  {
data/test/test_version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require File.expand_path '../helper', __FILE__
2
2
 
3
- class TestVersion < MiniTest::Test
3
+ class TestVersion < Minitest::Test
4
4
  include XMLHelper
5
5
 
6
6
  def test_set_author
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.3
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - cfillion
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-03 00:00:00.000000000 Z
11
+ date: 2024-11-01 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: '2.0'
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: '2.0'
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.3'
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.1.4
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