mnogootex 1.0.1 → 1.1.0

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: 2d2cadd08cf673a8236e169aaf64144b8da4ab0a9e62a22cf42b41ae157fd770
4
- data.tar.gz: '09d19bd303cb3ca974a3510d58913ed4cd913d965bf42f6711987e90cc1dd77c'
3
+ metadata.gz: 654469a2719e7a34e16be659b3b59cbf8611f1f5025ccba19ba1bea60e35d87b
4
+ data.tar.gz: cc026af91f6270d36fd5affa76565e49ba781638965cb0b377c8775d84cbc8fb
5
5
  SHA512:
6
- metadata.gz: 0f9cfe9d118d10e8b0d1a4abaa30cfbda49b20dba3083816ad32ad0ec42d335f7a2a861c1f6e45d043fad8fa9f5902515191744d557c2367acf3d62fbf937852
7
- data.tar.gz: 44bae07daab898443e036f2ef57febcf61a6c3c0dfc4caf8d20ec742087cc6c96b29ae9c2dd21bfdbfb9cb0b6dd350ba98675aff155ff26881836f6df102369d
6
+ metadata.gz: 2cf80aa5a52753bfec92a5ce7a6ff1c0a1d3d84376fdc897ed364097b52126245e5852284b474e81adee288c30d316753cb0bd38b8d75fbf541345512c834754
7
+ data.tar.gz: a71bda28d8eded4790cb3b40b6b673c58e3f96e630e42bb512c80afd004f869f559938ff83c7fb358780f59007c4117cad5bd0cf0b20e9d956c9c1d81425cfac
@@ -0,0 +1,41 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+
7
+ jobs:
8
+ main:
9
+ name: >-
10
+ ${{ matrix.os }} ${{ matrix.ruby }}
11
+ runs-on: ${{ matrix.os }}-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ os: [ ubuntu, macos ]
16
+ ruby: [ '2.6', '2.7', '3.0' ]
17
+
18
+ steps:
19
+
20
+ - name: Checkout repo
21
+ uses: actions/checkout@v2
22
+
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby }}
27
+
28
+ - name: Cache Ruby gems
29
+ uses: actions/cache@v2
30
+ with:
31
+ path: vendor/bundle
32
+ key: gems-${{ matrix.os }}-${{ matrix.ruby }}-${{ hashFiles('Gemfile', 'mnogootex.gemspec') }}
33
+ restore-keys: gems-${{ matrix.os }}-${{ matrix.ruby }}-
34
+
35
+ - name: Install Ruby gems
36
+ run: |
37
+ bundle config path vendor/bundle
38
+ bundle install --jobs 3 --retry 3
39
+
40
+ - name: Run tests
41
+ run: bundle exec rake spec:rspec
data/.rubocop.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.5.1
2
+ TargetRubyVersion: 2.6
3
+ NewCops: enable
3
4
  Metrics/LineLength:
4
5
  Max: 120
5
6
  Layout/DotPosition:
data/Guardfile CHANGED
@@ -12,45 +12,45 @@ guard :rspec, cmd: 'bundle exec rspec' do
12
12
  dsl.watch_spec_files_for(dsl.ruby.lib_files)
13
13
  end
14
14
 
15
- # TODO: refactor the following into a new version of guard-mutant
16
-
17
- require 'mutant'
18
- require 'dry/inflector'
19
- require 'guard/compat/plugin'
20
-
21
- # NOTE: :: is mandatory for inline guards
22
- module ::Guard # rubocop:disable Style/ClassAndModuleChildren
23
- class Mutant < Plugin
24
- def initialize(options = {})
25
- opts = options.dup
26
- # @my_option = opts.delete(:my_special_option)
27
- super(opts) # important to call + avoid passing options Guard doesn't understand
28
- end
29
-
30
- # TODO: how would this make sense?
31
- # def run_all; end
32
-
33
- def run_on_modifications(paths)
34
- inflector = Dry::Inflector.new
35
- subjects = paths.map do |path|
36
- match = path.match(%r{(?:spec|lib)\/(.*?)(?:_spec)?.rb}).captures.first
37
- inflector.camelize match
38
- end
39
- succesful = ::Mutant::CLI.run(%w[--use rspec --fail-fast] + subjects)
40
- throw :task_has_failed unless succesful
41
- self
42
- end
43
- end
44
- end
45
-
46
- guard :mutant do
47
- require 'guard/rspec/dsl'
48
- dsl = Guard::RSpec::Dsl.new(self)
49
-
50
- # RSpec files
51
- # watch(dsl.rspec.spec_helper) { dsl.rspec.spec_dir }
52
- watch(dsl.rspec.spec_files)
53
-
54
- # Ruby files
55
- dsl.watch_spec_files_for(dsl.ruby.lib_files)
56
- end
15
+ # # TODO: refactor the following into a new version of guard-mutant
16
+
17
+ # require 'mutant'
18
+ # require 'dry/inflector'
19
+ # require 'guard/compat/plugin'
20
+
21
+ # # NOTE: :: is mandatory for inline guards
22
+ # module ::Guard
23
+ # class Mutant < Plugin
24
+ # def initialize(options = {})
25
+ # opts = options.dup
26
+ # # @my_option = opts.delete(:my_special_option)
27
+ # super(opts) # important to call + avoid passing options Guard doesn't understand
28
+ # end
29
+
30
+ # # TODO: how would this make sense?
31
+ # # def run_all; end
32
+
33
+ # def run_on_modifications(paths)
34
+ # inflector = Dry::Inflector.new
35
+ # subjects = paths.map do |path|
36
+ # match = path.match(%r{(?:spec|lib)\/(.*?)(?:_spec)?.rb}).captures.first
37
+ # inflector.camelize match
38
+ # end
39
+ # succesful = ::Mutant::CLI.run(%w[--use rspec --fail-fast] + subjects)
40
+ # throw :task_has_failed unless succesful
41
+ # self
42
+ # end
43
+ # end
44
+ # end
45
+
46
+ # guard :mutant do
47
+ # require 'guard/rspec/dsl'
48
+ # dsl = Guard::RSpec::Dsl.new(self)
49
+
50
+ # # RSpec files
51
+ # # watch(dsl.rspec.spec_helper) { dsl.rspec.spec_dir }
52
+ # watch(dsl.rspec.spec_files)
53
+
54
+ # # Ruby files
55
+ # dsl.watch_spec_files_for(dsl.ruby.lib_files)
56
+ # end
data/README.md CHANGED
@@ -3,11 +3,10 @@
3
3
  [![Build Status](https://travis-ci.org/paolobrasolin/mnogootex.svg?branch=master)](https://travis-ci.org/paolobrasolin/mnogootex)
4
4
  [![Gem Version](https://badge.fury.io/rb/mnogootex.svg)](https://badge.fury.io/rb/mnogootex)
5
5
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
-
7
6
  [![Code Climate](https://codeclimate.com/github/paolobrasolin/mnogootex/badges/gpa.svg)](https://codeclimate.com/github/paolobrasolin/mnogootex)
8
- [![Test Coverage](https://codeclimate.com/github/paolobrasolin/mnogootex/badges/coverage.svg)](https://codeclimate.com/github/paolobrasolin/mnogootex/coverage)
9
- [![Inline docs](http://inch-ci.org/github/paolobrasolin/mnogootex.svg?branch=master)](http://inch-ci.org/github/paolobrasolin/mnogootex)
10
- [![Issue Count](https://codeclimate.com/github/paolobrasolin/mnogootex/badges/issue_count.svg)](https://codeclimate.com/github/paolobrasolin/mnogootex)
7
+ <!-- [![Test Coverage](https://codeclimate.com/github/paolobrasolin/mnogootex/badges/coverage.svg)](https://codeclimate.com/github/paolobrasolin/mnogootex/coverage) -->
8
+ <!-- [![Inline docs](http://inch-ci.org/github/paolobrasolin/mnogootex.svg?branch=master)](http://inch-ci.org/github/paolobrasolin/mnogootex) -->
9
+ <!-- [![Issue Count](https://codeclimate.com/github/paolobrasolin/mnogootex/badges/issue_count.svg)](https://codeclimate.com/github/paolobrasolin/mnogootex) -->
11
10
 
12
11
  Многоꙮтех (mnogootex) is a utility that parallelizes compilation
13
12
  of a LaTeX document using different classes and offers a
@@ -19,7 +18,7 @@ document classes.
19
18
 
20
19
  ## Installation
21
20
 
22
- The only requirement is [Ruby](https://www.ruby-lang.org) (>=2.3).
21
+ The only requirement is [Ruby](https://www.ruby-lang.org) (>=2.5 as earlier versions are untested).
23
22
 
24
23
  To install многоꙮтех execute
25
24
 
@@ -147,7 +146,7 @@ a configuration file in your home folder and use it as a global
147
146
  configuration for all you projects, while overwriting only specific
148
147
  options in the configuration files of each one.
149
148
 
150
- Многоꙮтех currently accepts only two options.
149
+ Многоꙮтех currently accepts three options.
151
150
 
152
151
  #### `spinner`
153
152
 
@@ -168,6 +167,15 @@ to compile documents.
168
167
  - -pdf
169
168
  - --interaction=nonstopmode
170
169
 
170
+ #### `work_path`
171
+
172
+ This option is an override for the path where compilation happens.
173
+
174
+ # Default value:
175
+ work_path: null
176
+
177
+ By default each run happens in a new empty folder. Overriding this allows you to easily reach the compilation artifacts, but leaves handling cleanup and conflicts with previous runs up to you.
178
+
171
179
  ## Contributing
172
180
 
173
181
  Bug reports and pull requests are welcome on GitHub at https://github.com/paolobrasolin/mnogootex. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'mutant'
4
- require 'dry/inflector'
3
+ # require 'mutant'
4
+ # require 'dry/inflector'
5
5
 
6
6
  require 'rspec/core/rake_task'
7
7
 
@@ -17,11 +17,11 @@ namespace :spec do
17
17
  Rake::Task['spec:rspec'].invoke
18
18
  end
19
19
 
20
- desc 'run Mutant'
21
- task :mutant, [:subject] do |_, args|
22
- subjects = [args[:subject]].compact
23
- subjects << 'Mnogootex*' if subjects.empty?
24
- successful = ::Mutant::CLI.run(%w[--use rspec --fail-fast] + subjects)
25
- raise('Mutant task is not successful') unless successful
26
- end
20
+ # desc 'run Mutant'
21
+ # task :mutant, [:subject] do |_, args|
22
+ # subjects = [args[:subject]].compact
23
+ # subjects << 'Mnogootex*' if subjects.empty?
24
+ # successful = ::Mutant::CLI.run(%w[--use rspec --fail-fast] + subjects)
25
+ # raise('Mutant task is not successful') unless successful
26
+ # end
27
27
  end
data/lib/mnogootex/cli.rb CHANGED
@@ -10,7 +10,7 @@ require 'mnogootex/cfg'
10
10
 
11
11
  module Mnogootex
12
12
  class CLI < Thor
13
- IS_MNOGOO = (ENV['IS_MNOGOO'] == 'true').freeze
13
+ IS_MNOGOO = (ENV['IS_MNOGOO'] == 'true')
14
14
 
15
15
  def self.basename
16
16
  IS_MNOGOO ? 'mnogoo' : super
@@ -36,6 +36,7 @@ module Mnogootex
36
36
  'Clean up all temporary files'
37
37
  def clobber
38
38
  # NOTE: this is a tad slow - using shell would improve that
39
+ # TODO: this does not account for custom work_path
39
40
  tmp_dir = Pathname.new(Dir.tmpdir).join('mnogootex')
40
41
  tmp_dir_size = Mnogootex::Utils.humanize_bytes Mnogootex::Utils.dir_size(tmp_dir)
41
42
  print "Freeing up #{tmp_dir_size}... "
@@ -54,12 +55,12 @@ module Mnogootex
54
55
  desc 'dir [JOB] [MAIN]',
55
56
  'Print dir of JOB (or source) for MAIN (or inferred) document'
56
57
  def dir(*args)
57
- jobs, main, = Mnogootex::Cfg.recombobulate(*args)
58
+ jobs, main, cfg = Mnogootex::Cfg.recombobulate(*args)
58
59
 
59
60
  if jobs.empty?
60
61
  puts main.dirname
61
62
  else
62
- jobs.map! { |hid| Mnogootex::Job::Porter.new hid: hid, source_path: main }
63
+ jobs.map! { |hid| Mnogootex::Job::Porter.new hid: hid, source_path: main, work_path: cfg['work_path'] }
63
64
  jobs.map!(&:target_dir)
64
65
  puts jobs
65
66
  end
@@ -71,7 +72,7 @@ module Mnogootex
71
72
  jobs, main, cfg = Mnogootex::Cfg.recombobulate(*args)
72
73
 
73
74
  jobs = cfg['jobs'] if jobs.empty?
74
- jobs.map! { |hid| Mnogootex::Job::Porter.new hid: hid, source_path: main }
75
+ jobs.map! { |hid| Mnogootex::Job::Porter.new hid: hid, source_path: main, work_path: cfg['work_path'] }
75
76
  jobs.map! { |porter| porter.target_path.sub_ext('.pdf') }
76
77
  puts jobs
77
78
  end
@@ -4,3 +4,4 @@ commandline:
4
4
  - latexmk
5
5
  - -pdf
6
6
  - --interaction=nonstopmode
7
+ work_path: null
@@ -10,13 +10,14 @@ module Mnogootex
10
10
  class Porter
11
11
  attr_reader :hid
12
12
 
13
- def initialize(hid:, source_path:)
13
+ def initialize(hid:, source_path:, work_path: nil)
14
14
  @source_path = Pathname.new(source_path).realpath
15
+ @work_path = calc_work_path(work_path).tap(&:mkpath).realpath
15
16
  @hid = hid
16
17
  end
17
18
 
18
19
  def target_dir
19
- @target_dir ||= Pathname.new(Dir.tmpdir).join('mnogootex', source_id, hid)
20
+ @target_dir ||= @work_path.join(hid)
20
21
  end
21
22
 
22
23
  def target_path
@@ -29,14 +30,21 @@ module Mnogootex
29
30
 
30
31
  def provide
31
32
  target_dir.mkpath
32
- # NOTE: can't use Pathname.join here since it elides the dot:
33
- FileUtils.cp_r File.join(@source_path.dirname, '.'), target_dir
33
+ providable_files = @source_path.dirname.children
34
+ providable_files.reject!(&@work_path.method(:==))
35
+ FileUtils.cp_r providable_files, target_dir
34
36
  target_dir.join('.mnogootex.yml').tap { |p| p.delete if p.file? }
35
37
  target_dir.join('.mnogootex.src').make_symlink(@source_path)
36
38
  end
37
39
 
38
40
  private
39
41
 
42
+ def calc_work_path(path)
43
+ return Pathname.new(path) unless path.nil?
44
+
45
+ Pathname.new(Dir.tmpdir).join('mnogootex', source_id)
46
+ end
47
+
40
48
  def source_id
41
49
  @source_id ||= Utils.short_md5(@source_path.to_s)
42
50
  end
@@ -7,9 +7,9 @@ module Mnogootex
7
7
  class Runner
8
8
  attr_reader :hid, :log_lines
9
9
 
10
- def initialize(cl:, chdir:)
10
+ def initialize(cmd:, chdir:)
11
11
  @log_lines = []
12
- _, @stream, @thread = Open3.popen2e(*cl, chdir: chdir)
12
+ _, @stream, @thread = Open3.popen2e(*cmd, chdir: chdir)
13
13
  @poller = start_poller
14
14
  end
15
15
 
@@ -23,6 +23,7 @@ module Mnogootex
23
23
 
24
24
  def count_lines
25
25
  return log_lines.size unless alive?
26
+
26
27
  @ticks = [@ticks || -1, log_lines.size - 1].min + 1
27
28
  end
28
29
 
@@ -36,7 +36,8 @@ module Mnogootex
36
36
  @configuration['jobs'].each do |cls|
37
37
  @porters << Mnogootex::Job::Porter.new(
38
38
  hid: cls,
39
- source_path: @source
39
+ source_path: @source,
40
+ work_path: @configuration['work_path'],
40
41
  )
41
42
  end
42
43
  end
@@ -52,7 +53,7 @@ module Mnogootex
52
53
  def init_and_exec_runners
53
54
  @runners = @porters.map do |porter|
54
55
  Mnogootex::Job::Runner.new(
55
- cl: commandline(porter.target_path),
56
+ cmd: commandline(porter.target_path),
56
57
  chdir: porter.target_dir
57
58
  )
58
59
  end
@@ -12,6 +12,6 @@ module Mnogootex
12
12
  # @return [Symbol] the associated log level
13
13
  # @!attribute length
14
14
  # @return [Integer] the number of matched lines
15
- Matcher = Struct.new(:regexp, :level, :length)
15
+ Matcher = Struct.new(:regexp, :level, :length) # rubocop:disable Lint/StructNewOverride
16
16
  end
17
17
  end
@@ -37,7 +37,7 @@ module Mnogootex
37
37
  tail_length, matcher = 0 # , nil
38
38
  lines.each do |line|
39
39
  if tail_length.zero?
40
- matcher = matchers.detect { |m| m.regexp === line.text }
40
+ matcher = matchers.detect { |m| line.text =~ m.regexp }
41
41
  tail_length = matcher&.length&.-(1) || 0
42
42
  else # still on the tail of the previous match
43
43
  tail_length -= 1
@@ -14,6 +14,7 @@ module Mnogootex
14
14
  def self.humanize_bytes(size)
15
15
  %w[b Kb Mb Gb Tb Pb Eb Zb Yb].reduce(size) do |magnitude, unit|
16
16
  break "#{magnitude}#{unit}" if magnitude < 1024
17
+
17
18
  magnitude / 1024
18
19
  end
19
20
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Mnogootex
4
- VERSION = '1.0.1'
4
+ VERSION = '1.1.0'
5
5
  end
data/mnogootex.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('../lib', __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  require 'mnogootex/version'
6
6
 
@@ -35,18 +35,20 @@ Gem::Specification.new do |spec| # rubocop:disable Metrics/BlockLength
35
35
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
36
36
  spec.require_paths = ['lib']
37
37
 
38
- spec.add_development_dependency 'bundler', '~> 1.16'
39
- spec.add_development_dependency 'byebug', '~> 10.0'
40
- spec.add_development_dependency 'dry-inflector', '~> 0.1.1'
41
- spec.add_development_dependency 'guard', '~> 2.14'
42
- spec.add_development_dependency 'guard-rspec', '~> 4.7'
43
- spec.add_development_dependency 'mutant', '~> 0.8.14'
44
- spec.add_development_dependency 'mutant-rspec', '~> 0.8.14'
45
- spec.add_development_dependency 'rake', '~> 10.4'
46
- spec.add_development_dependency 'rspec', '~> 3.6'
47
- spec.add_development_dependency 'rubocop', '~> 0.52.1'
48
- spec.add_development_dependency 'simplecov', '~> 0.15.1'
49
- spec.add_development_dependency 'yard', '~> 0.9.12'
38
+ spec.required_ruby_version = '>= 2.6'
39
+
40
+ spec.add_development_dependency 'bundler', '~> 2.2.30'
41
+ spec.add_development_dependency 'byebug', '~> 11.1.3'
42
+ # spec.add_development_dependency 'dry-inflector', '~> 0.1.1'
43
+ spec.add_development_dependency 'guard', '~> 2.18.0'
44
+ spec.add_development_dependency 'guard-rspec', '~> 4.7.3'
45
+ # spec.add_development_dependency 'mutant', '~> 0.8.14'
46
+ # spec.add_development_dependency 'mutant-rspec', '~> 0.8.14'
47
+ spec.add_development_dependency 'rake', '~> 13.0.6'
48
+ spec.add_development_dependency 'rspec', '~> 3.10.0'
49
+ spec.add_development_dependency 'rubocop', '~> 1.22.3'
50
+ spec.add_development_dependency 'simplecov', '~> 0.21.2'
51
+ spec.add_development_dependency 'yard', '~> 0.9.26'
50
52
 
51
53
  spec.add_dependency 'colorize', '~> 0.8.1'
52
54
  spec.add_dependency 'thor', '~> 0.20.0'
@@ -43,7 +43,7 @@ describe Mnogootex::Job::Porter do
43
43
  it 'has a deterministic location' do
44
44
  hash = Mnogootex::Utils.short_md5(test_dir.join('a', 'main.file').realpath.to_s)
45
45
  expect(porter_a1.target_dir.to_s).
46
- to match(%r{\A.+/mnogootex/#{hash}/#{1}\z})
46
+ to match(%r{\A.+/mnogootex/#{hash}/1\z})
47
47
  end
48
48
 
49
49
  it 'discriminates by hid' do
@@ -102,7 +102,7 @@ describe Mnogootex::Job::Porter do
102
102
  def relative_subtree(pathname)
103
103
  Pathname.glob(pathname.join('**', '{.*,*}')).map do |child|
104
104
  child.relative_path_from(pathname)
105
- end
105
+ end.sort
106
106
  end
107
107
 
108
108
  it 'copies all source files' do
@@ -11,19 +11,19 @@ describe Mnogootex::Job::Runner do
11
11
  after { test_dir.rmtree }
12
12
 
13
13
  it 'executes commandline in given dir' do
14
- runner = described_class.new(cl: 'pwd', chdir: test_dir)
14
+ runner = described_class.new(cmd: 'pwd', chdir: test_dir)
15
15
  expect(runner).to be_successful
16
16
  expect(runner.log_lines.join.chomp).to eq(test_dir.realpath.to_s)
17
17
  end
18
18
 
19
19
  describe '#alive?' do
20
20
  it 'is true if thread is running' do
21
- runner = described_class.new(cl: 'sleep 0.05', chdir: test_dir)
21
+ runner = described_class.new(cmd: 'sleep 0.05', chdir: test_dir)
22
22
  expect(runner).to be_alive
23
23
  end
24
24
 
25
25
  it 'is false if thread is dead' do
26
- runner = described_class.new(cl: ':', chdir: test_dir)
26
+ runner = described_class.new(cmd: ':', chdir: test_dir)
27
27
  sleep 0.05
28
28
  expect(runner).to_not be_alive
29
29
  end
@@ -31,12 +31,12 @@ describe Mnogootex::Job::Runner do
31
31
 
32
32
  describe '#successful?' do
33
33
  it 'is true on zero exit status' do
34
- runner = described_class.new(cl: 'exit 0', chdir: test_dir)
34
+ runner = described_class.new(cmd: 'exit 0', chdir: test_dir)
35
35
  expect(runner).to be_successful
36
36
  end
37
37
 
38
38
  it 'is false on nonzero exit status' do
39
- runner = described_class.new(cl: 'exit 1', chdir: test_dir)
39
+ runner = described_class.new(cmd: 'exit 1', chdir: test_dir)
40
40
  expect(runner).to_not be_successful
41
41
  end
42
42
  end
@@ -47,7 +47,7 @@ describe Mnogootex::Job::Runner do
47
47
  SHELL
48
48
 
49
49
  context 'dead process' do
50
- subject { described_class.new(cl: "#{lns} lns 3", chdir: test_dir) }
50
+ subject { described_class.new(cmd: "#{lns} lns 3", chdir: test_dir) }
51
51
 
52
52
  before do
53
53
  subject.successful? # waits on threads
@@ -59,7 +59,7 @@ describe Mnogootex::Job::Runner do
59
59
  end
60
60
 
61
61
  context 'alive process' do
62
- subject { described_class.new(cl: "#{lns} lns 3; sleep 0.20", chdir: test_dir) }
62
+ subject { described_class.new(cmd: "#{lns} lns 3; sleep 0.20", chdir: test_dir) }
63
63
 
64
64
  before do
65
65
  subject
@@ -152,11 +152,11 @@ describe Mnogootex::Log::Processor do
152
152
  This is also a known irrelevant information flood...
153
153
  ... telling you that you'd better pay attention to warnings.
154
154
  I warned you, dude. Here's an ERROR. :(
155
- LOG
155
+ LOG
156
156
 
157
- levels = { trace: Mnogootex::Log::Level.new(0, :trace),
157
+ levels = { trace: Mnogootex::Log::Level.new(0, :trace),
158
158
  warning: Mnogootex::Log::Level.new(1, :warning, :yellow),
159
- error: Mnogootex::Log::Level.new(2, :error, :red) }
159
+ error: Mnogootex::Log::Level.new(2, :error, :red) }
160
160
 
161
161
  matchers = [Mnogootex::Log::Matcher.new(/error/i, :error, 1),
162
162
  Mnogootex::Log::Matcher.new(/warning/i, :warning, 1),
data/spec/spec_helper.rb CHANGED
@@ -117,8 +117,8 @@ RSpec.configure do |config|
117
117
  # # as the one that triggered the failure.
118
118
  # Kernel.srand config.seed
119
119
 
120
- # Timeout to help mutant
121
- config.around(:each) do |example|
122
- Timeout.timeout(0.1, &example)
123
- end
120
+ # # Timeout to help mutant
121
+ # config.around(:each) do |example|
122
+ # Timeout.timeout(0.1, &example)
123
+ # end
124
124
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mnogootex
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paolo Brasolin
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-03 00:00:00.000000000 Z
11
+ date: 2021-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,168 +16,126 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.16'
19
+ version: 2.2.30
20
20
  type: :development
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.16'
26
+ version: 2.2.30
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: byebug
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '10.0'
33
+ version: 11.1.3
34
34
  type: :development
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: '10.0'
41
- - !ruby/object:Gem::Dependency
42
- name: dry-inflector
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 0.1.1
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 0.1.1
40
+ version: 11.1.3
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: guard
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
45
  - - "~>"
60
46
  - !ruby/object:Gem::Version
61
- version: '2.14'
47
+ version: 2.18.0
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
52
  - - "~>"
67
53
  - !ruby/object:Gem::Version
68
- version: '2.14'
54
+ version: 2.18.0
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: guard-rspec
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
59
  - - "~>"
74
60
  - !ruby/object:Gem::Version
75
- version: '4.7'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '4.7'
83
- - !ruby/object:Gem::Dependency
84
- name: mutant
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 0.8.14
61
+ version: 4.7.3
90
62
  type: :development
91
63
  prerelease: false
92
64
  version_requirements: !ruby/object:Gem::Requirement
93
65
  requirements:
94
66
  - - "~>"
95
67
  - !ruby/object:Gem::Version
96
- version: 0.8.14
97
- - !ruby/object:Gem::Dependency
98
- name: mutant-rspec
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 0.8.14
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 0.8.14
68
+ version: 4.7.3
111
69
  - !ruby/object:Gem::Dependency
112
70
  name: rake
113
71
  requirement: !ruby/object:Gem::Requirement
114
72
  requirements:
115
73
  - - "~>"
116
74
  - !ruby/object:Gem::Version
117
- version: '10.4'
75
+ version: 13.0.6
118
76
  type: :development
119
77
  prerelease: false
120
78
  version_requirements: !ruby/object:Gem::Requirement
121
79
  requirements:
122
80
  - - "~>"
123
81
  - !ruby/object:Gem::Version
124
- version: '10.4'
82
+ version: 13.0.6
125
83
  - !ruby/object:Gem::Dependency
126
84
  name: rspec
127
85
  requirement: !ruby/object:Gem::Requirement
128
86
  requirements:
129
87
  - - "~>"
130
88
  - !ruby/object:Gem::Version
131
- version: '3.6'
89
+ version: 3.10.0
132
90
  type: :development
133
91
  prerelease: false
134
92
  version_requirements: !ruby/object:Gem::Requirement
135
93
  requirements:
136
94
  - - "~>"
137
95
  - !ruby/object:Gem::Version
138
- version: '3.6'
96
+ version: 3.10.0
139
97
  - !ruby/object:Gem::Dependency
140
98
  name: rubocop
141
99
  requirement: !ruby/object:Gem::Requirement
142
100
  requirements:
143
101
  - - "~>"
144
102
  - !ruby/object:Gem::Version
145
- version: 0.52.1
103
+ version: 1.22.3
146
104
  type: :development
147
105
  prerelease: false
148
106
  version_requirements: !ruby/object:Gem::Requirement
149
107
  requirements:
150
108
  - - "~>"
151
109
  - !ruby/object:Gem::Version
152
- version: 0.52.1
110
+ version: 1.22.3
153
111
  - !ruby/object:Gem::Dependency
154
112
  name: simplecov
155
113
  requirement: !ruby/object:Gem::Requirement
156
114
  requirements:
157
115
  - - "~>"
158
116
  - !ruby/object:Gem::Version
159
- version: 0.15.1
117
+ version: 0.21.2
160
118
  type: :development
161
119
  prerelease: false
162
120
  version_requirements: !ruby/object:Gem::Requirement
163
121
  requirements:
164
122
  - - "~>"
165
123
  - !ruby/object:Gem::Version
166
- version: 0.15.1
124
+ version: 0.21.2
167
125
  - !ruby/object:Gem::Dependency
168
126
  name: yard
169
127
  requirement: !ruby/object:Gem::Requirement
170
128
  requirements:
171
129
  - - "~>"
172
130
  - !ruby/object:Gem::Version
173
- version: 0.9.12
131
+ version: 0.9.26
174
132
  type: :development
175
133
  prerelease: false
176
134
  version_requirements: !ruby/object:Gem::Requirement
177
135
  requirements:
178
136
  - - "~>"
179
137
  - !ruby/object:Gem::Version
180
- version: 0.9.12
138
+ version: 0.9.26
181
139
  - !ruby/object:Gem::Dependency
182
140
  name: colorize
183
141
  requirement: !ruby/object:Gem::Requirement
@@ -217,10 +175,10 @@ executables:
217
175
  extensions: []
218
176
  extra_rdoc_files: []
219
177
  files:
178
+ - ".github/workflows/main.yml"
220
179
  - ".gitignore"
221
180
  - ".rspec"
222
181
  - ".rubocop.yml"
223
- - ".travis.yml"
224
182
  - CODE_OF_CONDUCT.md
225
183
  - Gemfile
226
184
  - Guardfile
@@ -259,7 +217,7 @@ homepage: https://github.com/tetrapharmakon/mnogootex
259
217
  licenses:
260
218
  - MIT
261
219
  metadata: {}
262
- post_install_message:
220
+ post_install_message:
263
221
  rdoc_options: []
264
222
  require_paths:
265
223
  - lib
@@ -267,16 +225,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
267
225
  requirements:
268
226
  - - ">="
269
227
  - !ruby/object:Gem::Version
270
- version: '0'
228
+ version: '2.6'
271
229
  required_rubygems_version: !ruby/object:Gem::Requirement
272
230
  requirements:
273
231
  - - ">="
274
232
  - !ruby/object:Gem::Version
275
233
  version: '0'
276
234
  requirements: []
277
- rubyforge_project:
278
- rubygems_version: 2.7.6
279
- signing_key:
235
+ rubygems_version: 3.1.4
236
+ signing_key:
280
237
  specification_version: 4
281
238
  summary: Многоꙮтех (mnogootex) is a utility that parallelizes compilation of a LaTeX
282
239
  document using different classes and offers a meaningfully filtered output.
data/.travis.yml DELETED
@@ -1,22 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- rvm:
4
- - 2.5
5
- - 2.4
6
- - 2.3
7
- env:
8
- global:
9
- - CC_TEST_REPORTER_ID=890ed5ee01002c7149920883256f8e4790000127faa9ddf14d86dd3ceb3b8179
10
- sudo: false
11
- before_install: gem install bundler --no-doc
12
- before_script:
13
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
14
- - chmod +x ./cc-test-reporter
15
- - ./cc-test-reporter before-build
16
- script:
17
- - COVERAGE=true bundle exec rake spec:rspec
18
- after_script:
19
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
20
- branches:
21
- only:
22
- - master