mocktra 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/lib/mocktra.rb +12 -0
  2. data/lib/mocktra/version.rb +1 -1
  3. metadata +14 -14
@@ -25,4 +25,16 @@ module Kernel
25
25
  def Mocktra(*args, &block)
26
26
  Mocktra.mocktra(*args, &block)
27
27
  end
28
+ end
29
+
30
+ # patch to support basic auth
31
+ class WebMock::RackResponse
32
+ def build_rack_env_with_basic_auth_support(request)
33
+ env = build_rack_env_without_basic_auth_support(request)
34
+ uri = request.uri
35
+ env['HTTP_AUTHORIZATION'] = 'Basic ' + [uri.userinfo].pack('m').delete("\r\n") if uri.userinfo
36
+ env
37
+ end
38
+ alias_method :build_rack_env_without_basic_auth_support, :build_rack_env
39
+ alias_method :build_rack_env, :build_rack_env_with_basic_auth_support
28
40
  end
@@ -1,3 +1,3 @@
1
1
  module Mocktra
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mocktra
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-06 00:00:00.000000000Z
12
+ date: 2012-03-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
16
- requirement: &70162625263140 !ruby/object:Gem::Requirement
16
+ requirement: &70276730521220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70162625263140
24
+ version_requirements: *70276730521220
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rspec
27
- requirement: &70162625257760 !ruby/object:Gem::Requirement
27
+ requirement: &70276730519420 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '2.8'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70162625257760
35
+ version_requirements: *70276730519420
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: httpclient
38
- requirement: &70162625256280 !ruby/object:Gem::Requirement
38
+ requirement: &70276730518040 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70162625256280
46
+ version_requirements: *70276730518040
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: webmock
49
- requirement: &70162625253400 !ruby/object:Gem::Requirement
49
+ requirement: &70276730508980 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '1.8'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70162625253400
57
+ version_requirements: *70276730508980
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sinatra
60
- requirement: &70162625252480 !ruby/object:Gem::Requirement
60
+ requirement: &70276730507660 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,7 +65,7 @@ dependencies:
65
65
  version: '1.3'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70162625252480
68
+ version_requirements: *70276730507660
69
69
  description: A webmock DSL using sinatra.
70
70
  email:
71
71
  - jugyo.org@gmail.com
@@ -95,7 +95,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
95
95
  version: '0'
96
96
  segments:
97
97
  - 0
98
- hash: 2469475704060596433
98
+ hash: 833814731482073146
99
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements:
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  segments:
106
106
  - 0
107
- hash: 2469475704060596433
107
+ hash: 833814731482073146
108
108
  requirements: []
109
109
  rubyforge_project: mocktra
110
110
  rubygems_version: 1.8.10