yup 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/yup/request_handler.rb +10 -5
  3. data/yup.gemspec +2 -2
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
@@ -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
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "yup"
8
- s.version = "0.1.2"
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 = "2012-12-19"
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.2
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: 2012-12-19 00:00:00.000000000 Z
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: 2912788613092729472
265
+ hash: -4554609554866881469
266
266
  required_rubygems_version: !ruby/object:Gem::Requirement
267
267
  none: false
268
268
  requirements: