-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrakefile
29 lines (24 loc) · 862 Bytes
/
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
require 'rake/testtask'
# fallback if serialoscclient path is not set: serialoscclient-rb folder adjacent to grrr-rb folder can be used
def adjacent_serialoscclient_path
File.expand_path(File.dirname(__FILE__) + "/../serialoscclient-rb/lib")
end
task :default => :test_grrr
Rake::TestTask.new(:test_grrr) do |t|
t.libs << "test"
t.libs << adjacent_serialoscclient_path if $LOAD_PATH.grep(/serialoscclient-rb/).empty?
t.test_files = ["test/tc_grrr.rb"]
t.warning = true
t.verbose = true
end
task :irb => :environment do
require 'irb'
ARGV.clear
IRB.start
end
task :environment do |t|
$LOAD_PATH.unshift("./lib")
$LOAD_PATH.unshift(adjacent_serialoscclient_path) if $LOAD_PATH.grep(/serialoscclient-rb/).empty?
require 'grrr'
require 'grrr/screen_grid' if (defined? RUBY_ENGINE != nil) and RUBY_ENGINE == 'jruby'
end