merb-core 1.0.10 → 1.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile
CHANGED
data/lib/merb-core/constants.rb
CHANGED
|
@@ -38,7 +38,7 @@ module Merb
|
|
|
38
38
|
JSON_MIME_TYPE_REGEXP = %r{^application/json|^text/x-json}.freeze
|
|
39
39
|
XML_MIME_TYPE_REGEXP = %r{^application/xml|^text/xml}.freeze
|
|
40
40
|
FORM_URL_ENCODED_REGEXP = %r{^application/x-www-form-urlencoded}.freeze
|
|
41
|
-
LOCAL_IP_REGEXP = /^unknown$|^(127|10|172\.16|192\.168)\./i.freeze
|
|
41
|
+
LOCAL_IP_REGEXP = /^unknown$|^(127|10|172\.16|192\.168)\.|^(172\.(1[6-9]|2[0-9]|3[0-1]))\.|^(169\.254)\./i.freeze
|
|
42
42
|
XML_HTTP_REQUEST_REGEXP = /XMLHttpRequest/i.freeze
|
|
43
43
|
UPCASE_CONTENT_TYPE = 'CONTENT_TYPE'.freeze
|
|
44
44
|
CONTENT_TYPE = "Content-Type".freeze
|
|
@@ -436,7 +436,7 @@ module Kernel
|
|
|
436
436
|
#
|
|
437
437
|
# :api: public
|
|
438
438
|
def extract_options_from_args!(args)
|
|
439
|
-
args.pop if Hash
|
|
439
|
+
args.pop if (args.last.instance_of?(Hash) || args.last.instance_of?(Mash))
|
|
440
440
|
end
|
|
441
441
|
|
|
442
442
|
# Checks that the given objects quack like the given conditions.
|
|
@@ -183,7 +183,7 @@ module Merb
|
|
|
183
183
|
def identifier_for(obj)
|
|
184
184
|
return if obj.is_a?(String) || obj.is_a?(Symbol) || obj.is_a?(Numeric) ||
|
|
185
185
|
obj.is_a?(TrueClass) || obj.is_a?(FalseClass) || obj.is_a?(NilClass) ||
|
|
186
|
-
obj.is_a?(Array) || obj.
|
|
186
|
+
obj.is_a?(Array) || obj.instance_of?(Hash)
|
|
187
187
|
|
|
188
188
|
@identifiers.each do |klass, identifier|
|
|
189
189
|
return identifier if obj.is_a?(klass)
|
|
@@ -152,13 +152,14 @@ module Merb
|
|
|
152
152
|
pid, status = @pids[port + i], nil
|
|
153
153
|
poller = Merb::System::PortablePoller.new(pid)
|
|
154
154
|
begin
|
|
155
|
-
|
|
155
|
+
tick = 1
|
|
156
156
|
loop do
|
|
157
157
|
# Watch for the pid to exit.
|
|
158
158
|
_, status = Process.wait2(pid, Process::WNOHANG)
|
|
159
159
|
break if status
|
|
160
160
|
|
|
161
|
-
if (
|
|
161
|
+
if (tick % 120 == 0) && Merb::Config[:max_memory] && poller.memory > Merb::Config[:max_memory]
|
|
162
|
+
tick = 1
|
|
162
163
|
Process.kill("INT", pid)
|
|
163
164
|
if (Process.kill(0, pid) rescue false)
|
|
164
165
|
sleep Merb::Config[:hang_time] || 5
|
|
@@ -169,7 +170,7 @@ module Merb
|
|
|
169
170
|
status = Struct.new(:exitstatus).new(nil)
|
|
170
171
|
break
|
|
171
172
|
end
|
|
172
|
-
|
|
173
|
+
tick += 1
|
|
173
174
|
sleep 0.25
|
|
174
175
|
end
|
|
175
176
|
|
data/lib/merb-core/version.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
module Merb
|
|
2
|
-
VERSION = '1.0.
|
|
3
|
-
DM_VERSION = '0.9.
|
|
2
|
+
VERSION = '1.0.11' unless defined?(Merb::VERSION)
|
|
3
|
+
DM_VERSION = '0.9.11' unless defined?(Merb::DM_VERSION)
|
|
4
4
|
DO_VERSION = '0.9.11' unless defined?(Merb::DO_VERSION)
|
|
5
5
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: merb-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ezra Zygmuntowicz
|
|
@@ -9,7 +9,7 @@ autorequire:
|
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
11
|
|
|
12
|
-
date: 2009-03-
|
|
12
|
+
date: 2009-03-31 00:00:00 -07:00
|
|
13
13
|
default_executable:
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|