matchi 2.0.1 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9afc0e3e02c4150637f3d1080cf6eacd470ad7dec335417bda0e79ee60ecdea
4
- data.tar.gz: d62e283556fc4f9d4a6d93bde1efb518861d482dba734786f00b57a166f4ade6
3
+ metadata.gz: fbd646c1f880291334b1f98426cfdedab736a2f87bbb44e149e81bcb5f8affce
4
+ data.tar.gz: 9e285052b96848df8be1c22c2033032d2dcbe143ac4d84fa26e9e61b42ac8ee4
5
5
  SHA512:
6
- metadata.gz: 50d45962387971730773221e8756fa543457ebd1375f7205538040d2fb115eb1fae0784c1e9949794e9c990efc7788fda49ce03f8096918005eae384ed460a13
7
- data.tar.gz: 12071d2d5462243d42eac25ca3d70fc5a236cd79b8cbdd20a608e4d2ceeacdbdddbaeeba06f30218c30d1cbf0c6f16279be655eead7a42dcf6b9cecdf1c645cf
6
+ metadata.gz: d81a615fca3627cf424226c015e63ab09419be15059b83e926afa3d99819153ced25afca5adfe1421d85bbffcaf4048f2c36531b14b6a9f4920a1f7edf9efd61
7
+ data.tar.gz: e80cd7a69eef70a3ca0fc80bb4bf94468c14de22a9309d4bf736ea050e5feeeadf69216eadddc6e4ee678c08ccf64949729a3ef830ed9e1b4b3ca3d5ba23d0f7
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![Inline docs](https://inch-ci.org/github/fixrb/matchi.svg?branch=main)][inchpages]
7
7
  [![Documentation](https://img.shields.io/:yard-docs-38c800.svg)][rubydoc]
8
8
 
9
- > Collection of expectation matchers for Ruby.
9
+ > Collection of expectation matchers for Ruby 🤹
10
10
 
11
11
  ## Installation
12
12
 
@@ -88,7 +88,7 @@ module Matchi
88
88
  module Matcher
89
89
  class BeTheAnswer < ::Matchi::Matcher::Base
90
90
  def matches?
91
- 42.equal? yield
91
+ 42.equal?(yield)
92
92
  end
93
93
  end
94
94
  end
@@ -107,7 +107,7 @@ module Matchi
107
107
  module Matcher
108
108
  class BePrime < ::Matchi::Matcher::Base
109
109
  def matches?
110
- Prime.prime? yield
110
+ Prime.prime?(yield)
111
111
  end
112
112
  end
113
113
  end
@@ -129,7 +129,7 @@ module Matchi
129
129
  end
130
130
 
131
131
  def matches?
132
- !Regexp.new("^#{expected}").match(yield).nil?
132
+ Regexp.new(/\A#{expected}/).match?(yield)
133
133
  end
134
134
  end
135
135
  end
@@ -144,19 +144,13 @@ start_with.matches? { "foobar" } # => true
144
144
  * Home page: https://github.com/fixrb/matchi
145
145
  * Bugs/issues: https://github.com/fixrb/matchi/issues
146
146
 
147
- ## Rubies
148
-
149
- * [MRI](https://www.ruby-lang.org/)
150
- * [Rubinius](https://rubinius.com/)
151
- * [JRuby](https://www.jruby.org/)
152
-
153
147
  ## Versioning
154
148
 
155
149
  __Matchi__ follows [Semantic Versioning 2.0](https://semver.org/).
156
150
 
157
151
  ## License
158
152
 
159
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
153
+ The [gem](https://rubygems.org/gems/matchi) is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
160
154
 
161
155
  ***
162
156
 
@@ -28,7 +28,7 @@ module Matchi
28
28
  #
29
29
  # @return [Boolean] Comparison between actual and expected values.
30
30
  def matches?(*, **)
31
- expected.match(yield).nil?.equal?(false)
31
+ expected.match?(yield)
32
32
  end
33
33
  end
34
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matchi
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cyril Kato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-12 00:00:00.000000000 Z
11
+ date: 2021-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -122,7 +122,7 @@ dependencies:
122
122
  - - ">="
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
- description: Collection of expectation matchers for Ruby.
125
+ description: "Collection of expectation matchers for Ruby \U0001F939"
126
126
  email: contact@cyril.email
127
127
  executables: []
128
128
  extensions: []
@@ -160,8 +160,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  - !ruby/object:Gem::Version
161
161
  version: '0'
162
162
  requirements: []
163
- rubygems_version: 3.1.4
163
+ rubygems_version: 3.1.6
164
164
  signing_key:
165
165
  specification_version: 4
166
- summary: Collection of expectation matchers for Ruby.
166
+ summary: "Collection of expectation matchers for Ruby \U0001F939"
167
167
  test_files: []