Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 93 lines (73 sloc) 3.199 kb
38422b4 Joel Chippindale Basic cucumber_screenshot
authored
1 begin
93f72b0 Joel Chippindale Switch from jeweler to gem-this
authored
2 require 'spec'
38422b4 Joel Chippindale Basic cucumber_screenshot
authored
3 require 'spec/rake/spectask'
93f72b0 Joel Chippindale Switch from jeweler to gem-this
authored
4 desc 'Run the cucumber-screenshot specs'
38422b4 Joel Chippindale Basic cucumber_screenshot
authored
5 Spec::Rake::SpecTask.new('spec') do |t|
6 t.spec_files = FileList['spec/**/*_spec.rb']
7 t.spec_opts = ['--options', 'spec/spec.opts']
8 end
9 rescue LoadError
93f72b0 Joel Chippindale Switch from jeweler to gem-this
authored
10 puts 'Rspec not available, install it with: gem install rspec'
11 end
12
13
14 require 'rubygems'
15 require 'rake/gempackagetask'
16 require 'rake/rdoctask'
17
18 task :default => ['spec']
19
20 # This builds the actual gem. For details of what all these options
21 # mean, and other ones you can add, check the documentation here:
22 #
23 # http://rubygems.org/read/chapter/20
24 #
25 spec = Gem::Specification.new do |s|
26 # Change these as appropriate
27 s.name = 'cucumber-screenshot'
ec901c8 Joel Chippindale Bump version to 0.3.4
authored
28 s.version = '0.3.4'
c128fa1 Joel Chippindale Update readme and gemspec to reflect recent changes to the gem
authored
29 s.summary = 'Extension for Cucumber to capture HTML snapshots/PNG screenshots of your app'
93f72b0 Joel Chippindale Switch from jeweler to gem-this
authored
30
c128fa1 Joel Chippindale Update readme and gemspec to reflect recent changes to the gem
authored
31 s.description = 'Extension for Cucumber (http://cukes.info/) that makes it easy to take HTML snapshots and also to use Webkit to capture PNG screenshots of your web application during tests'
93f72b0 Joel Chippindale Switch from jeweler to gem-this
authored
32 s.author = 'Joel Chippindale'
33 s.email = 'joel.chippindale@gmail.com'
34 s.homepage = 'http://github.com/mocoso/cucumber-screenshot'
35
36 s.has_rdoc = true
37 s.extra_rdoc_files = %w(README.rdoc)
38 s.rdoc_options = %w(--main README.rdoc)
39
40 # Add any extra files to include in the gem
5f24980 Joel Chippindale Remove VERSION.yml
authored
41 s.files = %w(cucumber-screenshot.gemspec cucumber-screenshot.tmproj MIT-LICENSE Rakefile README.rdoc) + Dir.glob("{spec,lib/**/*}")
93f72b0 Joel Chippindale Switch from jeweler to gem-this
authored
42 s.require_paths = ["lib"]
43
44 # If you want to depend on other gems, add them here, along with any
45 # relevant versions
46 # s.add_dependency("some_other_gem", "~> 0.1.0")
47
318ddee Joel Chippindale Update dependencies to cucumber version 0.9.x
authored
48 s.add_dependency('cucumber', '~> 0.9')
49 s.add_dependency('webrat', '~> 0.7')
93f72b0 Joel Chippindale Switch from jeweler to gem-this
authored
50
51 # If your tests use any gems, include them here
318ddee Joel Chippindale Update dependencies to cucumber version 0.9.x
authored
52 s.add_development_dependency('rspec', '~>1.3')
93f72b0 Joel Chippindale Switch from jeweler to gem-this
authored
53
12aa735 Joel Chippindale Make dependency on snapurl optional
authored
54 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.
55
56 You will also need to install the snapurl gem
57
58 gem install snapurl --version=0.3.0
59
807a78f Joel Chippindale Add link back to README in post install message
authored
60 For details about how to set up your features to make use of cucumber-screenshot see http://github.com/mocoso/cucumber-screenshot'
93f72b0 Joel Chippindale Switch from jeweler to gem-this
authored
61 end
62
63 # This task actually builds the gem. We also regenerate a static
64 # .gemspec file, which is useful if something (i.e. GitHub) will
65 # be automatically building a gem for this project. If you're not
66 # using GitHub, edit as appropriate.
67 #
68 # To publish your gem online, install the 'gemcutter' gem; Read more
69 # about that here: http://gemcutter.org/pages/gem_docs
70 Rake::GemPackageTask.new(spec) do |pkg|
71 pkg.gem_spec = spec
72 end
73
74 desc "Build the gemspec file #{spec.name}.gemspec"
75 task :gemspec do
76 file = File.dirname(__FILE__) + "/#{spec.name}.gemspec"
77 File.open(file, "w") {|f| f << spec.to_ruby }
78 end
79
80 task :package => :gemspec
81
82 # Generate documentation
83 Rake::RDocTask.new do |rd|
84 rd.main = "README.rdoc"
85 rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
86 rd.rdoc_dir = "rdoc"
87 end
88
89 desc 'Clear out RDoc and generated packages'
90 task :clean => [:clobber_rdoc, :clobber_package] do
91 rm "#{spec.name}.gemspec"
38422b4 Joel Chippindale Basic cucumber_screenshot
authored
92 end
Something went wrong with that request. Please try again.