rack-singleshot 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,6 +27,7 @@ module Rack
27
27
  write_response(status, headers, body)
28
28
  ensure
29
29
  @stdout.close
30
+ exit
30
31
  end
31
32
 
32
33
  def read_request
@@ -90,6 +91,8 @@ module Rack
90
91
  return buffer, extra
91
92
  end
92
93
  end
94
+
95
+ return buffer, ''
93
96
  rescue EOFError
94
97
  return buffer, ''
95
98
  end
@@ -7,6 +7,8 @@ describe Rack::Handler::SingleShot do
7
7
 
8
8
  @app = Rack::Lint.new(lambda {|env| [200, {'Content-Type' => 'text/plain'}, []] })
9
9
  @server = Rack::Handler::SingleShot.new(@app, @stdin, @stdout)
10
+
11
+ @server.stub(:exit)
10
12
  end
11
13
 
12
14
  it 'can handle a simple request' do
@@ -39,6 +41,8 @@ RESPONSE
39
41
 
40
42
  @app = Rack::Lint.new(App.new)
41
43
  @server = Rack::Handler::SingleShot.new(@app, @stdin, @stdout)
44
+
45
+ @server.stub(:exit)
42
46
  end
43
47
 
44
48
  it 'can handle a sinatra request' do
metadata CHANGED
@@ -1,130 +1,120 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rack-singleshot
3
- version: !ruby/object:Gem::Version
4
- hash: 29
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.4
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 3
10
- version: 0.1.3
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Ben Burkert
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-04-03 00:00:00 -07:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-09-19 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: rack
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
27
- - - ">="
28
- - !ruby/object:Gem::Version
29
- hash: 3
30
- segments:
31
- - 0
32
- version: "0"
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
33
22
  type: :runtime
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: rspec
37
23
  prerelease: false
38
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: rspec
32
+ requirement: !ruby/object:Gem::Requirement
39
33
  none: false
40
- requirements:
41
- - - ">="
42
- - !ruby/object:Gem::Version
43
- hash: 3
44
- segments:
45
- - 0
46
- version: "0"
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
47
38
  type: :development
48
- version_requirements: *id002
49
- - !ruby/object:Gem::Dependency
50
- name: rake
51
39
  prerelease: false
52
- requirement: &id003 !ruby/object:Gem::Requirement
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
53
49
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- hash: 3
58
- segments:
59
- - 0
60
- version: "0"
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
61
54
  type: :development
62
- version_requirements: *id003
63
- - !ruby/object:Gem::Dependency
64
- name: sinatra
65
55
  prerelease: false
66
- requirement: &id004 !ruby/object:Gem::Requirement
56
+ version_requirements: !ruby/object:Gem::Requirement
67
57
  none: false
68
- requirements:
69
- - - ">="
70
- - !ruby/object:Gem::Version
71
- hash: 3
72
- segments:
73
- - 0
74
- version: "0"
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: sinatra
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
75
70
  type: :development
76
- version_requirements: *id004
77
- description: |
78
- Handles a single request to/from STDIN/STDOUT. Exits when the response
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ description: ! 'Handles a single request to/from STDIN/STDOUT. Exits when the response
79
+
79
80
  has finished. Sutable for running via inetd.
80
81
 
81
- email:
82
+ '
83
+ email:
82
84
  - ben@benburkert.com
83
- executables:
85
+ executables:
84
86
  - singleshot
85
87
  extensions: []
86
-
87
88
  extra_rdoc_files: []
88
-
89
- files:
89
+ files:
90
90
  - ./lib/rack/singleshot.rb
91
91
  - ./spec/singleshot_spec.rb
92
92
  - ./spec/spec_helper.rb
93
93
  - bin/singleshot
94
- has_rdoc: true
95
94
  homepage: http://github.com/benburkert/rack-singleshot
96
95
  licenses: []
97
-
98
96
  post_install_message:
99
97
  rdoc_options: []
100
-
101
- require_paths:
98
+ require_paths:
102
99
  - lib
103
- required_ruby_version: !ruby/object:Gem::Requirement
100
+ required_ruby_version: !ruby/object:Gem::Requirement
104
101
  none: false
105
- requirements:
106
- - - ">="
107
- - !ruby/object:Gem::Version
108
- hash: 3
109
- segments:
110
- - 0
111
- version: "0"
112
- required_rubygems_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - ! '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
113
107
  none: false
114
- requirements:
115
- - - ">="
116
- - !ruby/object:Gem::Version
117
- hash: 3
118
- segments:
119
- - 0
120
- version: "0"
108
+ requirements:
109
+ - - ! '>='
110
+ - !ruby/object:Gem::Version
111
+ version: '0'
121
112
  requirements: []
122
-
123
113
  rubyforge_project:
124
- rubygems_version: 1.6.2
114
+ rubygems_version: 1.8.23
125
115
  signing_key:
126
116
  specification_version: 3
127
117
  summary: A single-shot rack handler.
128
- test_files:
118
+ test_files:
129
119
  - ./spec/singleshot_spec.rb
130
120
  - ./spec/spec_helper.rb