fix 1.0.0.beta8 → 1.0.0.beta10
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/LICENSE.md +2 -2
- data/README.md +27 -26
- data/lib/fix/dsl.rb +15 -13
- data/lib/fix/matcher.rb +9 -9
- data/lib/fix/requirement.rb +5 -80
- data/lib/fix/run.rb +3 -3
- data/lib/fix/set.rb +25 -50
- data/lib/fix.rb +1 -1
- data/lib/kernel.rb +8 -6
- metadata +13 -127
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af0a01072f39d7c105aff0bde77c97ce31c9aae8a1144e29a00b9098017cb436
|
4
|
+
data.tar.gz: cab7ff1e39fc58599b712ff53597534535e86bf1422f0f10c926e14d1e267e3f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90f831b90a8faaabf56db03f17d03905e6c41eb18e0f1873db78e0de30540e46b4b395c7fb19f80b3ccbc6b3e560978c42fb0ff8066b6b912151f2785249b51b
|
7
|
+
data.tar.gz: 4b1f58e67584042977f803b53119d090e76f9848b6b470a86aeefaa5f5a195afe11f3ab98d3383e1c5e1e819ff570b890bff58aa734d2c19c6e3079d75a95ffd
|
data/LICENSE.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
The MIT License
|
1
|
+
# The MIT License
|
2
2
|
|
3
|
-
Copyright (c) 2014-
|
3
|
+
Copyright (c) 2014-2024 Cyril Kato
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
@@ -1,38 +1,36 @@
|
|
1
1
|
# Fix
|
2
2
|
|
3
3
|
[](https://fixrb.dev/)
|
4
|
-
[](https://github.com/fixrb/fix/
|
4
|
+
[](https://github.com/fixrb/fix/tags)
|
5
5
|
[](https://rubydoc.info/github/fixrb/fix/main)
|
6
|
-
[](https://github.com/fixrb/fix/actions?query=workflow%3Aruby+branch%3Amain)
|
7
7
|
[](https://github.com/fixrb/fix/actions?query=workflow%3Arubocop+branch%3Amain)
|
8
8
|
[](https://github.com/fixrb/fix/raw/main/LICENSE.md)
|
9
9
|
|
10
|
-
|
10
|
+

|
11
11
|
|
12
|
-
|
12
|
+
## Project Goals
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
* Be minimalist and easy to use.
|
19
|
-
* Run tests quickly.
|
14
|
+
- **Distinguish Specifications from Examples**: Clear separation between what is expected (specifications) and how it's demonstrated (examples).
|
15
|
+
- **Logic-Free Specification Documents**: Create specifications that are straightforward and free of complex logic, focusing purely on defining expected behaviors.
|
16
|
+
- **Nuanced Semantic Language in Specifications**: Utilize a rich, nuanced semantic language, similar to that in RFC 2119, employing keywords like MUST, SHOULD, and MAY to define different levels of requirement in specifications.
|
17
|
+
- **Fast and Individual Test Execution**: Enable quick execution of tests on an individual basis, providing immediate feedback on compliance with specifications.
|
20
18
|
|
21
19
|
## Installation
|
22
20
|
|
23
|
-
Add
|
21
|
+
Add to your Gemfile:
|
24
22
|
|
25
23
|
```ruby
|
26
|
-
gem "fix", ">= 1.0.0.
|
24
|
+
gem "fix", ">= 1.0.0.beta10"
|
27
25
|
```
|
28
26
|
|
29
|
-
|
27
|
+
Then execute:
|
30
28
|
|
31
29
|
```sh
|
32
|
-
bundle
|
30
|
+
bundle install
|
33
31
|
```
|
34
32
|
|
35
|
-
Or install it yourself
|
33
|
+
Or install it yourself:
|
36
34
|
|
37
35
|
```sh
|
38
36
|
gem install fix --pre
|
@@ -40,7 +38,7 @@ gem install fix --pre
|
|
40
38
|
|
41
39
|
## Example
|
42
40
|
|
43
|
-
|
41
|
+
Specifications for a `Duck` class:
|
44
42
|
|
45
43
|
```ruby
|
46
44
|
# examples/duck/fix.rb
|
@@ -65,10 +63,11 @@ Fix :Duck do
|
|
65
63
|
end
|
66
64
|
```
|
67
65
|
|
68
|
-
|
66
|
+
Implementing the `Duck` class:
|
69
67
|
|
70
68
|
```ruby
|
71
69
|
# examples/duck/app.rb
|
70
|
+
|
72
71
|
class Duck
|
73
72
|
def walks
|
74
73
|
"Klop klop!"
|
@@ -84,7 +83,7 @@ class Duck
|
|
84
83
|
end
|
85
84
|
```
|
86
85
|
|
87
|
-
|
86
|
+
Running the test:
|
88
87
|
|
89
88
|
```ruby
|
90
89
|
# examples/duck/test.rb
|
@@ -92,14 +91,16 @@ And we run this test:
|
|
92
91
|
require_relative "app"
|
93
92
|
require_relative "fix"
|
94
93
|
|
95
|
-
Fix[:Duck].
|
94
|
+
Fix[:Duck].test { Duck.new }
|
96
95
|
```
|
97
96
|
|
97
|
+
Execute:
|
98
|
+
|
98
99
|
```sh
|
99
100
|
ruby examples/duck/test.rb
|
100
101
|
```
|
101
102
|
|
102
|
-
|
103
|
+
Expected output:
|
103
104
|
|
104
105
|
```txt
|
105
106
|
(irb):3 Success: expected #<Duck:0x00007fb2fa208708> to be an instance of Duck.
|
@@ -111,10 +112,10 @@ We should see this output:
|
|
111
112
|
|
112
113
|
## Contact
|
113
114
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
115
|
+
- [Home page](https://fixrb.dev/)
|
116
|
+
- [Source code](https://github.com/fixrb/fix)
|
117
|
+
- [API Documentation](https://rubydoc.info/gems/fix)
|
118
|
+
- [Twitter](https://twitter.com/fix_rb)
|
118
119
|
|
119
120
|
## Versioning
|
120
121
|
|
@@ -124,11 +125,11 @@ __Fix__ follows [Semantic Versioning 2.0](https://semver.org/).
|
|
124
125
|
|
125
126
|
The [gem](https://rubygems.org/gems/fix) is available as open source under the terms of the [MIT License](https://github.com/fixrb/fix/raw/main/LICENSE.md).
|
126
127
|
|
127
|
-
|
128
|
+
---
|
128
129
|
|
129
130
|
<p>
|
130
131
|
This project is sponsored by:<br />
|
131
132
|
<a href="https://sashite.com/"><img
|
132
133
|
src="https://github.com/fixrb/fix/raw/main/img/sashite.png"
|
133
|
-
alt="
|
134
|
+
alt="Sashité" /></a>
|
134
135
|
</p>
|
data/lib/fix/dsl.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "defi"
|
3
|
+
require "defi/method"
|
4
4
|
|
5
5
|
require_relative "matcher"
|
6
6
|
require_relative "requirement"
|
@@ -22,14 +22,15 @@ module Fix
|
|
22
22
|
# let(:name) { "Bob" }
|
23
23
|
# end
|
24
24
|
#
|
25
|
-
# @param name
|
26
|
-
# @
|
25
|
+
# @param name [String, Symbol] The name of the property.
|
26
|
+
# @yield The block that defines the property's value
|
27
|
+
# @yieldreturn [Object] The value to be returned by the property
|
27
28
|
#
|
28
29
|
# @return [Symbol] A private method that define the block content.
|
29
30
|
#
|
30
31
|
# @api public
|
31
|
-
def self.let(name, &
|
32
|
-
private define_method(name, &
|
32
|
+
def self.let(name, &)
|
33
|
+
private define_method(name, &)
|
33
34
|
end
|
34
35
|
|
35
36
|
# Defines an example group with user-defined properties that describes a
|
@@ -39,20 +40,21 @@ module Fix
|
|
39
40
|
# require "fix"
|
40
41
|
#
|
41
42
|
# Fix do
|
42
|
-
# with :
|
43
|
+
# with password: "secret" do
|
43
44
|
# it MUST be true
|
44
45
|
# end
|
45
46
|
# end
|
46
47
|
#
|
47
48
|
# @param kwargs [Hash] The list of propreties.
|
48
|
-
# @
|
49
|
+
# @yield The block that defines the specs for this context
|
50
|
+
# @yieldreturn [void]
|
49
51
|
#
|
50
52
|
# @api public
|
51
|
-
def self.with(**kwargs, &
|
53
|
+
def self.with(**kwargs, &)
|
52
54
|
klass = ::Class.new(self)
|
53
55
|
klass.const_get(:CONTEXTS) << klass
|
54
56
|
kwargs.each { |name, value| klass.let(name) { value } }
|
55
|
-
klass.instance_eval(&
|
57
|
+
klass.instance_eval(&)
|
56
58
|
klass
|
57
59
|
end
|
58
60
|
|
@@ -75,10 +77,10 @@ module Fix
|
|
75
77
|
klass = ::Class.new(self)
|
76
78
|
klass.const_get(:CONTEXTS) << klass
|
77
79
|
|
78
|
-
const_set("Child#{block.object_id}", klass)
|
80
|
+
const_set(:"Child#{block.object_id}", klass)
|
79
81
|
|
80
82
|
klass.define_singleton_method(:challenges) do
|
81
|
-
challenge = ::Defi.
|
83
|
+
challenge = ::Defi::Method.new(method_name, *args, **kwargs)
|
82
84
|
super() + [challenge]
|
83
85
|
end
|
84
86
|
|
@@ -98,14 +100,14 @@ module Fix
|
|
98
100
|
location = caller_locations(1, 1).fetch(0)
|
99
101
|
location = [location.path, location.lineno].join(":")
|
100
102
|
|
101
|
-
define_method("test_#{requirement.object_id}") do
|
103
|
+
define_method(:"test_#{requirement.object_id}") do
|
102
104
|
[location, requirement, self.class.challenges]
|
103
105
|
end
|
104
106
|
end
|
105
107
|
|
106
108
|
# The list of challenges to be addressed to the object to be tested.
|
107
109
|
#
|
108
|
-
# @return [Array<Defi::
|
110
|
+
# @return [Array<Defi::Method>] A list of challenges.
|
109
111
|
def self.challenges
|
110
112
|
[]
|
111
113
|
end
|
data/lib/fix/matcher.rb
CHANGED
@@ -181,14 +181,12 @@ module Fix
|
|
181
181
|
#
|
182
182
|
# @param object [#object_id] An object.
|
183
183
|
# @param method [Symbol] The name of a method.
|
184
|
-
# @param args [Array] A list of arguments.
|
185
|
-
# @param kwargs [Hash] A list of keyword arguments.
|
186
184
|
#
|
187
185
|
# @return [#matches?] A change matcher.
|
188
186
|
#
|
189
187
|
# @api public
|
190
|
-
def change(object, method,
|
191
|
-
::Matchi::Change.new(object, method,
|
188
|
+
def change(object, method, ...)
|
189
|
+
::Matchi::Change.new(object, method, ...)
|
192
190
|
end
|
193
191
|
|
194
192
|
# Satisfy matcher
|
@@ -197,13 +195,15 @@ module Fix
|
|
197
195
|
# matcher = satisfy { |value| value == 42 }
|
198
196
|
# matcher.matches? { 42 } # => true
|
199
197
|
#
|
200
|
-
# @
|
198
|
+
# @yield [value] A block that defines the satisfaction criteria
|
199
|
+
# @yieldparam value The value to test
|
200
|
+
# @yieldreturn [Boolean] true if the value satisfies the criteria
|
201
201
|
#
|
202
202
|
# @return [#matches?] A satisfy matcher.
|
203
203
|
#
|
204
204
|
# @api public
|
205
|
-
def satisfy(&
|
206
|
-
::Matchi::Satisfy.new(&
|
205
|
+
def satisfy(&)
|
206
|
+
::Matchi::Satisfy.new(&)
|
207
207
|
end
|
208
208
|
|
209
209
|
private
|
@@ -214,10 +214,10 @@ module Fix
|
|
214
214
|
# matcher = be_empty
|
215
215
|
# matcher.matches? { [] } # => true
|
216
216
|
# matcher.matches? { [4] } # => false
|
217
|
-
def method_missing(name,
|
217
|
+
def method_missing(name, ...)
|
218
218
|
return super unless predicate_matcher_name?(name)
|
219
219
|
|
220
|
-
::Matchi::Predicate.new(name,
|
220
|
+
::Matchi::Predicate.new(name, ...)
|
221
221
|
end
|
222
222
|
|
223
223
|
# :nocov:
|
data/lib/fix/requirement.rb
CHANGED
@@ -20,22 +20,7 @@ module Fix
|
|
20
20
|
#
|
21
21
|
# @api public
|
22
22
|
def MUST(matcher)
|
23
|
-
::Spectus::Requirement::Required.new(
|
24
|
-
isolate: false,
|
25
|
-
negate: false,
|
26
|
-
matcher: matcher
|
27
|
-
)
|
28
|
-
end
|
29
|
-
|
30
|
-
# @see MUST
|
31
|
-
#
|
32
|
-
# @api public
|
33
|
-
def MUST!(matcher)
|
34
|
-
::Spectus::Requirement::Required.new(
|
35
|
-
isolate: true,
|
36
|
-
negate: false,
|
37
|
-
matcher: matcher
|
38
|
-
)
|
23
|
+
::Spectus::Requirement::Required.new(negate: false, matcher:)
|
39
24
|
end
|
40
25
|
|
41
26
|
# This method mean that the definition is an absolute prohibition of the specification.
|
@@ -46,22 +31,7 @@ module Fix
|
|
46
31
|
#
|
47
32
|
# @api public
|
48
33
|
def MUST_NOT(matcher)
|
49
|
-
::Spectus::Requirement::Required.new(
|
50
|
-
isolate: false,
|
51
|
-
negate: true,
|
52
|
-
matcher: matcher
|
53
|
-
)
|
54
|
-
end
|
55
|
-
|
56
|
-
# @see MUST_NOT
|
57
|
-
#
|
58
|
-
# @api public
|
59
|
-
def MUST_NOT!(matcher)
|
60
|
-
::Spectus::Requirement::Required.new(
|
61
|
-
isolate: true,
|
62
|
-
negate: true,
|
63
|
-
matcher: matcher
|
64
|
-
)
|
34
|
+
::Spectus::Requirement::Required.new(negate: true, matcher:)
|
65
35
|
end
|
66
36
|
|
67
37
|
# This method mean that there may exist valid reasons in particular
|
@@ -74,22 +44,7 @@ module Fix
|
|
74
44
|
#
|
75
45
|
# @api public
|
76
46
|
def SHOULD(matcher)
|
77
|
-
::Spectus::Requirement::Recommended.new(
|
78
|
-
isolate: false,
|
79
|
-
negate: false,
|
80
|
-
matcher: matcher
|
81
|
-
)
|
82
|
-
end
|
83
|
-
|
84
|
-
# @see SHOULD
|
85
|
-
#
|
86
|
-
# @api public
|
87
|
-
def SHOULD!(matcher)
|
88
|
-
::Spectus::Requirement::Recommended.new(
|
89
|
-
isolate: true,
|
90
|
-
negate: false,
|
91
|
-
matcher: matcher
|
92
|
-
)
|
47
|
+
::Spectus::Requirement::Recommended.new(negate: false, matcher:)
|
93
48
|
end
|
94
49
|
|
95
50
|
# This method mean that there may exist valid reasons in particular
|
@@ -104,22 +59,7 @@ module Fix
|
|
104
59
|
#
|
105
60
|
# @api public
|
106
61
|
def SHOULD_NOT(matcher)
|
107
|
-
::Spectus::Requirement::Recommended.new(
|
108
|
-
isolate: false,
|
109
|
-
negate: true,
|
110
|
-
matcher: matcher
|
111
|
-
)
|
112
|
-
end
|
113
|
-
|
114
|
-
# @see SHOULD_NOT
|
115
|
-
#
|
116
|
-
# @api public
|
117
|
-
def SHOULD_NOT!(matcher)
|
118
|
-
::Spectus::Requirement::Recommended.new(
|
119
|
-
isolate: true,
|
120
|
-
negate: true,
|
121
|
-
matcher: matcher
|
122
|
-
)
|
62
|
+
::Spectus::Requirement::Recommended.new(negate: true, matcher:)
|
123
63
|
end
|
124
64
|
|
125
65
|
# This method mean that an item is truly optional.
|
@@ -139,22 +79,7 @@ module Fix
|
|
139
79
|
#
|
140
80
|
# @api public
|
141
81
|
def MAY(matcher)
|
142
|
-
::Spectus::Requirement::Optional.new(
|
143
|
-
isolate: false,
|
144
|
-
negate: false,
|
145
|
-
matcher: matcher
|
146
|
-
)
|
147
|
-
end
|
148
|
-
|
149
|
-
# @see MAY
|
150
|
-
#
|
151
|
-
# @api public
|
152
|
-
def MAY!(matcher)
|
153
|
-
::Spectus::Requirement::Optional.new(
|
154
|
-
isolate: true,
|
155
|
-
negate: false,
|
156
|
-
matcher: matcher
|
157
|
-
)
|
82
|
+
::Spectus::Requirement::Optional.new(negate: false, matcher:)
|
158
83
|
end
|
159
84
|
|
160
85
|
# rubocop:enable Naming/MethodName
|
data/lib/fix/run.rb
CHANGED
@@ -13,12 +13,12 @@ module Fix
|
|
13
13
|
# @return [::Spectus::Requirement::Base] An expectation.
|
14
14
|
attr_reader :requirement
|
15
15
|
|
16
|
-
# @return [Array<::Defi::
|
16
|
+
# @return [Array<::Defi::Method>] A list of challenges.
|
17
17
|
attr_reader :challenges
|
18
18
|
|
19
19
|
# @param environment [::Fix::Dsl] A context instance.
|
20
20
|
# @param requirement [::Spectus::Requirement::Base] An expectation.
|
21
|
-
# @param challenges [Array<::Defi::
|
21
|
+
# @param challenges [Array<::Defi::Method>] A list of challenges.
|
22
22
|
def initialize(environment, requirement, *challenges)
|
23
23
|
@environment = environment
|
24
24
|
@requirement = requirement
|
@@ -33,7 +33,7 @@ module Fix
|
|
33
33
|
# @return [::Expresenter::Pass] A passed spec instance.
|
34
34
|
#
|
35
35
|
# @see https://github.com/fixrb/expresenter
|
36
|
-
def
|
36
|
+
def test(&subject)
|
37
37
|
requirement.call { actual_value(&subject) }
|
38
38
|
rescue ::Expresenter::Fail => e
|
39
39
|
e
|
data/lib/fix/set.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "English"
|
4
|
+
|
3
5
|
require_relative "doc"
|
4
6
|
require_relative "run"
|
5
7
|
|
@@ -8,85 +10,58 @@ module Fix
|
|
8
10
|
#
|
9
11
|
# @api private
|
10
12
|
class Set
|
11
|
-
# The type of result.
|
12
|
-
#
|
13
|
-
# Passed expectations can be classified as:
|
14
|
-
#
|
15
|
-
# * `success`
|
16
|
-
# * `warning`
|
17
|
-
# * `info`
|
18
|
-
#
|
19
|
-
# Failed expectations can be classified as:
|
20
|
-
#
|
21
|
-
# * `failure`
|
22
|
-
# * `error`
|
23
|
-
LOG_LEVELS = %w[
|
24
|
-
none
|
25
|
-
error
|
26
|
-
failure
|
27
|
-
warning
|
28
|
-
info
|
29
|
-
success
|
30
|
-
].freeze
|
31
|
-
|
32
13
|
# @return [Array] A list of specifications.
|
33
14
|
attr_reader :specs
|
34
15
|
|
16
|
+
# Load specifications from a constant name.
|
17
|
+
#
|
35
18
|
# @param name [String, Symbol] The constant name of the specifications.
|
19
|
+
# @return [Set] A new Set instance containing the loaded specifications.
|
36
20
|
#
|
37
21
|
# @api public
|
38
22
|
def self.load(name)
|
39
23
|
new(*Doc.fetch(name))
|
40
24
|
end
|
41
25
|
|
26
|
+
# Initialize a new Set with given contexts.
|
27
|
+
#
|
42
28
|
# @param contexts [Array<::Fix::Dsl>] The list of contexts document.
|
43
29
|
def initialize(*contexts)
|
44
|
-
@specs
|
45
|
-
@passed = true
|
30
|
+
@specs = Doc.specs(*contexts).shuffle
|
46
31
|
end
|
47
32
|
|
48
|
-
#
|
33
|
+
# Run the test suite against the provided subject.
|
49
34
|
#
|
35
|
+
# @yield The block of code to be tested
|
36
|
+
# @yieldreturn [Object] The result of the code being tested
|
37
|
+
# @return [Boolean] true if all tests pass, exits with false otherwise
|
50
38
|
# @raise [::SystemExit] The test set failed!
|
51
39
|
#
|
52
40
|
# @api public
|
53
|
-
def
|
54
|
-
|
55
|
-
|
56
|
-
specs.each do |environment, location, requirement, challenges|
|
57
|
-
runner = Run.new(environment, requirement, *challenges)
|
58
|
-
result = runner.against(&subject)
|
59
|
-
|
60
|
-
failed! if result.failed?
|
61
|
-
report!(location, result, log_level: log_level)
|
62
|
-
end
|
63
|
-
|
64
|
-
passed? || ::Kernel.exit(false)
|
41
|
+
def test(&)
|
42
|
+
suite_passed?(&) || ::Kernel.exit(false)
|
65
43
|
end
|
66
44
|
|
67
45
|
private
|
68
46
|
|
69
|
-
def
|
70
|
-
specs.
|
47
|
+
def suite_passed?(&subject)
|
48
|
+
specs.all? { |spec| run_spec(*spec, &subject) }
|
71
49
|
end
|
72
50
|
|
73
|
-
def
|
74
|
-
|
51
|
+
def run_spec(env, location, requirement, challenges, &subject)
|
52
|
+
::Process.fork { lab(env, location, requirement, challenges, &subject) }
|
53
|
+
::Process.wait
|
54
|
+
$CHILD_STATUS.success?
|
75
55
|
end
|
76
56
|
|
77
|
-
|
78
|
-
|
79
|
-
|
57
|
+
def lab(env, location, requirement, challenges, &)
|
58
|
+
result = Run.new(env, requirement, *challenges).test(&)
|
59
|
+
report!(location, result)
|
60
|
+
::Kernel.exit(result.passed?)
|
80
61
|
end
|
81
62
|
|
82
|
-
def report!(path, result
|
83
|
-
return unless report?(result, log_level: log_level)
|
84
|
-
|
63
|
+
def report!(path, result)
|
85
64
|
puts "#{path} #{result.colored_string}"
|
86
65
|
end
|
87
|
-
|
88
|
-
def report?(result, log_level:)
|
89
|
-
LOG_LEVELS[1..log_level].any? { |name| result.public_send("#{name}?") }
|
90
|
-
end
|
91
66
|
end
|
92
67
|
end
|
data/lib/fix.rb
CHANGED
data/lib/kernel.rb
CHANGED
@@ -17,20 +17,22 @@ module Kernel
|
|
17
17
|
# end
|
18
18
|
#
|
19
19
|
# # A test
|
20
|
-
# Fix[:Answer].
|
20
|
+
# Fix[:Answer].test { 42 }
|
21
21
|
#
|
22
|
-
# @param name
|
23
|
-
# @
|
22
|
+
# @param name [String, Symbol] The constant name of the specifications.
|
23
|
+
# @yield The specifications block that defines the test requirements
|
24
|
+
# @yieldreturn [void]
|
24
25
|
#
|
25
|
-
# @return [#
|
26
|
+
# @return [#test] The collection of specifications.
|
26
27
|
#
|
27
28
|
# @api public
|
28
|
-
def Fix(name = nil, &
|
29
|
+
def Fix(name = nil, &)
|
29
30
|
klass = ::Class.new(::Fix::Dsl)
|
30
31
|
klass.const_set(:CONTEXTS, [klass])
|
31
|
-
klass.instance_eval(&
|
32
|
+
klass.instance_eval(&)
|
32
33
|
::Fix::Doc.const_set(name, klass) unless name.nil?
|
33
34
|
::Fix::Set.new(*klass.const_get(:CONTEXTS))
|
34
35
|
end
|
36
|
+
|
35
37
|
# rubocop:enable Naming/MethodName
|
36
38
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cyril Kato
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2024-12-24 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: defi
|
@@ -16,154 +15,42 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - "~>"
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
18
|
+
version: 3.0.0
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - "~>"
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
25
|
+
version: 3.0.0
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: matchi
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
30
29
|
requirements:
|
31
30
|
- - "~>"
|
32
31
|
- !ruby/object:Gem::Version
|
33
|
-
version: 3.3.
|
32
|
+
version: 3.3.2
|
34
33
|
type: :runtime
|
35
34
|
prerelease: false
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
37
36
|
requirements:
|
38
37
|
- - "~>"
|
39
38
|
- !ruby/object:Gem::Version
|
40
|
-
version: 3.3.
|
39
|
+
version: 3.3.2
|
41
40
|
- !ruby/object:Gem::Dependency
|
42
41
|
name: spectus
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
44
43
|
requirements:
|
45
44
|
- - "~>"
|
46
45
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
46
|
+
version: 5.0.0
|
48
47
|
type: :runtime
|
49
48
|
prerelease: false
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
51
50
|
requirements:
|
52
51
|
- - "~>"
|
53
52
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: bundler
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
|
-
type: :development
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: rake
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - ">="
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :development
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - ">="
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: rubocop-md
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
|
-
- !ruby/object:Gem::Dependency
|
98
|
-
name: rubocop-performance
|
99
|
-
requirement: !ruby/object:Gem::Requirement
|
100
|
-
requirements:
|
101
|
-
- - ">="
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
version: '0'
|
104
|
-
type: :development
|
105
|
-
prerelease: false
|
106
|
-
version_requirements: !ruby/object:Gem::Requirement
|
107
|
-
requirements:
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: '0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: rubocop-rake
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - ">="
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0'
|
118
|
-
type: :development
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - ">="
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: rubocop-thread_safety
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - ">="
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '0'
|
132
|
-
type: :development
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - ">="
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: simplecov
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: yard
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - ">="
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '0'
|
160
|
-
type: :development
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - ">="
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '0'
|
53
|
+
version: 5.0.0
|
167
54
|
description: Specing framework.
|
168
55
|
email: contact@cyril.email
|
169
56
|
executables: []
|
@@ -188,7 +75,7 @@ metadata:
|
|
188
75
|
documentation_uri: https://rubydoc.info/gems/fix
|
189
76
|
source_code_uri: https://github.com/fixrb/fix
|
190
77
|
wiki_uri: https://github.com/fixrb/fix/wiki
|
191
|
-
|
78
|
+
rubygems_mfa_required: 'true'
|
192
79
|
rdoc_options: []
|
193
80
|
require_paths:
|
194
81
|
- lib
|
@@ -196,15 +83,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
196
83
|
requirements:
|
197
84
|
- - ">="
|
198
85
|
- !ruby/object:Gem::Version
|
199
|
-
version: 2.
|
86
|
+
version: 3.2.0
|
200
87
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
88
|
requirements:
|
202
|
-
- - "
|
89
|
+
- - ">="
|
203
90
|
- !ruby/object:Gem::Version
|
204
|
-
version:
|
91
|
+
version: '0'
|
205
92
|
requirements: []
|
206
|
-
rubygems_version: 3.
|
207
|
-
signing_key:
|
93
|
+
rubygems_version: 3.6.2
|
208
94
|
specification_version: 4
|
209
95
|
summary: Specing framework.
|
210
96
|
test_files: []
|