frameworks-capybara 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ 2.0.1
2
+ Fixed issue with no_proxy variable not being honoured (Mechanize driver).
3
+
1
4
  2.0.0
2
5
  Upgraded to Capybara 2.0+ and the latest versions of remaining gems.
3
6
  Removed monkey patches, reclassifying some as "extensions".
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- frameworks-capybara (2.0.0)
4
+ frameworks-capybara (2.0.1)
5
5
  capybara
6
6
  capybara-mechanize
7
7
  cucumber
@@ -109,6 +109,17 @@ module Frameworks
109
109
  agent.ca_file = ENV['CA_CERT_LOCATION'] if ENV['CA_CERT_LOCATION']
110
110
  agent.set_proxy(http_proxy.scan(/http:\/\/(.*):80/)[0][0].to_s,80) if http_proxy && !http_proxy.empty?
111
111
 
112
+ # The above proxy setting ignores any no_proxy variable setting:
113
+ # added the following to circumvent this
114
+ if(http_proxy)
115
+ no_proxy = ENV['NO_PROXY'] || ENV['no_proxy']
116
+ if(no_proxy)
117
+ # The no_proxy query string argument must not contain spaces
118
+ no_proxy_qs = no_proxy.gsub(/[, ]+/,',')
119
+ agent.agent.http.proxy = URI(http_proxy + '?no_proxy=' + no_proxy_qs)
120
+ end
121
+ end
122
+
112
123
  #This is necessary because Mech2 does not ship with root certs like Mech1 did and boxes may not have the OpenSSL set installed
113
124
  agent.verify_mode = OpenSSL::SSL::VERIFY_NONE
114
125
 
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module FrameworksCapybara
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
@@ -247,5 +247,33 @@ describe Frameworks::EnvHelper do
247
247
  agent.proxy_addr.should == 'mycache.co.uk'
248
248
  end
249
249
 
250
+ it "the proxy should be ignored if the no_proxy exclusion is set" do
251
+ proxy_host = 'mycache.co.uk'
252
+ proxy_port = '80'
253
+ proxy_uri = 'http://' + proxy_host + ':' + proxy_port
254
+ no_proxy = 'ignore_this_host'
255
+ ENV['NO_PROXY'] = no_proxy
256
+ agent = new_mechanize(http_proxy=proxy_uri)
257
+ expect(agent).to be_a_kind_of Mechanize
258
+ expect(agent.agent.http.proxy_uri.host).to eq(proxy_host)
259
+ expect(agent.agent.http.proxy_uri.port).to eq(proxy_port.to_i)
260
+ no_proxy_array = [ no_proxy ]
261
+ expect(agent.agent.http.no_proxy).to eq(no_proxy_array)
262
+ end
263
+
264
+ it "the proxy should be ignored if the no_proxy exclusion is set with multiple values" do
265
+ proxy_host = 'mycache.co.uk'
266
+ proxy_port = '80'
267
+ proxy_uri = 'http://' + proxy_host + ':' + proxy_port
268
+ no_proxy1 = 'ignore_this_host'
269
+ no_proxy2 = '.and.this.domain'
270
+ ENV['NO_PROXY'] = no_proxy1 + ', ' + no_proxy2
271
+ agent = new_mechanize(http_proxy=proxy_uri)
272
+ expect(agent).to be_a_kind_of Mechanize
273
+ expect(agent.agent.http.proxy_uri.host).to eq(proxy_host)
274
+ expect(agent.agent.http.proxy_uri.port).to eq(proxy_port.to_i)
275
+ no_proxy_array = [ no_proxy1, no_proxy2 ]
276
+ expect(agent.agent.http.no_proxy).to eq(no_proxy_array)
277
+ end
250
278
  end
251
279
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: frameworks-capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - matt robbins
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-11-07 00:00:00.000000000 Z
12
+ date: 2014-11-17 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: selenium-webdriver
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ! '>='
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ! '>='
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: capybara
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ! '>='
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ! '>='
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: mechanize
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ! '>='
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ! '>='
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: capybara-mechanize
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ! '>='
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ! '>='
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: json
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ! '>='
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ! '>='
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: cucumber
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ! '>='
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ! '>='
95
108
  - !ruby/object:Gem::Version
@@ -97,6 +110,7 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: w3c_validators
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - ! '>='
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - ! '>='
109
124
  - !ruby/object:Gem::Version
@@ -111,6 +126,7 @@ dependencies:
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: rake
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - ! '>='
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :development
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - ! '>='
123
140
  - !ruby/object:Gem::Version
@@ -125,6 +142,7 @@ dependencies:
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: rspec
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
147
  - - ! '>='
130
148
  - !ruby/object:Gem::Version
@@ -132,6 +150,7 @@ dependencies:
132
150
  type: :development
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
155
  - - ! '>='
137
156
  - !ruby/object:Gem::Version
@@ -169,26 +188,33 @@ files:
169
188
  - spec/unit_test_monkeypatches.rb
170
189
  homepage:
171
190
  licenses: []
172
- metadata: {}
173
191
  post_install_message:
174
192
  rdoc_options: []
175
193
  require_paths:
176
194
  - lib
177
195
  required_ruby_version: !ruby/object:Gem::Requirement
196
+ none: false
178
197
  requirements:
179
198
  - - ! '>='
180
199
  - !ruby/object:Gem::Version
181
200
  version: '0'
201
+ segments:
202
+ - 0
203
+ hash: 3489083016485421328
182
204
  required_rubygems_version: !ruby/object:Gem::Requirement
205
+ none: false
183
206
  requirements:
184
207
  - - ! '>='
185
208
  - !ruby/object:Gem::Version
186
209
  version: '0'
210
+ segments:
211
+ - 0
212
+ hash: 3489083016485421328
187
213
  requirements: []
188
214
  rubyforge_project:
189
- rubygems_version: 2.4.2
215
+ rubygems_version: 1.8.23.2
190
216
  signing_key:
191
- specification_version: 4
217
+ specification_version: 3
192
218
  summary: Gem to ease the pain of managing capybara driver config and provide a home
193
219
  for common utils and patches
194
220
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- MTA2NDkzZDc2NDc1ZmJiMmI0MGY2ODJiMGNmODA0NjI0Y2ZhYWQxYQ==
5
- data.tar.gz: !binary |-
6
- YTY4OGNkMjA2OGVhNjNiMmJjYjY0M2E5YTYwNGYwMzkwMzUyOGY2Mw==
7
- SHA512:
8
- metadata.gz: !binary |-
9
- ZjdmMjFmMGNkZjBlMDQwYjI3OTY2ZWQ4M2NiNWMzNmJmODE4ZTQ4MjhhZDU1
10
- NTllNTAxMzZiNWY2NWRhYjFhZmQyZjQ0NTcxNmIxZWY3NDNiMzVhNWM2NWU2
11
- M2NlODZhNWYzYjI2MTMzNGY2MWUwMTA5MTg5ZTY2NTUwNGYwZGM=
12
- data.tar.gz: !binary |-
13
- NWRhYmZlN2VhMDg4YWM0NTc3MTViNGEzMjY5ODA3YTEwMzMxMTkxOTkwOGY2
14
- NzdlZTQzYjIwMzNjN2I5ZmNmMWI3MGU4NDQ0NDBhYWY1MzgzZDY3MTMyYWRh
15
- ZmRkMWFjNTg1ZTgxNDI2YmZhNmViYzI2MWJkZDIxMzhjZGRiN2U=