matchi-rspec 0.1.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -43
- data/lib/matchi/matcher/be.rb +13 -0
- data/lib/matchi/{rspec → matcher}/be_an_instance_of.rb +3 -6
- data/lib/matchi/matcher/be_instance_of.rb +38 -0
- data/lib/matchi/{rspec → matcher}/eq.rb +5 -6
- data/lib/matchi/rspec.rb +3 -3
- metadata +35 -44
- data/.gitignore +0 -11
- data/.travis.yml +0 -28
- data/.yardopts +0 -1
- data/CODE_OF_CONDUCT.md +0 -13
- data/Gemfile +0 -5
- data/Rakefile +0 -22
- data/VERSION.semver +0 -1
- data/bin/console +0 -8
- data/bin/setup +0 -6
- data/checksum/matchi-fix-0.1.0.gem.sha512 +0 -1
- data/checksum/matchi-fix-0.1.1.gem.sha512 +0 -1
- data/checksum/matchi-fix-0.1.2.gem.sha512 +0 -1
- data/checksum/matchi-fix-0.1.3.gem.sha512 +0 -1
- data/checksum/matchi-fix-0.1.4.gem.sha512 +0 -1
- data/checksum/matchi-rspec-0.0.2.gem.sha512 +0 -1
- data/checksum/matchi-rspec-0.0.3.gem.sha512 +0 -1
- data/checksum/matchi-rspec-0.1.0.gem.sha512 +0 -1
- data/checksum/matchi-rspec-0.1.1.gem.sha512 +0 -1
- data/checksum/matchi-rspec-0.1.2.gem.sha512 +0 -1
- data/lib/matchi/rspec/be.rb +0 -16
- data/lib/matchi/rspec/be_instance_of.rb +0 -39
- data/matchi-fix.gemspec +0 -26
- data/pkg_checksum +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab1f81ada15270eed68cbe4498880832d3138fecf0de8b41559856769794f181
|
4
|
+
data.tar.gz: e736dedd1ab3ea230727fc23967705b100a360f9fa684faf918beb74a92fab2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8acad65064cf292f1aee4267b2108edbd12422573650d56b11c18a4f6198e44c5cb8a143b46b26f1684be7debfff636cd979cfdee9a1d74bec92383715e18bf9
|
7
|
+
data.tar.gz: 0bef1910fcad262488e3e0e5982d2edb68609e313f5a8ce2044dce79df05cf7dfd0e1dd2f3f468ce4fb4e21621ebbace9e2054e5193d7f1622d3489c8c6871e9
|
data/README.md
CHANGED
@@ -1,24 +1,11 @@
|
|
1
1
|
# Matchi::Rspec
|
2
2
|
|
3
3
|
[![Build Status](https://travis-ci.org/fixrb/matchi-rspec.svg?branch=master)][travis]
|
4
|
-
[![Code Climate](https://codeclimate.com/github/fixrb/matchi-rspec/badges/gpa.svg)][codeclimate]
|
5
4
|
[![Gem Version](https://badge.fury.io/rb/matchi-rspec.svg)][gem]
|
6
5
|
[![Inline docs](http://inch-ci.org/github/fixrb/matchi-rspec.svg?branch=master)][inchpages]
|
7
6
|
[![Documentation](http://img.shields.io/:yard-docs-38c800.svg)][rubydoc]
|
8
7
|
|
9
|
-
> Extend [Matchi](https://github.com/fixrb/matchi) matchers with some [RSpec](
|
10
|
-
|
11
|
-
## Contact
|
12
|
-
|
13
|
-
* Home page: https://github.com/fixrb/matchi-rspec
|
14
|
-
* Bugs/issues: https://github.com/fixrb/matchi-rspec/issues
|
15
|
-
* Support: https://stackoverflow.com/questions/tagged/fixrb
|
16
|
-
|
17
|
-
## Rubies
|
18
|
-
|
19
|
-
* [MRI](https://www.ruby-lang.org/)
|
20
|
-
* [Rubinius](http://rubini.us/)
|
21
|
-
* [JRuby](http://jruby.org/)
|
8
|
+
> Extend [Matchi](https://github.com/fixrb/matchi) matchers with some [RSpec](https://rspec.info/)'s ones.
|
22
9
|
|
23
10
|
## Installation
|
24
11
|
|
@@ -41,62 +28,53 @@ Or install it yourself as:
|
|
41
28
|
**Identity** matcher:
|
42
29
|
|
43
30
|
```ruby
|
44
|
-
be = Matchi::Be.new(42)
|
31
|
+
be = Matchi::Matcher::Be.new(42)
|
45
32
|
be.matches? { 42 } # => true
|
46
33
|
```
|
47
34
|
|
48
35
|
**Type/class** matcher:
|
49
36
|
|
50
37
|
```ruby
|
51
|
-
be_instance_of = Matchi::BeInstanceOf.new(String)
|
38
|
+
be_instance_of = Matchi::Matcher::BeInstanceOf.new(String)
|
52
39
|
be_instance_of.matches? { 'foo' } # => true
|
53
40
|
```
|
54
41
|
|
55
42
|
**Equivalence** matcher:
|
56
43
|
|
57
44
|
```ruby
|
58
|
-
eq = Matchi::Eq.new('foo')
|
45
|
+
eq = Matchi::Matcher::Eq.new('foo')
|
59
46
|
eq.matches? { 'foo' } # => true
|
60
47
|
```
|
61
48
|
|
62
|
-
##
|
49
|
+
## Contact
|
63
50
|
|
64
|
-
|
65
|
-
|
66
|
-
Although these checksums do not prevent malicious users from tampering with a
|
67
|
-
built Gem they can be used for basic integrity verification purposes.
|
51
|
+
* Home page: https://github.com/fixrb/matchi-rspec
|
52
|
+
* Bugs/issues: https://github.com/fixrb/matchi-rspec/issues
|
68
53
|
|
69
|
-
|
70
|
-
example:
|
54
|
+
## Rubies
|
71
55
|
|
72
|
-
|
73
|
-
|
56
|
+
* [MRI](https://www.ruby-lang.org/)
|
57
|
+
* [Rubinius](https://rubinius.com/)
|
58
|
+
* [JRuby](https://www.jruby.org/)
|
74
59
|
|
75
60
|
## Versioning
|
76
61
|
|
77
|
-
__Matchi::Rspec__ follows [Semantic Versioning 2.0](
|
62
|
+
__Matchi::Rspec__ follows [Semantic Versioning 2.0](https://semver.org/).
|
78
63
|
|
79
|
-
##
|
64
|
+
## License
|
80
65
|
|
81
|
-
|
82
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
83
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
84
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
85
|
-
5. Create a new Pull Request
|
66
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
86
67
|
|
87
|
-
|
68
|
+
***
|
88
69
|
|
89
|
-
|
70
|
+
<p>
|
71
|
+
This project is sponsored by:<br />
|
72
|
+
<a href="https://sashite.com/"><img
|
73
|
+
src="https://github.com/fixrb/matchi-rspec/raw/master/img/sashite.png"
|
74
|
+
alt="Sashite" /></a>
|
75
|
+
</p>
|
90
76
|
|
91
77
|
[gem]: https://rubygems.org/gems/matchi-rspec
|
92
78
|
[travis]: https://travis-ci.org/fixrb/matchi-rspec
|
93
|
-
[codeclimate]: https://codeclimate.com/github/fixrb/matchi-rspec
|
94
|
-
[gemnasium]: https://gemnasium.com/fixrb/matchi-rspec
|
95
79
|
[inchpages]: http://inch-ci.org/github/fixrb/matchi-rspec
|
96
80
|
[rubydoc]: http://rubydoc.info/gems/matchi-rspec/frames
|
97
|
-
|
98
|
-
***
|
99
|
-
|
100
|
-
This project is sponsored by:
|
101
|
-
|
102
|
-
[![Sashite](https://sashite.com/img/sashite.png)](https://sashite.com/)
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'matchi/matcher/equal'
|
4
|
+
|
5
|
+
# Namespace for the Matchi library.
|
6
|
+
module Matchi
|
7
|
+
# Collection of matcher classes.
|
8
|
+
module Matcher
|
9
|
+
# **Identity** matcher.
|
10
|
+
class Be < ::Matchi::Matcher::Equal
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -4,13 +4,10 @@ require_relative 'be_instance_of'
|
|
4
4
|
|
5
5
|
# Namespace for the Matchi library.
|
6
6
|
module Matchi
|
7
|
-
# Collection of
|
8
|
-
module
|
7
|
+
# Collection of matcher classes.
|
8
|
+
module Matcher
|
9
9
|
# **Type/class** matcher.
|
10
|
-
|
11
|
-
# The matcher.
|
12
|
-
class Matcher < BeInstanceOf::Matcher
|
13
|
-
end
|
10
|
+
class BeAnInstanceOf < BeInstanceOf
|
14
11
|
end
|
15
12
|
end
|
16
13
|
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'matchi/matcher/base'
|
4
|
+
|
5
|
+
# Namespace for the Matchi library.
|
6
|
+
module Matchi
|
7
|
+
# Collection of matcher classes.
|
8
|
+
module Matcher
|
9
|
+
# **Type/class** matcher.
|
10
|
+
class BeInstanceOf < ::Matchi::Matcher::Base
|
11
|
+
# Initialize the matcher with an object.
|
12
|
+
#
|
13
|
+
# @example A string matcher
|
14
|
+
# Matchi::Matcher::BeInstanceOf.new(String)
|
15
|
+
#
|
16
|
+
# @param expected [#object_id] An expected class.
|
17
|
+
def initialize(expected)
|
18
|
+
@expected = expected
|
19
|
+
end
|
20
|
+
|
21
|
+
# @todo For security reasons, instead of comparing actual with expected,
|
22
|
+
# we should compare expected with actual. Using something such as:
|
23
|
+
# `expected.class_of?(actual)`.
|
24
|
+
#
|
25
|
+
# @example Is it an instance of string?
|
26
|
+
# be_instance_of = Matchi::Matcher::BeInstanceOf.new(String)
|
27
|
+
# be_instance_of.matches? { 'foo' } # => true
|
28
|
+
#
|
29
|
+
# @yieldreturn [#instance_of?] the actual value to compare to the
|
30
|
+
# expected one.
|
31
|
+
#
|
32
|
+
# @return [Boolean] Comparison between actual and expected values.
|
33
|
+
def matches?
|
34
|
+
yield.instance_of?(expected)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -1,14 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require 'matchi/matcher/eql'
|
4
|
+
|
3
5
|
# Namespace for the Matchi library.
|
4
6
|
module Matchi
|
5
|
-
# Collection of
|
6
|
-
module
|
7
|
+
# Collection of matcher classes.
|
8
|
+
module Matcher
|
7
9
|
# **Equivalence** matcher.
|
8
|
-
|
9
|
-
# The matcher.
|
10
|
-
class Matcher < Eql::Matcher
|
11
|
-
end
|
10
|
+
class Eq < ::Matchi::Matcher::Eql
|
12
11
|
end
|
13
12
|
end
|
14
13
|
end
|
data/lib/matchi/rspec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matchi-rspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
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-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: matchi
|
@@ -16,70 +16,84 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
33
|
+
version: '2.1'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
40
|
+
version: '2.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '13.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
61
|
+
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-performance
|
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
|
+
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: simplecov
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - "~>"
|
74
88
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0.
|
89
|
+
version: '0.17'
|
76
90
|
type: :development
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
80
94
|
- - "~>"
|
81
95
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0.
|
96
|
+
version: '0.17'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: yard
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -95,40 +109,18 @@ dependencies:
|
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0.9'
|
97
111
|
description: Matchi extension gem to provide some RSpec matchers.
|
98
|
-
email:
|
99
|
-
- contact@cyril.email
|
112
|
+
email: contact@cyril.email
|
100
113
|
executables: []
|
101
114
|
extensions: []
|
102
115
|
extra_rdoc_files: []
|
103
116
|
files:
|
104
|
-
- ".gitignore"
|
105
|
-
- ".travis.yml"
|
106
|
-
- ".yardopts"
|
107
|
-
- CODE_OF_CONDUCT.md
|
108
|
-
- Gemfile
|
109
117
|
- LICENSE.md
|
110
118
|
- README.md
|
111
|
-
-
|
112
|
-
-
|
113
|
-
-
|
114
|
-
-
|
115
|
-
- checksum/matchi-fix-0.1.0.gem.sha512
|
116
|
-
- checksum/matchi-fix-0.1.1.gem.sha512
|
117
|
-
- checksum/matchi-fix-0.1.2.gem.sha512
|
118
|
-
- checksum/matchi-fix-0.1.3.gem.sha512
|
119
|
-
- checksum/matchi-fix-0.1.4.gem.sha512
|
120
|
-
- checksum/matchi-rspec-0.0.2.gem.sha512
|
121
|
-
- checksum/matchi-rspec-0.0.3.gem.sha512
|
122
|
-
- checksum/matchi-rspec-0.1.0.gem.sha512
|
123
|
-
- checksum/matchi-rspec-0.1.1.gem.sha512
|
124
|
-
- checksum/matchi-rspec-0.1.2.gem.sha512
|
119
|
+
- lib/matchi/matcher/be.rb
|
120
|
+
- lib/matchi/matcher/be_an_instance_of.rb
|
121
|
+
- lib/matchi/matcher/be_instance_of.rb
|
122
|
+
- lib/matchi/matcher/eq.rb
|
125
123
|
- lib/matchi/rspec.rb
|
126
|
-
- lib/matchi/rspec/be.rb
|
127
|
-
- lib/matchi/rspec/be_an_instance_of.rb
|
128
|
-
- lib/matchi/rspec/be_instance_of.rb
|
129
|
-
- lib/matchi/rspec/eq.rb
|
130
|
-
- matchi-fix.gemspec
|
131
|
-
- pkg_checksum
|
132
124
|
homepage: https://github.com/fixrb/matchi-rspec
|
133
125
|
licenses:
|
134
126
|
- MIT
|
@@ -148,9 +140,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
140
|
- !ruby/object:Gem::Version
|
149
141
|
version: '0'
|
150
142
|
requirements: []
|
151
|
-
|
152
|
-
rubygems_version: 2.7.6
|
143
|
+
rubygems_version: 3.1.2
|
153
144
|
signing_key:
|
154
145
|
specification_version: 4
|
155
|
-
summary:
|
146
|
+
summary: Matchi extension gem to provide some RSpec matchers.
|
156
147
|
test_files: []
|
data/.gitignore
DELETED
data/.travis.yml
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
sudo: false
|
3
|
-
cache: bundler
|
4
|
-
before_install:
|
5
|
-
- gem install bundler
|
6
|
-
script:
|
7
|
-
- bundle exec rubocop
|
8
|
-
- bundle exec rake test
|
9
|
-
rvm:
|
10
|
-
- 2.3.3
|
11
|
-
- 2.4.0
|
12
|
-
- 2.5.0
|
13
|
-
- 2.6.2
|
14
|
-
- ruby-head
|
15
|
-
- jruby-head
|
16
|
-
- rbx-3
|
17
|
-
matrix:
|
18
|
-
allow_failures:
|
19
|
-
- rvm: ruby-head
|
20
|
-
- rvm: jruby-head
|
21
|
-
- rvm: rbx-3
|
22
|
-
notifications:
|
23
|
-
webhooks:
|
24
|
-
urls:
|
25
|
-
- https://webhooks.gitter.im/e/a44b19cc5cf6db25fa87
|
26
|
-
on_success: change
|
27
|
-
on_failure: always
|
28
|
-
on_start: never
|
data/.yardopts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
- README.md
|
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# Contributor Code of Conduct
|
2
|
-
|
3
|
-
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
-
|
5
|
-
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
6
|
-
|
7
|
-
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
-
|
9
|
-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
-
|
11
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
-
|
13
|
-
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'bundler/gem_tasks'
|
4
|
-
require 'rake/testtask'
|
5
|
-
require 'rubocop/rake_task'
|
6
|
-
|
7
|
-
RuboCop::RakeTask.new
|
8
|
-
|
9
|
-
Rake::TestTask.new do |t|
|
10
|
-
t.verbose = true
|
11
|
-
t.warning = true
|
12
|
-
end
|
13
|
-
|
14
|
-
namespace :test do
|
15
|
-
task :coverage do
|
16
|
-
ENV['COVERAGE'] = 'true'
|
17
|
-
Rake::Task['test'].invoke
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
task(:doc_stats) { ruby '-S yard stats' }
|
22
|
-
task default: %i[test doc_stats rubocop]
|
data/VERSION.semver
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.3
|
data/bin/console
DELETED
data/bin/setup
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0decb77665ae868584aedab6ef126c7ce4efa69bf1fab75215ee9686b16525f8d7a45e03dc3145cb320371d8ddf2ffff90de34f5778fe55b11ce4cb4996a7f5a
|
@@ -1 +0,0 @@
|
|
1
|
-
2a66b5dda194af828096e9b86e2adf2b52cea4113720a0050c867aa37f32200be7ce8ca83c8fbfc9d39a7d6e2a2622f8873bbaafd7529bbc03015bb3e5b05421
|
@@ -1 +0,0 @@
|
|
1
|
-
5827ead29509f74ce55d8746b2e40155976c4594dc1260ec3497f1770c07e671a1ebaf6c20e4cfba3249b5cddf982c48b2ce10eb16fe10dd35afd39d1acfc576
|
@@ -1 +0,0 @@
|
|
1
|
-
8299f2b2322094fec83069d3206bd2b7e73c8fac4657d5eee7a1112dc7c4cefb7404ec1a75a2d8faf66d04e5ecc7b4d3da011a9c4ed7426bec4e62826c60d924
|
@@ -1 +0,0 @@
|
|
1
|
-
bfb467db5d2e47fd7af3969e12e9662632463e68051fd7ba9af0b4c407ffb9e4e206fbc31d9509d2ab35488592c1dc691e36e4ed32db3e262ff6c7d2cd066ed0
|
@@ -1 +0,0 @@
|
|
1
|
-
67bfc478d5c5b6c2375eaa2e205ffa2f6c2b1b3307068433ec7cc38f9b392b43b0bea9c2a2852f1287699e62d47d4aa1b282174f2993bbd1218b4f5505c9f809
|
@@ -1 +0,0 @@
|
|
1
|
-
dd28d15a4dd21aaadd93492a572313efdd55f9bda0179d0d6ff434ffe3c659c67f16145fbf13396bec3cd2c700272e55f19e0f4b05371ef1f6e73842128ee42a
|
@@ -1 +0,0 @@
|
|
1
|
-
3265c35f9f52b45c773623ec84e0caeaebc4341bb1be8ed4c3a3b4892a043fc1883a26276f94becf09822cdc90b2a83a0ec87bc542590489fcfc46752ded7bb5
|
@@ -1 +0,0 @@
|
|
1
|
-
27c0879b60ec0abbeb58673b6924a2a73968ba468774115be47eced7027478cd860e78f6e16e744da61727c42a47ae15222cd1e9e5026d71cba59220783b2245
|
@@ -1 +0,0 @@
|
|
1
|
-
3d8e941bdab14c00365b633fbd3bd5f2f74660616b9de3713a8fac63772962c9f6b970dce12db24aaec8861a7924fec34678fdd41f2a2856ab630216d236184e
|
data/lib/matchi/rspec/be.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'matchi/matchers_base' unless defined?(::Matchi::MatchersBase)
|
4
|
-
|
5
|
-
# Namespace for the Matchi library.
|
6
|
-
module Matchi
|
7
|
-
# Collection of matchers.
|
8
|
-
module Matchers
|
9
|
-
# **Identity** matcher.
|
10
|
-
module Be
|
11
|
-
# The matcher.
|
12
|
-
class Matcher < Equal::Matcher
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,39 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'matchi/matchers_base' unless defined?(::Matchi::MatchersBase)
|
4
|
-
|
5
|
-
# Namespace for the Matchi library.
|
6
|
-
module Matchi
|
7
|
-
# Collection of matchers.
|
8
|
-
module Matchers
|
9
|
-
# **Type/class** matcher.
|
10
|
-
module BeInstanceOf
|
11
|
-
# The matcher.
|
12
|
-
class Matcher
|
13
|
-
include MatchersBase
|
14
|
-
|
15
|
-
# Initialize the matcher with an object.
|
16
|
-
#
|
17
|
-
# @example A string matcher
|
18
|
-
# Matchi::BeInstanceOf.new(String)
|
19
|
-
#
|
20
|
-
# @param expected [#object_id] An expected class.
|
21
|
-
def initialize(expected)
|
22
|
-
@expected = expected
|
23
|
-
end
|
24
|
-
|
25
|
-
# @example Is it an instance of string?
|
26
|
-
# be_instance_of = Matchi::BeInstanceOf.new(String)
|
27
|
-
# be_instance_of.matches? { 'foo' } # => true
|
28
|
-
#
|
29
|
-
# @yieldreturn [#instance_of?] the actual value to compare to the
|
30
|
-
# expected one.
|
31
|
-
#
|
32
|
-
# @return [Boolean] Comparison between actual and expected values.
|
33
|
-
def matches?
|
34
|
-
yield.instance_of?(@expected)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
data/matchi-fix.gemspec
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
Gem::Specification.new do |spec|
|
4
|
-
spec.name = 'matchi-rspec'
|
5
|
-
spec.version = File.read('VERSION.semver').chomp
|
6
|
-
spec.authors = ['Cyril Kato']
|
7
|
-
spec.email = ['contact@cyril.email']
|
8
|
-
|
9
|
-
spec.summary = "Extend Matchi matchers with some RSpec's ones."
|
10
|
-
spec.description = 'Matchi extension gem to provide some RSpec matchers.'
|
11
|
-
spec.homepage = 'https://github.com/fixrb/matchi-rspec'
|
12
|
-
spec.license = 'MIT'
|
13
|
-
|
14
|
-
spec.files =
|
15
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^test/}) }
|
16
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
17
|
-
spec.require_paths = ['lib']
|
18
|
-
|
19
|
-
spec.add_dependency 'matchi', '~> 1.0.4'
|
20
|
-
|
21
|
-
spec.add_development_dependency 'bundler', '~> 2.0'
|
22
|
-
spec.add_development_dependency 'rake', '~> 12.3'
|
23
|
-
spec.add_development_dependency 'rubocop', '~> 0.67'
|
24
|
-
spec.add_development_dependency 'simplecov', '~> 0.16'
|
25
|
-
spec.add_development_dependency 'yard', '~> 0.9'
|
26
|
-
end
|
data/pkg_checksum
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require 'digest/sha2'
|
5
|
-
|
6
|
-
gemname = 'matchi-rspec'.to_sym
|
7
|
-
ARGV[0] = File.read('VERSION.semver').chomp if ARGV[0].nil?
|
8
|
-
built_gem_path = "pkg/#{gemname}-#{ARGV[0]}.gem"
|
9
|
-
checksum = Digest::SHA512.new.hexdigest(File.read(built_gem_path))
|
10
|
-
checksum_path = "checksum/#{gemname}-#{ARGV[0]}.gem.sha512"
|
11
|
-
|
12
|
-
File.open(checksum_path, 'w') { |f| f.write("#{checksum}\n") }
|