merb-core 1.0.10 → 1.0.11

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -352,7 +352,7 @@ def contributors(since_release = nil)
352
352
  git_log(since_release).split("\n").uniq.sort
353
353
  end
354
354
 
355
- PREVIOUS_RELEASE = '0.9.9'
355
+ PREVIOUS_RELEASE = '0.9.10'
356
356
  namespace :history do
357
357
  namespace :update do
358
358
  desc "updates contributors list"
@@ -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 === args.last
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.is_a?(Hash)
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
- i = 0
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 (i % 120 == 0) && Merb::Config[:max_memory] && poller.memory > Merb::Config[:max_memory]
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
- i += 1
173
+ tick += 1
173
174
  sleep 0.25
174
175
  end
175
176
 
@@ -1,5 +1,5 @@
1
1
  module Merb
2
- VERSION = '1.0.10' unless defined?(Merb::VERSION)
3
- DM_VERSION = '0.9.10' unless defined?(Merb::DM_VERSION)
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.10
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-18 00:00:00 -07:00
12
+ date: 2009-03-31 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency