Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

bundle the library for easier collaboration

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

0 notes on commit 0ce2518

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