Skip to content

Commit

Permalink
Tweak the rake file so that we test and build the gem with the defaul…
Browse files Browse the repository at this point in the history
…t task
  • Loading branch information
lance committed Apr 12, 2012
1 parent 1b5d836 commit b93961f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
15 changes: 12 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require 'rubygems'
require 'bundler/setup'
require 'rspec/core/rake_task'
require 'rake'
require 'awestruct/version'

task :default => :build

task :default => :test
task :test => :spec
if !defined?(RSpec)
puts "spec targets require RSpec"
else
Expand All @@ -15,3 +15,12 @@ else
end
end

desc "Run all tests and build the gem"
task :build => :spec do
system "gem build awestruct.gemspec"
end

desc "Release the gem to rubygems"
task :release => :build do
system "gem push awestruct-#{Awestruct::VERSION}.gem"
end
3 changes: 2 additions & 1 deletion awestruct.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.expand_path("../lib/awestruct/version", __FILE__)

Gem::Specification.new do |s|
spec = Gem::Specification.new do |s|
s.platform = Gem::Platform::RUBY
s.name = "awestruct"
s.version = Awestruct::VERSION
Expand Down Expand Up @@ -36,5 +36,6 @@ Gem::Specification.new do |s|
s.add_dependency 'git', '~> 1.2.5'

s.add_development_dependency 'rspec', '~> 2.9'
s.add_development_dependency 'rake', '~> 0.9.2'
end

0 comments on commit b93961f

Please sign in to comment.