proxy_tester 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- proxy_tester (0.0.10)
4
+ proxy_tester (0.1.0)
5
5
  activerecord (~> 4.0)
6
6
  activesupport (~> 4.0)
7
7
  addressable
data/README.md CHANGED
@@ -326,6 +326,32 @@ shared_examples 'a base proxy' do
326
326
  end
327
327
  ```
328
328
 
329
+ ### Examples
330
+
331
+
332
+ *Testing proxy pac*
333
+ ```ruby
334
+ # encoding: utf-8
335
+
336
+ describe 'a proxy pac' do
337
+ before :each do
338
+ # no online activities are needed to
339
+ # parse proxy pac => set_offline true
340
+ set_offline true
341
+
342
+ subject { 'http://url/for/proxy.pac' }
343
+ end
344
+
345
+ it 'works with http://www.example.org' do
346
+ use_proxy :pac, subject
347
+ visit 'http://www.example.org'
348
+ expect(proxy_pac).to return_proxy('PROXY 127.0.0.1:3128')
349
+ end
350
+ end
351
+ ```
352
+
353
+
354
+
329
355
  ### Helper methods
330
356
 
331
357
  This gem includes all helper methods provided by
@@ -37,7 +37,7 @@ module ProxyTester
37
37
  if uri.host.blank?
38
38
  @content = File.read(source)
39
39
  else
40
- @content = open(uri, { proxy: false })
40
+ @content = open(uri, { proxy: false }).string
41
41
  end
42
42
 
43
43
  @content
@@ -1,4 +1,4 @@
1
1
  #main ProxyTester
2
2
  module ProxyTester
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxy_tester
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: