Skip to content

Commit

Permalink
Use bundler for dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jgoizueta committed Apr 20, 2012
1 parent d77c31d commit 88cc82e
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 36 deletions.
25 changes: 19 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
## PROJECT::GENERAL

# rdoc generated
rdoc

# yard generated
doc
.yardoc

# bundler
.bundle

# jeweler generated
pkg

## PROJECT::SPECIFIC

## MAC OS
.DS_Store

Expand All @@ -13,9 +30,5 @@ tmtags
## VIM
*.swp

## PROJECT::GENERAL
coverage
rdoc
pkg

## PROJECT::SPECIFIC
# For rubinius:
*.rbc
10 changes: 10 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
source "http://rubygems.org"

gem 'modalsupport'

group :development do
gem "shoulda", ">= 0"
gem "rdoc", "~> 3.12"
gem "bundler", "~> 1"
gem "jeweler", "~> 1.8.3"
end
29 changes: 29 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
GEM
remote: http://rubygems.org/
specs:
git (1.2.5)
jeweler (1.8.3)
bundler (~> 1.0)
git (>= 1.2.5)
rake
rdoc
json (1.6.6)
modalsupport (0.8.3)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
shoulda (3.0.1)
shoulda-context (~> 1.0.0)
shoulda-matchers (~> 1.0.0)
shoulda-context (1.0.0)
shoulda-matchers (1.0.0)

PLATFORMS
ruby

DEPENDENCIES
bundler (~> 1)
jeweler (~> 1.8.3)
modalsupport
rdoc (~> 3.12)
shoulda
51 changes: 21 additions & 30 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
# encoding: utf-8

require 'rubygems'
require 'bundler'
begin
Bundler.setup(:default, :development)
rescue Bundler::BundlerError => e
$stderr.puts e.message
$stderr.puts "Run `bundle install` to install missing gems"
exit e.status_code
end
require 'rake'

begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "units-system"
gem.summary = %Q{Arithmetic with units of measure}
gem.description = %Q{Experimental unit conversion & arithmetic for Ruby 1.9}
gem.email = "jgoizueta@gmail.com"
gem.homepage = "http://github.com/jgoizueta/units-system"
gem.authors = ["Javier Goizueta"]
gem.add_development_dependency "shoulda"
end
Jeweler::GemcutterTasks.new
rescue LoadError
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "units-system"
gem.summary = %Q{Arithmetic with units of measure}
gem.description = %Q{Experimental unit conversion & arithmetic for Ruby 1.9}
gem.email = "jgoizueta@gmail.com"
gem.homepage = "http://github.com/jgoizueta/units-system"
gem.authors = ["Javier Goizueta"]
# dependencies defined in Gemfile
end
Jeweler::RubygemsDotOrgTasks.new

require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
Expand All @@ -24,24 +30,9 @@ Rake::TestTask.new(:test) do |test|
test.verbose = true
end

begin
require 'rcov/rcovtask'
Rcov::RcovTask.new do |test|
test.libs << 'test'
test.pattern = 'test/**/test_*.rb'
test.verbose = true
end
rescue LoadError
task :rcov do
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
end
end

task :test => :check_dependencies

task :default => :test

require 'rake/rdoctask'
require 'rdoc/task'
Rake::RDocTask.new do |rdoc|
version = File.exist?('VERSION') ? File.read('VERSION') : ""

Expand Down

0 comments on commit 88cc82e

Please sign in to comment.