rspec-webservice_matchers 3.0 → 3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/lib/rspec/webservice_matchers/version.rb +1 -1
- data/lib/rspec/webservice_matchers.rb +5 -4
- data/rspec-webservice_matchers.gemspec +1 -1
- data/spec/rspec/webservice_matchers/ssl_spec.rb +2 -2
- data/spec/spec_helper.rb +0 -3
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d448fe7d461f19e7541b58f6a3939fd978d7d7a
|
4
|
+
data.tar.gz: 6b2b76b98dcb485a71d6a55fc0df3f0830c78077
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 791abec1fc56685821246e9c09497424853b9e478d6357e6fb8180a40cb2ba34ce99cfefa3f33fc6aadc3a38f6885351b73c63f3e46a4922f44e10efbb46d656
|
7
|
+
data.tar.gz: ec5a39f5541236fe300ff755e3193042f4b538d270e9554b911bea4c5da2ba327830f689584467551caa464688e7ab355f6dca207b643816f987ef9d1e660e5f
|
@@ -1,11 +1,12 @@
|
|
1
1
|
require 'rspec/webservice_matchers/version'
|
2
|
+
require 'excon'
|
2
3
|
require 'faraday'
|
3
4
|
require 'faraday_middleware'
|
4
5
|
require 'pry'
|
5
6
|
|
6
7
|
# Seconds
|
7
|
-
TIMEOUT =
|
8
|
-
OPEN_TIMEOUT =
|
8
|
+
TIMEOUT = 20
|
9
|
+
OPEN_TIMEOUT = 20
|
9
10
|
|
10
11
|
module RSpec
|
11
12
|
# RSpec Custom Matchers
|
@@ -214,9 +215,9 @@ module RSpec
|
|
214
215
|
def self.connection(follow: false)
|
215
216
|
Faraday.new do |c|
|
216
217
|
c.options[:timeout] = TIMEOUT
|
217
|
-
c.options[:open_timeout] =
|
218
|
+
c.options[:open_timeout] = OPEN_TIMEOUT
|
218
219
|
c.use(FaradayMiddleware::FollowRedirects, limit: 4) if follow
|
219
|
-
c.adapter :
|
220
|
+
c.adapter :excon
|
220
221
|
end
|
221
222
|
end
|
222
223
|
|
@@ -22,9 +22,9 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_development_dependency 'rake'
|
23
23
|
spec.add_development_dependency 'pry'
|
24
24
|
spec.add_development_dependency 'webmock'
|
25
|
-
spec.add_development_dependency 'codeclimate-test-reporter'
|
26
25
|
|
27
26
|
spec.add_runtime_dependency 'rspec', '~> 2'
|
27
|
+
spec.add_runtime_dependency 'excon'
|
28
28
|
spec.add_runtime_dependency 'faraday'
|
29
29
|
spec.add_runtime_dependency 'faraday_middleware'
|
30
30
|
end
|
@@ -17,7 +17,7 @@ describe 'have_a_valid_cert matcher' do
|
|
17
17
|
it 'provides a relevant error message' do
|
18
18
|
expect {
|
19
19
|
expect('www.psu.edu').to have_a_valid_cert
|
20
|
-
}.to fail_matching(/(no route to host)|(connection refused)/i)
|
20
|
+
}.to fail_matching(/(unreachable)|(no route to host)|(connection refused)/i)
|
21
21
|
end
|
22
22
|
|
23
23
|
it "provides a relevant error message when the domain name doesn't exist" do
|
@@ -29,7 +29,7 @@ describe 'have_a_valid_cert matcher' do
|
|
29
29
|
it 'provides a good error message if the request times out' do
|
30
30
|
expect {
|
31
31
|
'www.myapp.com'.should have_a_valid_cert
|
32
|
-
}.to fail_matching(/execution expired/)
|
32
|
+
}.to fail_matching(/(timeout)|(execution expired)/)
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-webservice_matchers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '3.
|
4
|
+
version: '3.1'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robb Shecter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -67,33 +67,33 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rspec
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
76
|
-
type: :
|
75
|
+
version: '2'
|
76
|
+
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '2'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: excon
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '0'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: faraday
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|