Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reduce dependencies needed for just running tests in a gem package.

  • Loading branch information...
commit 79137cac324a37d32b3938f7d808639a51eee60c 1 parent ba30795
@jgarber jgarber authored
Showing with 16 additions and 5 deletions.
  1. +5 −0 Gemfile
  2. +8 −2 Rakefile
  3. +1 −2  redcloth.gemspec
  4. +2 −1  tasks/rspec.rake
View
5 Gemfile
@@ -1,2 +1,7 @@
source :rubygems
gemspec
+
+group :development do
+ gem 'rvm'
+ gem 'rake-compiler', '~> 0.7.1'
+end
View
10 Rakefile
@@ -2,9 +2,15 @@
require 'rubygems'
require 'bundler'
Bundler.setup
-Bundler::GemHelper.install_tasks
ENV['RUBYOPT'] = nil # Necessary to prevent Bundler from *&^%$#ing up rake-compiler.
require 'rake/clean'
-Dir['tasks/**/*.rake'].each { |rake| load File.expand_path(rake) }
+ 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.
+ load 'tasks/rspec.rake'
+end
View
3  redcloth.gemspec
@@ -23,6 +23,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"]
s.require_path = "lib"
+ s.files -= ['.rvmrc']
s.files -= Dir['ext/**/*']
s.files -= Dir['ragel/*']
s.files -= Dir['lib/redcloth.jar']
@@ -38,11 +39,9 @@ Gem::Specification.new do |s|
s.files += %w[attributes inline scan].map {|f| "ext/redcloth_scan/redcloth_#{f}.c"}
s.files += ["ext/redcloth_scan/redcloth.h"]
s.extensions = Dir['ext/**/extconf.rb']
- s.add_development_dependency('rvm')
end
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('rake-compiler', '~> 0.7.1')
end
View
3  tasks/rspec.rake
@@ -9,4 +9,5 @@ end
task :default => :spec
task :spec => :compile
-task :test => :spec # for rubygems-test
+RSpec::Core::RakeTask.new(:test) # for rubygems-test
Please sign in to comment.
Something went wrong with that request. Please try again.