vcr-xml 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.asc +7 -7
- data.tar.gz.asc +7 -7
- data/lib/vcr/header_matcher.rb +38 -0
- data/lib/vcr/xml/version.rb +1 -1
- metadata +2 -1
- metadata.gz.asc +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f888ae5745e0932961e69a6afea8ea8d543404ab
|
4
|
+
data.tar.gz: 66af45cfcea81e470408c0ab21eab2dcc86ff828
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 375ccecf1b89add47adba40aa4c3f3baca7a9dadf4b0be11f0eb0ccfb850871c81fbfde5b9f47dd038191318aff50c5aec080c7fa42f3786c0808d8ecb0828fc
|
7
|
+
data.tar.gz: 433de4ce3f6c440e7a33c04a0d27918ee83e56107e0bd350e6f6ae1d1150151e3f86707ed3410161c6f1fe342a3ac5cdd7e76e728c98c8af30f75fd21dd2b546
|
checksums.yaml.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABCgAGBQJRwWSYAAoJENcoxKfNVdjbuX8IAK+fC+fLzGJ2cvwCrDz8k1bf
|
6
|
+
DB6h7HOWSJeEjcH1Rzt/qsZWW+gEpCKLthLIS+RM3/Gse9uWkf9PbvozmQJngXIT
|
7
|
+
rHDdAy+rM+mbpJUqevC0g2bPULc3+bSyGsSjg6akzSR+iASc1IenBMmsemiJLbnG
|
8
|
+
0pJfLt41cKZsSmC+uT2KYlZB09oL31AxMI5T0NR0zziL5ViKj0GSnVIFfZ34ysSw
|
9
|
+
BDwFupSfFqj4iGaNqPruE6VyaSxHgBVDhOLi96iHDp5fvcNmz8L8W6WrDBIXmwWn
|
10
|
+
bDqZb2dVJEta8DbK36fGA4nGDt7bhpLeAE48f3WST2JRCK+UcdbBKhVEQlyvApk=
|
11
|
+
=h9dv
|
12
12
|
-----END PGP SIGNATURE-----
|
data.tar.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABCgAGBQJRwWSYAAoJENcoxKfNVdjbDmQH/RRlqT0aoCtJOeKQhUqey7wU
|
6
|
+
qWoXC+gAEx9Zsg9NmRw7MGF7Lm0AjZzanrG3Ex5C14Y02dA3m+p6FvAMdQYH+VPr
|
7
|
+
NUXiXDoV7A8g+0gsrWSLEl/bOG33GwJ3gKmzqBkyLTsM5664668kmaE4VOAn+ttq
|
8
|
+
KY8+SZBaSazFjuh+Dho2RhioIf9mEzMUIMCTtkkUKG2YP3MMDa73xCmQmjhhLaWA
|
9
|
+
eBzuHa5r9Io7kY4N10fW4G7OqdwegCXzMLIMVliP01x8OTnAU1v/ZK8qT3Bx4Df5
|
10
|
+
u2v3m39ookuroM041ypnHBBH+7afR04rFnpXABUsC1u1utTBcHcs2X0/MRacfCY=
|
11
|
+
=UN/9
|
12
12
|
-----END PGP SIGNATURE-----
|
@@ -0,0 +1,38 @@
|
|
1
|
+
module VCR
|
2
|
+
class HeaderMatcher < Struct.new(:keys)
|
3
|
+
def matches?(request, expected_request)
|
4
|
+
requested_headers = request.headers
|
5
|
+
expected_headers = expected_request.headers
|
6
|
+
|
7
|
+
if only_keys.present?
|
8
|
+
requested_headers.slice!(*only_keys)
|
9
|
+
expected_headers.slice!(*only_keys)
|
10
|
+
end
|
11
|
+
|
12
|
+
if without_keys.present?
|
13
|
+
requested_headers.except!(*without_keys)
|
14
|
+
expected_headers.except!(*without_keys)
|
15
|
+
end
|
16
|
+
|
17
|
+
requested_headers == expected_headers
|
18
|
+
end
|
19
|
+
|
20
|
+
def without_keys
|
21
|
+
keys.map do |k|
|
22
|
+
prefix, key_name = k.split(/^\^/)
|
23
|
+
key_name if key_name.present?
|
24
|
+
end.compact
|
25
|
+
end
|
26
|
+
|
27
|
+
def only_keys
|
28
|
+
keys.map do |k|
|
29
|
+
prefix, key_name = k.split(/^\^/)
|
30
|
+
prefix if prefix.present?
|
31
|
+
end.compact
|
32
|
+
end
|
33
|
+
|
34
|
+
def human_type
|
35
|
+
""
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/vcr/xml/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vcr-xml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vlad Bokov
|
@@ -156,6 +156,7 @@ files:
|
|
156
156
|
- lib/vcr/errors/unhandled_xml_request_error/headers.rb
|
157
157
|
- lib/vcr/errors/unhandled_xml_request_error/matchers.rb
|
158
158
|
- lib/vcr/errors/unhandled_xml_request_error/suggestions.rb
|
159
|
+
- lib/vcr/header_matcher.rb
|
159
160
|
- lib/vcr/locales/en.yml
|
160
161
|
- lib/vcr/locales/ru.yml
|
161
162
|
- lib/vcr/not_xpath_matcher.rb
|
metadata.gz.asc
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
Version: GnuPG/MacGPG2 v2.0.19 (Darwin)
|
3
3
|
Comment: GPGTools - http://gpgtools.org
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
=
|
5
|
+
iQEcBAABCgAGBQJRwWSYAAoJENcoxKfNVdjbnU4IALAD5oG4Or3euLyqobZBfoWk
|
6
|
+
oAiXl5O2XPMZ3pMfvnWvZxndtDowxOZl/vZSAHc1iLG1Bt1s1JjNGkm0tZi5InWo
|
7
|
+
3Ry6Oe149a86yBAW1q1J/SDUad04CsjmDiRmp8GYlFgsWZeCLA8tVrwUOBylhV6R
|
8
|
+
ZjmyVHPA+UdXIOcmfFRV88IE9OAxTIMwq8/EJso++NBDjJC5urOKt0fUpQzOFZr9
|
9
|
+
CW6w5z9P2dGMPQxG2ehKXKQOzV1khDC2+BueoHV7OzGFnaU2aqEzhahwpD574V3G
|
10
|
+
6GbveY3CD1fP3upHZf4TEdiR449Ay1HsCCsc5SN7ktL+a5f/01fOl4+QEep3d8c=
|
11
|
+
=yZzm
|
12
12
|
-----END PGP SIGNATURE-----
|