Permalink
Browse files

Load ruby-debug vs. ruby-debug19 based on ruby version.

Check the ruby version and conditionally add a runtime dependency on the right
debugging library.

Fixes errors installing gem on pre-1.9 versions of Ruby.
  • Loading branch information...
1 parent 5f55b94 commit a568c9664672e2a43459e98cecebd50e38ce294c Winfield Peterson committed Jan 6, 2012
Showing with 15 additions and 3 deletions.
  1. +15 −3 settingslogic.gemspec
View
18 settingslogic.gemspec
@@ -47,18 +47,30 @@ Gem::Specification.new do |s|
s.add_runtime_dependency(%q<rake>, [">= 0"])
s.add_runtime_dependency(%q<jeweler>, [">= 0"])
s.add_runtime_dependency(%q<rspec>, [">= 0"])
- s.add_runtime_dependency(%q<ruby-debug19>, [">= 0"])
+ if RUBY_VERSION < "1.9"
+ s.add_runtime_dependency(%q<ruby-debug>, [">= 0"])
+ else
+ s.add_runtime_dependency(%q<ruby-debug19>, [">= 0"])
+ end
else
s.add_dependency(%q<rake>, [">= 0"])
s.add_dependency(%q<jeweler>, [">= 0"])
s.add_dependency(%q<rspec>, [">= 0"])
- s.add_dependency(%q<ruby-debug19>, [">= 0"])
+ if RUBY_VERSION < "1.9"
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
+ else
+ s.add_dependency(%q<ruby-debug19>, [">= 0"])
+ end
end
else
s.add_dependency(%q<rake>, [">= 0"])
s.add_dependency(%q<jeweler>, [">= 0"])
s.add_dependency(%q<rspec>, [">= 0"])
- s.add_dependency(%q<ruby-debug19>, [">= 0"])
+ if RUBY_VERSION < "1.9"
+ s.add_dependency(%q<ruby-debug>, [">= 0"])
+ else
+ s.add_dependency(%q<ruby-debug19>, [">= 0"])
+ end
end
end

0 comments on commit a568c96

Please sign in to comment.