emmy-http 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/emmy_http/operation.rb +2 -25
- data/lib/emmy_http/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05594b33af30c50c3901325534fb2fbd5fb011b1
|
4
|
+
data.tar.gz: 3569e0ba991cd322c232c939a8a574a344836bc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49a503bfb5485e215e05ca6fb5e136b9285efd681c22841a7cb7cd0a82d37d8312779d09ac573c197a25af1646650a8818c58a17ef7197459b518b3076177c06
|
7
|
+
data.tar.gz: c57e79bc762c45e9e9845c3b77bea6a0a5f764336570f4831263d5b88962d9939b3fd6aceb4426dfc645f70ff974930c08b41ba9cfedd6c89e6566d5b1d7c00d
|
data/lib/emmy_http/operation.rb
CHANGED
@@ -9,9 +9,10 @@ module EmmyHttp
|
|
9
9
|
|
10
10
|
events :init, :head, :success, :error
|
11
11
|
|
12
|
-
def initialize(request, adapter)
|
12
|
+
def initialize(request, adapter, connection=nil)
|
13
13
|
raise "invalid adapter" if adapter.nil? || !adapter.respond_to?(:to_a) || !adapter.respond_to?(:delegate=)
|
14
14
|
@request = request
|
15
|
+
@connection = connection
|
15
16
|
@adapter = adapter
|
16
17
|
@adapter.delegate = self
|
17
18
|
end
|
@@ -66,30 +67,6 @@ module EmmyHttp
|
|
66
67
|
}
|
67
68
|
end
|
68
69
|
|
69
|
-
private
|
70
|
-
=begin
|
71
|
-
def setup
|
72
|
-
adapter.setup
|
73
|
-
|
74
|
-
on :init do |connection|
|
75
|
-
@connection = connection
|
76
|
-
end
|
77
|
-
|
78
|
-
on :head do |operation, conn|
|
79
|
-
@response = request.response_class.new
|
80
|
-
response.headers = operation.adapter.headers
|
81
|
-
end
|
82
|
-
|
83
|
-
on :success do |response, operation, conn|
|
84
|
-
response.status = operation.adapter.status
|
85
|
-
response.body = operation.adapter.body
|
86
|
-
end
|
87
|
-
|
88
|
-
on :error do |error, operation, conn|
|
89
|
-
response.status = operation.adapter.status
|
90
|
-
end
|
91
|
-
end
|
92
|
-
=end
|
93
70
|
#<<<
|
94
71
|
end
|
95
72
|
end
|
data/lib/emmy_http/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: emmy-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- inre
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: event_object
|