Skip to content

Commit

Permalink
Added gem related rake tasks [#55]
Browse files Browse the repository at this point in the history
 * Rolling a manual gemspec for now
 * Upped VERSION to 1.99.0 pending a published gem
  • Loading branch information
rmm5t committed Sep 14, 2008
1 parent d6277da commit 864a35f
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ test/rails_root/log/*.log
doc
coverage
.svn/
pkg
37 changes: 36 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
@@ -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'
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/shoulda/context.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Thoughtbot # :nodoc:
module Shoulda
VERSION = '1.1.1'
VERSION = '1.99.0'

class << self
attr_accessor :contexts
Expand Down

0 comments on commit 864a35f

Please sign in to comment.