proxy_rb 0.10.5 → 0.10.6

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: f6abcc8dc4e92962539f30a1449feae10f6c8940
4
- data.tar.gz: 184e4d8e2206de5d44e86eee437fece58df3f02a
3
+ metadata.gz: e46872c1598f6d391255a8f82bd45af392b85a62
4
+ data.tar.gz: b6f0b8b2255df3f30b8fb1ae856dcc975b9066d8
5
5
  SHA512:
6
- metadata.gz: 9096dd8f7b0373e477354e4cfaa22621a2775fe247dba45650b06b8a8e80bed93bb2da0965f7854b90af086851ce2af8fa6d83969ff503f2f6e0b07ff8209e3b
7
- data.tar.gz: a4b629292fcaa35f0bbf0942ab5f42729e41b669a141b720b2e0bd10eb1e351dd46ef12ac3c1bdb299fd415d200f0599d34d56d1cd35585c6369204dbf520661
6
+ metadata.gz: 298bf3a4892cb3da76e5eec56da220208ff17dec2b1552080fa40d393507bb347b5d25d133ba88a0e7d301be9c0e65aa9309e4d78888340779c22934c2d4914b
7
+ data.tar.gz: 5c8ac7581a493ce157398615e738e66b164202926ace2cc1f332a98783500f383b43b9757d4a5f1e4bc7215a2c56b2205f370a55fe3a6b73e501de20ff105676
data/History.md CHANGED
@@ -1,10 +1,8 @@
1
- # UNRELEASED
1
+ ## [v0.10.6](https://github.com/fedux-org/proxy_rb/compare/v0.10.5...v0.10.6)
2
2
 
3
- Empty
3
+ * Fix error message in matchers: The user name was missing
4
4
 
5
- # RELEASED
6
-
7
- ## [v0.10.5](https://github.com/fedux-org/proxy_rb/compare/v0.10.5...v0.10.5)
5
+ ## [v0.10.5](https://github.com/fedux-org/proxy_rb/compare/v0.10.4...v0.10.5)
8
6
 
9
7
  * Fix for overwriting proxies
10
8
  * Better error messages for matchers
data/Rakefile CHANGED
@@ -31,7 +31,7 @@ namespace :test do
31
31
 
32
32
  desc 'Run cucumber'
33
33
  task :cucumber do
34
- sh 'bundle exec cucumber -p all'
34
+ sh 'bundle exec cucumber'
35
35
  end
36
36
  end
37
37
 
@@ -48,7 +48,12 @@ module ProxyRb
48
48
  # @return [ProxyUrl]
49
49
  # The proxy as url
50
50
  def full_url
51
- ProxyUrl.build url.to_hash.merge(credentials.to_hash)
51
+ ProxyUrl.build(
52
+ url.to_hash.merge(
53
+ user: credentials.user_name,
54
+ password: credentials.password
55
+ )
56
+ )
52
57
  end
53
58
 
54
59
  # Convert proxy to string
data/lib/proxy_rb/main.rb CHANGED
@@ -7,13 +7,13 @@ module ProxyRb
7
7
  @logger = Logger.new($stderr)
8
8
 
9
9
  ANNOUNCERS = %i(
10
- proxy
11
- proxy_user
12
- resource
13
- resource_user
14
- http_response_headers
15
- status_code
16
- )
10
+ proxy
11
+ proxy_user
12
+ resource
13
+ resource_user
14
+ http_response_headers
15
+ status_code
16
+ ).freeze
17
17
 
18
18
  class << self
19
19
  protected
@@ -12,11 +12,11 @@ RSpec::Matchers.define :be_forbidden do
12
12
 
13
13
  msg << %(expected that response of "#{resource}" has status code 403, but has #{actual.status_code}.)
14
14
 
15
- if proxy.nil? || proxy.empty?
16
- msg << %(No proxy was used.)
17
- else
18
- msg << %(It was fetched via proxy "#{proxy.to_s}".)
19
- end
15
+ msg << if proxy.nil? || proxy.empty?
16
+ %(No proxy was used.)
17
+ else
18
+ %(It was fetched via proxy "#{proxy}".)
19
+ end
20
20
 
21
21
  msg.join ' '
22
22
  end
@@ -26,11 +26,11 @@ RSpec::Matchers.define :be_forbidden do
26
26
 
27
27
  msg << %(expected that response of "#{resource}" does not have status code 403.)
28
28
 
29
- if proxy.nil? || proxy.empty?
30
- msg << %(No proxy was used.)
31
- else
32
- msg << %(It was fetched via proxy "#{proxy.to_s}".)
33
- end
29
+ msg << if proxy.nil? || proxy.empty?
30
+ %(No proxy was used.)
31
+ else
32
+ %(It was fetched via proxy "#{proxy}".)
33
+ end
34
34
 
35
35
  msg.join ' '
36
36
  end
@@ -12,11 +12,11 @@ RSpec::Matchers.define :be_successful do
12
12
 
13
13
  msg << %(expected that response of "#{resource}" has status code 2xx, but has #{actual.status_code}.)
14
14
 
15
- if proxy.nil? || proxy.empty?
16
- msg << %(No proxy was used.)
17
- else
18
- msg << %(It was fetched via proxy "#{proxy.to_s}".)
19
- end
15
+ msg << if proxy.nil? || proxy.empty?
16
+ %(No proxy was used.)
17
+ else
18
+ %(It was fetched via proxy "#{proxy}".)
19
+ end
20
20
 
21
21
  msg.join ' '
22
22
  end
@@ -26,11 +26,11 @@ RSpec::Matchers.define :be_successful do
26
26
 
27
27
  msg << %(expected that response of "#{resource}" does not have status code 2xx.)
28
28
 
29
- if proxy.nil? || proxy.empty?
30
- msg << %(No proxy was used.)
31
- else
32
- msg << %(It was fetched via proxy "#{proxy.to_s}".)
33
- end
29
+ msg << if proxy.nil? || proxy.empty?
30
+ %(No proxy was used.)
31
+ else
32
+ %(It was fetched via proxy "#{proxy}".)
33
+ end
34
34
 
35
35
  msg.join ' '
36
36
  end
@@ -10,11 +10,11 @@ RSpec::Matchers.define :have_mime_type do |expected|
10
10
 
11
11
  msg << %(expected that response of "#{resource}" has mime type "#{expected}", but has "#{actual}".)
12
12
 
13
- if proxy.nil? || proxy.empty?
14
- msg << %(No proxy was used.)
15
- else
16
- msg << %(It was fetched via proxy "#{proxy.to_s}".)
17
- end
13
+ msg << if proxy.nil? || proxy.empty?
14
+ %(No proxy was used.)
15
+ else
16
+ %(It was fetched via proxy "#{proxy}".)
17
+ end
18
18
 
19
19
  msg.join ' '
20
20
  end
@@ -24,11 +24,11 @@ RSpec::Matchers.define :have_mime_type do |expected|
24
24
 
25
25
  msg << %(expected that response of "#{resource}" does not have mime type "#{expected}".)
26
26
 
27
- if proxy.nil? || proxy.empty?
28
- msg << %(No proxy was used.)
29
- else
30
- msg << %(It was fetched via proxy "#{proxy.to_s}".)
31
- end
27
+ msg << if proxy.nil? || proxy.empty?
28
+ %(No proxy was used.)
29
+ else
30
+ %(It was fetched via proxy "#{proxy}".)
31
+ end
32
32
 
33
33
  msg.join ' '
34
34
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # Main Module
3
3
  module ProxyRb
4
- VERSION = '0.10.5'
4
+ VERSION = '0.10.6'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxy_rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.5
4
+ version: 0.10.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Meyer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-30 00:00:00.000000000 Z
11
+ date: 2016-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -223,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
223
223
  version: '0'
224
224
  requirements: []
225
225
  rubyforge_project:
226
- rubygems_version: 2.5.1
226
+ rubygems_version: 2.6.3
227
227
  signing_key:
228
228
  specification_version: 4
229
229
  summary: This gem makes testing your proxy easy.