mongrel2 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/ChangeLog CHANGED
@@ -1,8 +1,38 @@
1
+ 2011-10-09 Michael Granger <ged@FaerieMUD.org>
2
+
3
+ * .hgtags:
4
+ Added tag v0.7.0 for changeset c20d38b9cd67
5
+ [db86ba6a709e] [tip]
6
+
7
+ * .hgsigs:
8
+ Added signature for changeset 297e73f3ad7a
9
+ [c20d38b9cd67] [v0.7.0]
10
+
11
+ * History.rdoc, lib/mongrel2.rb:
12
+ Bumped minor version, updated History.
13
+ [297e73f3ad7a]
14
+
15
+ * lib/mongrel2/response.rb, spec/mongrel2/response_spec.rb:
16
+ Add an optional #request parameter to Mongrel2::Response and make
17
+ Response.from_request set it. This is to make things like content-
18
+ negotiation less of a pain in the ass.
19
+ [4fb3017de357]
20
+
21
+ 2011-10-05 Michael Granger <ged@FaerieMUD.org>
22
+
23
+ * lib/mongrel2/handler.rb:
24
+ Log request and response both at INFO.
25
+ [56361e8db7bd]
26
+
1
27
  2011-10-03 Michael Granger <ged@FaerieMUD.org>
2
28
 
29
+ * History.rdoc:
30
+ Fixing the header in History
31
+ [0583c789593c]
32
+
3
33
  * .hgtags:
4
34
  Added tag v0.6.0 for changeset 4d0e21e8b7f8
5
- [bc11f65d120d] [tip]
35
+ [bc11f65d120d]
6
36
 
7
37
  * .hgsigs:
8
38
  Added signature for changeset 8234d3fa985b
@@ -23,7 +53,7 @@
23
53
  encoding headers: #content_type, #content_encoding
24
54
  - Switched the specs to use Mongrel2::RequestFactory for making
25
55
  request objects
26
- [d0d1a93982fc]
56
+ [d0d1a93982fc] [github/master]
27
57
 
28
58
  2011-09-30 Michael Granger <ged@FaerieMUD.org>
29
59
 
@@ -48,7 +78,7 @@
48
78
 
49
79
  * .hgtags:
50
80
  Added tag v0.4.0 for changeset 25f2272fc9f8
51
- [0b4e011b72b4] [github/master]
81
+ [0b4e011b72b4]
52
82
 
53
83
  * .hgsigs:
54
84
  Added signature for changeset 3fb74e2ce308
@@ -296,18 +326,14 @@
296
326
  * Automated merge with ssh://deveiate.org/Ruby-Mongrel2
297
327
  [2da76acfb8db]
298
328
 
299
- * Rakefile:
300
- Automated merge with ssh://deveiate.org/Ruby-Mongrel2
301
- [e3908fd8e744]
302
-
303
- * Rakefile:
304
- Remove ChangeLog task, since hoe-deveiate already does it
305
- [5f4982a32949]
306
-
307
329
  * History.rdoc:
308
330
  Updating History
309
331
  [3b013d4918c6]
310
332
 
333
+ * Rakefile:
334
+ Automated merge with ssh://deveiate.org/Ruby-Mongrel2
335
+ [e3908fd8e744]
336
+
311
337
  * .hgtags:
312
338
  Added tag v0.1.1 for changeset 42da048fe158
313
339
  [2489be2693d5]
@@ -324,6 +350,10 @@
324
350
  Updated rbzmq dependency
325
351
  [758fe465780e]
326
352
 
353
+ * Rakefile:
354
+ Remove ChangeLog task, since hoe-deveiate already does it
355
+ [5f4982a32949]
356
+
327
357
  * .hgtags:
328
358
  Added tag v0.1.0 for changeset 55c8f01c01c6
329
359
  [39b509c68142]
@@ -365,10 +395,6 @@
365
395
  Merged with 3659a56af8fb
366
396
  [f2201728e874]
367
397
 
368
- * .hgignore:
369
- Ignoring packaging directory
370
- [0613976b6735]
371
-
372
398
  2011-09-12 Michael Granger <ged@FaerieMUD.org>
373
399
 
374
400
  * README.rdoc:
@@ -437,6 +463,12 @@
437
463
  procedures.
438
464
  [19e0a72320dd]
439
465
 
466
+ 2011-09-13 Michael Granger <ged@FaerieMUD.org>
467
+
468
+ * .hgignore:
469
+ Ignoring packaging directory
470
+ [0613976b6735]
471
+
440
472
  2011-09-10 Michael Granger <ged@FaerieMUD.org>
441
473
 
442
474
  * bin/m2sh.rb:
@@ -477,18 +509,6 @@
477
509
  * Merged with 6ea60b67e106
478
510
  [6d5341f30cc4]
479
511
 
480
- * Manifest.txt:
481
- Updating the manifest for the first release
482
- [916a79570cdc]
483
-
484
- * examples/helloworld-handler.rb, lib/mongrel2/handler.rb:
485
- More Handler API docs.
486
- [47427db9b4fb]
487
-
488
- * lib/mongrel2/handler.rb:
489
- Adding some Mongrel2::Handler API docs.
490
- [da95bfdf83da]
491
-
492
512
  * lib/mongrel2/config/host.rb:
493
513
  Adding a many_to_one association for the server belonging to a
494
514
  Mongrel2::Config::Host
@@ -508,6 +528,18 @@
508
528
  Adding a proftools dump of the requestdumper app
509
529
  [00cbc1b89a61]
510
530
 
531
+ * Manifest.txt:
532
+ Updating the manifest for the first release
533
+ [916a79570cdc]
534
+
535
+ * examples/helloworld-handler.rb, lib/mongrel2/handler.rb:
536
+ More Handler API docs.
537
+ [47427db9b4fb]
538
+
539
+ * lib/mongrel2/handler.rb:
540
+ Adding some Mongrel2::Handler API docs.
541
+ [da95bfdf83da]
542
+
511
543
  2011-09-08 Michael Granger <ged@FaerieMUD.org>
512
544
 
513
545
  * README.rdoc, lib/mongrel2.rb, lib/mongrel2/config.rb,
@@ -1,4 +1,12 @@
1
- ## v0.6.0 [2011-10-03] Michael Granger <ged@FaerieMUD.org>
1
+ == v0.7.0 [2011-10-09] Michael Granger <ged@FaerieMUD.org>
2
+
3
+ - Add an optional #request attribute to Mongrel2::Response and make
4
+ Response.from_request set it. This is to make things like content-
5
+ negotiation less of a pain in the ass.
6
+ - Log request and response both at INFO.
7
+
8
+
9
+ == v0.6.0 [2011-10-03] Michael Granger <ged@FaerieMUD.org>
2
10
 
3
11
  Mongrel2::HTTPRequest enhancements.
4
12
  - Added #body= for rewriting the entity body
@@ -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.6.0'
17
+ VERSION = '0.7.0'
18
18
 
19
19
  # Version-control revision constant
20
- REVISION = %q$Revision: c2ffa52b95e8 $
20
+ REVISION = %q$Revision: 297e73f3ad7a $
21
21
 
22
22
 
23
23
  require 'mongrel2/logging'
@@ -159,15 +159,15 @@ class Mongrel2::Handler
159
159
  def start_accepting_requests
160
160
  until @conn.closed?
161
161
  req = @conn.receive
162
- self.log.info "%p via %s:%d" % [ req.class, req.sender_id, req.conn_id ]
162
+ self.log.info( req.inspect )
163
163
 
164
164
  res = self.dispatch_request( req )
165
165
 
166
166
  if res
167
- self.log.debug " responding with a %p" % [ res.class ]
167
+ self.log.info( res.inspect )
168
168
  @conn.reply( res ) unless @conn.closed?
169
169
  else
170
- self.log.debug " no response; ignoring."
170
+ self.log.info " no response; ignoring."
171
171
  end
172
172
  end
173
173
  rescue ZMQ::Error => err
@@ -19,7 +19,10 @@ class Mongrel2::Response
19
19
  ### Create a response to the specified +request+ and return it.
20
20
  def self::from_request( request )
21
21
  Mongrel2.log.debug "Creating a %p to request %p" % [ self, request ]
22
- return new( request.sender_id, request.conn_id )
22
+ response = new( request.sender_id, request.conn_id )
23
+ response.request = request
24
+
25
+ return response
23
26
  end
24
27
 
25
28
 
@@ -28,6 +31,7 @@ class Mongrel2::Response
28
31
  @sender_id = sender_id
29
32
  @conn_id = conn_id
30
33
  @body = body
34
+ @request = nil
31
35
  end
32
36
 
33
37
 
@@ -46,6 +50,9 @@ class Mongrel2::Response
46
50
  # The body of the response
47
51
  attr_accessor :body
48
52
 
53
+ # The request that this response is for, if there is one
54
+ attr_accessor :request
55
+
49
56
 
50
57
  ### Append the given +object+ to the response body. Returns the response for
51
58
  ### chaining.
@@ -42,6 +42,7 @@ describe Mongrel2::Response do
42
42
  response.should be_a( Mongrel2::Response )
43
43
  response.sender_id.should == req.sender_id
44
44
  response.conn_id.should == req.conn_id
45
+ response.request.should equal( req )
45
46
  end
46
47
 
47
48
 
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.6.0
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -48,11 +48,11 @@ cert_chain:
48
48
  -----END CERTIFICATE-----
49
49
 
50
50
  '
51
- date: 2011-10-03 00:00:00.000000000Z
51
+ date: 2011-10-09 00:00:00.000000000Z
52
52
  dependencies:
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: nokogiri
55
- requirement: &70332659324060 !ruby/object:Gem::Requirement
55
+ requirement: &2169400600 !ruby/object:Gem::Requirement
56
56
  none: false
57
57
  requirements:
58
58
  - - ~>
@@ -60,10 +60,10 @@ dependencies:
60
60
  version: '1.5'
61
61
  type: :runtime
62
62
  prerelease: false
63
- version_requirements: *70332659324060
63
+ version_requirements: *2169400600
64
64
  - !ruby/object:Gem::Dependency
65
65
  name: sequel
66
- requirement: &70332659323600 !ruby/object:Gem::Requirement
66
+ requirement: &2169399460 !ruby/object:Gem::Requirement
67
67
  none: false
68
68
  requirements:
69
69
  - - ~>
@@ -71,10 +71,10 @@ dependencies:
71
71
  version: '3.26'
72
72
  type: :runtime
73
73
  prerelease: false
74
- version_requirements: *70332659323600
74
+ version_requirements: *2169399460
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: amalgalite
77
- requirement: &70332659323100 !ruby/object:Gem::Requirement
77
+ requirement: &2169398740 !ruby/object:Gem::Requirement
78
78
  none: false
79
79
  requirements:
80
80
  - - ~>
@@ -82,10 +82,10 @@ dependencies:
82
82
  version: '1.1'
83
83
  type: :runtime
84
84
  prerelease: false
85
- version_requirements: *70332659323100
85
+ version_requirements: *2169398740
86
86
  - !ruby/object:Gem::Dependency
87
87
  name: tnetstring
88
- requirement: &70332659322480 !ruby/object:Gem::Requirement
88
+ requirement: &2169397920 !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
91
91
  - - ~>
@@ -93,10 +93,10 @@ dependencies:
93
93
  version: '0.3'
94
94
  type: :runtime
95
95
  prerelease: false
96
- version_requirements: *70332659322480
96
+ version_requirements: *2169397920
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: yajl-ruby
99
- requirement: &70332659322040 !ruby/object:Gem::Requirement
99
+ requirement: &2169397080 !ruby/object:Gem::Requirement
100
100
  none: false
101
101
  requirements:
102
102
  - - ~>
@@ -104,10 +104,10 @@ dependencies:
104
104
  version: '0.8'
105
105
  type: :runtime
106
106
  prerelease: false
107
- version_requirements: *70332659322040
107
+ version_requirements: *2169397080
108
108
  - !ruby/object:Gem::Dependency
109
109
  name: zmq
110
- requirement: &70332659321520 !ruby/object:Gem::Requirement
110
+ requirement: &2169396360 !ruby/object:Gem::Requirement
111
111
  none: false
112
112
  requirements:
113
113
  - - ~>
@@ -115,10 +115,10 @@ dependencies:
115
115
  version: 2.1.4
116
116
  type: :runtime
117
117
  prerelease: false
118
- version_requirements: *70332659321520
118
+ version_requirements: *2169396360
119
119
  - !ruby/object:Gem::Dependency
120
120
  name: hoe-mercurial
121
- requirement: &70332659321000 !ruby/object:Gem::Requirement
121
+ requirement: &2169395800 !ruby/object:Gem::Requirement
122
122
  none: false
123
123
  requirements:
124
124
  - - ~>
@@ -126,10 +126,10 @@ dependencies:
126
126
  version: 1.3.1
127
127
  type: :development
128
128
  prerelease: false
129
- version_requirements: *70332659321000
129
+ version_requirements: *2169395800
130
130
  - !ruby/object:Gem::Dependency
131
131
  name: hoe-highline
132
- requirement: &70332659320420 !ruby/object:Gem::Requirement
132
+ requirement: &2169394780 !ruby/object:Gem::Requirement
133
133
  none: false
134
134
  requirements:
135
135
  - - ~>
@@ -137,10 +137,10 @@ dependencies:
137
137
  version: 0.0.1
138
138
  type: :development
139
139
  prerelease: false
140
- version_requirements: *70332659320420
140
+ version_requirements: *2169394780
141
141
  - !ruby/object:Gem::Dependency
142
142
  name: configurability
143
- requirement: &70332659319940 !ruby/object:Gem::Requirement
143
+ requirement: &2169393980 !ruby/object:Gem::Requirement
144
144
  none: false
145
145
  requirements:
146
146
  - - ~>
@@ -148,10 +148,10 @@ dependencies:
148
148
  version: '1.0'
149
149
  type: :development
150
150
  prerelease: false
151
- version_requirements: *70332659319940
151
+ version_requirements: *2169393980
152
152
  - !ruby/object:Gem::Dependency
153
153
  name: rspec
154
- requirement: &70332659319500 !ruby/object:Gem::Requirement
154
+ requirement: &2169392940 !ruby/object:Gem::Requirement
155
155
  none: false
156
156
  requirements:
157
157
  - - ~>
@@ -159,10 +159,10 @@ dependencies:
159
159
  version: '2.4'
160
160
  type: :development
161
161
  prerelease: false
162
- version_requirements: *70332659319500
162
+ version_requirements: *2169392940
163
163
  - !ruby/object:Gem::Dependency
164
164
  name: hoe
165
- requirement: &70332659318960 !ruby/object:Gem::Requirement
165
+ requirement: &2169392060 !ruby/object:Gem::Requirement
166
166
  none: false
167
167
  requirements:
168
168
  - - ~>
@@ -170,7 +170,7 @@ dependencies:
170
170
  version: '2.12'
171
171
  type: :development
172
172
  prerelease: false
173
- version_requirements: *70332659318960
173
+ version_requirements: *2169392060
174
174
  description: ! "Ruby-Mongrel2 is a complete Ruby (1.9-only) connector for \nMongrel2[http://mongrel2.org/].\n\nThis
175
175
  library includes configuration-database ORM classes, a Ruby\nimplementation of the
176
176
  'm2sh' tool, a configuration DSL for generating config\ndatabases in pure Ruby,
metadata.gz.sig CHANGED
Binary file