]> git.wincent.com - wikitext.git/commitdiff
Handle missing "add_development_dependency" by defining it
authorWincent Colaiuta <win@wincent.com>
Tue, 22 Jun 2010 06:35:56 +0000 (08:35 +0200)
committerWincent Colaiuta <win@wincent.com>
Tue, 22 Jun 2010 06:35:56 +0000 (08:35 +0200)
This will allow us to conveniently add requirements where needed.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
wikitext.gemspec

index dfcd8b95115af2034f1b6344a62411d2891a4f3e..f55e0cecfc6d2d66783043ff3085a3ffa830436f 100644 (file)
@@ -36,11 +36,14 @@ Gem::Specification.new do |s|
                             'spec/*.rb']
   s.extensions        = ['ext/extconf.rb']
   s.executables       = ['wikitext']
-  %w{rspec thor wopen3 yard}.each do |dep|
-    if s.respond_to? :add_development_dependency
-      s.add_development_dependency dep
-    else
-      s.add_dependency dep
+
+  if !s.respond_to? :add_development_dependency
+    def s.add_development_dependency gem, *requirements
+      s.add_dependency gem, *requirements
     end
   end
+  s.add_development_dependency 'rspec'
+  s.add_development_dependency 'thor'
+  s.add_development_dependency 'yard'
+  s.add_development_dependency 'wopen3'
 end