-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathRakefile
53 lines (43 loc) · 1.2 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
require 'rake'
require 'rake/clean'
require 'rspec/core/rake_task'
CLEAN.include("**/*.gem", "**/*.rbc", "**/*.lock")
namespace :gem do
desc "Create the interface gem"
task :create => [:clean] do
require 'rubygems/package'
spec = Gem::Specification.load('interface.gemspec')
spec.signing_key = File.join(Dir.home, '.ssh', 'gem-private_key.pem')
Gem::Package.build(spec)
end
desc "Install the interface gem"
task :install => [:create] do
file = Dir["*.gem"].first
sh "gem install -l #{file}"
end
end
namespace :example do
desc 'Run the example_instance.rb sample program'
task :instance do
ruby '-Ilib examples/example_instance.rb'
end
desc 'Run the example_interface.rb sample program'
task :interface do
ruby '-Ilib examples/example_interface.rb'
end
desc 'Run the example_sub.rb sample program'
task :sub do
ruby '-Ilib examples/example_sub.rb'
end
desc 'Run the example_unrequire.rb sample program'
task :unrequire do
ruby '-Ilib examples/example_unrequire.rb'
end
end
desc "Run the test suite"
RSpec::Core::RakeTask.new(:spec)
# Clean up afterwards
Rake::Task[:spec].enhance do
Rake::Task[:clean].invoke
end
task :default => :spec