summaryrefslogtreecommitdiff
path: root/Rakefile
blob: 70139f4ea4214e2bbf1f55fd549ac5b9b5bb3650 (plain)
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
require 'rubygems'
require 'rake'
require 'opentox-ruby-api-wrapper'
#require 'tasks/opentox'

namespace "fminer" do
	desc "Install required gems and fminer"
	task :install do
		puts `git submodule init`
		puts `git submodule update`
		Dir.chdir('libfminer/libbbrc')
		puts `git checkout master`
		puts `git pull`
		puts `./configure`
        if $? == 0
            puts `echo "Fminer successfully configured."`
        else
            puts `echo "Fminer configuration failed!"`
            exit
        end
        puts `make ruby`
	    end

	desc "Update gems and fminer"
	task :update do
		puts `git submodule update`
		Dir.chdir('libfminer/libbbrc')
		puts `git checkout master`
		puts `git pull`
		puts `./configure`
        if $? == 0
            puts `echo "Fminer successfully configured."`
        else
            puts `echo "Fminer configuration failed!"`
            exit
        end
        puts `make ruby`
        end
end
desc "Run tests"
task :test do
	load 'test/test.rb'
end