Browse files

Final push for release.

  • Loading branch information...
1 parent 49acc0b commit 7120f620f7c63070276b50c13e52a2d40c33914f @metaskills metaskills committed Oct 17, 2010
Showing with 18 additions and 3 deletions.
  1. +2 −1 .gitignore
  2. +16 −2 Rakefile
View
3 .gitignore
@@ -12,4 +12,5 @@ vendor
lib/tiny_tds/tiny_tds.rb
.rvmrc
Gemfile.lock
-misc
+misc
+*.gem
View
18 Rakefile
@@ -1,9 +1,12 @@
# encoding: UTF-8
require 'rake'
+require "rake/clean"
+require 'rbconfig'
require 'rake/testtask'
require 'rake/extensiontask'
+
def test_libs
['lib','test']
end
@@ -12,14 +15,25 @@ def test_files
Dir.glob("test/**/*_test.rb").sort
end
+def gemspec
+ @clean_gemspec ||= eval(File.read(File.expand_path('../tiny_tds.gemspec', __FILE__)))
+end
+
Rake::TestTask.new do |t|
t.libs = test_libs
t.test_files = test_files
t.verbose = true
end
-def gemspec
- @clean_gemspec ||= eval(File.read(File.expand_path('../tiny_tds.gemspec', __FILE__)))
+desc "Build the gem"
+task :gem => [:distclean] do
+ sh %{gem build tiny_tds.gemspec}
+end
+
+desc "Try to clean up everything"
+task :distclean do
+ CLEAN.concat(['pkg', 'tiny_tds-*.gem', 'tmp'])
+ Rake::Task[:clean].invoke
end
Rake::ExtensionTask.new('tiny_tds', gemspec) do |ext|

0 comments on commit 7120f62

Please sign in to comment.