liquid-proxy 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE ADDED
@@ -0,0 +1,7 @@
1
+ Copyright 2012 British Broadcasting Corporation
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
4
+
5
+ http://www.apache.org/licenses/LICENSE-2.0
6
+
7
+ Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
@@ -4,9 +4,9 @@
4
4
 
5
5
  ## Overview
6
6
 
7
- Start http proxy that you can control via api in order to inject http headers into requests passing through.
7
+ Http proxy that you can instruct via api to inject arbitrary headers into requests passing through.
8
8
 
9
- Why? I needed it to recreate parts of infrustructure in test environment (namely, the app under test was behind the proxy that takes care of authenticating users and passes on its checks in the form of http header).
9
+ Why? I needed it to recreate parts of live infrustructure in test environment (namely, the app under test was behind the proxy that takes care of authenticating users and passes on its checks in the form of http header).
10
10
 
11
11
  ## Usage
12
12
 
@@ -25,21 +25,22 @@ require 'capybara'
25
25
  require 'selenium-webdriver'
26
26
  require 'liquid-proxy'
27
27
 
28
- LiquidProxy.start(:port => 9889)
28
+ LiquidProxy.start(port: 9889)
29
29
 
30
30
  Capybara.configure do |config|
31
31
  config.default_driver = :selenium
32
- config.run_server = false
33
- config.app_host = "http://test.example.com"
32
+ config.run_server = false
33
+ config.app_host = "http://test.example.com"
34
34
  end
35
35
 
36
36
  Capybara.register_driver :selenium do |app|
37
- profile = Selenium::WebDriver::Firefox::Profile.new
37
+ profile = Selenium::WebDriver::Firefox::Profile.new
38
38
  profile.proxy = Selenium::WebDriver::Proxy.new(http: 'localhost:9889', type: :manual)
39
39
 
40
40
  Capybara::Selenium::Driver.new(app, profile: profile)
41
41
  end
42
-
42
+
43
+ # let tests start clean
43
44
  Before do
44
45
  LiquidProxy.clear
45
46
  end
@@ -1,3 +1,3 @@
1
1
  class LiquidProxy
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
7
7
  s.version = LiquidProxy::VERSION
8
8
  s.authors = ["artemave"]
9
9
  s.email = ["artemave@gmail.com"]
10
- s.homepage = ""
10
+ s.homepage = "https://github.com/artemave/liquid-proxy"
11
11
  s.summary = %q{http proxy with api for modifying requests passing through}
12
12
  #s.description = %q{http proxy with api for modifying requests passing through}
13
13
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: liquid-proxy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-02-07 00:00:00.000000000 +00:00
12
+ date: 2012-02-10 00:00:00.000000000 +00:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: em-proxy
17
- requirement: &2161476040 !ruby/object:Gem::Requirement
17
+ requirement: &2159431500 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2161476040
25
+ version_requirements: *2159431500
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: http_tools
28
- requirement: &2161475620 !ruby/object:Gem::Requirement
28
+ requirement: &2159430960 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2161475620
36
+ version_requirements: *2159430960
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: http_parser.rb
39
- requirement: &2161475200 !ruby/object:Gem::Requirement
39
+ requirement: &2159430540 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2161475200
47
+ version_requirements: *2159430540
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: childprocess
50
- requirement: &2161474780 !ruby/object:Gem::Requirement
50
+ requirement: &2159430120 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: '0'
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *2161474780
58
+ version_requirements: *2159430120
59
59
  description:
60
60
  email:
61
61
  - artemave@gmail.com
@@ -68,6 +68,7 @@ files:
68
68
  - .rspec
69
69
  - .travis.yml
70
70
  - Gemfile
71
+ - LICENSE
71
72
  - README.markdown
72
73
  - Rakefile
73
74
  - bin/liquid-proxy
@@ -97,7 +98,7 @@ files:
97
98
  - spec/subprocess_spec.rb
98
99
  - spec/support/reset-singleton.rb
99
100
  has_rdoc: true
100
- homepage: ''
101
+ homepage: https://github.com/artemave/liquid-proxy
101
102
  licenses: []
102
103
  post_install_message:
103
104
  rdoc_options: []
@@ -109,12 +110,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
109
110
  - - ! '>='
110
111
  - !ruby/object:Gem::Version
111
112
  version: '0'
113
+ segments:
114
+ - 0
115
+ hash: 1174446404085041691
112
116
  required_rubygems_version: !ruby/object:Gem::Requirement
113
117
  none: false
114
118
  requirements:
115
119
  - - ! '>='
116
120
  - !ruby/object:Gem::Version
117
121
  version: '0'
122
+ segments:
123
+ - 0
124
+ hash: 1174446404085041691
118
125
  requirements: []
119
126
  rubyforge_project: liquid-proxy
120
127
  rubygems_version: 1.6.2