sinatra-synchrony 0.1.1 → 0.2.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/Gemfile.lock +28 -24
  2. data/README.markdown +1 -1
  3. data/lib/sinatra/synchrony.rb +15 -2
  4. metadata +59 -114
@@ -1,12 +1,13 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sinatra-synchrony (0.1.0.beta.5)
5
- async-rack
6
- em-http-request (= 0.3.0)
7
- em-resolv-replace
8
- em-synchrony (= 0.2.0)
9
- rack-fiber_pool (= 0.9.1)
4
+ sinatra-synchrony (0.2.0.beta.1)
5
+ async-rack (>= 0.5.1)
6
+ em-http-request (= 1.0.0.beta.4)
7
+ em-resolv-replace (>= 1.1.1)
8
+ em-synchrony (= 0.3.0.beta.1)
9
+ eventmachine (= 1.0.0.beta.3)
10
+ rack-fiber_pool (= 0.9.2)
10
11
  sinatra (>= 1.0)
11
12
 
12
13
  GEM
@@ -17,29 +18,32 @@ GEM
17
18
  sexp_processor (>= 3.0.0)
18
19
  RubyInline (3.9.0)
19
20
  ZenTest (~> 4.3)
20
- ZenTest (4.6.0)
21
+ ZenTest (4.5.0)
21
22
  addressable (2.2.6)
22
23
  async-rack (0.5.1)
23
24
  rack (~> 1.1)
24
25
  diff-lcs (1.1.2)
25
- em-http-request (0.3.0)
26
- addressable (>= 2.0.0)
27
- escape_utils
28
- eventmachine (>= 0.12.9)
26
+ em-http-request (1.0.0.beta.4)
27
+ addressable (>= 2.2.3)
28
+ em-socksify
29
+ eventmachine (>= 1.0.0.beta.3)
30
+ http_parser.rb (>= 0.5.1)
29
31
  em-resolv-replace (1.1.1)
30
- em-synchrony (0.2.0)
31
- eventmachine (>= 0.12.9)
32
- escape_utils (0.2.3)
33
- eventmachine (0.12.10)
34
- file-tail (1.0.6)
35
- spruz (~> 0.2)
36
- minitest (2.3.1)
37
- predicated (0.2.6)
38
- rack (1.3.2)
39
- rack-fiber_pool (0.9.1)
32
+ em-socksify (0.1.0)
33
+ eventmachine
34
+ em-synchrony (0.3.0.beta.1)
35
+ eventmachine (>= 1.0.0.beta.1)
36
+ eventmachine (1.0.0.beta.3)
37
+ file-tail (1.0.5)
38
+ spruz (>= 0.1.0)
39
+ http_parser.rb (0.5.1)
40
+ minitest (2.1.0)
41
+ predicated (0.2.2)
42
+ rack (1.2.2)
43
+ rack-fiber_pool (0.9.2)
40
44
  rack-test (0.5.7)
41
45
  rack (>= 1.0)
42
- rake (0.9.2)
46
+ rake (0.8.7)
43
47
  ruby2ruby (1.2.5)
44
48
  ruby_parser (~> 2.0)
45
49
  sexp_processor (~> 3.0)
@@ -54,8 +58,8 @@ GEM
54
58
  ruby2ruby (>= 1.2.5)
55
59
  ruby_parser (>= 2.0.5)
56
60
  sexp_processor (>= 3.0.5)
57
- spruz (0.2.11)
58
- tilt (1.3.2)
61
+ spruz (0.2.6)
62
+ tilt (1.3.3)
59
63
  wrong (0.5.0)
60
64
  ParseTree (~> 3.0)
61
65
  diff-lcs (~> 1.1.2)
@@ -1,4 +1,4 @@
1
- Sinatra::Synchrony
1
+ Sinatra::Synchrony [![](https://secure.travis-ci.org/kyledrake/sinatra-synchrony.png)](http://travis-ci.org/kyledrake/sinatra-synchrony)
2
2
  ===
3
3
 
4
4
  Sinatra + EM-Synchrony - fast, concurrent web applications with no callbacks!
@@ -9,10 +9,23 @@ require 'async-rack'
9
9
  module Sinatra
10
10
  module Synchrony
11
11
  def setup_sessions(builder)
12
- builder.use Rack::FiberPool unless test?
12
+ builder.use Rack::FiberPool, {:rescue_exception => handle_exception } unless test?
13
13
  super
14
14
  end
15
15
 
16
+ def handle_exception
17
+ Proc.new do |env, e|
18
+ if settings.show_exceptions?
19
+ request = Sinatra::Request.new(env)
20
+ printer = Sinatra::ShowExceptions.new(proc{ raise e })
21
+ s, h, b = printer.call(env)
22
+ [s, h, b]
23
+ else
24
+ [500, {}, ""]
25
+ end
26
+ end
27
+ end
28
+
16
29
  class << self
17
30
  def patch_tests!
18
31
  require 'sinatra/synchrony/mock_session'
@@ -24,4 +37,4 @@ module Sinatra
24
37
  end
25
38
  end
26
39
  register Synchrony
27
- end
40
+ end
metadata CHANGED
@@ -1,13 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-synchrony
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
5
- prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 1
10
- version: 0.1.1
4
+ version: 0.2.0.beta.1
11
5
  platform: ruby
12
6
  authors:
13
7
  - Kyle Drake
@@ -15,160 +9,119 @@ autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
11
 
18
- date: 2011-08-02 00:00:00 -07:00
12
+ date: 2011-08-25 00:00:00 -07:00
19
13
  default_executable:
20
14
  dependencies:
21
15
  - !ruby/object:Gem::Dependency
22
16
  name: sinatra
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
26
20
  requirements:
27
21
  - - ">="
28
22
  - !ruby/object:Gem::Version
29
- hash: 15
30
- segments:
31
- - 1
32
- - 0
33
23
  version: "1.0"
34
- type: :runtime
35
- version_requirements: *id001
24
+ version:
36
25
  - !ruby/object:Gem::Dependency
37
26
  name: rack-fiber_pool
38
- prerelease: false
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
41
30
  requirements:
42
31
  - - "="
43
32
  - !ruby/object:Gem::Version
44
- hash: 57
45
- segments:
46
- - 0
47
- - 9
48
- - 1
49
- version: 0.9.1
33
+ version: 0.9.2
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: eventmachine
50
37
  type: :runtime
51
- version_requirements: *id002
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - "="
42
+ - !ruby/object:Gem::Version
43
+ version: 1.0.0.beta.3
44
+ version:
52
45
  - !ruby/object:Gem::Dependency
53
46
  name: em-http-request
54
- prerelease: false
55
- requirement: &id003 !ruby/object:Gem::Requirement
56
- none: false
47
+ type: :runtime
48
+ version_requirement:
49
+ version_requirements: !ruby/object:Gem::Requirement
57
50
  requirements:
58
51
  - - "="
59
52
  - !ruby/object:Gem::Version
60
- hash: 19
61
- segments:
62
- - 0
63
- - 3
64
- - 0
65
- version: 0.3.0
66
- type: :runtime
67
- version_requirements: *id003
53
+ version: 1.0.0.beta.4
54
+ version:
68
55
  - !ruby/object:Gem::Dependency
69
56
  name: em-synchrony
70
- prerelease: false
71
- requirement: &id004 !ruby/object:Gem::Requirement
72
- none: false
57
+ type: :runtime
58
+ version_requirement:
59
+ version_requirements: !ruby/object:Gem::Requirement
73
60
  requirements:
74
61
  - - "="
75
62
  - !ruby/object:Gem::Version
76
- hash: 23
77
- segments:
78
- - 0
79
- - 2
80
- - 0
81
- version: 0.2.0
82
- type: :runtime
83
- version_requirements: *id004
63
+ version: 0.3.0.beta.1
64
+ version:
84
65
  - !ruby/object:Gem::Dependency
85
66
  name: em-resolv-replace
86
- prerelease: false
87
- requirement: &id005 !ruby/object:Gem::Requirement
88
- none: false
67
+ type: :runtime
68
+ version_requirement:
69
+ version_requirements: !ruby/object:Gem::Requirement
89
70
  requirements:
90
71
  - - ">="
91
72
  - !ruby/object:Gem::Version
92
- hash: 3
93
- segments:
94
- - 0
95
- version: "0"
96
- type: :runtime
97
- version_requirements: *id005
73
+ version: 1.1.1
74
+ version:
98
75
  - !ruby/object:Gem::Dependency
99
76
  name: async-rack
100
- prerelease: false
101
- requirement: &id006 !ruby/object:Gem::Requirement
102
- none: false
77
+ type: :runtime
78
+ version_requirement:
79
+ version_requirements: !ruby/object:Gem::Requirement
103
80
  requirements:
104
81
  - - ">="
105
82
  - !ruby/object:Gem::Version
106
- hash: 3
107
- segments:
108
- - 0
109
- version: "0"
110
- type: :runtime
111
- version_requirements: *id006
83
+ version: 0.5.1
84
+ version:
112
85
  - !ruby/object:Gem::Dependency
113
86
  name: rake
114
- prerelease: false
115
- requirement: &id007 !ruby/object:Gem::Requirement
116
- none: false
87
+ type: :development
88
+ version_requirement:
89
+ version_requirements: !ruby/object:Gem::Requirement
117
90
  requirements:
118
91
  - - ">="
119
92
  - !ruby/object:Gem::Version
120
- hash: 3
121
- segments:
122
- - 0
123
93
  version: "0"
124
- type: :development
125
- version_requirements: *id007
94
+ version:
126
95
  - !ruby/object:Gem::Dependency
127
96
  name: rack-test
128
- prerelease: false
129
- requirement: &id008 !ruby/object:Gem::Requirement
130
- none: false
97
+ type: :development
98
+ version_requirement:
99
+ version_requirements: !ruby/object:Gem::Requirement
131
100
  requirements:
132
101
  - - "="
133
102
  - !ruby/object:Gem::Version
134
- hash: 5
135
- segments:
136
- - 0
137
- - 5
138
- - 7
139
103
  version: 0.5.7
140
- type: :development
141
- version_requirements: *id008
104
+ version:
142
105
  - !ruby/object:Gem::Dependency
143
106
  name: wrong
144
- prerelease: false
145
- requirement: &id009 !ruby/object:Gem::Requirement
146
- none: false
107
+ type: :development
108
+ version_requirement:
109
+ version_requirements: !ruby/object:Gem::Requirement
147
110
  requirements:
148
111
  - - "="
149
112
  - !ruby/object:Gem::Version
150
- hash: 11
151
- segments:
152
- - 0
153
- - 5
154
- - 0
155
113
  version: 0.5.0
156
- type: :development
157
- version_requirements: *id009
114
+ version:
158
115
  - !ruby/object:Gem::Dependency
159
116
  name: minitest
160
- prerelease: false
161
- requirement: &id010 !ruby/object:Gem::Requirement
162
- none: false
117
+ type: :development
118
+ version_requirement:
119
+ version_requirements: !ruby/object:Gem::Requirement
163
120
  requirements:
164
121
  - - ">="
165
122
  - !ruby/object:Gem::Version
166
- hash: 3
167
- segments:
168
- - 0
169
123
  version: "0"
170
- type: :development
171
- version_requirements: *id010
124
+ version:
172
125
  description: Bootstraps in code required to take advantage of EventMachine/EM-Synchrony's concurrency enhancements for slow IO. Patches TCPSocket, which makes anything based on it EM-aware (including RestClient). Includes patch for tests. Requires ruby 1.9.
173
126
  email:
174
127
  - kyledrake@gmail.com
@@ -197,29 +150,21 @@ rdoc_options: []
197
150
  require_paths:
198
151
  - lib
199
152
  required_ruby_version: !ruby/object:Gem::Requirement
200
- none: false
201
153
  requirements:
202
154
  - - ">="
203
155
  - !ruby/object:Gem::Version
204
- hash: 3
205
- segments:
206
- - 0
207
156
  version: "0"
157
+ version:
208
158
  required_rubygems_version: !ruby/object:Gem::Requirement
209
- none: false
210
159
  requirements:
211
160
  - - ">="
212
161
  - !ruby/object:Gem::Version
213
- hash: 19
214
- segments:
215
- - 1
216
- - 3
217
- - 4
218
162
  version: 1.3.4
163
+ version:
219
164
  requirements: []
220
165
 
221
166
  rubyforge_project: sinatra-synchrony
222
- rubygems_version: 1.6.2
167
+ rubygems_version: 1.3.5
223
168
  signing_key:
224
169
  specification_version: 3
225
170
  summary: Bootstraps Sinatra with EM-Synchrony code, make TCPSocket EM-aware, provides support for tests