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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 116f6648013ea37e3295b6016bfd9aa41071f574
4
- data.tar.gz: 880a76b4fd4b9d55d8f34cd9ef97384a6ef6f592
3
+ metadata.gz: 34d6fbccde44282c3c5fbf59b409f6f28751acd2
4
+ data.tar.gz: a080d170a4eed435043d53c4ef35e71fa66f8c2a
5
5
  SHA512:
6
- metadata.gz: 9e8e86b25f9f353000daa243b718db9e3401f878066e06a861265d53171fa37408b29f19c9787e8fa4618a2e68642bb4c1892b7f5db18e61984051c43cb740f1
7
- data.tar.gz: ccf55fd103ccb294ec67a9f20ff83da8accaa3bd54af38e984114c2bf24e18ecb01c8477642208fbfae0470c2205cb0efee214ec4eb3750529d6250697b963a5
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
@@ -1,3 +1,3 @@
1
1
  module HttpDouble
2
- VERSION = '0.1.11'
2
+ VERSION = '0.1.12'
3
3
  end
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.11
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-06-11 00:00:00.000000000 Z
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.6
145
+ rubygems_version: 2.4.5.1
160
146
  signing_key:
161
147
  specification_version: 4
162
148
  summary: Sinatra-based HTTP test doubling