mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
fix one deprecation warning for rubygems >= 1.8.2
This commit is contained in:
parent
998231066f
commit
30c2fb8b82
1 changed files with 10 additions and 1 deletions
|
|
@ -1,6 +1,15 @@
|
|||
# adapted from https://gist.github.com/471663 and https://rails.lighthouseapp.com/projects/8994/tickets/4690-mongrel-doesnt-work-with-rails-238
|
||||
|
||||
if Rails.version == '2.3.14' && Gem.available?('mongrel', '~>1.1.5') && self.class.const_defined?(:Mongrel)
|
||||
def check_mongrel_around_115
|
||||
# Gem.available? is deprecated from rubygems 1.8.2
|
||||
Gem::Specification::find_by_name "mongrel", "~>1.1.5"
|
||||
rescue
|
||||
Gem.available?('mongrel', '~>1.1.5')
|
||||
end
|
||||
|
||||
mongrel115 = check_mongrel_around_115
|
||||
|
||||
if Rails.version == '2.3.14' && mongrel115 && self.class.const_defined?(:Mongrel)
|
||||
|
||||
# Pulled right from latest rack. Old looked like this in 1.1.0 version.
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue