rspec-webservice_matchers 4.5.0 → 4.6.0

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: a2c6cf504ff19bde93e91498bd7e392ef410b94c
4
- data.tar.gz: c2803564cafe83bda06abc3a195e1723e6185d22
3
+ metadata.gz: 0f78401e84678f7f624bfa448b483d50dd05927b
4
+ data.tar.gz: f2f69dec3dc9ca7b5f3feae23964c9be536c1600
5
5
  SHA512:
6
- metadata.gz: 1c6bd1e678ed71303bbc8e6a6396870268195b8a41889656f1a5f5c17088f6a11cd8ddc8daeb86e27d9c7446668d01704baff79abae46245432d06e666729ab8
7
- data.tar.gz: 3a49f67bf48853a73b47b6f71d2f6e5eee6d43590caad741303e6dbc7216e0f7fdc7cdf591741808cc8e2dc76d7155febd0acc30b0c097d2b528ff66c27155f2
6
+ metadata.gz: f71b8211be319c077820c50183ce6a5b0bd28081f0a0ce8effa2a40af23b8f73639080aee84aa24191e3cfe84ead11a2cdf7b125273a0a3cd2cb6a6a0cc88dae
7
+ data.tar.gz: c7ffeb5bde032a4cc8721670d8bb6488aa8108d6b2e8854371c9057c54de1ea12de95c55ad81243e4d1e82af4f6f95f46107d32aa5f4f0db45d8e74d2d62ad4e
data/Gemfile CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  source 'https://rubygems.org'
2
3
 
3
4
  # Specify your gem's dependencies in rspec-webservice_matchers.gemspec
data/HISTORY.md CHANGED
@@ -1,3 +1,8 @@
1
+ 4.6.0
2
+ -----
3
+ Added `# frozen_string_literal: true` to all ruby files using `rubocop -a`,
4
+ in order to prepare for Ruby 3, and to reduce memory use.
5
+
1
6
  4.5.0
2
7
  -----
3
8
  Removed the Excon dependency entirely.
data/Rakefile CHANGED
@@ -1,6 +1,7 @@
1
+ # frozen_string_literal: true
1
2
  require 'bundler/gem_tasks'
2
3
  require 'rspec/core/rake_task'
3
4
 
4
5
  RSpec::Core::RakeTask.new('spec')
5
6
 
6
- task :default => :spec
7
+ task default: :spec
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rspec/webservice_matchers/have_a_valid_cert'
2
3
  require 'rspec/webservice_matchers/redirect_permanently_to'
3
4
  require 'rspec/webservice_matchers/redirect_temporarily_to'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'cgi'
2
3
  require 'json'
3
4
  require 'rspec/webservice_matchers/util'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rspec/webservice_matchers/util'
2
3
 
3
4
  module RSpec
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rspec/webservice_matchers/util'
2
3
 
3
4
  module RSpec
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'faraday'
2
3
  require 'rspec/webservice_matchers/util'
3
4
  require 'rspec/webservice_matchers/redirect_helpers'
@@ -27,7 +28,7 @@ module RSpec
27
28
  status, headers = Util.head(domain_name)
28
29
  location = headers['location']
29
30
  /^(https?)/ =~ location
30
- protocol = $1 || nil
31
+ protocol = Regexp.last_match(1) || nil
31
32
  [status, location, protocol]
32
33
  end
33
34
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rspec/webservice_matchers/util'
2
3
 
3
4
  module RSpec
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rspec/webservice_matchers/util'
2
3
 
3
4
  module RSpec
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rspec/webservice_matchers/util'
2
3
  require 'rspec/webservice_matchers/redirect_helpers'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rspec/webservice_matchers/util'
2
3
  require 'rspec/webservice_matchers/redirect_helpers'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'faraday'
2
3
  require 'faraday_middleware'
3
4
 
@@ -59,7 +60,7 @@ module RSpec
59
60
  true
60
61
  end
61
62
 
62
- private
63
+ # private
63
64
 
64
65
  def self.connection(follow: false)
65
66
  Faraday.new do |c|
@@ -1,5 +1,6 @@
1
+ # frozen_string_literal: true
1
2
  module RSpec
2
3
  module WebserviceMatchers
3
- VERSION = '4.5.0'
4
+ VERSION = '4.6.0'
4
5
  end
5
6
  end
@@ -1,4 +1,5 @@
1
1
  # coding: utf-8
2
+ # frozen_string_literal: true
2
3
  lib = File.expand_path('../lib', __FILE__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
5
  require 'rspec/webservice_matchers/version'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Specs for all of the PageSpeed code and matchers.
2
3
 
3
4
  require 'spec_helper'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'rspec/webservice_matchers'
3
4
  require 'rspec/webservice_matchers/util'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'rspec/webservice_matchers/util'
3
4
  include RSpec::WebserviceMatchers
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'rspec/webservice_matchers'
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'spec_helper'
2
3
  require 'rspec/webservice_matchers'
3
4
 
@@ -11,7 +12,7 @@ describe 'have_a_valid_cert matcher' do
11
12
  it 'fails if the server is not serving SSL at all' do
12
13
  expect {
13
14
  expect('www.psu.edu').to have_a_valid_cert
14
- }.to fail
15
+ }.to fail_matching(/443/)
15
16
  end
16
17
 
17
18
  it 'provides a relevant error message' do
data/spec/spec_helper.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'webmock/rspec'
2
3
 
3
4
  RSpec.configure do |config|
@@ -12,13 +13,13 @@ RSpec.configure do |config|
12
13
  WebMock.stub_request(:get, 'appengine.com').to_return(status: 200)
13
14
 
14
15
  WebMock.stub_request(:any, 'perm-redirector.com')
15
- .to_return(status: 301, headers: { Location: 'http://www.website.com/' })
16
+ .to_return(status: 301, headers: { Location: 'http://www.website.com/' })
16
17
 
17
18
  WebMock.stub_request(:any, 'temp-redirector.org')
18
- .to_return(status: 302, headers: { Location: 'http://a-page.com/a/page.txt' })
19
+ .to_return(status: 302, headers: { Location: 'http://a-page.com/a/page.txt' })
19
20
 
20
21
  WebMock.stub_request(:any, 'temp-307-redirector.net')
21
- .to_return(status: 307, headers: { Location: 'http://a-page.com/a/page.txt' })
22
+ .to_return(status: 307, headers: { Location: 'http://a-page.com/a/page.txt' })
22
23
 
23
24
  # Timeout scenarios
24
25
  WebMock.stub_request(:any, 'www.timeout.com').to_timeout
@@ -26,12 +27,12 @@ RSpec.configure do |config|
26
27
 
27
28
  # Insights API
28
29
  key = ENV['WEBSERVICE_MATCHER_INSIGHTS_KEY']
29
- WebMock.stub_request(:get, "https://www.googleapis.com/pagespeedonline/v2/runPagespeed?key=#{key}&screenshot=false&url=http://nonstop.qa").
30
- with(:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Faraday v0.9.2'})
31
- .to_return(
32
- status: 200,
33
- body: IO.read('spec/fixtures/pagespeed.json'),
34
- headers: {})
30
+ WebMock.stub_request(:get, "https://www.googleapis.com/pagespeedonline/v2/runPagespeed?key=#{key}&screenshot=false&url=http://nonstop.qa")
31
+ .with(headers: { 'Accept' => '*/*', 'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent' => 'Faraday v0.9.2' })
32
+ .to_return(
33
+ status: 200,
34
+ body: IO.read('spec/fixtures/pagespeed.json'),
35
+ headers: {})
35
36
 
36
37
  WebMock.allow_net_connect!
37
38
  end
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: 4.5.0
4
+ version: 4.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robb Shecter
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-17 00:00:00.000000000 Z
11
+ date: 2016-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
161
161
  version: '0'
162
162
  requirements: []
163
163
  rubyforge_project:
164
- rubygems_version: 2.5.1
164
+ rubygems_version: 2.6.2
165
165
  signing_key:
166
166
  specification_version: 4
167
167
  summary: Black-box web app configuration testing