spectus 5.0.0 → 5.0.1

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: 3f0cce51d702c1c3d143fdad6af9384ebe7cbca8718a671d928ca8b5a111fe04
4
- data.tar.gz: 1648b947935ac87ef6c5b02c16a066b92bf44bbcf5d8bfae0d87c07d3697cf91
3
+ metadata.gz: 11f7d2775c0de9fcba11f795927752e4f15aa1de85b63e2d5bd806b82c434bca
4
+ data.tar.gz: ebf62bbee1e7d30003995918b368f0905ee2305a3fb79a242f940837d94c793b
5
5
  SHA512:
6
- metadata.gz: 165ed9b4d2528c514dcf9856124a9da2d43c414757e2bd31716b9098f9fa55c5b4f9db4d65f35a0b94696c9bde2143c40a7285ddc428171496b1f56d285ac87f
7
- data.tar.gz: 8c4a74459502da707d751ac829efccd41bdb9f49667eb7b94d460f93fbf427b25e7c888d16c207889366bb56e51f58ccad6e3716c2709bb28d2af4d5dd985bee
6
+ metadata.gz: 978d85aa4e676d8edea4c94644976a06284820b912602cb98808d1a39cf3ef3e2538bee688da3d7401593710de86b03f4b28b05cc0e6555c45741ca0782c78ad
7
+ data.tar.gz: 9c51ec6b30adb0590bdd514c5c6c74474508ab146a72dbd7ebddc375a6dedc765a7201e18022514cc5634c5f4fb377d064acac2ae0a8832f491437a614fbd83c
data/README.md CHANGED
@@ -8,8 +8,6 @@
8
8
 
9
9
  > A Ruby library for defining expectations with precision, using [RFC 2119](https://www.ietf.org/rfc/rfc2119.txt) compliance levels. 🚥
10
10
 
11
- ![A traffic light with three distinct sections](https://github.com/fixrb/spectus/raw/main/img/spectus.png)
12
-
13
11
  ## Installation
14
12
 
15
13
  Add this line to your application's Gemfile:
@@ -42,10 +40,6 @@ require "spectus"
42
40
 
43
41
  For convenience, we will also instantiate some matchers from the [Matchi library](https://github.com/fixrb/matchi):
44
42
 
45
- ```sh
46
- gem install matchi
47
- ```
48
-
49
43
  ```ruby
50
44
  require "matchi"
51
45
  ```
@@ -129,11 +123,6 @@ __Spectus__ follows [Semantic Versioning 2.0](https://semver.org/).
129
123
 
130
124
  The [gem](https://rubygems.org/gems/spectus) is available as open source under the terms of the [MIT License](https://github.com/fixrb/spectus/raw/main/LICENSE.md).
131
125
 
132
- ---
126
+ ## Sponsors
133
127
 
134
- <p>
135
- This project is sponsored by:<br />
136
- <a href="https://sashite.com/"><img
137
- src="https://github.com/fixrb/spectus/raw/main/img/sashite.png"
138
- alt="Sashité" /></a>
139
- </p>
128
+ This project is sponsored by [Sashité](https://sashite.com/)
@@ -10,7 +10,7 @@ module Spectus
10
10
  class Base
11
11
  # Initialize the requirement level class.
12
12
  #
13
- # @param matcher [#matches?] The matcher.
13
+ # @param matcher [#match?] The matcher.
14
14
  # @param negate [Boolean] Invert the matcher or not.
15
15
  def initialize(matcher:, negate:)
16
16
  @matcher = matcher
@@ -32,7 +32,6 @@ module Spectus
32
32
  actual: test.actual,
33
33
  definition: @matcher.to_s,
34
34
  error: test.error,
35
- expected: @matcher.expected,
36
35
  got: test.got,
37
36
  level: self.class.level,
38
37
  negate: @negate
data/lib/spectus.rb CHANGED
@@ -17,7 +17,7 @@ module Spectus
17
17
  # Spectus.must Matchi::Eq.new("FOO")
18
18
  # # => #<MUST Matchi::Eq("FOO") negate=false>
19
19
  #
20
- # @param matcher [#matches?] The matcher.
20
+ # @param matcher [#match?] The matcher.
21
21
  #
22
22
  # @return [Requirement::Required] An absolute requirement level instance.
23
23
  #
@@ -35,7 +35,7 @@ module Spectus
35
35
  # Spectus.must_not Matchi::Be.new(42)
36
36
  # # => #<MUST Matchi::Be(42) negate=true>
37
37
  #
38
- # @param matcher [#matches?] The matcher.
38
+ # @param matcher [#match?] The matcher.
39
39
  #
40
40
  # @return [Requirement::Required] An absolute prohibition level instance.
41
41
  def self.must_not(matcher)
@@ -53,7 +53,7 @@ module Spectus
53
53
  # Spectus.should Matchi::Be.new(true)
54
54
  # # => #<SHOULD Matchi::Be(true) negate=false>
55
55
  #
56
- # @param matcher [#matches?] The matcher.
56
+ # @param matcher [#match?] The matcher.
57
57
  #
58
58
  # @return [Requirement::Recommended] A recommended requirement level instance.
59
59
  def self.should(matcher)
@@ -72,7 +72,7 @@ module Spectus
72
72
  # Spectus.should_not Matchi::RaiseException.new(NoMethodError)
73
73
  # # => #<SHOULD Matchi::RaiseException(NoMethodError) negate=true>
74
74
  #
75
- # @param matcher [#matches?] The matcher.
75
+ # @param matcher [#match?] The matcher.
76
76
  #
77
77
  # @return [Requirement::Recommended] A not recommended requirement level
78
78
  # instance.
@@ -98,7 +98,7 @@ module Spectus
98
98
  # Spectus.may Matchi::Match.new(/^foo$/)
99
99
  # # => #<MAY Matchi::Match(/^foo$/) negate=false>
100
100
  #
101
- # @param matcher [#matches?] The matcher.
101
+ # @param matcher [#match?] The matcher.
102
102
  #
103
103
  # @return [Requirement::Optional] An optional requirement level instance.
104
104
  def self.may(matcher)
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spectus
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Kato
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-01-25 00:00:00.000000000 Z
10
+ date: 2024-12-30 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: expresenter
@@ -16,28 +15,42 @@ dependencies:
16
15
  requirements:
17
16
  - - "~>"
18
17
  - !ruby/object:Gem::Version
19
- version: 1.4.1
18
+ version: 1.5.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: 1.4.1
25
+ version: 1.5.0
26
+ - !ruby/object:Gem::Dependency
27
+ name: matchi
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: '4.0'
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '4.0'
27
40
  - !ruby/object:Gem::Dependency
28
41
  name: test_tube
29
42
  requirement: !ruby/object:Gem::Requirement
30
43
  requirements:
31
44
  - - "~>"
32
45
  - !ruby/object:Gem::Version
33
- version: 3.0.0
46
+ version: 4.0.0
34
47
  type: :runtime
35
48
  prerelease: false
36
49
  version_requirements: !ruby/object:Gem::Requirement
37
50
  requirements:
38
51
  - - "~>"
39
52
  - !ruby/object:Gem::Version
40
- version: 3.0.0
53
+ version: 4.0.0
41
54
  description: "Expectation library with RFC 2119's requirement levels \U0001F6A5"
42
55
  email: contact@cyril.email
43
56
  executables: []
@@ -57,7 +70,6 @@ licenses:
57
70
  - MIT
58
71
  metadata:
59
72
  rubygems_mfa_required: 'true'
60
- post_install_message:
61
73
  rdoc_options: []
62
74
  require_paths:
63
75
  - lib
@@ -72,8 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
84
  - !ruby/object:Gem::Version
73
85
  version: '0'
74
86
  requirements: []
75
- rubygems_version: 3.4.19
76
- signing_key:
87
+ rubygems_version: 3.6.2
77
88
  specification_version: 4
78
89
  summary: "Expectation library with RFC 2119's requirement levels \U0001F6A5"
79
90
  test_files: []