Permalink
Browse files

Bundle all dependencies.

  • Loading branch information...
1 parent 97f4102 commit d2e0038337fbdf7ca5dca033a7b25cae9c6dec7b @postmodern committed Jun 15, 2010
Showing with 54 additions and 29 deletions.
  1. +1 −0 .gitignore
  2. +19 −0 Gemfile
  3. +24 −26 Rakefile
  4. +10 −3 spec/spec_helper.rb
View
@@ -2,6 +2,7 @@ doc
pkg
tmp/*
.DS_Store
+.bundle
.yardoc
*.db
*.log
View
19 Gemfile
@@ -0,0 +1,19 @@
+source 'https://rubygems.org'
+
+gem 'yard', '~> 0.5.3', :group => [:development, :runtime]
+
+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
+end
+
+gem 'rspec', '~> 1.3.0', :group => [:development, :test]
View
@@ -1,23 +1,28 @@
require 'rubygems'
-require 'rake'
+require 'bundler'
begin
- require 'jeweler'
- Jeweler::Tasks.new do |gem|
- gem.name = "yard-contextify"
- gem.license = 'MIT'
- gem.summary = %Q{A plugin for YARD for parsing contextified classes.}
- gem.description = %Q{yard-contextify is a plugin for YARD for parsing contextified classes.}
- gem.email = "postmodern.mod3@gmail.com"
- gem.homepage = "http://github.com/postmodern/yard-contextify"
- gem.authors = ["postmodern"]
- gem.add_dependency "yard", ">= 0.4.0"
- 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 = "yard-contextify"
+ gem.license = 'MIT'
+ gem.summary = %Q{A plugin for YARD for parsing contextified classes.}
+ gem.description = %Q{yard-contextify is a plugin for YARD for parsing contextified classes.}
+ gem.email = "postmodern.mod3@gmail.com"
+ gem.homepage = "http://github.com/postmodern/yard-contextify"
+ gem.authors = ["postmodern"]
+ gem.add_dependency "yard", ">= 0.4.0"
+ gem.add_development_dependency "rspec", "~> 1.3.0"
+ gem.has_rdoc = 'yard'
end
require 'spec/rake/spectask'
@@ -27,14 +32,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,8 +1,15 @@
require 'rubygems'
-gem 'rspec', '>=1.3.0'
-require 'spec'
+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
-gem 'yard', '>=0.4.0'
+require 'spec'
require 'yard'
include YARD

0 comments on commit d2e0038

Please sign in to comment.