Permalink
Browse files

Switch to bundler rake stuff and git for gemspec files.

  • Loading branch information...
1 parent a1b2237 commit 005fc6204a245b40cb8497cdbe6e9fff692500fa @jnunemaker committed Dec 20, 2010
Showing with 9 additions and 26 deletions.
  1. +4 −23 Rakefile
  2. +5 −3 joint.gemspec
View
@@ -1,31 +1,12 @@
-require 'rubygems'
-require 'rake'
-require 'rake/testtask'
-require File.expand_path('../lib/joint/version', __FILE__)
+require 'bundler'
+Bundler::GemHelper.install_tasks
+require 'rake/testtask'
Rake::TestTask.new do |test|
test.libs << 'lib' << 'test'
test.pattern = 'test/**/test_*.rb'
test.ruby_opts = ['-rubygems']
test.verbose = true
end
-task :default => :test
-
-desc 'Builds the gem'
-task :build do
- sh "gem build joint.gemspec"
-end
-
-desc 'Builds and installs the gem'
-task :install => :build do
- sh "gem install joint-#{Joint::Version}"
-end
-
-desc 'Tags version, pushes to remote, and pushes gem'
-task :release => :build do
- sh "git tag v#{Joint::Version}"
- sh "git push origin master"
- sh "git push origin v#{Joint::Version}"
- sh "gem push joint-#{Joint::Version}.gem"
-end
+task :default => :test
View
@@ -7,11 +7,8 @@ Gem::Specification.new do |s|
s.description = %Q{MongoMapper and GridFS joined in file upload love.}
s.email = "nunemaker@gmail.com"
s.homepage = "http://github.com/jnunemaker/joint"
- s.require_path = 'lib'
s.authors = ["John Nunemaker"]
s.version = Joint::Version
- s.files = Dir.glob("{lib,test}/**/*") + %w[LICENSE README.rdoc]
- s.test_files = Dir.glob("test/**/*")
s.add_dependency 'wand', '~> 0.3'
s.add_dependency 'mime-types'
@@ -20,4 +17,9 @@ Gem::Specification.new do |s|
s.add_development_dependency 'shoulda'
s.add_development_dependency 'mocha'
s.add_development_dependency 'jnunemaker-matchy'
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
end

0 comments on commit 005fc62

Please sign in to comment.