yup 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/yup/request_handler.rb +10 -5
- data/yup.gemspec +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.3
|
data/lib/yup/request_handler.rb
CHANGED
@@ -50,16 +50,21 @@ module Yup
|
|
50
50
|
|
51
51
|
private
|
52
52
|
def send_answer
|
53
|
+
@logger.info {
|
54
|
+
peername = get_peername
|
55
|
+
port, ip = if peername
|
56
|
+
Socket.unpack_sockaddr_in(peername)
|
57
|
+
else
|
58
|
+
["unknown", "unknown"]
|
59
|
+
end
|
60
|
+
"Sending the answer #{@status_code} to a client #{ip}:#{port}"
|
61
|
+
}
|
62
|
+
|
53
63
|
resp = WEBrick::HTTPResponse.new(:HTTPVersion => '1.1')
|
54
64
|
resp.status = @status_code
|
55
65
|
resp['Server'] = 'yupd'
|
56
66
|
send_data resp.to_s
|
57
67
|
close_connection_after_writing
|
58
|
-
|
59
|
-
@logger.info {
|
60
|
-
port, ip = Socket.unpack_sockaddr_in(get_peername)
|
61
|
-
"Sent the answer #{@status_code} to a client #{ip}:#{port}"
|
62
|
-
}
|
63
68
|
end
|
64
69
|
|
65
70
|
def shedule_request
|
data/yup.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "yup"
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Denis Sukhonin"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2013-01-09"
|
13
13
|
s.description = "Just answers 200 (or specified) to a client and asynchronously forwards HTTP request to a configured host"
|
14
14
|
s.email = "d.sukhonin@gmail.com"
|
15
15
|
s.executables = ["yupd"]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2013-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: eventmachine
|
@@ -262,7 +262,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
262
262
|
version: '0'
|
263
263
|
segments:
|
264
264
|
- 0
|
265
|
-
hash:
|
265
|
+
hash: -4554609554866881469
|
266
266
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
267
267
|
none: false
|
268
268
|
requirements:
|