initial gem
authorChristoph Helma <helma@in-silico.ch>
Wed, 23 Aug 2017 14:11:22 +0000 (16:11 +0200)
committerChristoph Helma <helma@in-silico.ch>
Wed, 23 Aug 2017 14:11:22 +0000 (16:11 +0200)
ext/toxtree/extconf.rb [new file with mode: 0644]
test/toxtree.rb
toxtree.gemspec [new file with mode: 0644]

diff --git a/ext/toxtree/extconf.rb b/ext/toxtree/extconf.rb
new file mode 100644 (file)
index 0000000..1cf3424
--- /dev/null
@@ -0,0 +1,21 @@
+require 'mkmf'
+
+main_dir = File.expand_path(File.join(File.dirname(__FILE__),"..",".."))
+
+# check for required programs
+programs = ["wget","unzip","java"]
+programs.each do |program|
+  abort "Please install #{program} on your system." unless find_executable program
+end
+
+# get Toxtree
+puts `cd #{main_dir} && wget https://sourceforge.net/projects/toxtree/files/toxtree/Toxtree-v.2.6.13/Toxtree-v2.6.13.zip`
+# unzip
+puts `cd #{main_dir} && unzip Toxtree-v2.6.13.zip`
+
+# create a fake Makefile
+File.open(File.join(File.dirname(__FILE__),"Makefile"),"w+") do |makefile|
+  makefile.puts "all:\n\ttrue\n\ninstall:\n\ttrue\n"
+end
+
+$makefile_created = true
index 80733d1..b1d6274 100644 (file)
@@ -1,4 +1,3 @@
-require 'json'
 require 'minitest/autorun'
 require_relative '../lib/toxtree.rb'
 
diff --git a/toxtree.gemspec b/toxtree.gemspec
new file mode 100644 (file)
index 0000000..8f6b9d4
--- /dev/null
@@ -0,0 +1,15 @@
+Gem::Specification.new do |s|
+  s.name        = "toxtree"
+  s.version     = "0.0.1"
+  s.authors     = ["Christoph Helma"]
+  s.email       = ["helma@in-silico.ch"]
+  s.homepage    = "http://github.com/opentox/toxtree"
+  s.summary     = %q{Toxtree Ruby wrapper}
+  s.description = %q{http://toxtree.sourceforge.net}
+  s.license     = 'GPL-3.0'
+
+  s.rubyforge_project = "toxtree"
+  s.files         = `git ls-files`.split("\n")
+  s.test_files    = `git ls-files -- {test,spec,features}/*`.split("\n")
+  s.require_paths = ["lib"]
+end