matchi-fix 0.2.0 → 1.0.0
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
- checksums.yaml.gz.sig +0 -0
- data/.travis.yml +12 -0
- data/README.md +7 -1
- data/VERSION.semver +1 -1
- data/checksum/matchi-fix-0.2.0.gem.sha512 +1 -0
- data/lib/matchi/fix.rb +30 -43
- data/matchi-fix.gemspec +3 -3
- data.tar.gz.sig +4 -1
- metadata +10 -9
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c3e06971c09441d9d4d78a7183ef570351076f59
|
4
|
+
data.tar.gz: ce4a705bd89b19f59c2ea7d5e87009250b50515d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca3243c26e76df891900c158ade0bf1235b10fd0374168cb7e1a3574b8737fe33bb058d2049307039939138d08b552446b719b1c2f2edfc83f4955c37409690c
|
7
|
+
data.tar.gz: 27694556fba226d2b1ffae30465283d164258b934fd35af0509fa5b6c0d831ca169ffc7358dd28e32525f53e35762fd99539204ef2b03cc0c3f9ad5e18e359cb
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/.travis.yml
CHANGED
@@ -13,3 +13,15 @@ rvm:
|
|
13
13
|
- jruby
|
14
14
|
- jruby-head
|
15
15
|
- rbx-2
|
16
|
+
matrix:
|
17
|
+
allow_failures:
|
18
|
+
- rvm: rbx-2
|
19
|
+
- rvm: jruby-head
|
20
|
+
- rvm: ruby-head
|
21
|
+
notifications:
|
22
|
+
webhooks:
|
23
|
+
urls:
|
24
|
+
- https://webhooks.gitter.im/e/a44b19cc5cf6db25fa87
|
25
|
+
on_success: change
|
26
|
+
on_failure: always
|
27
|
+
on_start: never
|
data/README.md
CHANGED
@@ -35,7 +35,7 @@ The `HighSecurity` trust profile will verify all gems. All of __Matchi::Fix__'s
|
|
35
35
|
```ruby
|
36
36
|
require 'matchi/fix'
|
37
37
|
|
38
|
-
fix = Matchi::Fix.new(proc { it { MUST equal 42 } })
|
38
|
+
fix = Matchi::Matchers::Fix::Matcher.new(proc { it { MUST equal 42 } }) #<Matchi::Matchers::Fix::Matcher:0x007fd4022dd6c8 @expected=#<Proc:0x007fd4022dd6f0@(irb):1>>
|
39
39
|
fix.matches? { 6 * 7 } # => true
|
40
40
|
```
|
41
41
|
|
@@ -72,3 +72,9 @@ See `LICENSE.md` file.
|
|
72
72
|
[travis]: https://travis-ci.org/fixrb/matchi-fix
|
73
73
|
[inchpages]: http://inch-ci.org/github/fixrb/matchi-fix/
|
74
74
|
[rubydoc]: http://rubydoc.info/gems/matchi-fix/frames
|
75
|
+
|
76
|
+
***
|
77
|
+
|
78
|
+
This project is sponsored by:
|
79
|
+
|
80
|
+
[](http://www.sashite.com/)
|
data/VERSION.semver
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
1.0.0
|
@@ -0,0 +1 @@
|
|
1
|
+
f2e4576acc8456a4b6f253bb70a1328498f04661b8656f17fe98a5209e9bac4bc5b21adac1ed87f0fd549cbf06e33485d9da9397a4fee222234f431ac8cd593a
|
data/lib/matchi/fix.rb
CHANGED
@@ -1,52 +1,39 @@
|
|
1
|
-
require 'matchi'
|
1
|
+
require 'matchi/matchers_base'
|
2
2
|
require 'fix'
|
3
3
|
|
4
4
|
# Namespace for the Matchi library.
|
5
|
-
#
|
6
|
-
# @api public
|
7
|
-
#
|
8
5
|
module Matchi
|
9
|
-
#
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
# @api private
|
17
|
-
#
|
18
|
-
def initialize(expected)
|
19
|
-
@expected = expected
|
20
|
-
end
|
21
|
-
|
22
|
-
# @example Is it equal to 42?
|
23
|
-
# fix = Matchi::Fix.new(proc { it { MUST equal 42 } })
|
24
|
-
# fix.matches? { 6 * 7 } # => true
|
25
|
-
#
|
26
|
-
# @api public
|
27
|
-
#
|
28
|
-
# @yieldreturn [#object_id] The front object to compare against the spec.
|
29
|
-
#
|
30
|
-
# @return [Boolean] The result of the test which can be _pass_ or _fail_.
|
31
|
-
def matches?
|
32
|
-
::Fix.describe(yield, verbose: false, &@expected)
|
33
|
-
rescue SystemExit => e
|
34
|
-
e.success?
|
35
|
-
end
|
6
|
+
# Collection of matchers.
|
7
|
+
module Matchers
|
8
|
+
# **Fix** matcher.
|
9
|
+
module Fix
|
10
|
+
# The matcher.
|
11
|
+
class Matcher
|
12
|
+
include MatchersBase
|
36
13
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
14
|
+
# Initialize the matcher with a spec.
|
15
|
+
#
|
16
|
+
# @example It MUST be equal to 42 matcher.
|
17
|
+
# new(proc { it { MUST equal 42 } })
|
18
|
+
#
|
19
|
+
# @param expected [Proc] A spec.
|
20
|
+
def initialize(expected)
|
21
|
+
@expected = expected
|
22
|
+
end
|
43
23
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
24
|
+
# @example Is 42 matching 6 * 7?
|
25
|
+
# fix = new(proc { it { MUST equal 42 } })
|
26
|
+
# fix.matches? { 6 * 7 } # => true
|
27
|
+
#
|
28
|
+
# @yieldreturn [#object_id] A front object to compare against the spec.
|
29
|
+
#
|
30
|
+
# @return [Boolean] The result of the test: _pass_ or _fail_.
|
31
|
+
def matches?
|
32
|
+
::Fix.describe(yield, verbose: false, &@expected)
|
33
|
+
rescue SystemExit => e
|
34
|
+
e.success?
|
35
|
+
end
|
36
|
+
end
|
50
37
|
end
|
51
38
|
end
|
52
39
|
end
|
data/matchi-fix.gemspec
CHANGED
@@ -14,14 +14,14 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
15
15
|
spec.require_paths = ['lib']
|
16
16
|
|
17
|
-
spec.add_dependency 'matchi', '~> 0.1
|
18
|
-
spec.add_dependency 'fix', '~> 0.
|
17
|
+
spec.add_dependency 'matchi', '~> 1.0.1'
|
18
|
+
spec.add_dependency 'fix', '~> 0.17.0'
|
19
19
|
|
20
20
|
spec.add_development_dependency 'bundler', '~> 1.10'
|
21
21
|
spec.add_development_dependency 'rake', '~> 10.4'
|
22
22
|
spec.add_development_dependency 'yard', '~> 0.8'
|
23
23
|
spec.add_development_dependency 'simplecov', '~> 0.10'
|
24
|
-
spec.add_development_dependency 'rubocop', '~> 0.
|
24
|
+
spec.add_development_dependency 'rubocop', '~> 0.35'
|
25
25
|
|
26
26
|
spec.cert_chain = ['certs/gem-fixrb-public_cert.pem']
|
27
27
|
private_key = File.expand_path('~/.ssh/gem-fixrb-private_key.pem')
|
data.tar.gz.sig
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: matchi-fix
|
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 Wack
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
dzJvWzQ1+dJU6WQv75E9ddSkaQrK3nhdgQVu+/wgvGSrsMvOGNz+LXaSDxQqZuwX
|
31
31
|
0KNQFuIukfrdk8URwRnHoAnvx4U93iUw
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date: 2015-
|
33
|
+
date: 2015-11-28 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: matchi
|
@@ -38,28 +38,28 @@ dependencies:
|
|
38
38
|
requirements:
|
39
39
|
- - "~>"
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 0.1
|
41
|
+
version: 1.0.1
|
42
42
|
type: :runtime
|
43
43
|
prerelease: false
|
44
44
|
version_requirements: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: 0.1
|
48
|
+
version: 1.0.1
|
49
49
|
- !ruby/object:Gem::Dependency
|
50
50
|
name: fix
|
51
51
|
requirement: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: 0.
|
55
|
+
version: 0.17.0
|
56
56
|
type: :runtime
|
57
57
|
prerelease: false
|
58
58
|
version_requirements: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 0.
|
62
|
+
version: 0.17.0
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: bundler
|
65
65
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,14 +122,14 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '0.
|
125
|
+
version: '0.35'
|
126
126
|
type: :development
|
127
127
|
prerelease: false
|
128
128
|
version_requirements: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '0.
|
132
|
+
version: '0.35'
|
133
133
|
description: A Fix expectation matcher for Matchi.
|
134
134
|
email:
|
135
135
|
- contact@cyril.email
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- checksum/matchi-fix-0.1.2.gem.sha512
|
155
155
|
- checksum/matchi-fix-0.1.3.gem.sha512
|
156
156
|
- checksum/matchi-fix-0.1.4.gem.sha512
|
157
|
+
- checksum/matchi-fix-0.2.0.gem.sha512
|
157
158
|
- lib/matchi/fix.rb
|
158
159
|
- matchi-fix.gemspec
|
159
160
|
- pkg_checksum
|
@@ -177,7 +178,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
177
178
|
version: '0'
|
178
179
|
requirements: []
|
179
180
|
rubyforge_project:
|
180
|
-
rubygems_version: 2.4.5
|
181
|
+
rubygems_version: 2.4.5.1
|
181
182
|
signing_key:
|
182
183
|
specification_version: 4
|
183
184
|
summary: Fix expectation matcher.
|
metadata.gz.sig
CHANGED
Binary file
|