Permalink
Browse files

bundle the library for easier collaboration

  • Loading branch information...
1 parent 8e97984 commit 0ce251893f1f10199e7b2927b2bcb7cc0eb9cd78 @atmos atmos committed Dec 1, 2009
Showing with 30 additions and 6 deletions.
  1. +2 −0 .gitignore
  2. +14 −0 Gemfile
  3. +2 −2 LICENSE
  4. +11 −2 Rakefile
  5. +1 −2 spec/spec_helper.rb
View
@@ -1,4 +1,6 @@
coverage/*
pkg/*
rdoc/*
+gbin
+vendor
View
14 Gemfile
@@ -0,0 +1,14 @@
+bin_path "gbin"
+disable_system_gems
+
+only :release do
+ gem 'ParseTree', :require_as => [ ]
+end
+
+only :test do
+ gem 'rspec', :require_as => 'spec'
+ gem 'rake'
+ gem 'bundler'
+ gem 'ruby-debug'
+ gem 'rcov'
+end
View
@@ -1,4 +1,4 @@
-Copyright (c) 2008 Ben Burkert
+Copyright (c) 2008-2009 Ben Burkert
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
@@ -17,4 +17,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
@@ -1,9 +1,9 @@
-require 'rubygems'
require 'rake/gempackagetask'
require 'rubygems/specification'
require 'date'
require "spec/rake/spectask"
require 'rake/rdoctask'
+require 'bundler'
PROJECT_NAME = "randexp"
GEM = "randexp"
@@ -18,6 +18,8 @@ RDOC_FILES = %w(LICENSE README README Rakefile TODO CHANGELOG) + Dir.glob("lib/*
RUBYFORGE_USER = "benburkert"
+task :default => :specs
+
spec = Gem::Specification.new do |s|
s.name = GEM
s.version = GEM_VERSION
@@ -33,6 +35,13 @@ spec = Gem::Specification.new do |s|
s.require_path = 'lib'
s.autorequire = GEM
s.files = FILES
+
+ manifest = Bundler::Environment.load(File.dirname(__FILE__) + '/Gemfile')
+ manifest.dependencies.each do |d|
+ next unless d.only && d.only.include?('release')
+ s.add_dependency(d.name, d.version)
+ end
+
end
Rake::GemPackageTask.new(spec) do |package|
@@ -108,4 +117,4 @@ task :release => [:specs, :package, :doc] do
%w[zip tgz].each do |ext|
sh %{rubyforge add_file #{PROJECT_NAME} #{GEM} "#{GEM_VERSION}" pkg/#{GEM}-#{GEM_VERSION}.#{ext}}
end
-end
+end
View
@@ -1,5 +1,4 @@
-require 'rubygems'
-require 'spec'
+Bundler.require_env(:test)
$LOAD_PATH.unshift File.join(File.dirname(__FILE__), "..", "lib")
require 'randexp'

0 comments on commit 0ce2518

Please sign in to comment.