forked from cucumber-attic/gherkin2
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
48 lines (43 loc) · 1.68 KB
/
Rakefile
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
40
41
42
43
44
45
46
47
48
# encoding: utf-8
require 'rbconfig'
require 'rubygems'
require 'rake'
require 'rake/clean'
begin
require 'jeweler'
Jeweler::Tasks.new do |gem|
gem.name = "gherkin"
gem.summary = %Q{Fast Gherkin lexer/parser}
gem.description = %Q{A fast Gherkin lexer/parser based on the Ragel State Machine Compiler.}
gem.email = "cukes@googlegroups.com"
gem.homepage = "http://github.com/aslakhellesoy/gherkin"
gem.authors = ["Mike Sassak", "Gregory Hnatiuk", "Aslak Hellesøy"]
gem.executables = ["gherkin"]
gem.add_dependency "trollop", ">= 1.15"
gem.add_development_dependency "rspec", ">= 1.2.9"
gem.add_development_dependency "cucumber", ">= 0.6.1"
gem.add_development_dependency "rake-compiler", ">= 0.7.0" unless defined?(JRUBY_VERSION)
case ENV['PLATFORM']
when 'java'
gem.platform = 'java'
gem.files += FileList['lib/gherkin.jar']
gem.extensions = []
when 'i386-mswin32', 'i386-mingw32'
gem.platform = ENV['PLATFORM']
gem.files += FileList['lib/*.so']
gem.extensions = []
else
gem.files += FileList['lib/gherkin/rb_lexer/*.rb']
gem.files += FileList['ext/**/*.c']
gem.extensions = FileList['ext/**/extconf.rb']
end
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
end
Jeweler::GemcutterTasks.new
rescue LoadError
warn "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
end
Dir['tasks/**/*.rake'].each { |rake| load File.expand_path(rake) }
task :default => [:spec, :cucumber]
task :spec => defined?(JRUBY_VERSION) ? :jar : :compile
task :cucumber => defined?(JRUBY_VERSION) ? :jar : :compile