Permalink
Browse files

Bundle all dependencies.

  • Loading branch information...
1 parent 92615df commit fd60459bd13927268005146c9ffc625f2b71dac3 @postmodern committed Jun 15, 2010
Showing with 52 additions and 26 deletions.
  1. +1 −0 .gitignore
  2. +19 −0 Gemfile
  3. +23 −25 Rakefile
  4. +9 −1 spec/spec_helper.rb
View
@@ -1,3 +1,4 @@
doc
pkg
+.bundle
.yardoc
View
19 Gemfile
@@ -0,0 +1,19 @@
+source 'https://rubygems.org'
+
+group(:development) do
+ gem 'rake', '~> 0.8.7'
+ gem 'jeweler', '~> 1.4.0', :git => 'git://github.com/technicalpickles/jeweler.git'
+end
+
+group(:doc) do
+ case RUBY_PLATFORM
+ when 'java'
+ gem 'maruku', '~> 0.6.0'
+ else
+ gem 'rdiscount', '~> 1.6.3'
+ end
+
+ gem 'yard', '~> 0.5.3'
+end
+
+gem 'rspec', '~> 1.3.0', :group => [:development, :test]
View
@@ -1,22 +1,27 @@
require 'rubygems'
-require 'rake'
+require 'bundler'
begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = 'digest-crc'
- gem.license = 'MIT'
- gem.summary = %Q{A Cyclic Redundancy Check (CRC) library for Ruby.}
- gem.description = %Q{Adds support for calculating Cyclic Redundancy Check (CRC) to the Digest module.}
- gem.email = 'postmodern.mod3@gmail.com'
- gem.homepage = 'http://github.com/postmodern/digest-crc'
- gem.authors = ['Postmodern']
- gem.add_development_dependency 'rspec', '>= 1.3.0'
- gem.has_rdoc = 'yard'
- end
- Jeweler::GemcutterTasks.new
-rescue LoadError
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
+ Bundler.setup(:development, :doc)
+rescue Bundler::BundlerError => e
+ STDERR.puts e.message
+ STDERR.puts "Run `bundle install` to install missing gems"
+ exit e.status_code
+end
+
+require 'rake'
+require 'jeweler'
+
+Jeweler::Tasks.new do |gem|
+ gem.name = 'digest-crc'
+ gem.license = 'MIT'
+ gem.summary = %Q{A Cyclic Redundancy Check (CRC) library for Ruby.}
+ gem.description = %Q{Adds support for calculating Cyclic Redundancy Check (CRC) to the Digest module.}
+ gem.email = 'postmodern.mod3@gmail.com'
+ gem.homepage = 'http://github.com/postmodern/digest-crc'
+ gem.authors = ['Postmodern']
+ gem.add_development_dependency 'rspec', '>= 1.3.0'
+ gem.has_rdoc = 'yard'
end
require 'spec/rake/spectask'
@@ -26,14 +31,7 @@ Spec::Rake::SpecTask.new(:spec) do |spec|
spec.spec_opts = ['--options', '.specopts']
end
-task :spec => :check_dependencies
task :default => :spec
-begin
- require 'yard'
- YARD::Rake::YardocTask.new
-rescue LoadError
- task :yard do
- abort "YARD is not available. In order to run yard, you must: gem install yard"
- end
-end
+require 'yard'
+YARD::Rake::YardocTask.new
View
@@ -1,4 +1,12 @@
require 'rubygems'
-gem 'rspec', '>= 1.3.0'
+require 'bundler'
+
+begin
+ Bundler.setup(:runtime, :test)
+rescue Bundler::BundlerError => e
+ STDERR.puts e.message
+ STDERR.puts "Run `bundle install` to install missing gems"
+ exit e.status_code
+end
require 'spec'

0 comments on commit fd60459

Please sign in to comment.