Permalink
Browse files

manual rooted at ./manual

  • Loading branch information...
lmrodriguezr committed Mar 30, 2016
1 parent ecff82d commit f0937d538d5b42122ccbf379d552a43428106e04
Showing with 108 additions and 42 deletions.
  1. +0 −25 .book.summary.md
  2. +1 −0 .gitignore
  3. +4 −3 book.json
  4. 0 .book.glossary.md → manual/glossary.md
  5. +14 −14 INTRO.md → manual/intro.md
  6. +25 −0 manual/summary.md
  7. +64 −0 test/common_test.rb

This file was deleted.

Oops, something went wrong.
@@ -2,3 +2,4 @@
Gemfile.lock
miga-base-*.gem
doc/
_book/
@@ -1,8 +1,9 @@
{
"gitbook": "3.0.0-pre.5",
"root": "./manual",
"structure": {
"readme": "INTRO.md",
"summary": ".book.summary.md",
"glossary": ".book.glossary.md"
"readme": "intro.md",
"summary": "summary.md",
"glossary": "glossary.md"
}
}
File renamed without changes.
@@ -7,18 +7,18 @@ metagenomes. It's main aim is to provide a uniform system for genome-based
taxonomic classification and diversity studies, but its base can be used for
other purposes.

* [How can MiGA help me?](manual/part1/pitch.md)
* [Who's using MiGA?](manual/part1/use-cases.md)
* [How can MiGA help me?](part1/pitch.md)
* [Who's using MiGA?](part1/use-cases.md)

## Getting started with MiGA

MiGA iself doesn't require much, but processing large data collections may
require large infrastructures. With that in mind, MiGA is designed to support
both single machines or cluster infrastructures.

* [Requirements](manual/part2/requirements.md)
* [Installation](manual/part2/installation.md)
* [MiGA types](manual/part2/types.md)
* [Requirements](part2/requirements.md)
* [Installation](part2/installation.md)
* [MiGA types](part2/types.md)

## MiGA Interfaces

@@ -32,18 +32,18 @@ means that you can write your own interfaces (or pieces) if you know how to talk
to these Ruby objects. Sometimes I even use `irb`, which is an interactive shell
for Ruby, but that's mostly for debugging.

* [MiGA API](manual/part3/API.md)
* [MiGA CLI](manual/part3/CLI.md)
* [MiGA GUI](manual/part3/GUI.md)
* [MiGA Web](manual/part3/Web.md)
* [MiGA API](part3/API.md)
* [MiGA CLI](part3/CLI.md)
* [MiGA GUI](part3/GUI.md)
* [MiGA Web](part3/Web.md)

## Deploying examples

* [RefSeq in MiGA](manual/part4/deploy-refseq.md)
* [Build a clade collection](manual/part4/deploy-clade.md)
* [RefSeq in MiGA](part4/deploy-refseq.md)
* [Build a clade collection](part4/deploy-clade.md)

## MiGA in detail

* [Advanced configuration](manual/part5/advanced-configuration.md)
* [MiGA workflow](manual/part5/workflow.md)
* [Extending MiGA](manual/part5/extending.md)
* [Advanced configuration](part5/advanced-configuration.md)
* [MiGA workflow](part5/workflow.md)
* [Extending MiGA](part5/extending.md)
@@ -0,0 +1,25 @@
# Summary

* [Introduction](INTRO.md)
* [Part I: What is MiGA?](part1.md)
* [How can MiGA help me?](part1/pitch.md)
* [Who's using MiGA?](part1/use-cases.md)
* [Definitions](.GLOSSARY.md)
* [Part II: Getting started](part2.md)
* [Requirements](part2/requirements.md)
* [Installation](part2/installation.md)
* [MiGA types](part2/types.md)
* [Part III: Interfaces](part3.md)
* [MiGA API](part3/API.md)
* [MiGA CLI](part3/CLI.md)
* [MiGA GUI](part3/GUI.md)
* [MiGA Web](part3/Web.md)
* [Part IV: Deploying examples](part4.md)
* [RefSeq in MiGA](part4/deploy-refseq.md)
* [Build a clade collection](part4/deploy-clade.md)
* [Launching daemons](part4/daemons.md)
* [Setting up MiGA in a cluster](part4/cluster.md)
* [Part V: Additional details](part5.md)
* [Advanced configuration](part5/advanced-configuration.md)
* [MiGA workflow](part5/workflow.md)
* [Extending MiGA](part5/extending.md)
@@ -0,0 +1,64 @@
require "test_helper"

class CommonTest < Test::Unit::TestCase

def test_debug
assert_respond_to(MiGA::MiGA, :DEBUG)
assert_respond_to(MiGA::MiGA, :DEBUG_ON)
assert_respond_to(MiGA::MiGA, :DEBUG_OFF)
MiGA::MiGA.DEBUG_ON
err = capture_stderr do
MiGA::MiGA.DEBUG "Tralari"
end
assert_equal("Tralari\n", err.string)
MiGA::MiGA.DEBUG_OFF
err = capture_stderr do
MiGA::MiGA.DEBUG "Tralara"
end
assert_equal("", err.string)
ensure
MiGA::MiGA.DEBUG_OFF
end

def test_debug_trace
assert_respond_to(MiGA::MiGA, :DEBUG)
assert_respond_to(MiGA::MiGA, :DEBUG_ON)
assert_respond_to(MiGA::MiGA, :DEBUG_OFF)
MiGA::MiGA.DEBUG_TRACE_ON
err = capture_stderr do
MiGA::MiGA.DEBUG "Dandadi"
end
assert(err.string =~ /Dandadi\n .*block in test_debug_trace/)
MiGA::MiGA.DEBUG_TRACE_OFF
err = capture_stderr do
MiGA::MiGA.DEBUG "Dandada"
end
assert_equal("Dandada\n", err.string)
ensure
MiGA::MiGA.DEBUG_TRACE_OFF
MiGA::MiGA.DEBUG_OFF
end

def test_generic_transfer
$tmp = Dir.mktmpdir
hello = File.expand_path("Hello", $tmp)
world = File.expand_path("World", $tmp)
assert_respond_to(File, :generic_transfer)
FileUtils.touch(hello)
assert(File.exist?(hello))
File.generic_transfer(hello, world, :symlink)
assert_equal("link", File.ftype(world))
assert(File.symlink?(world))
File.unlink world
File.generic_transfer(hello, world, :hardlink)
assert_equal("file", File.ftype(world))
File.open(hello, "w"){ |fh| fh.print "!" }
File.open(world, "r"){ |fh| assert_equal("!", fh.gets) }
File.unlink world
File.generic_transfer(hello, world, :copy)
assert_equal("file", File.ftype(world))
ensure
FileUtils.rm_rf $tmp
end

end

0 comments on commit f0937d5

Please sign in to comment.