mongrel2 0.16.0 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.rdoc +10 -0
- data/Rakefile +1 -0
- data/lib/mongrel2.rb +2 -2
- data/lib/mongrel2/config.rb +25 -2
- data/lib/mongrel2/websocket.rb +1 -1
- metadata +44 -33
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.rdoc
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
== v0.17.0 [2012-03-18] Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
- Squelch logging of expected SQL errors.
|
4
|
+
Errors are normal during Mongrel2::Config.db= and
|
5
|
+
.database_initialized?, so add a new .without_sql_logging method for
|
6
|
+
temporarily disabling SQL logging, and wrap that around the methods
|
7
|
+
in quesion.
|
8
|
+
- Fix documentation for WebSocket#validate_control_frame
|
9
|
+
|
10
|
+
|
1
11
|
== v0.16.0 [2012-03-10] Michael Granger <ged@FaerieMUD.org>
|
2
12
|
|
3
13
|
- Add WebSocket (RFC6455) support
|
data/Rakefile
CHANGED
@@ -35,6 +35,7 @@ hoespec = Hoe.spec 'mongrel2' do
|
|
35
35
|
self.dependency 'zmq', '~> 2.1.4'
|
36
36
|
|
37
37
|
self.dependency 'configurability', '~> 1.0', :developer
|
38
|
+
self.dependency 'simplecov', '~> 0.6', :developer
|
38
39
|
self.dependency 'rspec', '~> 2.8', :developer
|
39
40
|
|
40
41
|
self.spec_extras[:licenses] = ["BSD"]
|
data/lib/mongrel2.rb
CHANGED
@@ -14,10 +14,10 @@ module Mongrel2
|
|
14
14
|
abort "\n\n>>> Mongrel2 requires Ruby 1.9.2 or later. <<<\n\n" if RUBY_VERSION < '1.9.2'
|
15
15
|
|
16
16
|
# Library version constant
|
17
|
-
VERSION = '0.
|
17
|
+
VERSION = '0.17.0'
|
18
18
|
|
19
19
|
# Version-control revision constant
|
20
|
-
REVISION = %q$Revision:
|
20
|
+
REVISION = %q$Revision: 023114cc92af $
|
21
21
|
|
22
22
|
|
23
23
|
require 'mongrel2/logging'
|
data/lib/mongrel2/config.rb
CHANGED
@@ -120,7 +120,10 @@ module Mongrel2
|
|
120
120
|
### Reset the database connection that all model objects will use to +newdb+, which should
|
121
121
|
### be a Sequel::Database.
|
122
122
|
def self::db=( newdb )
|
123
|
-
|
123
|
+
self.without_sql_logging( newdb ) do
|
124
|
+
super
|
125
|
+
end
|
126
|
+
|
124
127
|
if self == Mongrel2::Config
|
125
128
|
Mongrel2.log.debug "Resetting database connection for %d config classes to: %p" %
|
126
129
|
[ self.descendents.length, newdb ]
|
@@ -166,7 +169,9 @@ module Mongrel2
|
|
166
169
|
### Returns +true+ if the config database has been installed. This currently only
|
167
170
|
### checks to see if the 'server' table exists for the sake of speed.
|
168
171
|
def self::database_initialized?
|
169
|
-
return self.
|
172
|
+
return self.without_sql_logging do
|
173
|
+
self.db.table_exists?( :server )
|
174
|
+
end
|
170
175
|
end
|
171
176
|
|
172
177
|
|
@@ -202,6 +207,24 @@ module Mongrel2
|
|
202
207
|
return Pathname( pathname )
|
203
208
|
end
|
204
209
|
|
210
|
+
|
211
|
+
#########
|
212
|
+
protected
|
213
|
+
#########
|
214
|
+
|
215
|
+
### Execute a block after removing all loggers from the current database handle, then
|
216
|
+
### restore them before returning.
|
217
|
+
def self::without_sql_logging( logged_db=nil )
|
218
|
+
logged_db ||= self.db
|
219
|
+
|
220
|
+
loggers_to_restore = logged_db.loggers.dup
|
221
|
+
logged_db.loggers.clear
|
222
|
+
yield
|
223
|
+
ensure
|
224
|
+
logged_db.loggers.replace( loggers_to_restore )
|
225
|
+
end
|
226
|
+
|
227
|
+
|
205
228
|
end # class Config
|
206
229
|
|
207
230
|
|
data/lib/mongrel2/websocket.rb
CHANGED
@@ -516,7 +516,7 @@ module Mongrel2::WebSocket
|
|
516
516
|
end
|
517
517
|
|
518
518
|
|
519
|
-
### Sanity-check control frame +data+,
|
519
|
+
### Sanity-check control frame +data+, adding an error message to #errors
|
520
520
|
### if there's a problem.
|
521
521
|
def validate_control_frame
|
522
522
|
return unless self.control?
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mongrel2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -36,11 +36,11 @@ cert_chain:
|
|
36
36
|
YUhDS0xaZFNLai9SSHVUT3QrZ2JsUmV4OEZBaDhOZUEKY21saFhlNDZwWk5K
|
37
37
|
Z1dLYnhaYWg4NWpJang5NWhSOHZPSStOQU01aUg5a09xSzEzRHJ4YWNUS1Bo
|
38
38
|
cWo1UGp3RgotLS0tLUVORCBDRVJUSUZJQ0FURS0tLS0tCg==
|
39
|
-
date: 2012-03-
|
39
|
+
date: 2012-03-18 00:00:00.000000000 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: nokogiri
|
43
|
-
requirement: &
|
43
|
+
requirement: &70107726149280 !ruby/object:Gem::Requirement
|
44
44
|
none: false
|
45
45
|
requirements:
|
46
46
|
- - ~>
|
@@ -48,10 +48,10 @@ dependencies:
|
|
48
48
|
version: '1.5'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
|
-
version_requirements: *
|
51
|
+
version_requirements: *70107726149280
|
52
52
|
- !ruby/object:Gem::Dependency
|
53
53
|
name: sequel
|
54
|
-
requirement: &
|
54
|
+
requirement: &70107726148340 !ruby/object:Gem::Requirement
|
55
55
|
none: false
|
56
56
|
requirements:
|
57
57
|
- - ~>
|
@@ -59,10 +59,10 @@ dependencies:
|
|
59
59
|
version: '3.31'
|
60
60
|
type: :runtime
|
61
61
|
prerelease: false
|
62
|
-
version_requirements: *
|
62
|
+
version_requirements: *70107726148340
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: amalgalite
|
65
|
-
requirement: &
|
65
|
+
requirement: &70107726147900 !ruby/object:Gem::Requirement
|
66
66
|
none: false
|
67
67
|
requirements:
|
68
68
|
- - ~>
|
@@ -70,10 +70,10 @@ dependencies:
|
|
70
70
|
version: '1.1'
|
71
71
|
type: :runtime
|
72
72
|
prerelease: false
|
73
|
-
version_requirements: *
|
73
|
+
version_requirements: *70107726147900
|
74
74
|
- !ruby/object:Gem::Dependency
|
75
75
|
name: tnetstring
|
76
|
-
requirement: &
|
76
|
+
requirement: &70107726147460 !ruby/object:Gem::Requirement
|
77
77
|
none: false
|
78
78
|
requirements:
|
79
79
|
- - ~>
|
@@ -81,10 +81,10 @@ dependencies:
|
|
81
81
|
version: '0.3'
|
82
82
|
type: :runtime
|
83
83
|
prerelease: false
|
84
|
-
version_requirements: *
|
84
|
+
version_requirements: *70107726147460
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: yajl-ruby
|
87
|
-
requirement: &
|
87
|
+
requirement: &70107726147020 !ruby/object:Gem::Requirement
|
88
88
|
none: false
|
89
89
|
requirements:
|
90
90
|
- - ~>
|
@@ -92,10 +92,10 @@ dependencies:
|
|
92
92
|
version: '1.0'
|
93
93
|
type: :runtime
|
94
94
|
prerelease: false
|
95
|
-
version_requirements: *
|
95
|
+
version_requirements: *70107726147020
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
97
|
name: trollop
|
98
|
-
requirement: &
|
98
|
+
requirement: &70107726146580 !ruby/object:Gem::Requirement
|
99
99
|
none: false
|
100
100
|
requirements:
|
101
101
|
- - ~>
|
@@ -103,10 +103,10 @@ dependencies:
|
|
103
103
|
version: '1.16'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
|
-
version_requirements: *
|
106
|
+
version_requirements: *70107726146580
|
107
107
|
- !ruby/object:Gem::Dependency
|
108
108
|
name: sysexits
|
109
|
-
requirement: &
|
109
|
+
requirement: &70107726146140 !ruby/object:Gem::Requirement
|
110
110
|
none: false
|
111
111
|
requirements:
|
112
112
|
- - ~>
|
@@ -114,10 +114,10 @@ dependencies:
|
|
114
114
|
version: '1.0'
|
115
115
|
type: :runtime
|
116
116
|
prerelease: false
|
117
|
-
version_requirements: *
|
117
|
+
version_requirements: *70107726146140
|
118
118
|
- !ruby/object:Gem::Dependency
|
119
119
|
name: zmq
|
120
|
-
requirement: &
|
120
|
+
requirement: &70107726145700 !ruby/object:Gem::Requirement
|
121
121
|
none: false
|
122
122
|
requirements:
|
123
123
|
- - ~>
|
@@ -125,10 +125,10 @@ dependencies:
|
|
125
125
|
version: 2.1.4
|
126
126
|
type: :runtime
|
127
127
|
prerelease: false
|
128
|
-
version_requirements: *
|
128
|
+
version_requirements: *70107726145700
|
129
129
|
- !ruby/object:Gem::Dependency
|
130
130
|
name: hoe-mercurial
|
131
|
-
requirement: &
|
131
|
+
requirement: &70107726145260 !ruby/object:Gem::Requirement
|
132
132
|
none: false
|
133
133
|
requirements:
|
134
134
|
- - ~>
|
@@ -136,10 +136,10 @@ dependencies:
|
|
136
136
|
version: 1.3.1
|
137
137
|
type: :development
|
138
138
|
prerelease: false
|
139
|
-
version_requirements: *
|
139
|
+
version_requirements: *70107726145260
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: hoe-highline
|
142
|
-
requirement: &
|
142
|
+
requirement: &70107726144780 !ruby/object:Gem::Requirement
|
143
143
|
none: false
|
144
144
|
requirements:
|
145
145
|
- - ~>
|
@@ -147,10 +147,10 @@ dependencies:
|
|
147
147
|
version: 0.0.1
|
148
148
|
type: :development
|
149
149
|
prerelease: false
|
150
|
-
version_requirements: *
|
150
|
+
version_requirements: *70107726144780
|
151
151
|
- !ruby/object:Gem::Dependency
|
152
152
|
name: configurability
|
153
|
-
requirement: &
|
153
|
+
requirement: &70107726144300 !ruby/object:Gem::Requirement
|
154
154
|
none: false
|
155
155
|
requirements:
|
156
156
|
- - ~>
|
@@ -158,10 +158,21 @@ dependencies:
|
|
158
158
|
version: '1.0'
|
159
159
|
type: :development
|
160
160
|
prerelease: false
|
161
|
-
version_requirements: *
|
161
|
+
version_requirements: *70107726144300
|
162
|
+
- !ruby/object:Gem::Dependency
|
163
|
+
name: simplecov
|
164
|
+
requirement: &70107726143860 !ruby/object:Gem::Requirement
|
165
|
+
none: false
|
166
|
+
requirements:
|
167
|
+
- - ~>
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
version: '0.6'
|
170
|
+
type: :development
|
171
|
+
prerelease: false
|
172
|
+
version_requirements: *70107726143860
|
162
173
|
- !ruby/object:Gem::Dependency
|
163
174
|
name: rspec
|
164
|
-
requirement: &
|
175
|
+
requirement: &70107726143420 !ruby/object:Gem::Requirement
|
165
176
|
none: false
|
166
177
|
requirements:
|
167
178
|
- - ~>
|
@@ -169,10 +180,10 @@ dependencies:
|
|
169
180
|
version: '2.8'
|
170
181
|
type: :development
|
171
182
|
prerelease: false
|
172
|
-
version_requirements: *
|
183
|
+
version_requirements: *70107726143420
|
173
184
|
- !ruby/object:Gem::Dependency
|
174
185
|
name: rdoc
|
175
|
-
requirement: &
|
186
|
+
requirement: &70107726142980 !ruby/object:Gem::Requirement
|
176
187
|
none: false
|
177
188
|
requirements:
|
178
189
|
- - ~>
|
@@ -180,18 +191,18 @@ dependencies:
|
|
180
191
|
version: '3.10'
|
181
192
|
type: :development
|
182
193
|
prerelease: false
|
183
|
-
version_requirements: *
|
194
|
+
version_requirements: *70107726142980
|
184
195
|
- !ruby/object:Gem::Dependency
|
185
196
|
name: hoe
|
186
|
-
requirement: &
|
197
|
+
requirement: &70107726142540 !ruby/object:Gem::Requirement
|
187
198
|
none: false
|
188
199
|
requirements:
|
189
200
|
- - ~>
|
190
201
|
- !ruby/object:Gem::Version
|
191
|
-
version: '2.
|
202
|
+
version: '2.16'
|
192
203
|
type: :development
|
193
204
|
prerelease: false
|
194
|
-
version_requirements: *
|
205
|
+
version_requirements: *70107726142540
|
195
206
|
description: ! 'Ruby-Mongrel2 is a complete Ruby (1.9-only) connector for
|
196
207
|
|
197
208
|
Mongrel2[http://mongrel2.org/].
|
@@ -210,11 +221,11 @@ executables:
|
|
210
221
|
- m2sh.rb
|
211
222
|
extensions: []
|
212
223
|
extra_rdoc_files:
|
213
|
-
- Manifest.txt
|
214
|
-
- examples/README.txt
|
215
224
|
- DSL.rdoc
|
216
225
|
- History.rdoc
|
226
|
+
- Manifest.txt
|
217
227
|
- README.rdoc
|
228
|
+
- examples/README.txt
|
218
229
|
files:
|
219
230
|
- .autotest
|
220
231
|
- .gemtest
|
metadata.gz.sig
CHANGED
Binary file
|