Permalink
Browse files

Added gem related rake tasks [#55]

 * Rolling a manual gemspec for now
 * Upped VERSION to 1.99.0 pending a published gem
  • Loading branch information...
1 parent d6277da commit 864a35fe81cb02b0c9fa9de6aeffa1411cad2748 @rmm5t rmm5t committed Sep 14, 2008
Showing with 38 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +36 −1 Rakefile
  3. +1 −1 lib/shoulda/context.rb
View
@@ -2,3 +2,4 @@ test/rails_root/log/*.log
doc
coverage
.svn/
+pkg
View
@@ -1,6 +1,9 @@
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
+require 'rake/gempackagetask'
+require 'lib/shoulda/context'
+require 'lib/shoulda/tasks'
# Test::Unit::UI::VERBOSE
test_files_pattern = 'test/{unit,functional,other}/**/*_test.rb'
@@ -33,5 +36,37 @@ end
desc 'Default: run tests.'
task :default => ['test']
-require 'lib/shoulda/tasks'
+spec = Gem::Specification.new do |s|
+ s.name = "shoulda"
+ s.version = Thoughtbot::Shoulda::VERSION
+ s.summary = "Making tests easy on the fingers and eyes"
+ s.homepage = "http://thoughtbot.com/projects/shoulda"
+ s.rubyforge_project = "shoulda"
+
+ s.files = FileList["[A-Z]*", "{bin,lib,test}/**/*"]
+ s.executables = s.files.grep(/^bin/) { |f| File.basename(f) }
+ s.has_rdoc = true
+ s.extra_rdoc_files = ["README.rdoc", "CONTRIBUTION_GUIDELINES.rdoc"]
+ s.rdoc_options = ["--line-numbers", "--inline-source", "--main", "README.rdoc"]
+
+ s.authors = ["Tammer Saleh"]
+ s.email = "tsaleh@thoughtbot.com"
+
+ s.add_dependency "activesupport", ">= 2.0"
+end
+
+Rake::GemPackageTask.new spec do |pkg|
+ pkg.need_tar = true
+ pkg.need_zip = true
+end
+
+desc "Clean files generated by rake tasks"
+task :clobber => [:clobber_rdoc, :clobber_package]
+
+desc "Generate a gemspec file for GitHub"
+task :gemspec do
+ File.open("#{spec.name}.gemspec", 'w') do |f|
+ f.write spec.to_ruby
+ end
+end
View
@@ -1,6 +1,6 @@
module Thoughtbot # :nodoc:
module Shoulda
- VERSION = '1.1.1'
+ VERSION = '1.99.0'
class << self
attr_accessor :contexts

0 comments on commit 864a35f

Please sign in to comment.