Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
93 lines (73 sloc) 3.12 KB
require 'spec'
require 'spec/rake/spectask'
desc 'Run the cucumber-screenshot specs''spec') do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = ['--options', 'spec/spec.opts']
rescue LoadError
puts 'Rspec not available, install it with: gem install rspec'
require 'rubygems'
require 'rake/gempackagetask'
require 'rake/rdoctask'
task :default => ['spec']
# This builds the actual gem. For details of what all these options
# mean, and other ones you can add, check the documentation here:
spec = do |s|
# Change these as appropriate = 'cucumber-screenshot'
s.version = '0.3.4'
s.summary = 'Extension for Cucumber to capture HTML snapshots/PNG screenshots of your app'
s.description = 'Extension for Cucumber ( that makes it easy to take HTML snapshots and also to use Webkit to capture PNG screenshots of your web application during tests' = 'Joel Chippindale' = ''
s.homepage = ''
s.has_rdoc = true
s.extra_rdoc_files = %w(README.rdoc)
s.rdoc_options = %w(--main README.rdoc)
# Add any extra files to include in the gem
s.files = %w(cucumber-screenshot.gemspec cucumber-screenshot.tmproj MIT-LICENSE Rakefile README.rdoc) + Dir.glob("{spec,lib/**/*}")
s.require_paths = ["lib"]
# If you want to depend on other gems, add them here, along with any
# relevant versions
# s.add_dependency("some_other_gem", "~> 0.1.0")
s.add_dependency('cucumber', '~> 0.9')
s.add_dependency('webrat', '~> 0.7')
# If your tests use any gems, include them here
s.add_development_dependency('rspec', '~>1.3')
s.post_install_message = 'To take actual screenshots rather than just snapshots of the HTML returned you will need Mac OS X 10.5 or later with RubyCocoa.
You will also need to install the snapurl gem
gem install snapurl --version=0.3.0
For details about how to set up your features to make use of cucumber-screenshot see'
# This task actually builds the gem. We also regenerate a static
# .gemspec file, which is useful if something (i.e. GitHub) will
# be automatically building a gem for this project. If you're not
# using GitHub, edit as appropriate.
# To publish your gem online, install the 'gemcutter' gem; Read more
# about that here: do |pkg|
pkg.gem_spec = spec
desc "Build the gemspec file #{}.gemspec"
task :gemspec do
file = File.dirname(__FILE__) + "/#{}.gemspec", "w") {|f| f << spec.to_ruby }
task :package => :gemspec
# Generate documentation do |rd|
rd.main = "README.rdoc"
rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
rd.rdoc_dir = "rdoc"
desc 'Clear out RDoc and generated packages'
task :clean => [:clobber_rdoc, :clobber_package] do
rm "#{}.gemspec"