http-double 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/http_double/request_logger.rb +16 -2
- data/lib/http_double/version.rb +1 -1
- metadata +3 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34d6fbccde44282c3c5fbf59b409f6f28751acd2
|
4
|
+
data.tar.gz: a080d170a4eed435043d53c4ef35e71fa66f8c2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd7e39224dda8befab504bd3e6f172f2f01639f8701393415950b64e40408084844ee4e8fae505b686f9c84c38bf319ebd550b2ec1e6fa30f27078b43a1ba62b
|
7
|
+
data.tar.gz: deb231b9f25e6e0db093c2eb96042603ff31a83e09da7720cf145cc3857eaf31d6cfe98d75291e9067641844b2654850268b72eaa39205b57c9ba0eda47cbd37
|
@@ -1,8 +1,6 @@
|
|
1
1
|
require 'rack/utils'
|
2
|
-
require 'active_support/hash_with_indifferent_access'
|
3
2
|
|
4
3
|
class HttpDouble::RequestLogger
|
5
|
-
include ActiveSupport
|
6
4
|
|
7
5
|
def initialize(app, log)
|
8
6
|
@app = app
|
@@ -104,4 +102,20 @@ class HttpDouble::RequestLogger
|
|
104
102
|
|
105
103
|
end
|
106
104
|
|
105
|
+
class HashWithIndifferentAccess < Hash
|
106
|
+
|
107
|
+
def initialize(other_hash = {})
|
108
|
+
merge! other_hash
|
109
|
+
end
|
110
|
+
|
111
|
+
def merge!(other_hash)
|
112
|
+
other_hash.each { |k, v| self[k] = v }
|
113
|
+
end
|
114
|
+
|
115
|
+
%i([] []= key? fetch delete).each do |method|
|
116
|
+
define_method(method) { |key, *args, &block| super key.to_s, *args, &block }
|
117
|
+
end
|
118
|
+
|
119
|
+
end
|
120
|
+
|
107
121
|
end
|
data/lib/http_double/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: http-double
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Neil E. Pearson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -66,20 +66,6 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.6'
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: activesupport
|
71
|
-
requirement: !ruby/object:Gem::Requirement
|
72
|
-
requirements:
|
73
|
-
- - "~>"
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version: '4.1'
|
76
|
-
type: :runtime
|
77
|
-
prerelease: false
|
78
|
-
version_requirements: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - "~>"
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: '4.1'
|
83
69
|
- !ruby/object:Gem::Dependency
|
84
70
|
name: bundler
|
85
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -156,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
142
|
version: '0'
|
157
143
|
requirements: []
|
158
144
|
rubyforge_project:
|
159
|
-
rubygems_version: 2.4.
|
145
|
+
rubygems_version: 2.4.5.1
|
160
146
|
signing_key:
|
161
147
|
specification_version: 4
|
162
148
|
summary: Sinatra-based HTTP test doubling
|