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 +4 -4
- data/Gemfile +6 -6
- data/config/mutant.yml +2 -1
- data/lib/defmastership/core/constants.rb +4 -7
- data/lib/defmastership/core/version.rb +1 -1
- data/spec/spec_helper.rb +12 -10
- data/tasks/code_quality.rake +1 -2
- data/tasks/test.rake +15 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5c5a143b6265b07fb4028aa17358c2a749e8dbbf4f261974b4916b7b1d1334f3
|
|
4
|
+
data.tar.gz: 67b0ba49e124af3163fad2d4c3f84ed283f10a500c95d6d27bd8c59a73b25388
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
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', '~>
|
|
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.
|
|
34
|
+
gem 'rubocop', '1.82'
|
|
35
35
|
# code needs to be clean
|
|
36
|
-
gem 'rubocop-performance', '~> 1.
|
|
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.
|
|
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 = "
|
|
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
|
-
|
|
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)
|
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
|
-
|
|
4
|
+
unless ENV['CODE_COVERAGE_IN_RSPEC'] && ENV['DISABLE_CODE_COVERAGE_IN_RSPEC'] != 'disabled'
|
|
5
|
+
require('simplecov')
|
|
5
6
|
|
|
6
|
-
SimpleCov.start do
|
|
7
|
-
|
|
7
|
+
SimpleCov.start do
|
|
8
|
+
command_name 'spec:unit'
|
|
8
9
|
|
|
9
|
-
|
|
10
|
-
|
|
10
|
+
add_group 'Libraries', 'lib'
|
|
11
|
+
add_group 'Unit test', 'spec/unit'
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
add_filter 'config'
|
|
14
|
+
add_filter 'vendor'
|
|
15
|
+
add_filter 'set_join_hack'
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
|
|
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|
|
data/tasks/code_quality.rake
CHANGED
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.
|
|
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:
|
|
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: []
|