proxy_rb 0.10.2 → 0.10.3

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: 594b3c6231ef198e86f5c96186bf3267b57c48a8
4
- data.tar.gz: 49071a22acf7676f7262e05e8bdc15702533e7c2
3
+ metadata.gz: aa1d3d222a7c616d23e6930fbc87b592ddc5ba6a
4
+ data.tar.gz: 5c99918686897ccb1d5562c0423b37d80d53936d
5
5
  SHA512:
6
- metadata.gz: 9a7305a4755446b67a30a8ec2bde20da59d89d72aa0a94cfe161c0ba19cc5485a17a3c59a3d9d5782c588e1b203ede19e0d7aa6821d6a5372fcd0c35e7b31e39
7
- data.tar.gz: a469f54857c7678a64b6ba6b4e518057665472306a3b64207f445a8e6732a9379376bc7539d67219e408e750d709ddc8ee9f3e518c4d5f39b7c6a990c6e78c55
6
+ metadata.gz: 3d3d7dc887e5b52713d46449cd71a3733cdf9b8264ed6802b888e23ec2d6214cdb2b84441e96facaeab43e277739ccee11b029a9762a309aaeb80763347196e0
7
+ data.tar.gz: b0e1b739ed427900c03ea59e9577d250b065030e83e0730320d48a6c36a37b73523ff97d29b219951ba52403e728133aa3d1b0675a641f2835303674d3c135a5
data/History.md CHANGED
@@ -4,6 +4,10 @@ Empty
4
4
 
5
5
  # RELEASED
6
6
 
7
+ ## [v0.10.3](https://github.com/fedux-org/proxy_rb/compare/v0.10.2...v0.10.3)
8
+
9
+ * Setting user information now works with default step in Before Hook
10
+
7
11
  ## [v0.10.2](https://github.com/fedux-org/proxy_rb/compare/v0.10.1...v0.10.2)
8
12
 
9
13
  * Make it possible to visit pages and then check all of them
@@ -8,18 +8,33 @@ Given(/^I use the user "([^"]*)"(?: with password "([^"]*)")?$/) do |user_name,
8
8
  u.password = password || password(user_name)
9
9
 
10
10
  users << u
11
+
12
+ proxies.each do |p|
13
+ p.credentials.user_name = users.last.name
14
+ p.credentials.password = users.last.password
15
+ end
11
16
  end
12
17
 
13
18
  Given(/^I use the following proxies:$/) do |table|
14
19
  @proxies = table.hashes.map do |r|
15
20
  p = ProxyRb::HttpProxy.new(ProxyRb::ProxyUrlParser.new(r[:proxy]))
16
- p.credentials.password = password(p.credentials.user_name) if p.credentials.password == '<PASSWORD>'
17
21
 
18
- unless users.nil? || users.empty?
19
- p.credentials.user_name = users.first.name
20
- p.credentials.password = users.first.password
22
+ # Hide password by using <PASSWORD> => retrieve it using fetcher
23
+ if p.credentials.password == '<PASSWORD>'
24
+ p.credentials.password = password(p.credentials.user_name)
25
+ next p
21
26
  end
22
27
 
28
+ # Username and password are already set
29
+ next p if p.credentials.password && p.credentials.user_name
30
+
31
+ # No users have be defined
32
+ next p if users.nil? || users.empty?
33
+
34
+ # Use last user since nothing else makes sense
35
+ p.credentials.user_name = users.last.name
36
+ p.credentials.password = users.last.password
37
+
23
38
  p
24
39
  end
25
40
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # Main Module
3
3
  module ProxyRb
4
- VERSION = '0.10.2'
4
+ VERSION = '0.10.3'
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.2
4
+ version: 0.10.3
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-29 00:00:00.000000000 Z
11
+ date: 2016-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler