spectus 3.0.8 → 3.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop_todo.yml +6 -4
- data/.travis.yml +4 -4
- data/README.md +1 -1
- data/VERSION.semver +1 -1
- data/checksum/spectus-3.0.8.gem.sha512 +1 -0
- data/lib/spectus.rb +2 -2
- data/lib/spectus/expectation_target.rb +3 -3
- data/lib/spectus/matchers.rb +7 -8
- data/lib/spectus/requirement_level/base.rb +5 -5
- data/lib/spectus/result/base.rb +10 -10
- data/lib/spectus/result/fail.rb +1 -1
- data/spectus.gemspec +3 -3
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 645bb313682da9f93c32ceb0b1372158dae9cb7b02a453fa438b8b0afd4f5a5d
|
4
|
+
data.tar.gz: df28a0e854c5a7522375103394cef6ea9ed7c309bd455d7a34210aac2bc9408c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efbc33f8c658ceb668bb8d3f3a5fdeb17f7d1de7bbad87334ddf15f4e6016d5b5c339d89462ae14aad27f050c25efde3d58419c83e7fdd199f5ef0b4a5f977cf
|
7
|
+
data.tar.gz: ad2bab2ec218593b7b0eae6a2010373db3d01c22a971372f1dc7d90fe6d6f21bba10a1da4829e433aa016be2e1aeab2d624727b572758b5071db64626bd29863
|
data/.gitignore
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2019-
|
3
|
+
# on 2019-10-08 23:18:40 +0200 using RuboCop version 0.75.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
9
|
+
# Offense count: 230
|
10
10
|
# Cop supports --auto-correct.
|
11
|
-
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
11
|
+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
12
12
|
# SupportedHashRocketStyles: key, separator, table
|
13
13
|
# SupportedColonStyles: key, separator, table
|
14
14
|
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
15
15
|
Layout/AlignHash:
|
16
16
|
Exclude:
|
17
|
+
- 'lib/spectus/result/base.rb'
|
17
18
|
- 'test/level/test_high_fail.rb'
|
18
19
|
- 'test/level/test_high_pass.rb'
|
19
20
|
- 'test/level/test_low_fail.rb'
|
@@ -33,7 +34,8 @@ Metrics/MethodLength:
|
|
33
34
|
Metrics/ParameterLists:
|
34
35
|
Max: 10
|
35
36
|
|
36
|
-
# Offense count:
|
37
|
+
# Offense count: 10
|
38
|
+
# Cop supports --auto-correct.
|
37
39
|
# Configuration parameters: PreferredName.
|
38
40
|
Naming/RescuedExceptionsVariableName:
|
39
41
|
Exclude:
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
data/VERSION.semver
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.9
|
@@ -0,0 +1 @@
|
|
1
|
+
a8c66f4d94650243ec088b9b7b0dd66814e4a88c7de6cadb1dd72e0703a92c9facb94dedbb138cd8e383081c8507ea622b9b3f8aced825e4080a64206afdcc70
|
data/lib/spectus.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative File.join
|
3
|
+
require_relative File.join('spectus', 'matchers')
|
4
4
|
|
5
5
|
# Namespace for the Spectus library.
|
6
6
|
#
|
@@ -25,4 +25,4 @@ module Spectus
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
require_relative File.join
|
28
|
+
require_relative File.join('spectus', 'expectation_target')
|
@@ -176,6 +176,6 @@ module Spectus
|
|
176
176
|
end
|
177
177
|
end
|
178
178
|
|
179
|
-
require_relative File.join
|
180
|
-
require_relative File.join
|
181
|
-
require_relative File.join
|
179
|
+
require_relative File.join('requirement_level', 'high')
|
180
|
+
require_relative File.join('requirement_level', 'medium')
|
181
|
+
require_relative File.join('requirement_level', 'low')
|
data/lib/spectus/matchers.rb
CHANGED
@@ -8,13 +8,12 @@ module Spectus
|
|
8
8
|
# @api public
|
9
9
|
#
|
10
10
|
module Matchers
|
11
|
-
Matchi::Matchers.constants.each do |const|
|
12
|
-
name = const
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
.downcase
|
11
|
+
::Matchi::Matchers.constants.each do |const|
|
12
|
+
name = const.to_s
|
13
|
+
.gsub(/::/, '/')
|
14
|
+
.gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2')
|
15
|
+
.gsub(/([a-z\d])([A-Z])/, '\1_\2')
|
16
|
+
.downcase
|
18
17
|
|
19
18
|
# Define a method for the given matcher.
|
20
19
|
#
|
@@ -27,7 +26,7 @@ module Spectus
|
|
27
26
|
#
|
28
27
|
# @return [#matches?] The matcher.
|
29
28
|
define_method name do |*args|
|
30
|
-
Matchi::Matchers.const_get(const)::Matcher.new(*args)
|
29
|
+
::Matchi::Matchers.const_get(const)::Matcher.new(*args)
|
31
30
|
end
|
32
31
|
end
|
33
32
|
end
|
@@ -92,7 +92,7 @@ module Spectus
|
|
92
92
|
#
|
93
93
|
# @return [Sandbox] The sandbox.
|
94
94
|
def sandbox(isolation)
|
95
|
-
isolation ? Aw.fork! { execute } : execute
|
95
|
+
isolation ? ::Aw.fork! { execute } : execute
|
96
96
|
end
|
97
97
|
|
98
98
|
# @return [Sandbox] The sandbox.
|
@@ -103,7 +103,7 @@ module Spectus
|
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
|
-
require_relative File.join
|
107
|
-
require_relative File.join
|
108
|
-
require_relative File.join
|
109
|
-
require_relative File.join
|
106
|
+
require_relative File.join('..', 'report')
|
107
|
+
require_relative File.join('..', 'result', 'fail')
|
108
|
+
require_relative File.join('..', 'result', 'pass')
|
109
|
+
require_relative File.join('..', 'sandbox')
|
data/lib/spectus/result/base.rb
CHANGED
@@ -95,16 +95,16 @@ module Spectus
|
|
95
95
|
# @return [Hash] The properties of the result.
|
96
96
|
def to_h
|
97
97
|
{
|
98
|
-
subject:
|
99
|
-
challenge:
|
100
|
-
actual:
|
101
|
-
expected:
|
102
|
-
got:
|
103
|
-
error:
|
104
|
-
level:
|
105
|
-
negate:
|
106
|
-
valid:
|
107
|
-
result:
|
98
|
+
subject: subject,
|
99
|
+
challenge: challenge.to_h,
|
100
|
+
actual: actual,
|
101
|
+
expected: expected.to_h,
|
102
|
+
got: got,
|
103
|
+
error: error,
|
104
|
+
level: level,
|
105
|
+
negate: negate?,
|
106
|
+
valid: valid?,
|
107
|
+
result: result?
|
108
108
|
}
|
109
109
|
end
|
110
110
|
end
|
data/lib/spectus/result/fail.rb
CHANGED
data/spectus.gemspec
CHANGED
@@ -21,8 +21,8 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency 'matchi', '~> 1.0.4'
|
22
22
|
|
23
23
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
24
|
-
spec.add_development_dependency 'rake', '~>
|
25
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
26
|
-
spec.add_development_dependency 'simplecov', '~> 0.
|
24
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
25
|
+
spec.add_development_dependency 'rubocop', '~> 0.75'
|
26
|
+
spec.add_development_dependency 'simplecov', '~> 0.17'
|
27
27
|
spec.add_development_dependency 'yard', '~> 0.9'
|
28
28
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spectus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Kato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aw
|
@@ -72,42 +72,42 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '13.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '13.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rubocop
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0.
|
89
|
+
version: '0.75'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0.
|
96
|
+
version: '0.75'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: simplecov
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0.
|
103
|
+
version: '0.17'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0.
|
110
|
+
version: '0.17'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: yard
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -171,6 +171,7 @@ files:
|
|
171
171
|
- checksum/spectus-3.0.5.gem.sha512
|
172
172
|
- checksum/spectus-3.0.6.gem.sha512
|
173
173
|
- checksum/spectus-3.0.7.gem.sha512
|
174
|
+
- checksum/spectus-3.0.8.gem.sha512
|
174
175
|
- lib/spectus.rb
|
175
176
|
- lib/spectus/expectation_target.rb
|
176
177
|
- lib/spectus/matchers.rb
|
@@ -204,8 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
205
|
- !ruby/object:Gem::Version
|
205
206
|
version: '0'
|
206
207
|
requirements: []
|
207
|
-
|
208
|
-
rubygems_version: 2.7.6
|
208
|
+
rubygems_version: 3.0.3
|
209
209
|
signing_key:
|
210
210
|
specification_version: 4
|
211
211
|
summary: Expectation library with RFC 2119 keywords.
|