wildcard_matchers 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.travis.yml +7 -0
- data/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/lib/wildcard_matchers/matchers.rb +1 -0
- data/lib/wildcard_matchers/matchers/bag.rb +12 -0
- data/spec/wildcard_matchers/matchers/bag_spec.rb +14 -0
- data/wildcard_matchers.gemspec +2 -0
- metadata +8 -6
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c38dfa86fa011bfe6cedf7cd72b5d44144666ca
|
4
|
+
data.tar.gz: 22af55c3ae96ea0ee671c22f576b7155e220dec5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 643a3bb8994f1cd26c2c06152539e55322086acd94498e53e4f534670b020b107186d023bf17ac8dc8dd640dd3afa20cc8a148ba5e6f1a814abeea73ced0854c
|
7
|
+
data.tar.gz: 8ca9ad272f497cd2c21d3f8a00ca4e82c16f1add74023291a124d7fc18e3ee44f3320b86f58c9c2d783583d69be99af2b4ef56bcc8df2a881430d7c59a67ab33
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module WildcardMatchers
|
2
|
+
module Matchers
|
3
|
+
define_wildcard_matcher(:bag_of)
|
4
|
+
|
5
|
+
class BagOf < ::WildcardMatchers::WildcardMatcher
|
6
|
+
protected
|
7
|
+
def wildcard_match(actual)
|
8
|
+
errors.push(*WildcardMatchers::ArrayMatcher.check_errors(actual.sort, expectation.sort, position))
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe WildcardMatchers::Matchers::HashIncludes do
|
4
|
+
[ [ [ 1, 2, 3 ], :bag_of, 3, 2, 1 ],
|
5
|
+
[ [ 1, 2, 3 ], :bag_of, 1, 2, 3 ],
|
6
|
+
].each do |actual, matcher, *args|
|
7
|
+
it_behaves_like "wildcard match", actual, matcher, *args
|
8
|
+
end
|
9
|
+
|
10
|
+
[ [ [ 1, 2, 3 ], :bag_of, 1, 2 ],
|
11
|
+
].each do |actual, matcher, *args|
|
12
|
+
it_behaves_like "not wildcard match", actual, matcher, *args
|
13
|
+
end
|
14
|
+
end
|
data/wildcard_matchers.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wildcard_matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- okitan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-07-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facets
|
@@ -132,8 +132,6 @@ files:
|
|
132
132
|
- ".coveralls.yml"
|
133
133
|
- ".gitignore"
|
134
134
|
- ".rspec"
|
135
|
-
- ".ruby-gemset"
|
136
|
-
- ".ruby-version"
|
137
135
|
- ".travis.yml"
|
138
136
|
- CHANGELOG.md
|
139
137
|
- Gemfile
|
@@ -148,6 +146,7 @@ files:
|
|
148
146
|
- lib/wildcard_matchers/helpers/nil_or.rb
|
149
147
|
- lib/wildcard_matchers/helpers/responding.rb
|
150
148
|
- lib/wildcard_matchers/matchers.rb
|
149
|
+
- lib/wildcard_matchers/matchers/bag.rb
|
151
150
|
- lib/wildcard_matchers/matchers/hash_includes.rb
|
152
151
|
- lib/wildcard_matchers/matchers/is_uri.rb
|
153
152
|
- lib/wildcard_matchers/matchers/with_uri_template.rb
|
@@ -160,6 +159,7 @@ files:
|
|
160
159
|
- spec/wildcard_matchers/helpers/for_any_spec.rb
|
161
160
|
- spec/wildcard_matchers/helpers/nil_or_spec.rb
|
162
161
|
- spec/wildcard_matchers/helpers/responding_spec.rb
|
162
|
+
- spec/wildcard_matchers/matchers/bag_spec.rb
|
163
163
|
- spec/wildcard_matchers/matchers/hash_includes_spec.rb
|
164
164
|
- spec/wildcard_matchers/matchers/is_uri_spec.rb
|
165
165
|
- spec/wildcard_matchers/matchers/with_uri_template_spec.rb
|
@@ -168,7 +168,8 @@ files:
|
|
168
168
|
- spec/wildcard_matchers_spec.rb
|
169
169
|
- wildcard_matchers.gemspec
|
170
170
|
homepage: https://github.com/okitan/wildcard_matchers
|
171
|
-
licenses:
|
171
|
+
licenses:
|
172
|
+
- MIT
|
172
173
|
metadata: {}
|
173
174
|
post_install_message:
|
174
175
|
rdoc_options: []
|
@@ -186,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
186
187
|
version: '0'
|
187
188
|
requirements: []
|
188
189
|
rubyforge_project:
|
189
|
-
rubygems_version: 2.
|
190
|
+
rubygems_version: 2.4.6
|
190
191
|
signing_key:
|
191
192
|
specification_version: 4
|
192
193
|
summary: wildcard matchers which can use in rspec
|
@@ -198,6 +199,7 @@ test_files:
|
|
198
199
|
- spec/wildcard_matchers/helpers/for_any_spec.rb
|
199
200
|
- spec/wildcard_matchers/helpers/nil_or_spec.rb
|
200
201
|
- spec/wildcard_matchers/helpers/responding_spec.rb
|
202
|
+
- spec/wildcard_matchers/matchers/bag_spec.rb
|
201
203
|
- spec/wildcard_matchers/matchers/hash_includes_spec.rb
|
202
204
|
- spec/wildcard_matchers/matchers/is_uri_spec.rb
|
203
205
|
- spec/wildcard_matchers/matchers/with_uri_template_spec.rb
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
wildcard_matchers
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
default
|