Skip to content

Commit

Permalink
Merge branch 'master' of [email protected]:quix/comp_tree
Browse files Browse the repository at this point in the history
  • Loading branch information
quix committed Sep 13, 2008
2 parents 7f0caea + b30cccf commit c8de9d3
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 29 deletions.
10 changes: 10 additions & 0 deletions contrib/comp_tree/CHANGES
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

= CompTree ChangeLog

== Version 0.5.2

* internal project cleanup (no relevant code changes).

== Version 0.5.0

* Initial release.
55 changes: 34 additions & 21 deletions contrib/comp_tree/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ $LOAD_PATH.unshift "contrib/quix/lib"

require 'rake/gempackagetask'
require 'rake/contrib/rubyforgepublisher'
require 'quix/subpackager'

$VERBOSE = nil
require 'rdoc/rdoc'
Expand All @@ -11,12 +10,8 @@ $VERBOSE = true
require 'fileutils'
include FileUtils

gemspec = eval(File.read("comp_tree.gemspec"))
package_name = gemspec.name
package_name_in_ruby = "CompTree"

# I would prefer "doc", but "html" is hard-coded for rubyforgepublisher
doc_dir = "html"
GEMSPEC = eval(File.read("comp_tree.gemspec"))
DOC_DIR = "html"

######################################################################
# clean
Expand All @@ -25,7 +20,7 @@ task :clean => [:clobber, :clean_doc] do
end

task :clean_doc do
rm_rf(doc_dir)
rm_rf(DOC_DIR)
end

######################################################################
Expand All @@ -40,7 +35,7 @@ end

task :package => :clean

Rake::GemPackageTask.new(gemspec) { |t|
Rake::GemPackageTask.new(GEMSPEC) { |t|
t.need_tar = true
}

Expand All @@ -53,8 +48,8 @@ task :doc => :clean_doc do
}

options = [
"-o", doc_dir,
"--title", "comp_tree: #{gemspec.summary}",
"-o", DOC_DIR,
"--title", "comp_tree: #{GEMSPEC.summary}",
"--main", "README"
]

Expand Down Expand Up @@ -98,24 +93,42 @@ end
# release

task :prerelease => :clean do
rm_rf(doc_dir)
rm_rf(DOC_DIR)
rm_rf("pkg")
unless `git status` =~ %r!nothing to commit \(working directory clean\)!
raise "Directory not clean"
end
unless `ping -c2 github.com` =~ %r!0% packet loss!i
raise "No ping for github.com"
end
end

def rubyforge(command, file)
sh("rubyforge",
command,
GEMSPEC.rubyforge_project,
GEMSPEC.rubyforge_project,
GEMSPEC.version.to_s,
file)
end

task :finish_release do
%w(gem tgz).each_with_index { |ext, index|
sh("rubyforge",
(index == 0 ? "add_release" : "add_file"),
gemspec.rubyforge_project,
gemspec.rubyforge_project,
gemspec.version.to_s,
"pkg/#{gemspec.name}-#{gemspec.version}.#{ext}")
gem, tgz = %w(gem tgz).map { |ext|
"pkg/#{GEMSPEC.name}-#{GEMSPEC.version}.#{ext}"
}
git("tag", "comp_tree-" + gemspec.version.to_s)
git("push", "--tags")
gem_md5, tgz_md5 = [gem, tgz].map { |file|
"#{file}.md5".tap { |md5|
sh("md5sum #{file} > #{md5}")
}
}

rubyforge("add_release", gem)
rubyforge("add_file", gem_md5)
rubyforge("add_file", tgz)
rubyforge("add_file", tgz_md5)

git("tag", "comp_tree-" + GEMSPEC.version.to_s)
git(*%w(push --tags origin master))
end

task :release =>
Expand Down
2 changes: 1 addition & 1 deletion contrib/comp_tree/comp_tree.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Gem::Specification.new { |t|
t.name = "comp_tree"
t.rubyforge_project = "comptree"
t.homepage = "comptree.rubyforge.org"
t.version = "0.5.0"
t.version = "0.5.2"
t.description = "Build a computation tree and execute it with N " +
"parallel threads. Optionally fork computation nodes into new processes."

Expand Down
4 changes: 2 additions & 2 deletions contrib/comp_tree/contrib/quix/lib/quix/simple_installer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
require 'fileutils'
require 'quix/vars'

module Quix
module CompTree
class SimpleInstaller
include Quix::Vars
include CompTree::Vars

def initialize
dest_root = Config::CONFIG["sitelibdir"]
Expand Down
4 changes: 2 additions & 2 deletions contrib/comp_tree/contrib/quix/lib/quix/thread_local.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
require 'thread'
require 'quix/kernel'

module Quix
module CompTree
class ThreadLocal
include Quix::Kernel
include Misc

def initialize(prefix = nil, &default)
@name = gensym(prefix)
Expand Down
4 changes: 2 additions & 2 deletions contrib/comp_tree/contrib/quix/lib/quix/vars.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
require 'quix/builtin/kernel/tap'
require 'ostruct'

module Quix
module CompTree
module Vars
include Quix::Kernel
include CompTree::Misc

def eval_locals(code_with_locals, &block)
code_with_locals.call.split(",").map { |name|
Expand Down
2 changes: 1 addition & 1 deletion contrib/comp_tree/install.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$LOAD_PATH.unshift "./contrib/quix/lib"
require 'quix/simple_installer'
Quix::SimpleInstaller.new.run
CompTree::SimpleInstaller.new.run

0 comments on commit c8de9d3

Please sign in to comment.