Skip to content
Browse files

Fix bundler complaining about not having rake-compiler or rvm when we…

… are in a gem (not generating from Ragel sources).
  • Loading branch information...
1 parent 418f36f commit 81d3bbcd0191a3f467d0c1d1fb547050c7a56551 @jgarber jgarber committed Feb 7, 2011
Showing with 16 additions and 6 deletions.
  1. +2 −2 Gemfile
  2. +5 −3 Rakefile
  3. +9 −1 redcloth.gemspec
View
4 Gemfile
@@ -1,7 +1,7 @@
source :rubygems
gemspec
-group :development do
- gem 'rvm'
+group :compilation do
+ gem 'rvm', '~> 1.2.6'
gem 'rake-compiler', '~> 0.7.1'
end
View
8 Rakefile
@@ -1,16 +1,18 @@
# encoding: utf-8
require 'rubygems'
require 'bundler'
-Bundler.setup
ENV['RUBYOPT'] = nil # Necessary to prevent Bundler from *&^%$#ing up rake-compiler.
require 'rake/clean'
if File.directory? "ragel"
+ Bundler.setup
Bundler::GemHelper.install_tasks
- Bundler.setup(:development)
Dir['tasks/**/*.rake'].each { |rake| load File.expand_path(rake) }
else
- # Omit generation/compile tasks. In a gem package we only need testing tasks.
+ # Omit generation/compile tasks and dependencies. In a gem package
+ # we only need tasks and dependencies required for running specs.
+ Bundler.settings.without = [:compilation]
+ Bundler.setup(:default, :development)
load 'tasks/rspec.rake'
end
View
10 redcloth.gemspec
@@ -41,7 +41,15 @@ Gem::Specification.new do |s|
s.extensions = Dir['ext/**/extconf.rb']
end
+ s.add_development_dependency('bundler', '~> 1.0.10')
s.add_development_dependency('rake', '~> 0.8.7')
s.add_development_dependency('rspec', '~> 2.4')
- s.add_development_dependency('diff-lcs')
+ s.add_development_dependency('diff-lcs', '~> 1.1.2')
+
+ # Have to load these even though they're only needed for
+ # gem packaging. Otherwise, Bundler complains that they're
+ # not installed even though they're not required.
+ # See https://github.com/carlhuda/bundler/issues/issue/1021
+ s.add_development_dependency('rvm', '~> 1.2.6')
+ s.add_development_dependency('rake-compiler', '~> 0.7.1')
end

0 comments on commit 81d3bbc

Please sign in to comment.
Something went wrong with that request. Please try again.