defmastership-core 1.5.3 → 1.5.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87ef2f8df723ddacc30b17efb600a7cfacde2566599dce03becfe3fe2cbe2b9a
4
- data.tar.gz: 2d646e28f1792c32040dd005e16587bf4cfdd06e41fcc71eeca405a7912e592b
3
+ metadata.gz: 5c5a143b6265b07fb4028aa17358c2a749e8dbbf4f261974b4916b7b1d1334f3
4
+ data.tar.gz: 67b0ba49e124af3163fad2d4c3f84ed283f10a500c95d6d27bd8c59a73b25388
5
5
  SHA512:
6
- metadata.gz: 9d937b2b863453035dc44671a218f35ebcd0fb7a835475ad33adf408c8a199a34ab57c5343d8381965c26965c11eb7c45be66a634a3013687bdcd1bedeac0304
7
- data.tar.gz: a683dee22f180c43bc611be760b25e17980286fe6009e6fbeb29006b1bda495bfa86d152c2b0a06eaaa5f3420a8e89a2b8e7a4bb320bd42d60fa5992234d7cad
6
+ metadata.gz: 53699baf54b7f01cd8b622ccafa9ee330e63e56e56478cb8592ef13c2bebd51201fc0f1e057617c2c36be43c22c495b6abea69b571625b9794eb9cf4b1586fc4
7
+ data.tar.gz: 3d6b5da5d13a843b28288504678b0b7d5b6a664cf6bfafbf36eace3bc3bae2f33e9530af86d8405c01b47c37a19edcc38c7037f4ee3ace8d403e528e34a886ca
data/Gemfile CHANGED
@@ -11,11 +11,11 @@ group :development do
11
11
  # needed by yard to render documentation
12
12
  gem 'asciidoctor', '~> 2.0'
13
13
  # code duplication
14
- gem 'flay', '~> 2.13'
14
+ gem 'flay', '~> 2.14'
15
15
  # automatic test run
16
16
  gem 'guard', '~> 2.19'
17
17
  # automatic update invocation
18
- gem 'guard-bundler', '~> 3.0'
18
+ # gem 'guard-bundler', '~> 3.0'
19
19
  # automatic style check
20
20
  gem 'guard-reek', '~> 1.2'
21
21
  # automatic tdd
@@ -27,13 +27,13 @@ group :development do
27
27
  # to parse and execute Rakefile
28
28
  gem 'rake', '~> 13.3'
29
29
  # needed by yard to render documentation
30
- gem 'rdoc', '~> 6.14'
30
+ gem 'rdoc', '~> 7.0'
31
31
  # tdd
32
32
  gem 'rspec', '~> 3.13'
33
33
  # code needs to be clean
34
- gem 'rubocop', '1.80'
34
+ gem 'rubocop', '1.82'
35
35
  # code needs to be clean
36
- gem 'rubocop-performance', '~> 1.25'
36
+ gem 'rubocop-performance', '~> 1.26'
37
37
  # test code needs to be clean
38
38
  gem 'rubocop-rspec', '~> 3.6'
39
39
  # Rakefiles need to be clean
@@ -41,7 +41,7 @@ group :development do
41
41
  # detect smelling code
42
42
  gem 'reek', '~> 6.5'
43
43
  # my code needs to be critiqued
44
- gem 'rubycritic', '~> 4.10'
44
+ gem 'rubycritic', '~> 4.11'
45
45
  # Doc need to be clean
46
46
  gem 'rubocop-yard', '~> 1.0'
47
47
  # What is tdd without code coverage ?
data/config/mutant.yml CHANGED
@@ -7,10 +7,11 @@ integration:
7
7
  arguments:
8
8
  - --options=config/rspec
9
9
  - spec
10
+ environment_variables:
11
+ CODE_COVERAGE_IN_RSPEC: disabled
10
12
  requires:
11
13
  - defmastership/core/constants
12
14
  - defmastership/core/parsing_state
13
15
  matcher:
14
16
  subjects:
15
17
  - 'Defmastership::Core*'
16
- # fail_fast: true
@@ -49,7 +49,7 @@ module Defmastership
49
49
  public_constant :REFERENCE
50
50
 
51
51
  # [Regexp] match reference with optional version and checksum
52
- REF_WITH_OPT_VER_CHK = "\\s*#{REFERENCE}#{DEF_VERSION_AND_CHECKSUM}\\s*".freeze
52
+ REF_WITH_OPT_VER_CHK = "#{REFERENCE}#{DEF_VERSION_AND_CHECKSUM}".freeze
53
53
  public_constant :REF_WITH_OPT_VER_CHK
54
54
 
55
55
  # [Regexp] match defintion summary
@@ -77,17 +77,14 @@ module Defmastership
77
77
 
78
78
  # [Regexp] match a definition line
79
79
  definition_re_string = <<~"DEF"
80
- ^
81
- \\s*
82
- \\[
80
+ ^\\s*\\[
83
81
  #{DEF_KEYWORD}
84
82
  #{DEF_TYPE}
85
83
  ,
86
- #{REF_WITH_OPT_VER_CHK}
84
+ \\s*#{REF_WITH_OPT_VER_CHK}
87
85
  #{DEF_SUMMARY}
88
86
  #{DEF_LABELS}
89
- \\s*
90
- \\]
87
+ \\s*\\]
91
88
  DEF
92
89
  # [Regexp] match a definition line
93
90
  DEFINITION = Regexp.new(definition_re_string, Regexp::EXTENDED)
@@ -5,7 +5,7 @@ module Defmastership
5
5
  # Common to defmastership and asciidoctor-defmastership
6
6
  module Core
7
7
  # [String] Gem version
8
- VERSION = '1.5.3'
8
+ VERSION = '1.5.5'
9
9
  public_constant :VERSION
10
10
  end
11
11
  end
data/spec/spec_helper.rb CHANGED
@@ -1,20 +1,22 @@
1
1
  # Copyright (c) 2020 Jerome Arbez-Gindre
2
2
  # frozen_string_literal: true
3
3
 
4
- require('simplecov')
4
+ unless ENV['CODE_COVERAGE_IN_RSPEC'] && ENV['DISABLE_CODE_COVERAGE_IN_RSPEC'] != 'disabled'
5
+ require('simplecov')
5
6
 
6
- SimpleCov.start do
7
- command_name 'spec:unit'
7
+ SimpleCov.start do
8
+ command_name 'spec:unit'
8
9
 
9
- add_group 'Libraries', 'lib'
10
- add_group 'Unit test', 'spec/unit'
10
+ add_group 'Libraries', 'lib'
11
+ add_group 'Unit test', 'spec/unit'
11
12
 
12
- add_filter 'config'
13
- add_filter 'vendor'
14
- add_filter 'set_join_hack'
13
+ add_filter 'config'
14
+ add_filter 'vendor'
15
+ add_filter 'set_join_hack'
15
16
 
16
- enable_coverage :branch
17
- minimum_coverage line: 100, branch: 100
17
+ enable_coverage :branch
18
+ minimum_coverage line: 100, branch: 100
19
+ end
18
20
  end
19
21
 
20
22
  RSpec::Matchers.define(:matchdata_including) do |h|
@@ -60,8 +60,7 @@ namespace 'quality' do
60
60
  all: [
61
61
  'quality:rubocop',
62
62
  'quality:reek',
63
- 'quality:flay',
64
- 'quality:rubycritic'
63
+ 'quality:flay'
65
64
  ]
66
65
  )
67
66
  end
data/tasks/test.rake CHANGED
@@ -8,6 +8,18 @@ namespace 'test' do
8
8
  t.rspec_opts = ['--options config/rspec']
9
9
  end
10
10
 
11
+ desc 'mutation testing'
12
+ task :mutation do
13
+ sh 'mutant run'
14
+ end
15
+
16
+ namespace 'mutation' do
17
+ desc 'mutation testing (fail fast)'
18
+ task :ff do
19
+ sh 'mutant run --fail-fast'
20
+ end
21
+ end
22
+
11
23
  desc 'Runs all unit tests'
12
24
  task(all: ['test:spec'])
13
25
  end
@@ -17,3 +29,6 @@ task(spec: 'test:spec')
17
29
 
18
30
  desc 'Synonym for test:all'
19
31
  task(test: 'test:all')
32
+
33
+ desc 'Synonym for test:mutation'
34
+ task(mutation: 'test:mutation')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: defmastership-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jérôme Arbez-Gindre
@@ -58,7 +58,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  requirements: []
61
- rubygems_version: 3.6.9
61
+ rubygems_version: 4.0.2
62
62
  specification_version: 4
63
63
  summary: Handling of references and definitions with asciidoctor - common code
64
64
  test_files: []