public
Description: command line runner for rspec stories
Homepage:
Clone URL: git://github.com/pd/story.git
story / Rakefile
100644 39 lines (32 sloc) 1.078 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require 'rake/gempackagetask'
require 'spec/rake/spectask'
 
gemspec = Gem::Specification.new do |spec|
  spec.name = 'story'
  spec.summary = "Command line runner for rspec plain text user stories"
  spec.version = '0.2'
  spec.author = 'Kyle Hargraves'
  spec.email = 'philodespotos@gmail.com'
  spec.description = <<-END
Provides an executable, 'story', that can be used to run suites of
rspec plain text user stories. Gracefully handles both Rails and non-Rails
projects.
END
 
  spec.files = FileList['bin/**/*', 'lib/**/*', 'README.rdoc', 'MIT-LICENSE', 'Rakefile']
  spec.bindir = 'bin'
  spec.executables = ['story']
 
  spec.rubyforge_project = 'rspec-hpricot'
  spec.homepage = 'http://rspec-hpricot.rubyforge.org'
end
 
Rake::GemPackageTask.new(gemspec) do |spec|
end
 
desc "force a rebuild and install the gem"
task :reinstall => :repackage do
  `gem install pkg/story-#{gemspec.version}.gem`
end
 
desc "Make sure everything is green"
task :aok do
  system('spec spec')
  exit(1) unless $?.success?
  system('./bin/story')
  exit(1) unless $?.success?
end