Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Re-organizing for new project name

  • Loading branch information...
commit 13d24bf86cc4e898dc34908628e6bf50e6dfe949 1 parent 9017037
@nkpart authored
View
1  Manifest.txt
@@ -1,4 +1,3 @@
-History.txt
Manifest.txt
PostInstall.txt
README.rdoc
View
2  README.rdoc
@@ -26,7 +26,7 @@ FIX (describe your package)
(The MIT License)
-Copyright (c) 2009 FIXME full name
+Copyright (c) 2009 Nick Partridge
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
19 bin/dget
@@ -0,0 +1,19 @@
+#!/usr/bin/env ruby
+#
+# Created on 2009-8-26.
+# Copyright (c) Nick Partridge 2009. All rights reserved.
+
+require 'rubygems'
+require File.expand_path(File.dirname(__FILE__) + "/../lib/gh-wiki")
+
+user, project_name, file = *ARGV
+if (user && project_name) then
+ file ||= "#{project_name}_#{user}.html"
+ content = GhWiki.main(user, project_name)
+ File.open(file, 'w') { |f| f.puts content }
+else
+ puts "Usage: gw user project [file=user_project.html]"
+end
+
+
+
View
10 bin/gh-wiki
@@ -1,10 +0,0 @@
-#!/usr/bin/env ruby
-#
-# Created on 2009-8-26.
-# Copyright (c) 2009. All rights reserved.
-
-require 'rubygems'
-require File.expand_path(File.dirname(__FILE__) + "/../lib/gh-wiki")
-require "gh-wiki/cli"
-
-GhWiki::CLI.execute(STDOUT, ARGV)
View
44 features/development.feature
@@ -1,44 +0,0 @@
-# Scenario: Generate RubyGem
-# Given this project is active project folder
-# And "pkg" folder is deleted
-# When I invoke task "rake gem"
-# Then folder "pkg" is created
-# And file with name matching "pkg/*.gem" is created else you should run "rake manifest" to fix this
-# And gem spec key "rdoc_options" contains /--mainREADME.rdoc/
-
-Feature: github wiki cloning
- In order read the wiki
- As a developer who doesn't have internet access on the train
- I want to be able copy the wiki locally
-
- Scenario: Clone Wiki
- Given this project is active project folder
- When I run project executable "bin/gh-wiki" with arguments "dpp liftweb -p tmp/lw"
- Then I should see
- """
- dpp / liftweb
- Description: The Lift web framework for Scala
- """
- And I should see
- """
- Pages: "About: Lift Tags"
- """
-
- Scenario: Help
- Given this project is active project folder
- When I run project executable "bin/gh-wiki" with arguments "--help"
- Then I should see
- """
- Usage: gh-wiki user project [options]
- eg. gh-wiki dpp liftweb
- -p, --path=PATH The path to dump the wiki to. Default: ./project
- -h, --help
- """
-
-
-
-
-
-
-
-
View
163 features/step_definitions/common_steps.rb
@@ -1,163 +0,0 @@
-Given /^this project is active project folder/ do
- @active_project_folder = File.expand_path(File.dirname(__FILE__) + "/../..")
-end
-
-Given /^env variable \$([\w_]+) set to "(.*)"/ do |env_var, value|
- ENV[env_var] = value
-end
-
-Given /"(.*)" folder is deleted/ do |folder|
- in_project_folder { FileUtils.rm_rf folder }
-end
-
-When /^I invoke "(.*)" generator with arguments "(.*)"$/ do |generator, arguments|
- @stdout = StringIO.new
- in_project_folder do
- if Object.const_defined?("APP_ROOT")
- APP_ROOT.replace(FileUtils.pwd)
- else
- APP_ROOT = FileUtils.pwd
- end
- run_generator(generator, arguments.split(' '), SOURCES, :stdout => @stdout)
- end
- File.open(File.join(@tmp_root, "generator.out"), "w") do |f|
- @stdout.rewind
- f << @stdout.read
- end
-end
-
-When /^I run executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
- @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
- in_project_folder do
- system "#{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
- end
-end
-
-When /^I run project executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
- @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
- in_project_folder do
- system "ruby #{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
- end
-end
-
-When /^I run local executable "(.*)" with arguments "(.*)"/ do |executable, arguments|
- @stdout = File.expand_path(File.join(@tmp_root, "executable.out"))
- executable = File.expand_path(File.join(File.dirname(__FILE__), "/../../bin", executable))
- in_project_folder do
- system "ruby #{executable} #{arguments} > #{@stdout} 2> #{@stdout}"
- end
-end
-
-When /^I invoke task "rake (.*)"/ do |task|
- @stdout = File.expand_path(File.join(@tmp_root, "tests.out"))
- in_project_folder do
- system "rake #{task} --trace > #{@stdout} 2> #{@stdout}"
- end
-end
-
-Then /^folder "(.*)" (is|is not) created/ do |folder, is|
- in_project_folder do
- File.exists?(folder).should(is == 'is' ? be_true : be_false)
- end
-end
-
-Then /^file "(.*)" (is|is not) created/ do |file, is|
- in_project_folder do
- File.exists?(file).should(is == 'is' ? be_true : be_false)
- end
-end
-
-Then /^file with name matching "(.*)" is created/ do |pattern|
- in_project_folder do
- Dir[pattern].should_not be_empty
- end
-end
-
-Then /^file "(.*)" contents (does|does not) match \/(.*)\// do |file, does, regex|
- in_project_folder do
- actual_output = File.read(file)
- (does == 'does') ?
- actual_output.should(match(/#{regex}/)) :
- actual_output.should_not(match(/#{regex}/))
- end
-end
-
-Then /gem file "(.*)" and generated file "(.*)" should be the same/ do |gem_file, project_file|
- File.exists?(gem_file).should be_true
- File.exists?(project_file).should be_true
- gem_file_contents = File.read(File.dirname(__FILE__) + "/../../#{gem_file}")
- project_file_contents = File.read(File.join(@active_project_folder, project_file))
- project_file_contents.should == gem_file_contents
-end
-
-Then /^(does|does not) invoke generator "(.*)"$/ do |does_invoke, generator|
- actual_output = File.read(@stdout)
- does_invoke == "does" ?
- actual_output.should(match(/dependency\s+#{generator}/)) :
- actual_output.should_not(match(/dependency\s+#{generator}/))
-end
-
-Then /help options "(.*)" and "(.*)" are displayed/ do |opt1, opt2|
- actual_output = File.read(@stdout)
- actual_output.should match(/#{opt1}/)
- actual_output.should match(/#{opt2}/)
-end
-
-Then /^I should see$/ do |text|
- actual_output = File.read(@stdout)
- actual_output.should contain(text)
-end
-
-Then /^I should not see$/ do |text|
- actual_output = File.read(@stdout)
- actual_output.should_not contain(text)
-end
-
-Then /^I should see exactly$/ do |text|
- actual_output = File.read(@stdout)
- actual_output.should == text
-end
-
-Then /^I should see all (\d+) tests pass/ do |expected_test_count|
- expected = %r{^#{expected_test_count} tests, \d+ assertions, 0 failures, 0 errors}
- actual_output = File.read(@stdout)
- actual_output.should match(expected)
-end
-
-Then /^I should see all (\d+) examples pass/ do |expected_test_count|
- expected = %r{^#{expected_test_count} examples?, 0 failures}
- actual_output = File.read(@stdout)
- actual_output.should match(expected)
-end
-
-Then /^yaml file "(.*)" contains (\{.*\})/ do |file, yaml|
- in_project_folder do
- yaml = eval yaml
- YAML.load(File.read(file)).should == yaml
- end
-end
-
-Then /^Rakefile can display tasks successfully/ do
- @stdout = File.expand_path(File.join(@tmp_root, "rakefile.out"))
- in_project_folder do
- system "rake -T > #{@stdout} 2> #{@stdout}"
- end
- actual_output = File.read(@stdout)
- actual_output.should match(/^rake\s+\w+\s+#\s.*/)
-end
-
-Then /^task "rake (.*)" is executed successfully/ do |task|
- @stdout.should_not be_nil
- actual_output = File.read(@stdout)
- actual_output.should_not match(/^Don't know how to build task '#{task}'/)
- actual_output.should_not match(/Error/i)
-end
-
-Then /^gem spec key "(.*)" contains \/(.*)\// do |key, regex|
- in_project_folder do
- gem_file = Dir["pkg/*.gem"].first
- gem_spec = Gem::Specification.from_yaml(`gem spec #{gem_file}`)
- spec_value = gem_spec.send(key.to_sym)
- spec_value.to_s.should match(/#{regex}/)
- end
-end
View
29 features/support/common.rb
@@ -1,29 +0,0 @@
-module CommonHelpers
- def in_tmp_folder(&block)
- FileUtils.chdir(@tmp_root, &block)
- end
-
- def in_project_folder(&block)
- project_folder = @active_project_folder || @tmp_root
- FileUtils.chdir(project_folder, &block)
- end
-
- def in_home_folder(&block)
- FileUtils.chdir(@home_path, &block)
- end
-
- def force_local_lib_override(project_name = @project_name)
- rakefile = File.read(File.join(project_name, 'Rakefile'))
- File.open(File.join(project_name, 'Rakefile'), "w+") do |f|
- f << "$:.unshift('#{@lib_path}')\n"
- f << rakefile
- end
- end
-
- def setup_active_project_folder project_name
- @active_project_folder = File.join(@tmp_root, project_name)
- @project_name = project_name
- end
-end
-
-World(CommonHelpers)
View
14 features/support/env.rb
@@ -1,14 +0,0 @@
-require File.dirname(__FILE__) + "/../../lib/gh-wiki"
-
-gem 'cucumber'
-require 'cucumber'
-gem 'rspec'
-require 'spec'
-
-Before do
- @tmp_root = File.dirname(__FILE__) + "/../../tmp"
- @home_path = File.expand_path(File.join(@tmp_root, "home"))
- FileUtils.rm_rf @tmp_root
- FileUtils.mkdir_p @home_path
- ENV['HOME'] = @home_path
-end
View
11 features/support/matchers.rb
@@ -1,11 +0,0 @@
-module Matchers
- def contain(expected)
- simple_matcher("contain #{expected.inspect}") do |given, matcher|
- matcher.failure_message = "expected #{given.inspect} to contain #{expected.inspect}"
- matcher.negative_failure_message = "expected #{given.inspect} not to contain #{expected.inspect}"
- given.index expected
- end
- end
-end
-
-World(Matchers)
View
63 lib/gh-wiki.rb
@@ -1,65 +1,12 @@
$:.unshift(File.dirname(__FILE__)) unless
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
-require 'open-uri'
-require 'nokogiri'
+%w{rubygems erb nokogiri open-uri}.each { |r| require r }
+require "gh-wiki/utils"
+require "gh-wiki/googlecode"
+require "gh-wiki/github"
+
module GhWiki
VERSION = '0.0.1' unless defined? VERSION
-
- def N url
- Nokogiri::HTML(open(url))
- end
-
- class Page
- include GhWiki
-
- attr_reader :title
-
- def initialize title, link
- @title = title
- @link = link
- end
-
- def doc
- N link
- end
- end
-
-
- class Project
- include GhWiki
-
- attr_reader :user, :name
- def initialize user, name
- @user = user
- @name = name
- end
-
- def home_doc
- @home_doc ||= N("http://wiki.github.com/#{user}/#{name}")
- end
-
- def description
- home_doc.css("#repository_description").each do |h|
- @desc = h.content
- end
- @desc
- end
-
- def pages
- home_doc.css(".sidebar ul li b a").map do |item|
- Page.new(item.content, item['href'])
- end
- end
-
-
- def save_pages_into path
- FileUtils::mkdir_p path
- projects.pages.each do |page|
-
- # get page, clean it, replace sidebar, check for links, save it out
- end
- end
- end
end
View
51 lib/gh-wiki/cli.rb
@@ -1,51 +0,0 @@
-require 'optparse'
-require 'gh-wiki'
-require 'fileutils'
-
-module GhWiki
- class CLI
- def self.execute(stdout, arguments=[])
-
- # NOTE: the option -p/--path= is given as an example, and should be replaced in your application.
-
- options = {
- :path => '~'
- }
- mandatory_options = %w( )
-
- banner = <<-BANNER.gsub(/^ /,'')
- Usage: gh-wiki user project [options]
- eg. gh-wiki dpp liftweb
- BANNER
- parser = OptionParser.new do |opts|
- opts.banner = banner
- opts.separator ""
- opts.on("-p", "--path=PATH", String,
- "The path to dump the wiki to. Default: ./project") { |arg| options[:path] = arg }
- opts.on("-h", "--help",
- "") { stdout.puts opts; exit }
- opts.parse!(arguments)
-
- if mandatory_options && mandatory_options.find { |option| options[option.to_sym].nil? }
- stdout.puts opts; exit
- end
- end
-
- user = ARGV[0]
- project_name = ARGV[1]
- if !user || !project_name then
- puts banner
- else
- path = options[:path]
-
- project = Project.new(user,project_name)
- puts "#{user} / #{project.name}"
- puts "Description: #{project.description}"
- puts "Pages: #{project.pages.map{ |x| x.title.inspect }.join(", ")}"
-
- project.save_pages_into path
- end
-
- end
- end
-end
View
376 lib/gh-wiki/github.html
@@ -0,0 +1,376 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=UTF-8" />
+ <title>Local GH Wiki - <%= project_name %></title>
+ <link href="bundle.css" media="screen" rel="stylesheet" type="text/css" />
+ <style type="text/css" media="screen">
+ ul.jq-ui-autocomplete{position:absolute;overflow:hidden;background-color:#fff;border:1px solid #aaa;margin:0;padding:0;list-style:none;font:normal .75em/.75em Verdana,Arial,sans-serif;color:#333;}
+ ul.jq-ui-autocomplete li{display:block;padding:.3em .5em .3em .3em;overflow:hidden;width:100%;}
+ ul.jq-ui-autocomplete li.active{background-color:#3875d7;color:#fff;}
+
+ div.dp-popup{position:relative;background:#ccc;font-size:10px;font-family:arial,sans-serif;padding:2px;width:171px;line-height:1.2em;}
+ div#dp-popup{position:absolute;z-index:199;}
+ div.dp-popup h2{font-size:12px;text-align:center;margin:2px 0;padding:0;}
+ a#dp-close{font-size:11px;padding:4px 0;text-align:center;display:block;}
+ a#dp-close:hover{text-decoration:underline;}
+ div.dp-popup a{color:#000;text-decoration:none;padding:3px 2px 0;}
+ div.dp-popup div.dp-nav-prev{position:absolute;top:2px;left:4px;width:100px;}
+ div.dp-popup div.dp-nav-prev a{float:left;}
+ div.dp-popup div.dp-nav-prev a,div.dp-popup div.dp-nav-next a{cursor:pointer;}
+ div.dp-popup div.dp-nav-prev a.disabled,div.dp-popup div.dp-nav-next a.disabled{cursor:default;}
+ div.dp-popup div.dp-nav-next{position:absolute;top:2px;right:4px;width:100px;}
+ div.dp-popup div.dp-nav-next a{float:right;}
+ div.dp-popup a.disabled{cursor:default;color:#aaa;}
+ div.dp-popup td{cursor:pointer;}
+ div.dp-popup td.disabled{cursor:default;}
+ .syntax{background:#fff;}
+ .syntax .c{color:#998;font-style:italic;}
+ .syntax .err{color:#a61717;background-color:#e3d2d2;}
+ .syntax .k{font-weight:bold;}
+ .syntax .o{font-weight:bold;}
+ .syntax .cm{color:#998;font-style:italic;}
+ .syntax .cp{color:#999;font-weight:bold;}
+ .syntax .c1{color:#998;font-style:italic;}
+ .syntax .cs{color:#999;font-weight:bold;font-style:italic;}
+ .syntax .gd{color:#000;background-color:#fdd;}
+ .syntax .gd .x{color:#000;background-color:#faa;}
+ .syntax .ge{font-style:italic;}
+ .syntax .gr{color:#a00;}
+ .syntax .gh{color:#999;}
+ .syntax .gi{color:#000;background-color:#dfd;}
+ .syntax .gi .x{color:#000;background-color:#afa;}
+ .syntax .go{color:#888;}
+ .syntax .gp{color:#555;}
+ .syntax .gs{font-weight:bold;}
+ .syntax .gu{color:#aaa;}
+ .syntax .gt{color:#a00;}
+ .syntax .kc{font-weight:bold;}
+ .syntax .kd{font-weight:bold;}
+ .syntax .kp{font-weight:bold;}
+ .syntax .kr{font-weight:bold;}
+ .syntax .kt{color:#458;font-weight:bold;}
+ .syntax .m{color:#099;}
+ .syntax .s{color:#d14;}
+ .syntax .na{color:#008080;}
+ .syntax .nb{color:#0086B3;}
+ .syntax .nc{color:#458;font-weight:bold;}
+ .syntax .no{color:#008080;}
+ .syntax .ni{color:#800080;}
+ .syntax .ne{color:#900;font-weight:bold;}
+ .syntax .nf{color:#900;font-weight:bold;}
+ .syntax .nn{color:#555;}
+ .syntax .nt{color:#000080;}
+ .syntax .nv{color:#008080;}
+ .syntax .ow{font-weight:bold;}
+ .syntax .w{color:#bbb;}
+ .syntax .mf{color:#099;}
+ .syntax .mh{color:#099;}
+ .syntax .mi{color:#099;}
+ .syntax .mo{color:#099;}
+ .syntax .sb{color:#d14;}
+ .syntax .sc{color:#d14;}
+ .syntax .sd{color:#d14;}
+ .syntax .s2{color:#d14;}
+ .syntax .se{color:#d14;}
+ .syntax .sh{color:#d14;}
+ .syntax .si{color:#d14;}
+ .syntax .sx{color:#d14;}
+ .syntax .sr{color:#009926;}
+ .syntax .s1{color:#d14;}
+ .syntax .ss{color:#990073;}
+ .syntax .bp{color:#999;}
+ .syntax .vc{color:#008080;}
+ .syntax .vg{color:#008080;}
+ .syntax .vi{color:#008080;}
+ .syntax .il{color:#099;}
+ *{margin:0;padding:0;}
+ html,body{height:100%;}
+ body{background-color:white;font:13.34px helvetica,arial,freesans,clean,sans-serif;*font-size:small;text-align:center;}
+ table{font-size:inherit;font:100%;}
+ select,input[type=text],input[type=password],input[type=image],textarea{font:99% helvetica,arial,freesans,sans-serif;}
+ select,option{padding:0 .25em;}
+ input.text{padding:1px 0;}
+ optgroup{margin-top:.5em;}
+ pre,code{font:115% Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;*font-size:100%;}
+ body *{line-height:1.4em;}
+ img{border:0;}
+ a{color:#4183c4;text-decoration:none;}
+ a.action{color:#d00;text-decoration:underline;}
+ a.action span{text-decoration:none;}
+ a:hover{text-decoration:underline;}
+ .clear{clear:both;}
+ .sparkline{display:none;}
+ .right{float:right;}
+ .left{float:left;}
+ .hidden{display:none;}
+ img.help{vertical-align:middle;}
+ .notification{background:#FFFBE2 none repeat scroll 0;border:1px solid #FFE222;padding:1em;margin:1em 0;font-weight:bold;}
+ .warning{background:#fffccc;font-weight:bold;padding:.5em;margin-bottom:.8em;}
+ .error_box{background:#FFEBE8 none repeat scroll 0;border:1px solid #DD3C10;padding:1em;font-weight:bold;}
+ abbr{border-bottom:none;}
+ .flash{color:green;}
+ .corner{-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px;padding:3px;}
+ body{text-align:center;}
+ .site{width:69em;margin:0 auto;padding:0 3em;text-align:left;}
+ .syntax .gc{color:#999;background-color:#EAF2F5;}
+ #site_alert{margin-bottom:1em;}
+ #site_alert p{margin:0 auto;width:85%;text-align:center;font-weight:bold;color:#fff;background:#000;padding-top:.3em;}
+/* #header{background:#fcfcfc url(/images/modules/header/header_bg.png) 0 100% repeat-x;height:6.82em;min-width:75em;}*/
+ #header a{color:#fff;}
+ #header a:hover{text-decoration:none;}
+ #header .logo{padding-top:1.2em;float:left;}
+ #header .actions{float:right;color:#444;font-size:110%;margin-top:2.3em;}
+ #header .actions a{color:#444;margin-left:1.5em;padding:.4em;}
+ #header .actions a:hover{text-decoration:none;background-color:#dcdcdc;}
+ #header.basic{border-bottom:5px solid #ddd;margin-bottom:1em;}
+ #header .userbox{background:#EAF2F5;border:1px solid #ddd;float:right;margin-top:1.6em;width:25em;color:#aac;}
+ #header .userbox .box{margin:.25em .5em;}
+ #header .userbox .gravatar{float:left;}
+ #header .userbox .gravatar img{border:1px solid #d0d0d0;padding:2px;background-color:white;margin-right:.7em;}
+ #header .userbox .top{overflow:hidden;}
+ #header .userbox .top .name{float:left;overflow:hidden;font-weight:bold;width:10em;}
+ #header .userbox .top .name a{color:#000;}
+ #header .userbox .top .links{font-size:85%;margin-top:.2em;float:right;text-align:right;}
+ #header .userbox .top .links a{color:#4183c4;}
+ #header .userbox .top .links a:hover{text-decoration:underline;}
+ #header .userbox .bottom{overflow:hidden;}
+ #header .userbox .inbox{float:left;margin-top:.7em;background:url('/images/modules/inbox/message.png') 0 .1em no-repeat;}
+ #header .userbox .inbox a{padding-left:20px;display:block;}
+ #header .userbox a{color:#4183c4;}
+ #header .userbox .bottom .select{float:right;margin-top:.5em;}
+ #header .topsearch{float:left;width:19em;margin:2.05em 0 0 1em;color:#bbb;}
+ #header .topsearch a{color:#666;font-size:80%;}
+ #header .topsearch a:hover{color:black;text-decoration:underline;}
+ #header .topsearch form{padding-top:.4em;}
+ #header .topsearch input{vertical-align:middle;}
+ body:first-of-type#header .topsearch input{font-size:110%;}
+ #header .topsearch input.search{padding-top:1px;width:12em;}
+ body:first-of-type #header .topsearch input.search{padding-top:0;font-size:120%;width:9em;}
+ #header .topsearch input[type=submit]{position:relative;top:1px;}
+ body:first-of-type #header .topsearch input[type=submit]{top:0;}
+ #header .topsearch .links span{float:right;}
+ #main{min-height:100%;height:auto!important;height:100%;margin:0 auto -8.6em;}
+ .push{height:8.6em;padding-bottom:4em;}
+ #footer{height:8.6em;background:#bbccd9 url(/images/modules/footer/bg.png) 0 0 repeat-x;overflow:hidden;color:#cadcea;min-width:75em;}
+ #footer a{color:white;text-decoration:underline;}
+ #footer .info{padding:2.9em 0 3.3em 0;float:left;}
+ #footer .info .links{padding-bottom:.4em;border-bottom:3px solid #5c8ab3;}
+ #footer .info .company{padding-top:.4em;}
+ #footer .sponsor{padding:2.75em 0 1em 0;float:right;width:20em;}
+ #footer .sponsor img{float:right;margin:.4em 0 0 .75em;}
+ #footer .sponsor a{text-decoration:none;}
+ #footer .sponsor div{text-align:right;font-size:.9em;margin-top:.7em;}
+ #int-info img{position:relative;top:-.1em;}
+ #path{font-size:140%;padding:.8em 0;}
+ #toc{padding:1.5em 0;font-family:Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;font-size:90%;}
+ #toc ul{border-top:1px solid #eee;}
+ #toc ul li{list-style-type:none;padding:.4em 0 .4em 20px;border-bottom:1px solid #eee;}
+ #toc ul li.added{background:white url(/images/modules/toc/added.png) 0 50% no-repeat;}
+ #toc ul li.removed{background:white url(/images/modules/toc/removed.png) 0 50% no-repeat;}
+ #toc ul li.modified{background:white url(/images/modules/toc/modified.png) 0 50% no-repeat;}
+ #repos{margin-bottom:1em;}
+ #repos h1{font-size:160%;}
+ #repos h1 a{font-size:70%;font-weight:normal;}
+ #repos .hint{font-style:italic;color:#888;margin:.3em 0;}
+ #repos .repo{margin:1em 0;padding:.1em .5em .1em .5em;}
+ #repos .public{border:1px solid #d8d8d8;background-color:#f0f0f0;}
+ #repos .private{border:1px solid #f7ca75;background-color:#fffeeb;}
+ #repos .repo .title{overflow:hidden;}
+ #repos .repo .title .path{float:left;font-size:140%;}
+ #repos .repo .title .path img{vertical-align:middle;}
+ #repos .repo .title .path .button{margin-left:.25em;vertical-align:-12%;}
+ #repos .repo .title .path span a{font-size:75%;font-weight:normal;}
+ #repos .repo .title .security{float:right;text-align:right;font-weight:bold;padding-top:.5em;}
+ #repos .repo .title .security *{vertical-align:middle;}
+ #repos .repo .title .security img{position:relative;top:-1px;}
+ #repos .repo .title .flexipill{float:right;padding-top:.3em;margin-right:.5em;}
+ #repos .repo .title .flexipill a{color:black;}
+ #repos .repo .title .flexipill .middle{background:url(/images/modules/repos/pills/middle.png) 0 0 repeat-x;padding:0 0 0 .3em;}
+ #repos .repo .title .flexipill .middle span{position:relative;top:.1em;font-size:95%;}
+ #repos .repo .meta{margin:.2em 0 0 0;overflow:hidden;}
+ #repos .repo .meta table{float:left;max-width:48em;}
+ #repos .repo .meta table td *{vertical-align:middle;}
+ #repos .repo .meta table td.label{color:#888;padding-right:.25em;vertical-align:bottom;}
+ #repos .repo .meta table td span.editarea input{margin-top:.5em;margin-right:.5em;}
+ #repos .repo .meta table td textarea{display:block;clear:right;}
+ #repos .repo .meta table td.url{color:#4183c4;}
+ #repos .repo .meta table td.blank{color:#bbb;}
+ #repos .repo .pledgie{float:right;}
+ #repos .repo .commit{border:1px solid #bedce7;margin-top:.5em;padding:0 .5em .5em .5em;background:#eaf2f5 url(/images/modules/commit/bg_gradient.gif) 0 100% repeat-x;overflow:hidden;}
+ #repos .repo .commit .actor{float:left;margin-top:.5em;}
+ #repos .repo .commit .actor .gravatar{border:1px solid #d0d0d0;padding:2px;background-color:white;float:left;margin-right:.7em;}
+ #repos .repo .commit .actor .name{line-height:1.5em;}
+ #repos .repo .commit .actor .name span{color:#888;font-size:90%;}
+ #repos .repo .commit .actor .date{color:#888;font-size:90%;line-height:1em;}
+ #repos .repo .commit .message{float:left;padding:.5em 0 .5em .5em;margin-left:2em;border-left:1px solid #bedce7;}
+ #repos .repo .commit .machine{float:right;width:30em;padding:.5em 0 .5em .5em;border-left:1px solid #bedce7;color:#808080;font-family:Monaco,"Courier New","DejaVu Sans Mono","Bitstream Vera Sans Mono",monospace;font-size:85%;line-height:1.5em;}
+ #repos .repo .diffs{margin-top:.5em;}
+ #repos .repo .diffs .diff *{vertical-align:middle;}
+ #repos .repo .diffs .diff img{position:relative;top:-1px;}
+ #guides h1{margin-bottom:.5em;}
+ #guides .index ul{list-style-type:none;font-size:120%;}
+ #guides .index ul li{padding-left:1.5em;background:white url(/images/modules/guides/book.png) no-repeat;}
+ #guides .index .new{margin-top:1em;border-top:1px solid #ccc;padding-top:.5em;}
+ #guides .index .new ul li{background:white url(/images/modules/guides/book_add.png) no-repeat;}
+ #guides .index .new ul li a{color:#c00;}
+ #guides .write .delete_page{float:right;}
+ #guides .guide{overflow:hidden;}
+ #guides .guide .main{float:left;width:50em;}
+ #guides .guide .sidebar{float:right;width:15em;border-left:4px solid #e6e6e6;margin:2.1em 0 0 0;padding-left:1em;}
+ #guides .guide .sidebar h3{margin:0 0 .5em 0;}
+ #guides .guide .sidebar ul{list-style-type:none;margin:0;color:#888;}
+ #guides .guide .sidebar ul li{padding-left:12px;background:white url(/images/modules/guides/sidebar/bullet_blue.png) -4px 0 no-repeat;margin:.2em 0;}
+ #guides .admin{clear:both;margin-top:3em;border-top:4px solid #e6e6e6;padding-top:.3em;overflow:hidden;}
+ #guides .write label{font-size:110%;color:#666;display:block;margin:1em 0;}
+ #guides .write input.text,#guides .write textarea{padding:5px;border:1px solid #888;}
+ #guides .write input.text{width:40em;}
+ #guides .write textarea{width:100%;height:25em;}
+ #guides .write label span.title{color:black;font-weight:bold;}
+ #guides .write .actions input{margin-right:1em;}
+ .wikistyle h1,h2,h3,h4,h5,h6{border:0!important;}
+ .wikistyle h1{font-size:170%!important;border-top:4px solid #aaa!important;padding-top:.5em!important;margin-top:1.5em!important;}
+ .wikistyle h1:first-child{margin-top:0!important;padding-top:.25em!important;border-top:none!important;}
+ .wikistyle h2{font-size:150%!important;margin-top:1.5em!important;border-top:4px solid #e0e0e0!important;padding-top:.5em!important;}
+ .wikistyle h3{margin-top:1em!important;}
+ .wikistyle p{margin:1em 0!important;line-height:1.5em!important;}
+ .wikistyle ul{margin:1em 0 1em 1.3em!important;}
+ .wikistyle ul{margin-top:0!important;margin-bottom:0!important;}
+ .wikistyle ol{margin:1em 0 1em 1.5em!important;}
+ .wikistyle ol ol{margin-top:0!important;margin-bottom:0!important;}
+ .wikistyle blockquote{margin:1em 0!important;border-left:5px solid #ddd!important;padding-left:.6em!important;color:#555!important;}
+ .wikistyle dt{font-weight:bold!important;margin-left:1em!important;}
+ .wikistyle dd{margin-left:2em!important;margin-bottom:1em!important;}
+ .wikistyle table{margin:1em 0!important;}
+ .wikistyle table th{border-bottom:1px solid #bbb!important;padding:.2em 1em!important;}
+ .wikistyle table td{border-bottom:1px solid #ddd!important;padding:.2em 1em!important;}
+ .wikistyle pre{margin:1em 0!important;font-size:90%!important;background-color:#f8f8ff!important;border:1px solid #dedede!important;padding:.5em!important;line-height:1.5em!important;color:#444!important;overflow:auto!important;}
+ .wikistyle pre code{padding:0!important;font-size:100%!important;background-color:#f8f8ff!important;border:none!important;}
+ .wikistyle code{font-size:90%!important;background-color:#f8f8ff!important;color:#444!important;padding:0 .2em!important;border:1px solid #dedede!important;}
+ .wikistyle pre.console{margin:1em 0!important;font-size:90%!important;background-color:black!important;padding:.5em!important;line-height:1.5em!important;color:white!important;}
+ .wikistyle pre.console code{padding:0!important;font-size:100%!important;background-color:black!important;border:none!important;color:white!important;}
+ .wikistyle pre.console span{color:#888!important;}
+ .wikistyle pre.console span.command{color:yellow!important;}
+ ul#archive{list-style-type:none;text-align:center;}
+ ul#archive li{display:inline;}
+ #other_archives{border-top:1px solid #ddd;padding-top:.5em;}
+ #other_archives ul{list-style-type:none;width:8em;float:left;clear:right;}
+ #archives .wait{padding:2em 0 3em 0;}
+ #archives .wait h2,#archives .wait p{text-align:center;}
+ .tool-tip{color:#fff;width:350px;z-index:13000;}
+ .tool-title{font-weight:bold;font-size:11px;margin:0;color:#9FD4FF;padding:8px 8px 4px;background:url(/images/modules/tooltip/bubble.png) top left;}
+ .tool-text{font-size:11px;padding:4px 8px 8px;background:url(/images/modules/tooltip/bubble.png) bottom right;}
+ .custom-tip{color:#000;width:130px;z-index:13000;}
+ .custom-title{font-weight:bold;font-size:11px;margin:0;color:#3E4F14;padding:8px 8px 4px;background:#C3DF7D;border-bottom:1px solid #B5CF74;}
+ .custom-text{font-size:11px;padding:4px 8px 8px;background:#CFDFA7;}
+ #services .test_hook{margin-top:.5em;}
+ #privacy_terms h1{margin-bottom:.3em;}
+ #privacy_terms h2{margin-top:1em;}
+ #privacy_terms ul,#privacy_terms ol{margin-left:1.4em;}
+ #privacy_terms p{margin-bottom:1em;}
+ #languages .popular{border-top:5px solid #f4f4f4;background-color:#fdfdfd;overflow:hidden;margin-top:2.4em;margin-bottom:1em;padding-top:1em;}
+ #languages .popular.compact{margin-top:0;}
+ #languages .popular h3{font-size:105%;color:#aaa;margin-bottom:.5em;}
+ #languages .popular .site .left img{border:1px solid #d0d0d0;padding:1px;background-color:white;margin-right:.1em;position:absolute;top:.25em;left:0;}
+ #languages .popular a{color:black;}
+ #languages .popular ul{list-style-type:none;}
+ #languages .popular ul li{line-height:1.6em!important;font-size:125%;color:#888;padding-left:1.6em;position:relative;}
+ #languages .popular ul li a.repo{font-weight:bold;}
+ #languages .popular .left{margin-left:14em;float:left;width:27em;}
+ #languages .popular.compact .left{margin-left:0;float:left;width:25em;padding-bottom:2em;}
+ #languages .popular.compact .left.row{clear:left;}
+ #languages .all_languages{padding-right:3em;text-align:right;}
+ #language_table{border:1px solid #eee;}
+ #language_table th{background:#f0f0f0;padding:.5em;}
+ #language_table td{padding:.5em;}
+ #language_table tr.dark{background:#fafafa;}
+
+
+ .actions { display: none; }
+ </style>
+ <script type="text/javascript" charset="utf-8">
+ function go(id) {
+ var content = document.getElementById(id)
+ var mc = document.getElementById("main_content")
+ mc.innerHTML = content.innerHTML
+ }
+ </script>
+ </head>
+
+ <body>
+ <div id="main">
+ <div id="header" class="">
+ <div class="site">
+ <div class="logo">
+ <!-- <a href="http://github.com"><img src="/images/modules/header/logov3.png" alt="github" /></a> -->
+ </div>
+ </div>
+ </div>
+
+ <div class="site">
+
+<div id="repos">
+ <div class="repo public" id="repo_details">
+ <div class="title">
+ <div class="path">
+ <a href="#/home"><%= user %></a> / <b><a href="#/home"><%= project_name %></a></b>
+ </div>
+
+ </div>
+
+ <div class="meta">
+ <table>
+ <tr>
+ <td class="label">Description:</td>
+ <td>
+ <span id="repository_description"><%= project_description %></span>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+
+</div>
+
+<div id="guides">
+ <div class="guide">
+ <!-- main content -->
+
+ <div class="main" id="main_content">
+ <%= main_content %>
+ </div>
+
+ <!-- sidebar -->
+
+ <div class="sidebar">
+ <h3>
+ Pages
+ </h3>
+ <%= page_list %>
+ <hr/>
+ <ul><li><b><a href="javascript:go('all_pages')">All Pages</a></b></li><ul>
+ </div>
+
+ </div>
+
+ <!-- admin -->
+ <div class="admin">
+ </div>
+</div>
+
+ </div>
+
+ <div class="push"></div>
+ </div>
+ <div id="footer">
+ </div>
+
+ <div id="all_pages" style="display: none;">
+ <%= page_content %>
+ </div>
+
+ </body>
+</html>
+
View
58 lib/gh-wiki/github.rb
@@ -0,0 +1,58 @@
+$:.unshift(File.dirname(__FILE__)) unless
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
+
+module GhWiki
+ module_function
+
+ def template
+ IO.read(File.dirname(__FILE__) / 'github.html')
+ end
+
+ def main user, project_name
+ root = N('http://wiki.github.com/%s/%s' % [user, project_name])
+ root.css('.main').first.fmap { |c| clean_links c, project_name }
+ pages = get_pages(root, project_name)
+
+ build_doc(root, pages, project_name, user)
+ end
+
+ def build_doc root, pages, project_name, user
+ # Template vars
+ project_description = root.css("#repository_description").first.fmap(&:content)
+ main_content = root.css('.main').first.fmap(&:inner_html)
+ page_list = sidebar(pages)
+ page_content = pages.map { |title, id, content_f|
+ "<div id=\"#{id}\">#{content_f[]}</div>"
+ }.join
+
+ ERB.new(template()).result(binding)
+ end
+
+ def sidebar pages
+ "<ul>" +
+ pages.map { |title, id| "<li><b><a href=\"javascript:go(\'#{id}\')\""">#{title}</a></b></li>" }.join +
+ "</ul>"
+ end
+
+ def clean_links page_main_doc, project_name
+ page_main_doc.css('a').each do |some_a|
+ some_a['href'][/#{project_name}\/(.*)/, 1].fmap { |id|
+ some_a['href'] = "javascript:go(\'#{id}\')"
+ }
+ end
+ end
+
+ def get_pages root_doc, project_name
+ root_doc.css(".sidebar ul li b a").map do |link|
+ [
+ link.content,
+ link['href'][/#{project_name}\/(.*)/, 1] || "home",
+ proc {
+ content = N(link['href']).css('.main').first
+ clean_links content, project_name
+ content
+ }
+ ]
+ end
+ end
+end
View
54 lib/gh-wiki/googlecode.rb
@@ -0,0 +1,54 @@
+$:.unshift(File.dirname(__FILE__)) unless
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
+
+module GhWiki
+ module_function
+
+ def template
+ IO.read(File.dirname(__FILE__) / 'googlecode.html')
+ end
+
+ def main user, project_name
+ root = N('http://wiki.github.com/%s/%s' % [user, project_name])
+ pages = get_pages(root, project_name)
+
+ build_doc(root, pages)
+ end
+
+ def build_doc root, pages
+ #
+ root.css('#wikimaincol').first.fmap { |c| clean_links c }
+
+ # Template vars
+ project_description = root.css("#repository_description").first.content
+ main_content = root.css('.main').first.inner_html
+ page_list = sidebar(pages)
+ page_content = pages.map { |title, id, content_f|
+ "<div id=\"#{id}\">#{content_f[]}</div>"
+ }.join
+
+ ERB.new(template()).result(binding)
+ end
+
+ def clean_links page_main_doc
+ page_main_doc.css('a').each do |some_a|
+ some_a['href'][/#{project_name}\/(.*)/, 1].fmap { |id|
+ some_a['href'] = "javascript:go(\'#{id}\')"
+ }
+ end
+ end
+
+ def get_pages root_doc, project_name
+ root_doc.css(".sidebar ul li b a").map do |link|
+ [
+ link.content,
+ link['href'][/#{project_name}\/(.*)/, 1] || "home",
+ proc {
+ content = N(link['href']).css('.main').first
+ clean_links content
+ content
+ }
+ ]
+ end
+ end
+end
View
45 lib/gh-wiki/utils.rb
@@ -0,0 +1,45 @@
+module GhWiki
+ module_function
+
+ def N url
+ Nokogiri::HTML(open(url))
+ rescue SocketError => e
+ puts "No connection available: #{url}"
+ exit 1
+ end
+end
+
+class String
+ def / other
+ File.join(self, other)
+ end
+end
+
+class Symbol
+ # def to_proc
+ # proc { |x| x.send(self) }
+ # end
+end
+
+class Object
+ def fmap &blk
+ if (self.respond_to? :map) then
+ self.map(&blk)
+ else
+ yield self if self
+ end
+ end
+
+ def filter &blk
+ if (self.respond_to? :select) then
+ self.select(&blk)
+ else
+ if self && (yield self)
+ self
+ else
+ nil
+ end
+ end
+ end
+end
+
View
324 lib/googlecode.html
@@ -0,0 +1,324 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <script type="text/javascript">
+ var codesite_token = null;
+ var logged_in_user_email = null;
+
+ </script>
+
+ <title>Changes - simple-build-tool -Project Hosting on Google Code</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" >
+ <link type="text/css" rel="stylesheet" href="http://www.gstatic.com/codesite/ph/15757402407652699001/css/ph_core.css">
+ <link type="text/css" rel="stylesheet" href="http://www.gstatic.com/codesite/ph/15757402407652699001/css/ph_detail.css" >
+</head>
+<body class="t6">
+
+
+ <div style="height: 1px"></div>
+ <table style="padding:0px; margin: 20px 0px 0px 0px; width:100%" cellpadding="0" cellspacing="0">
+ <tr style="height: 58px;">
+ <td style="width: 55px; text-align:center;">
+ <a href="/p/simple-build-tool/"><img src="http://www.gstatic.com/codesite/ph/images/defaultlogo.png"
+ alt="Project Logo"></a>
+ </td>
+ <td style="padding-left: 0.8em">
+
+ <div id="pname" style="margin: 0px 0px -3px 0px">
+ <a href="/p/simple-build-tool/" style="text-decoration:none; color:#000">simple-build-tool</a>
+ </div>
+ <div id="psum">
+ <i><a id="project_summary_link" href="/p/simple-build-tool/" style="text-decoration:none; color:#000">A build tool for Scala</a></i>
+ </div>
+
+ </td>
+ <td style="white-space:nowrap; text-align:right">
+
+ <form action="/hosting/search">
+ <input size="30" name="q" value="">
+ <input type="submit" name="projectsearch" value="Search projects" >
+ </form>
+
+ </tr>
+ </table>
+
+
+
+ <table id="mt" cellspacing="0" cellpadding="0" width="100%" border="0">
+ <tr>
+ <th onclick="if (!cancelBubble) _go('/p/simple-build-tool/');">
+ <div class="tab inactive">
+ <div class="round4"></div>
+ <div class="round2"></div>
+ <div class="round1"></div>
+ <div class="box-inner">
+ <a onclick="cancelBubble=true;" href="/p/simple-build-tool/">Project&nbsp;Home</a>
+ </div>
+ </div>
+ </th><td>&nbsp;&nbsp;</td>
+
+
+
+
+ <th onclick="if (!cancelBubble) _go('/p/simple-build-tool/downloads/list');">
+ <div class="tab inactive">
+ <div class="round4"></div>
+ <div class="round2"></div>
+ <div class="round1"></div>
+ <div class="box-inner">
+ <a onclick="cancelBubble=true;" href="/p/simple-build-tool/downloads/list">Downloads</a>
+ </div>
+ </div>
+ </th><td>&nbsp;&nbsp;</td>
+
+
+
+
+
+ <th onclick="if (!cancelBubble) _go('/p/simple-build-tool/w/list');">
+ <div class="tab active">
+ <div class="round4"></div>
+ <div class="round2"></div>
+ <div class="round1"></div>
+ <div class="box-inner">
+ <a onclick="cancelBubble=true;" href="/p/simple-build-tool/w/list">Wiki</a>
+ </div>
+ </div>
+ </th><td>&nbsp;&nbsp;</td>
+
+
+
+
+
+ <th onclick="if (!cancelBubble) _go('/p/simple-build-tool/issues/list');">
+ <div class="tab inactive">
+ <div class="round4"></div>
+ <div class="round2"></div>
+ <div class="round1"></div>
+ <div class="box-inner">
+ <a onclick="cancelBubble=true;" href="/p/simple-build-tool/issues/list">Issues</a>
+ </div>
+ </div>
+ </th><td>&nbsp;&nbsp;</td>
+
+
+
+
+
+ <th onclick="if (!cancelBubble) _go('/p/simple-build-tool/source/checkout');">
+ <div class="tab inactive">
+ <div class="round4"></div>
+ <div class="round2"></div>
+ <div class="round1"></div>
+ <div class="box-inner">
+ <a onclick="cancelBubble=true;" href="/p/simple-build-tool/source/checkout">Source</a>
+ </div>
+ </div>
+ </th><td>&nbsp;&nbsp;</td>
+
+
+ <td width="100%">&nbsp;</td>
+ </tr>
+</table>
+<table cellspacing="0" cellpadding="0" width="100%" align="center" border="0" class="st">
+ <tr>
+
+
+
+ <td>
+ <div class="issueDetail">
+<div class="isf">
+
+ <span class="inIssueList">
+ <span>Search</span>
+ <form action="/p/simple-build-tool/w/list" method="GET" style="display:inline">
+ <select id="can" name="can" style="font-size:92%">
+ <option disabled="disabled">Search within:</option>
+
+ <option value="1" >&nbsp;All wiki pages</option>
+ <option value="3" >&nbsp;Featured pages</option>
+ <option value="2" selected="selected">&nbsp;Current pages</option>
+
+
+ <option value="4" >&nbsp;Deprecated pages</option>
+
+ </select>
+ <span>for</span>
+ <span id="qq"><input type="text" size="32" id="q" name="q" value="" style="font-size:92%" ></span>
+
+
+ <input type="submit" value="Search" style="font-size:92%" >
+ </form>
+ </span>
+
+
+
+
+
+
+
+
+
+</div>
+</div>
+
+ </td>
+
+
+
+
+
+
+
+
+ <td height="4" align="right" valign="top" class="bevel-right">
+ <div class="round4"></div>
+ <div class="round2"></div>
+ <div class="round1"></div>
+ </td>
+ </tr>
+</table>
+<script type="text/javascript">
+ var cancelBubble = false;
+ function _go(url) { document.location = url; }
+</script>
+
+<div id="maincol" style="padding:0 3px 3px 0; margin:0">
+
+<!-- IE -->
+<style type="text/css">
+ #wikimaincol { padding-top: 6px; padding-left:1em}
+ #sidebarcontainer { padding: 4px 2px 2px 2px; width:20em; overflow:hidden}
+ .sidebartop ul { margin:0 0 0 .5em; padding-left:0; list-style:none}
+ .sidebartop ul ul { margin-left:1em; padding-left:0; list-style:none; display:none}
+ .sidebartop li { margin:0 0 2px 0; padding:1px; padding-left:14px; cursor:pointer}
+ .sidebartop li a { padding:2px}
+ .sidebartop li { background: url(http://www.gstatic.com/codesite/ph/images/plus.gif) no-repeat 1px 3px}
+ .sidebartop li.treeopen { background: url(http://www.gstatic.com/codesite/ph/images/minus.gif) no-repeat 1px 3px}
+ .sidebartop li.treeleaf { background:none}
+ .currentpagelink { background:#cdf}
+</style>
+
+ <style type="text/css">
+ .artifactcomment, #commentform {
+ margin: .5em 0 0 0;
+ padding: .3em 0 .3em .3em;
+ border-top: 3px solid #c3d9ff;
+ }
+ #commentform { padding-top: 1em; }
+ .delcom { background: #e8e8e8 }
+ .commentcontent { margin: 1em 0;}
+ </style>
+
+
+ <div id="wikicontent">
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
+ <tr>
+
+ <td class="vt expand" id="wikisidebar">
+ <div class="pmeta_bubble_bg">
+
+ <div style="float:right; padding:0 3px">
+ <a class="ifExpand" style="font-size:130%; color:blue; text-decoration:none"
+ href="#" onclick="_DW_toggleSidebar('simple-build-tool', this, ''); return false;"
+ title="Hide sidebar"><b>&lsaquo;&lsaquo;</b></a>
+ </div>
+ <div class="ifCollapse" style="padding:0 2px">
+ <a style="font-size:130%; color:blue; text-decoration:none"
+ href="#" onclick="_DW_toggleSidebar('simple-build-tool', this, ''); return false;"
+ title="Show sidebar"><b>&rsaquo;&rsaquo;</b></a>
+ </div>
+
+
+ <div id="sidebarcontainer" class="sidebartop ifExpand">
+ <ul><li>Getting Started </li><ul><li><a href="/p/simple-build-tool/wiki/Setup">Setup</a> - Getting <tt>sbt</tt> running on your machine. </li><li><a href="/p/simple-build-tool/wiki/RunningSbt">Basic Usage</a> - Actions and Commands </li></ul><li>Usage </li><ul><li><a href="/p/simple-build-tool/wiki/TriggeredExecution">Triggered Actions</a> </li><li><a href="/p/simple-build-tool/wiki/CrossBuild">Cross-building</a> </li><li><a href="/p/simple-build-tool/wiki/Loader">Scala and Sbt Versions</a> </li><li><a href="/p/simple-build-tool/wiki/ProjectConsole">Project Console</a> </li><li><a href="/p/simple-build-tool/wiki/IntegrationSupport">Integration</a> - Using <tt>sbt</tt> with other tools </li></ul><li>Configuration </li><ul><li><a href="/p/simple-build-tool/wiki/BuildConfiguration">Basic Configuration</a> </li><li><a href="/p/simple-build-tool/wiki/ProjectDefinitionExamples">Examples</a> </li><li><a href="/p/simple-build-tool/wiki/Forking">Forking</a> </li><li><a href="/p/simple-build-tool/wiki/Properties">Properties</a> </li><li><a href="/p/simple-build-tool/wiki/SubProjects">Sub Projects</a> </li><li><a href="/p/simple-build-tool/wiki/Paths">Paths</a> </li><li><a href="/p/simple-build-tool/wiki/CompilerPlugins">Using Compiler Plugins</a> </li><li><a href="/p/simple-build-tool/wiki/ScalaJars">Scala Jars and Dependency Management</a> </li><li><a href="/p/simple-build-tool/wiki/TestFrameworkExtensions">Extending the Test Framework</a> </li><li><a href="/p/simple-build-tool/wiki/SbtPlugins">Plugins</a> - Reusing and distributing project definitions </li><li>Managed Dependencies </li><ul><li><a href="/p/simple-build-tool/wiki/LibraryManagement">Basics</a> </li><li><a href="/p/simple-build-tool/wiki/ManagedConfigurations">Configurations</a> </li><li><a href="/p/simple-build-tool/wiki/Publishing">Publishing</a> </li></ul></ul><li>Writing Actions </li><ul><li><a href="/p/simple-build-tool/wiki/CustomActions">Creating/Modifying Actions</a> </li><li><a href="/p/simple-build-tool/wiki/ActionContent">Implementing Actions</a> </li><li><a href="/p/simple-build-tool/wiki/MethodTasks">Actions with Parameters (method tasks)</a> </li><li><a href="/p/simple-build-tool/wiki/Process">External Processes</a> </li></ul><li>Other Project Types </li><ul><li>Web Applications </li><ul><li><a href="/p/simple-build-tool/wiki/WebApplications">Web Applications</a> </li><li><a href="/p/simple-build-tool/wiki/WebApplicationExample">Hello Lift Example</a> </li></ul><li>Webstart Applications </li><ul><li><a href="/p/simple-build-tool/wiki/Webstart">Webstart</a> </li><li><a href="/p/simple-build-tool/wiki/WebstartExample">Example</a> </li></ul><li><a href="/p/simple-build-tool/wiki/JavaSources">Java Sources</a> </li></ul><li>Project Information </li><ul><li><a href="/p/simple-build-tool/wiki/Credits">Credits</a> </li><li><a href="/p/simple-build-tool/wiki/Roadmap">Roadmap</a> </li><li><a href="/p/simple-build-tool/wiki/Changes">Changes</a> </li><li><a href="/p/simple-build-tool/wiki/Build">Build</a> from source </li><li><a href="http://simple-build-tool.googlecode.com/svn/artifacts/latest/api/index.html" rel="nofollow">API Documentation</a> </li><li><a href="/p/simple-build-tool/wiki/ChangeDetectionAndTesting">Change Detection and Testing</a> </li></ul></ul>
+ </div>
+ <div class="round1"></div>
+ <div class="round2"></div>
+ <div class="round4"></div>
+ </div>
+</td>
+
+
+ <td class="vt" id="wikimaincol" width="100%">
+
+ <div style="float:right; width:18em" id="wikimeta">
+ <div class="pmeta_bubble_bg">
+ <div class="round4"></div>
+ <div class="round2"></div>
+ <div class="round1"></div>
+ <div class="box-inner">
+ <table style="padding: 5px">
+ <tr><td colspan="2" style="padding-bottom:5px">Updated <span title="Tue Sep 1 07:12:52 2009">Today (7 hours ago)</span>
+
+ by <a style="white-space: nowrap" href="/u/dmharrah/">dmharrah</a>
+ </td></tr>
+
+ </table>
+ </div>
+ <div class="round1"></div>
+ <div class="round2"></div>
+ <div class="round4"></div>
+ </div>
+ </div>
+
+ <div id="wikiheader" style="margin-bottom:1em">
+
+ <span style="font-size:120%;font-weight:bold">Changes</span>
+ &nbsp;
+
+ </div>
+ <h3><a name="0.5.2_to_trunk"/>0.5.2 to trunk</h3><ul><li>Many logging related changes and fixes. Added <tt>FilterLogger</tt> and cleaned up interaction between <tt>Logger</tt>, scripted testing, and the builder projects. This included removing the <tt>recordingDepth</tt> hack from Logger. Logger buffering is now enabled/disabled per thread. </li><li>Fix <tt>compileOptions</tt> being fixed after the first compile </li><li>Minor fixes to output directory checking </li><li>Added <tt>defaultLoggingLevel</tt> method for setting the initial level of a project&#x27;s <tt>Logger</tt> </li><li>Cleaned up internal approach to adding extra default configurations like <tt>plugin</tt> </li><li>Added <tt>syncPathsTask</tt> for synchronizing paths to a target directory </li><li>Allow multiple instances of Jetty (new <tt>jettyRunTasks</tt> can be defined with different ports) </li><li><tt>jettyRunTask</tt> accepts configuration in a single configuration wrapper object instead of many parameters </li><li>Fix web application class loading (<a title="web application class loader problem" class=closed_ref href="/p/simple-build-tool/issues/detail?id=35">&nbsp;issue #35&nbsp;</a>) by using <tt>jettyClasspath=testClasspath---jettyRunClasspath</tt> for loading Jetty. A better way would be to have a <tt>jetty</tt> configuration and have <tt>jettyClasspath=managedClasspath(&#x27;jetty&#x27;)</tt>, but this maintains compatibility. </li><li>Copy resources to <tt>target/resources</tt> and <tt>target/test-resources</tt> using <tt>copyResources</tt> and <tt>copyTestResources</tt> tasks. Properly include all resources in web applications and classpaths (<a title="Overriding resources issue" class=closed_ref href="/p/simple-build-tool/issues/detail?id=36">&nbsp;issue #36&nbsp;</a>). <tt>mainResources</tt> and <tt>testResources</tt> are now the definitive methods for getting resources. </li><li>Updated for 2.8 (<tt>sbt</tt> now compiles against August 21, 2009 nightly build of Scala) </li><li>Fixed issue with position of <tt>^</tt> in compile errors </li><li>Changed order of repositories (local, shared, Maven Central, user, Scala Tools) </li><li>Added Maven Central to resolvers used to find Scala library/compiler in launcher </li><li>Fixed problem that prevented detecting user-specified subclasses </li><li>Fixed exit code returned when exception thrown in main thread for <tt>TrapExit</tt> </li><li>Added <tt>javap</tt> task to <tt>DefaultProject</tt>. It has tab completion on compiled project classes and the run classpath is passed to <tt>javap</tt> so that library classes are available. Examples: </li><pre class="prettyprint"> &gt; javap your.Clazz
+ &gt; javap -c scala.List</pre><li>Added <tt>exec</tt> task. Mixin <tt>Exec</tt> to project definition to use. This forks the command following <tt>exec</tt>. Examples: </li><pre class="prettyprint"> &gt; exec echo Hi
+ &gt; exec find src/main/scala -iname *.scala -exec wc -l {} ;</pre><li>Added <tt>sh</tt> task for users with a unix-style shell available (runs <tt>/bin/sh -c &lt;arguments&gt;</tt>). Mixin <tt>Exec</tt> to project definition to use. Example: </li><pre class="prettyprint"> &gt; sh find src/main/scala -iname *.scala | xargs cat | wc -l</pre><li>Improved Ivy-related code to not load unnecessary default settings </li><li>Moved repository order to be local, user repositories, Maven Central, and then Scala Tools </li><li>Fixed <a title="source package paths" class=closed_ref href="/p/simple-build-tool/issues/detail?id=39">&nbsp;issue #39&nbsp;</a> (sources were not relative in src package) </li><li>Implemented <a title="Ivy install task" class=closed_ref href="/p/simple-build-tool/issues/detail?id=38">&nbsp;issue #38&nbsp;</a> (<tt>InstallProject</tt> with &#x27;install&#x27; task) </li><li>Vesa&#x27;s patch for configuring the output of forked Scala/Java and processes </li><li>Don&#x27;t buffer logging of forked <tt>run</tt> by default </li><li>Check <tt>Project.terminateWatch</tt> to determine if triggered execution should stop for a given keypress. </li><li>Terminate triggered execution only on &#x27;enter&#x27; by default (previously, any keypress stopped it) </li></ul><h3><a name="0.5.1_to_0.5.2"/>0.5.1 to 0.5.2</h3><ul><li>Fixed problem where dependencies of <tt>sbt</tt> plugins were not on the compile classpath </li><li>Added <tt>execTask</tt> that runs an <tt>sbt.ProcessBuilder</tt> when invoked </li><li>Added implicit conversion from <tt>scala.xml.Elem</tt> to <tt>sbt.ProcessBuilder</tt> that takes the element&#x27;s text content, trims it, and splits it around whitespace to obtain the command. </li><li>Processes can now redirect standard input (see run with Boolean argument or !&lt; operator on <tt>ProcessBuilder</tt>), off by default </li><li>Made scripted framework a plugin and scripted tests now go in <tt>src/sbt-test</tt> by default </li><li>Can define and use an sbt test framework extension in a project </li><li>Fixed <tt>run</tt> action swallowing exceptions </li><li>Fixed tab completion for method tasks for multi-project builds </li><li>Check that tasks in <tt>compoundTask</tt> do not reference static tasks </li><li>Make <tt>toString</tt> of <tt>Path</tt>s in subprojects relative to root project directory </li><li><tt>crossScalaVersions</tt> is now inherited from parent if not specified </li><li>Added <tt>scala-library.jar</tt> to the <tt>javac</tt> classpath </li><li>Project dependencies are added to published <tt>ivy.xml</tt> </li><li>Added dependency tracking for Java sources using classfile parsing (with the usual limitations) </li><li>Added <tt>Process.cat</tt> that will send contents of <tt>URL</tt>s and <tt>File</tt>s to standard output. Alternatively, <tt>cat</tt> can be used on a single <tt>URL</tt> or <tt>File</tt>. Example: </li><pre class="prettyprint"> import java.net.URL
+ import java.io.File
+ val spde = new URL(&quot;http://technically.us/spde/About&quot;)
+ val dispatch = new URL(&quot;http://databinder.net/dispatch/About&quot;)
+ val build = new File(&quot;project/build.properties&quot;)
+ cat(spde, dispatch, build) #| &quot;grep -i scala&quot; !</pre></ul><h3><a name="0.4.6_to_0.5/0.5.1"/>0.4.6 to 0.5/0.5.1</h3><ul><li>Fixed <tt>ScalaTest</tt> framework dropping stack traces </li><li>Publish only public configurations by default </li><li>Loader now adds <tt>.m2/repository</tt> for downloading Scala jars </li><li>Can now fork the compiler and runner and the runner can use a different working directory. </li><li>Maximum compiler errors shown is now configurable </li><li>Fixed rebuilding and republishing released versions of <tt>sbt</tt> against new Scala versions (attempt #2) </li><li>Fixed snapshot reversion handling (Ivy needs changing pattern set on cache, apparently) </li><li>Fixed handling of default configuration when <tt>useMavenConfiguration</tt> is <tt>true</tt> </li><li>Cleanup on Environment, Analysis, Conditional, <tt>MapUtilities</tt>, and more... </li><li>Tests for Environment, source dependencies, library dependency management, and more... </li><li>Dependency management and multiple Scala versions </li><li>Experimental plugin for producing project bootstrapper in a self-extracting jar </li><li>Added ability to directly specify <tt>URL</tt> to use for dependency with the <tt>from(url: URL)</tt> method defined on <tt>ModuleID</tt> </li><li>Fixed <a title="provided classpath included in war file and webstart" class=closed_ref href="/p/simple-build-tool/issues/detail?id=30">&nbsp;issue #30&nbsp;</a> </li><li>Support cross-building with <tt>+</tt> when running batch actions </li><li>Additional flattening for project definitions: sources can go either in <tt>project/build/src</tt> (recursively) or <tt>project/build</tt> (flat) </li><li>Fixed manual <tt>reboot</tt> not changing the version of Scala when it is manually <tt>set</tt> </li><li>Fixed tab completion for cross-building </li><li>Fixed a class loading issue with web applications </li></ul><h3><a name="0.4.5_to_0.4.6"/>0.4.5 to 0.4.6</h3><ul><li>Publishing to ssh/sftp/filesystem repository supported </li><li>Exception traces are printed by default </li><li>Fixed warning message about no <tt>Class-Path</tt> attribute from showing up for <tt>run</tt> </li><li>Fixed <tt>package-project</tt> operation </li><li>Fixed <tt>Path.fromFile</tt> </li><li>Fixed issue with external process output being lost when sent to a <tt>BufferedLogger</tt> with <tt>parallelExecution</tt> enabled. </li><li>Preserve history across <tt>clean</tt> </li><li>Fixed issue with making relative path in jar with wrong separator </li><li>Added cross-build functionality (prefix action with <tt>+</tt>). </li><li>Added methods <tt>scalaLibraryJar</tt> and <tt>scalaCompilerJar</tt> to <tt>FileUtilities</tt> </li><li>Include project dependencies for <tt>deliver</tt>/<tt>publish</tt> </li><li>Add Scala dependencies for <tt>make-pom</tt>/<tt>deliver</tt>/<tt>publish</tt>, which requires these to depend on <tt>package</tt> </li><li>Properly add compiler jar to run/test classpaths when main sources depend on it </li><li><tt>TestFramework</tt> root <tt>ClassLoader</tt> filters compiler classes used by <tt>sbt</tt>, which is required for projects using the compiler. </li><li>Better access to dependencies: </li><ul><li><tt>mainDependencies</tt> and <tt>testDependencies</tt> provide an analysis of the dependencies of your code as determined during compilation </li><li><tt>scalaJars</tt> is deprecated, use <tt>mainDependencies.scalaJars</tt> instead (provides a <tt>PathFinder</tt>, which is generally more useful) </li></ul><li>Added <tt>jettyPort</tt> method to <tt>DefaultWebProject</tt>. </li><li>Fixed <tt>package-project</tt> to exclude <tt>project/boot</tt> and <tt>project/build/target</tt> </li><li>Support specs 1.5.0 for Scala 2.7.4 version. </li><li>Parallelization at the subtask level </li><li>Parallel test execution at the suite/specification level. </li></ul><h3><a name="0.4.3_to_0.4.5"/>0.4.3 to 0.4.5</h3><ul><li>Sorted out repository situation in loader </li><li>Added support for <tt>http_proxy</tt> environment variable </li><li>Added <tt>download</tt> method from Nathan to <tt>FileUtilities</tt> to retrieve the contents of a URL. </li><li>Added special support for compiler plugins, see <a href="/p/simple-build-tool/wiki/CompilerPlugins">CompilerPlugins</a> page. </li><li><tt>reload</tt> command in scripted tests will now properly handle success/failure </li><li>Very basic support for Java sources: Java sources under <tt>src/main/java</tt> and <tt>src/test/java</tt> will be compiled. </li><li><tt>parallelExecution</tt> defaults to value in parent project if there is one. </li><li>Added &#x27;console-project&#x27; that enters the Scala interpreter with the current <tt>Project</tt> bound to the variable <tt>project</tt>. </li><li>The default Ivy cache manager is now configured with <tt>useOrigin=true</tt> so that it doesn&#x27;t cache artifacts from the local filesystem. </li><li>For users building from trunk, if a project specifies a version of <tt>sbt</tt> that ends in <tt>-SNAPSHOT</tt>, the loader will update <tt>sbt</tt> every time it starts up. The trunk version of <tt>sbt</tt> will always end in <tt>-SNAPSHOT</tt> now. </li><li>Added automatic detection of classes with main methods for use when <tt>mainClass</tt> is not explicitly specified in the project definition. If exactly one main class is detected, it is used for <tt>run</tt> and <tt>package</tt>. If multiple main classes are detected, the user is prompted for which one to use for <tt>run</tt>. For <tt>package</tt>, no <tt>Main-Class</tt> attribute is automatically added and a warning is printed. </li><li>Updated build to cross-compile against Scala 2.7.4. </li><li>Fixed <tt>proguard</tt> task in <tt>sbt</tt>&#x27;s project definition </li><li>Added <tt>manifestClassPath</tt> method that accepts the value for the <tt>Class-Path</tt> attribute </li><li>Added <tt>PackageOption</tt> called <tt>ManifestAttributes</tt> that accepts <tt>(java.util.jar.Attributes.Name, String)</tt> or <tt>(String, String)</tt> pairs and adds them to the main manifest attributes </li><li>Fixed some situations where characters would not be echoed at prompts other than main prompt. </li><li>Fixed <a title="Does not use system proxy?" class=closed_ref href="/p/simple-build-tool/issues/detail?id=20">&nbsp;issue #20&nbsp;</a> (use <tt>http_proxy</tt> environment variable) </li><li>Implemented <a title="Utilities to run arbitrary shell commands" class=closed_ref href="/p/simple-build-tool/issues/detail?id=21">&nbsp;issue #21&nbsp;</a> (native process wrapper) </li><li>Fixed <a title="Dependency issue on updating Scala version to 2.7.4 via build.properties" class=closed_ref href="/p/simple-build-tool/issues/detail?id=22">&nbsp;issue #22&nbsp;</a> (rebuilding and republishing released versions of <tt>sbt</tt> against new Scala versions, specifically Scala 2.7.4) </li><li>Implemented <a title="Repositories defined in parent repository don't seem to be passed to child projects" class=closed_ref href="/p/simple-build-tool/issues/detail?id=23">&nbsp;issue #23&nbsp;</a> (inherit inline repositories declared in parent project) </li></ul><h3><a name="0.4_to_0.4.3"/>0.4 to 0.4.3</h3><ul><li>Direct dependencies on Scala libraries are checked for version equality with <tt>scala.version</tt> </li><li>Transitive dependencies on <tt>scala-library</tt> and <tt>scala-compiler</tt> are filtered </li><ul><li>They are fixed by <tt>scala.version</tt> and provided on the classpath by <tt>sbt</tt> </li><li>To access them, use the <tt>scalaJars</tt> method, <tt>classOf[ScalaObject].getProtectionDomain.getCodeSource</tt>, or mainCompileConditional.analysis.allExternals </li></ul><li>The configurations checked/filtered as described above are configurable. Nonstandard configurations are not checked by default. </li><li>Version of <tt>sbt</tt> and Scala printed on startup </li><li>Launcher asks if you want to try a different version if <tt>sbt</tt> or Scala could not be retrieved. </li><li>After changing <tt>scala.version</tt> or <tt>sbt.version</tt> with <tt>set</tt>, note is printed that <tt>reboot</tt> is required. </li><li>Moved managed dependency actions to <tt>BasicManagedProject</tt> (<tt>update</tt> is now available on <tt>ParentProject</tt>) </li><li>Cleaned up <tt>sbt</tt>&#x27;s build so that you just need to do <tt>update</tt> and <tt>full-build</tt> to build from source. The trunk version of <tt>sbt</tt> will be available for use from the loader. </li><ul><li>The loader is now a subproject. </li><li>For development, you&#x27;ll still want the usual actions (such as <tt>package</tt>) for the main builder and <tt>proguard</tt> to build the loader. </li></ul><li>Fixed analysis plugin improperly including traits/abstract classes in subclass search </li><li><tt>ScalaProject</tt>s already had everything required to be parent projects: flipped the switch to enable it </li><li>Proper method task support in scripted tests (<tt>package</tt> group tests rightly pass again) </li><li>Improved tests in loader that check that all necessary libraries were downloaded properly </li></ul><h3><a name="0.3.7_to_0.4"/>0.3.7 to 0.4</h3><ul><li>Fixed issue with <tt>build.properties</tt> being unnecessarily updated in sub-projects when loading. </li><li>Added method to compute the SHA-1 hash of a <tt>String</tt> </li><li>Added pack200 methods </li><li>Added initial process interface </li><li>Added initial webstart support </li><li>Added gzip methods </li><li>Added <tt>sleep</tt> and <tt>newer</tt> commands to scripted testing. </li><li>Scripted tests now test the version of <tt>sbt</tt> being built instead of the version doing the building. </li><li><tt>testResources</tt> is put on the test classpath instead of <tt>testResourcesPath</tt> </li><li>Added <tt>jetty-restart</tt>, which does <tt>jetty-stop</tt> and then <tt>jetty-run</tt> </li><li>Added automatic reloading of default web application </li><li>Changed packaging behaviors (still likely to change) </li><li>Inline configurations now allowed (can be used with configurations in inline XML) </li><li>Split out some code related to managed dependencies from <tt>BasicScalaProject</tt> to new class <tt>BasicManagedProject</tt> </li><li>Can specify that maven-like configurations should be automatically declared </li><li>Fixed problem with nested modules being detected as tests </li><li><tt>testResources</tt>, <tt>integrationTestResources</tt>, and <tt>mainResources</tt> should now be added to appropriate classpaths </li><li>Added project organization as a property that defaults to inheriting from the parent project. </li><li>Project creation now prompts for the organization. </li><li>Added method tasks, which are top-level actions with parameters. </li><li>Made <tt>help</tt>, <tt>actions</tt>, and <tt>methods</tt> commands available to batch-style invocation. </li><li>Applied Mikko&#x27;s two fixes for webstart and fixed problem with pack200+sign. Also, fixed nonstandard behavior when gzip enabled. </li><li>Added <tt>control</tt> method to <tt>Logger</tt> for action lifecycle logging </li><li>Made standard logging level convenience methods final </li><li>Made <tt>BufferedLogger</tt> have a per-actor buffer instead of a global buffer </li><li>Added a <tt>SynchronizedLogger</tt> and a <tt>MultiLogger</tt> (intended to be used with the yet unwritten <tt>FileLogger</tt>) </li><li>Changed method of atomic logging to be a method <tt>logAll</tt> accepting <tt>List[LogEvent]</tt> instead of <tt>doSynchronized</tt> </li><li>Improved action lifecycle logging </li><li>Parallel logging now provides immediate feedback about starting an action </li><li>General cleanup, including removing unused classes and methods and reducing dependencies between classes </li><li><tt>run</tt> is now a method task that accepts options to pass to the <tt>main</tt> method (<tt>runOptions</tt> has been removed, <tt>runTask</tt> is no longer interactive, and <tt>run</tt> no longer starts a console if <tt>mainClass</tt> is undefined) </li><li>Major task execution changes: </li><ul><li>Tasks automatically have implicit dependencies on tasks with the same name in dependent projects </li><li>Implicit dependencies on interactive tasks are ignored, explicit dependencies produce an error </li><li>Interactive tasks must be executed directly on the project on which they are defined </li><li>Method tasks accept input arguments (<tt>Array[String]</tt>) and dynamically create the task to run </li><li>Tasks can depend on tasks in other projects </li><li>Tasks are run in parallel breadth-first style </li></ul><li>Added <tt>test-only</tt> method task, which restricts the tests to run to only those passed as arguments. </li><li>Added <tt>test-failed</tt> method task, which restricts the tests to run. First, only tests passed as arguments are run. If no tests are passed, no filtering is done. Then, only tests that failed the previous run are run. </li><li>Added <tt>test-quick</tt> method task, which restricts the tests to run. First, only tests passed as arguments are run. If no tests are passed, no filtering is done. Then, only tests that failed the previous run or had a dependency change are run. </li><li>Added launcher that allows declaring version of sbt/scala to build project with. </li><li>Added tab completion with ~ </li><li>Added basic tab completion for method tasks, including <tt>test-*</tt> </li><li>Changed default pack options to be the default options of Pack200.Packer </li><li>Fixed ~ behavior when action doesn&#x27;t exist </li></ul><h3><a name="0.3.6_to_0.3.7"/>0.3.6 to 0.3.7</h3><ul><li>Improved classpath methods </li><li>Refactored various features into separate project traits </li><li><tt>ParentProject</tt> can now specify dependencies </li><li>Support for <tt>optional</tt> scope </li><li>More API documentation </li><li>Test resource paths provided on classpath for testing </li><li>Added some missing read methods in <tt>FileUtilities</tt> </li><li>Added scripted test framework </li><li>Change detection using hashes of files </li><li>Fixed problem with manifests not being generated (<a title="Main-Class attribute not set" class=closed_ref href="/p/simple-build-tool/issues/detail?id=14">&nbsp;bug #14&nbsp;</a>) </li><li>Fixed issue with scala-tools repository not being included by default (again) </li><li>Added option to set ivy cache location (mainly for testing) </li><li>trace is no longer a logging level but a flag enabling/disabling stack traces </li><li>Project.loadProject and related methods now accept a Logger to use </li><li>Made hidden files and files that start with <tt>&#x27;.&#x27;</tt> excluded by default (<tt>&#x27;.*&#x27;</tt> is required because subversion seems to not mark <tt>.svn</tt> directories hidden on Windows) </li><li>Implemented exit codes </li><li>Added continuous compilation command <tt>cc</tt> </li></ul><h3><a name="0.3.5_to_0.3.6"/>0.3.5 to 0.3.6</h3><ul><li>Fixed <a title="path parsing broken" class=closed_ref href="/p/simple-build-tool/issues/detail?id=12">&nbsp;bug #12&nbsp;</a>. </li><li>Compiled with 2.7.2. </li></ul><h3><a name="0.3.2_to_0.3.5"/>0.3.2 to 0.3.5</h3><ul><li>Fixed <a title="build.properties keeps getting modified" class=closed_ref href="/p/simple-build-tool/issues/detail?id=11">&nbsp;bug #11&nbsp;</a>. </li><li>Fixed problem with dependencies where source jars would be used instead of binary jars. </li><li>Fixed scala-tools not being used by default for inline configurations. </li><li>Small dependency management error message correction </li><li>Slight refactoring for specifying whether scala-tools releases gets added to configured resolvers </li><li>Separated repository/dependency overriding so that repositories can be specified inline for use with <tt>ivy.xml</tt> or <tt>pom.xml</tt> files </li><li>Added ability to specify Ivy XML configuration in Scala. </li><li>Added <tt>clean-cache</tt> action for deleting Ivy&#x27;s cache </li><li>Some initial work towards accessing a resource directory from tests </li><li>Initial tests for <tt>Path</tt> </li><li>Some additional <tt>FileUtilities</tt> methods, some <tt>FileUtilities</tt> method adjustments and some initial tests for <tt>FileUtilities</tt> </li><li>A basic framework for testing <tt>ReflectUtilities</tt>, not run by default because of run time </li><li>Minor cleanup to <tt>Path</tt> and added non-empty check to path components </li><li>Catch additional exceptions in <tt>TestFramework</tt> </li><li>Added <tt>copyTask</tt> task creation method. </li><li>Added <tt>jetty-run</tt> action and added ability to package war files. </li><li>Added <tt>jetty-stop</tt> action. </li><li>Added <tt>console-quick</tt> action that is the same as <tt>console</tt> but doesn&#x27;t compile sources first. </li><li>Moved some custom <tt>ClassLoader</tt>s to <tt>ClasspathUtilities</tt> and improved a check. </li><li>Added ability to specify hooks to call before <tt>sbt</tt> shuts down. </li><li>Added <tt>zip</tt>, <tt>unzip</tt> methods to <tt>FileUtilities</tt> </li><li>Added <tt>append</tt> equivalents to <tt>write*</tt> methods in <tt>FileUtilites</tt> </li><li>Added first draft of integration testing </li><li>Added batch command <tt>compile-stats</tt> </li><li>Added methods to create tasks that have basic conditional execution based on declared sources/products of the task </li><li>Added <tt>newerThan</tt> and <tt>olderThan</tt> methods to <tt>Path</tt> </li><li>Added <tt>reload</tt> action to reread the project definition without losing the performance benefits of an already running jvm </li><li>Added <tt>help</tt> action to tab completion </li><li>Added handling of (effectively empty) scala source files that create no class files: they are always interpreted as modified. </li><li>Added prompt to retry project loading if compilation fails </li><li><tt>package</tt> action now uses <tt>fileTask</tt> so that it only executes if files are out of date </li><li>fixed <tt>ScalaTest</tt> framework wrapper so that it fails the <tt>test</tt> action if tests fail </li><li>Inline dependencies can now specify configurations </li></ul><h3><a name="0.3.1_to_0.3.2"/>0.3.1 to 0.3.2</h3><ul><li>Compiled jar with Java 1.5. </li></ul><h3><a name="0.3_to_0.3.1"/>0.3 to 0.3.1</h3><ul><li>Fixed bugs #8, #9, and #10. </li></ul><h3><a name="0.2.3_to_0.3"/>0.2.3 to 0.3</h3><ul><li>Version change only for first release. </li></ul><h3><a name="0.2.2_to_0.2.3"/>0.2.2 to 0.2.3</h3><ul><li>Added tests for <tt>Dag</tt>, <tt>NameFilter</tt>, <tt>Version</tt> </li><li>Fixed handling of trailing <tt>*</tt>s in <tt>GlobFilter</tt> and added some error-checking for control characters, which <tt>Pattern</tt> doesn&#x27;t seem to like </li><li>Fixed <tt>Analysis.allProducts</tt> implementation </li><ul><li>It previously returned the sources instead of the generated classes </li><li>Will only affect the count of classes (it should be correct now) and the debugging of missed classes (erroneously listed classes as missed) </li></ul><li>Made some implied preconditions on <tt>BasicVersion</tt> and <tt>OpaqueVersion</tt> explicit </li><li>Made increment version behavior in <tt>ScalaProject</tt> easier to overload </li><li>Added <tt>Seq[..Option]</tt> alternative to <tt>...Option*</tt> for tasks </li><li>Documentation generation fixed to use latest value of version </li><li>Fixed <tt>BasicVersion.incrementMicro</tt> </li><li>Fixed test class loading so that <tt>sbt</tt> can test the version of <tt>sbt</tt> being developed (previously, the classes from the executing version of <tt>sbt</tt> were tested) </li></ul><h3><a name="0.2.1_to_0.2.2"/>0.2.1 to 0.2.2</h3><ul><li>Package name is now a call-by-name parameter for the package action </li><li>Fixed release action calling compile multiple times </li></ul><h3><a name="0.2.0_to_0.2.1"/>0.2.0 to 0.2.1</h3><ul><li>Added some action descriptions </li><li>jar name now comes from normalized name (lowercased and spaces to dashes) </li><li>Some cleanups related to creating filters </li><li>Path should only &#x27;get&#x27; itself if the underlying file exists to be consistent with other <tt>PathFinders</tt> </li><li>Added <tt>---</tt> operator for <tt>PathFinder</tt> that excludes paths from the <tt>PathFinder</tt> argument </li><li>Removed <tt>***</tt> operator on <tt>PathFinder</tt> </li><li><tt>**</tt> operator on <tt>PathFinder</tt> matches all descendents or self that match the <tt>NameFilter</tt> argument </li><li>The above should fix bug <tt>#6</tt> </li><li>Added version increment and release actions. </li><li>Can now build sbt with sbt. Build scripts <tt>build</tt> and <tt>clean</tt> will still exist. </li></ul><h3><a name="0.1.9_to_0.2.0"/>0.1.9 to 0.2.0</h3><ul><li>Implemented typed properties and access to system properties </li><li>Renamed <tt>metadata</tt> directory to <tt>project</tt> </li><li>Information previously in <tt>info</tt> file now obtained by properties: </li><ul><li><tt>info.name --&gt; name</tt> </li><li><tt>info.currentVersion --&gt; version</tt> </li></ul><li>Concrete <tt>Project</tt> subclasses should have a constructor that accepts a single argument of type <tt>ProjectInfo</tt> (argument <tt>dependencies: Iterable[Project]</tt> has been merged into <tt>ProjectInfo</tt>) </li></ul><h3><a name="0.1.8_to_0.1.9"/>0.1.8 to 0.1.9</h3><ul><li>Better default implementation of <tt>allSources</tt>. </li><li>Generate warning if two jars on classpath have the same name. </li><li>Upgraded to specs 1.4.0 </li><li>Upgraded to <tt>ScalaCheck</tt> 1.5 </li><li>Changed some update options to be final vals instead of objects. </li><li>Added some more API documentation. </li><li>Removed release action. </li><li>Split compilation into separate main and test compilations. </li><li>A failure in a <tt>ScalaTest</tt> run now fails the test action. </li><li>Implemented reporters for <tt>compile/scaladoc</tt>, <tt>ScalaTest</tt>, <tt>ScalaCheck</tt>, and <tt>specs</tt> that delegate to the appropriate <tt>sbt.Logger</tt>. </li></ul><h3><a name="0.1.7_to_0.1.8"/>0.1.7 to 0.1.8</h3><ul><li>Improved configuring of tests to exclude. </li><li>Simplified version handling. </li><li>Task <tt>&amp;&amp;</tt> operator properly handles dependencies of tasks it combines. </li><li>Changed method of inline library dependency declarations to be simpler. </li><li>Better handling of errors in parallel execution. </li></ul><h3><a name="0.1.6_to_0.1.7"/>0.1.6 to 0.1.7</h3><ul><li>Added graph action to generate dot files (for graphiz) from dependency information (work in progress). </li><li>Options are now passed to tasks as varargs. </li><li>Redesigned <tt>Path</tt> properly, including <tt>PathFinder</tt> returning a <tt>Set[Path]</tt> now instead of <tt>Iterable[Path]</tt>. </li><li>Moved paths out of <tt>ScalaProject</tt> and into <tt>BasicProjectPaths</tt> to keep path definitions separate from task definitions. </li><li>Added initial support for managing third-party libraries through the <tt>update</tt> task, which must be explicitly called (it is not a dependency of compile or any other task). This is experimental, undocumented, and known to be incomplete. </li><li>Parallel execution implementation at the project level, disabled by default. To enable, add: </li><pre class="prettyprint"> override def parallelExecution = true</pre></ul><blockquote>to your project definition. In order for logging to make sense, all project logging is buffered until the project is finished executing. Still to be done is some sort of notification of project execution (which ones are currently executing, how many remain)
+</blockquote><ul><li><tt>run</tt> and <tt>console</tt> are now specified as &quot;interactive&quot; actions, which means they are only executed on the project in which they are defined when called directly, and not on all dependencies. Their dependencies are still run on dependent projects. </li><li>Generalized conditional tasks a bit. Of note is that analysis is no longer required to be in metadata/analysis, but is now in target/analysis by default. </li><li>Message now displayed when project definition is recompiled on startup </li><li>Project no longer inherits from Logger, but now has a log member. </li><li>Dependencies passed to <tt>project</tt> are checked for null (may help with errors related to initialization/circular dependencies) </li><li>Task dependencies are checked for null </li><li>Projects in a multi-project configuration are checked to ensure that output paths are different (check can be disabled) </li><li>Made <tt>update</tt> task globally synchronized because Ivy is not thread-safe. </li><li>Generalized test framework, directly invoking frameworks now (used reflection before). </li><li>Moved license files to licenses/ </li><li>Added support for <tt>specs</tt> and some support for <tt>ScalaTest</tt> (the test action doesn&#x27;t fail if <tt>ScalaTest</tt> tests fail). </li><li>Added <tt>specs</tt>, <tt>ScalaCheck</tt>, <tt>ScalaTest</tt> jars to lib/ </li><ul><li>These are now required for compilation, but are optional at runtime. </li><li>Added the appropriate licenses and notices. </li></ul><li>Options for <tt>update</tt> action are now taken from updateOptions member. </li><li>Fixed <tt>SbtManager</tt> inline dependency manager to work properly. </li><li>Improved Ivy configuration handling (not compiled with test dependencies yet though). </li><li>Added case class implementation of <tt>SbtManager</tt> called <tt>SimpleManager</tt>. </li><li>Project definitions not specifying dependencies can now use just a single argument constructor. </li></ul><h3><a name="0.1.5_to_0.1.6"/>0.1.5 to 0.1.6</h3><ul><li><tt>run</tt> and <tt>console</tt> handle <tt>System.exit</tt> and multiple threads in user code under certain circumstances (see <a href="/p/simple-build-tool/wiki/RunningProjectCode">RunningProjectCode</a>). </li></ul><h3><a name="0.1.4_to_0.1.5"/>0.1.4 to 0.1.5</h3><ul><li>Generalized interface with plugin (see <tt>AnalysisCallback</tt>) </li><li>Split out task implementations and paths from <tt>Project</tt> to <tt>ScalaProject</tt> </li><li>Subproject support (changed required project constructor signature: see <tt>sbt/DefaultProject.scala</tt>) </li><ul><li>Can specify dependencies between projects </li><li>Execute tasks across multiple projects </li><li>Classpath of all dependencies included when compiling </li><li>Proper inter-project source dependency handling </li><li>Can change to a project in an interactive session to work only on that project (and its dependencies) </li></ul><li>External dependency handling </li><ul><li>Tracks non-source dependencies (compiled classes and jars) </li><li>Requires each class to be provided by exactly one classpath element (This means you cannot have two versions of the same class on the classpath, e.g. from two versions of a library) </li><li>Changes in a project propagate the right source recompilations in dependent projects </li><li>Consequences: </li><ul><li>Recompilation when changing java/scala version </li><li>Recompilation when upgrading libraries (again, as indicated in the second point, situations where you have library-1.0.jar and library-2.0.jar on the classpath at the same time are not handled predictably. Replacing library-1.0.jar with library-2.0.jar should work as expected.) </li><li>Changing sbt version will recompile project definitions </li></ul></ul></ul><h3><a name="0.1.3_to_0.1.4"/>0.1.3 to 0.1.4</h3><ul><li>Autodetection of Project definitions. </li><li>Simple tab completion/history in an interactive session with JLine </li><li>Added descriptions for most actions </li></ul><h3><a name="0.1.2_to_0.1.3"/>0.1.2 to 0.1.3</h3><ul><li>Dependency management between tasks and auto-discovery tasks. </li><li>Should work on Windows. </li></ul><h3><a name="0.1.1_to_0.1.2"/>0.1.1 to 0.1.2</h3><ul><li>Should compile/build on Java 1.5 </li><li>Fixed run action implementation to include scala library on classpath </li><li>Made project configuration easier (see <a href="/p/simple-build-tool/wiki/BuildConfiguration">BuildConfiguration</a> in the Wiki) </li></ul><h3><a name="0.1_to_0.1.1"/>0.1 to 0.1.1</h3><ul><li>Fixed handling of source files without a package </li><li>Added easy project setup </li></ul>
+ </td>
+ </tr>
+ </table>
+ </div>
+
+ <br>
+ <div class="artifactcomment">
+ <img src="http://www.gstatic.com/codesite/ph/images/triangle.gif"><a href="https://www.google.com/accounts/ServiceLogin?service=code&ltmpl=phosting&continue=http%3A%2F%2Fcode.google.com%2Fp%2Fsimple-build-tool%2Fwiki%2FChanges&amp;followup=http%3A%2F%2Fcode.google.com%2Fp%2Fsimple-build-tool%2Fwiki%2FChanges"
+ >Sign in</a> to add a comment
+ </div>
+
+ <script src="http://www.gstatic.com/codesite/ph/15757402407652699001/js/dwiki_scripts_20081003.js"></script>
+
+<script src="http://www.gstatic.com/codesite/ph/15757402407652699001/js/prettify/prettify.js"></script>
+<script type="text/javascript">
+ prettyPrint();
+</script>
+<script type="text/javascript" src="http://www.gstatic.com/codesite/ph/15757402407652699001/js/dit_scripts_20081013.js"></script>
+
+ <script type="text/javascript" src="http://www.gstatic.com/codesite/ph/15757402407652699001/js/core_scripts_20081103.js"></script>
+ <script type="text/javascript" src="/js/codesite_product_dictionary_ph.pack.04102009.js"></script>
+
+ </div>
+<div id="footer" dir="ltr">
+ <div class="text">
+ &copy;2009 Google -
+ <a href="/">Code Home</a> -
+ <a href="/tos.html">Terms of Service</a> -
+ <a href="http://www.google.com/privacy.html">Privacy Policy</a> -
+ <a href="/more/">Site Directory</a> -
+ <a href="/p/support/">Project Hosting Help</a>
+
+ </div>
+</div>
+
+ <div class="hostedBy" style="margin-top: -20px;">
+ <span style="vertical-align: top;">Hosted by</span>
+ <a href="/hosting/">
+ <img src="http://www.gstatic.com/codesite/ph/images/google_code_tiny.png" width="107" height="24" alt="Google Code">
+ </a>
+ </div>
+
+ </body>
+</html>
+
View
15 test/test_gh-wiki_cli.rb
@@ -1,15 +0,0 @@
-require File.join(File.dirname(__FILE__), "test_helper.rb")
-require 'gh-wiki/cli'
-
-class TestGhWikiCli < Test::Unit::TestCase
- def setup
- GhWiki::CLI.execute(@stdout_io = StringIO.new, [])
- @stdout_io.rewind
- @stdout = @stdout_io.read
- end
-
- def test_print_default_output
- assert_match(/To update this executable/, @stdout)
- end
-
-end

0 comments on commit 13d24bf

Please sign in to comment.
Something went wrong with that request. Please try again.