-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
58 lines (47 loc) · 1.18 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
49
50
51
52
53
54
55
56
57
58
require 'rubygems'
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
require 'jse/version'
begin
require 'cucumber'
require 'cucumber/rake/task'
namespace :cucumber do
Cucumber::Rake::Task.new(:ok) do |t|
t.cucumber_opts = "--format progress -t ~@wip -P"
end
Cucumber::Rake::Task.new(:wip) do |t|
t.cucumber_opts = "--format pretty -t @wip -P"
end
end
task :cucumber => 'cucumber:ok'
rescue LoadError
desc 'Cucumber rake task not available'
task :cucumber do
abort 'Install cucumber as a gem to run tests.'
end
end
begin
require 'spec/rake/spectask'
Spec::Rake::SpecTask.new(:spec) do |t|
t.spec_files = FileList['spec/**/*_spec.rb']
end
rescue LoadError
desc 'RSpec rake task not available'
task :spec do
abort 'Install rspec as a gem to run tests.'
end
end
task :default => [:spec, :cucumber]
desc 'Build the jse gem'
task :build do
system "gem build jse.gemspec"
end
desc 'Push a the gem to gemcutter'
task :release => :build do
system "git tag v#{JSE::VERSION}"
system "git push origin v#{JSE::VERSION}"
system "gem push jse-#{JSE::VERSION}.gem"
end
desc 'Clean up old gems'
task :clean do
system "rm *.gem"
end