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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da5e8521d806264714169e3d9427a4cccfd979d9
4
- data.tar.gz: 9b3c233b836035216d277fbbf687b5873531064e
3
+ metadata.gz: 8d448fe7d461f19e7541b58f6a3939fd978d7d7a
4
+ data.tar.gz: 6b2b76b98dcb485a71d6a55fc0df3f0830c78077
5
5
  SHA512:
6
- metadata.gz: 4ce03e800829b9c0b6bb9976d355d154821da201e92995c10a0989b0c2e295a357464dcfd7aa1573b2b8f1a0d58c15378b4d4cb1b74dac2660f7bf0551506267
7
- data.tar.gz: f5abc5dafeeddfe2b4648fb81671874972bacfe8cdc4f3acd605617f5b320ffe741fa67af24fb1c99e6c3c7fab8f03757728be4622c73d885561017a2a63cc58
6
+ metadata.gz: 791abec1fc56685821246e9c09497424853b9e478d6357e6fb8180a40cb2ba34ce99cfefa3f33fc6aadc3a38f6885351b73c63f3e46a4922f44e10efbb46d656
7
+ data.tar.gz: ec5a39f5541236fe300ff755e3193042f4b538d270e9554b911bea4c5da2ba327830f689584467551caa464688e7ab355f6dca207b643816f987ef9d1e660e5f
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
+ .DS*
2
+ ._*
1
3
  *.gem
2
4
  *.rbc
3
5
  .bundle
@@ -1,5 +1,5 @@
1
1
  module RSpec
2
2
  module WebserviceMatchers
3
- VERSION = '3.0'
3
+ VERSION = '3.1'
4
4
  end
5
5
  end
@@ -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 = 5
8
- OPEN_TIMEOUT = 2
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] = TIMEOUT
218
+ c.options[:open_timeout] = OPEN_TIMEOUT
218
219
  c.use(FaradayMiddleware::FollowRedirects, limit: 4) if follow
219
- c.adapter :net_http
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
@@ -1,6 +1,3 @@
1
- require 'codeclimate-test-reporter'
2
- CodeClimate::TestReporter.start
3
-
4
1
  require 'webmock/rspec'
5
2
 
6
3
  RSpec.configure do |config|
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.0'
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-07 00:00:00.000000000 Z
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: codeclimate-test-reporter
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
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: '0'
82
+ version: '2'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rspec
84
+ name: excon
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
- version: '2'
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: '2'
96
+ version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: faraday
99
99
  requirement: !ruby/object:Gem::Requirement