commit 78a196e489f39e5be22be9a6148fdd593b061e25
parent 511c86669540d095ba198819e8212951fc24c7c7
Author: Whyme.Lyu <callme5long@gmail.com>
Date: Fri, 3 May 2013 22:34:14 -0700
Merge pull request #40 from 5long/release-process-cleanup
Lots of cleanup
Diffstat:
19 files changed, 66 insertions(+), 544 deletions(-)
diff --git a/.gitignore b/.gitignore
@@ -1,9 +1,13 @@
# i use vi
*.swp
-.ditz-config
# i use emacs
*~
-# i use rake package task
+# artifact
pkg/
+*.gem
# i have accidently added this one one too many times
sup-exception-log.txt
+
+# bundler stuff
+Gemfile.lock
+.bundle
diff --git a/.travis.yml b/.travis.yml
@@ -9,8 +9,6 @@ before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq uuid-dev uuid libncursesw5-dev libncursesw5
-gemfile: Gemfile.ci
-
script: bundle exec rake travis
matrix:
diff --git a/Gemfile b/Gemfile
@@ -0,0 +1,3 @@
+source 'http://rubygems.org/'
+
+gemspec
diff --git a/Gemfile.ci b/Gemfile.ci
@@ -1,19 +0,0 @@
-# Until we figure out how to install deps in Travis env in a modern, DRY
-# way, just use this.
-
-source :rubygems
-
-# Original runtime deps
-gem "xapian-full-alaveteli", "~> 1.2"
-gem "ncursesw-sup", "~> 1.3", ">= 1.3.1"
-gem "rmail", ">= 0.17"
-gem "highline"
-gem "trollop", ">= 1.12"
-gem "lockfile"
-gem "mime-types", "~> 1"
-gem "gettext"
-
-# required by Travis
-group :development, :test do
- gem "rake"
-end
diff --git a/Rakefile b/Rakefile
@@ -1,79 +1,16 @@
-## is there really no way to make a rule for this?
-WWW_FILES = %w(www/index.html README.txt doc/Philosophy.txt doc/FAQ.txt doc/NewUserGuide.txt www/main.css)
-
-rule 'ss?.png' => 'ss?-small.png' do |t|
-end
-SCREENSHOTS = FileList["www/ss?.png"]
-SCREENSHOTS_SMALL = []
-SCREENSHOTS.each do |fn|
- fn =~ /ss(\d+)\.png/
- sfn = "www/ss#{$1}-small.png"
- file sfn => [fn] do |t|
- sh "cat #{fn} | pngtopnm | pnmscale -xysize 320 240 | pnmtopng > #{sfn}"
- end
- SCREENSHOTS_SMALL << sfn
-end
-
-task :upload_webpage => WWW_FILES do |t|
- sh "rsync -essh -cavz #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
-end
-
-task :upload_webpage_images => (SCREENSHOTS + SCREENSHOTS_SMALL) do |t|
- sh "rsync -essh -cavz #{t.prerequisites * ' '} wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
-end
-
-# vim: syntax=ruby
-# -*- ruby -*-
-task :upload_report do |t|
- sh "ditz html ditz"
- sh "rsync -essh -cavz ditz wmorgan@rubyforge.org:/var/www/gforge-projects/sup/"
-end
-
require 'rubygems'
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'test'
- test.test_files = FileList.new('test/test_*.rb').exclude(/test\/test_server.rb/)
+ test.test_files = FileList.new('test/test_*.rb')
test.verbose = true
end
-$:.push "lib"
require 'rubygems/package_task'
-unless Kernel.respond_to?(:require_relative)
- require "./sup-files"
- require "./sup-version"
-else
- require_relative "sup-files"
- require_relative "sup-version"
-end
-
-spec = Gem::Specification.new do |s|
- s.name = %q{sup}
- s.version = SUP_VERSION
- s.date = Time.now.strftime "%Y-%m-%d"
- s.authors = ["William Morgan"]
- s.email = "sup-talk@rubyforge.org"
- s.summary = %q{A console-based email client with the best features of GMail, mutt, and emacs. Features full text search, labels, tagged operations, multiple buffers, recent contacts, and more.}
- s.homepage = %q{https://github.com/sup-heliotrope/sup/wiki}
- s.description = %q{Sup is a console-based email client for people with a lot of email. It supports tagging, very fast full-text search, automatic contact-list management, and more. If you're the type of person who treats email as an extension of your long-term memory, Sup is for you. Sup makes it easy to: - Handle massive amounts of email. - Mix email from different sources: mbox files (even across different machines), Maildir directories, POP accounts, and GMail accounts. - Instantaneously search over your entire email collection. Search over body text, or use a query language to combine search predicates in any way. - Handle multiple accounts. Replying to email sent to a particular account will use the correct SMTP server, signature, and from address. - Add custom code to handle certain types of messages or to handle certain types of text within messages. - Organize email with user-defined labels, automatically track recent contacts, and much more! The goal of Sup is to become the email client of choice for nerds everywhere.}
- s.files = SUP_FILES
- s.executables = SUP_EXECUTABLES
-
- s.add_dependency "xapian-full-alaveteli", "~> 1.2"
- s.add_dependency "ncursesw-sup", "~> 1.3", ">= 1.3.1"
- s.add_dependency "rmail", ">= 0.17"
- s.add_dependency "highline"
- s.add_dependency "trollop", ">= 1.12"
- s.add_dependency "lockfile"
- s.add_dependency "mime-types", "~> 1"
- s.add_dependency "gettext"
-end
-
-Gem::PackageTask.new(spec) do |pkg|
- pkg.need_tar = true
+Gem::PackageTask.new(Redwood::Gemspec) do |pkg|
+ pkg.need_tar = true
end
-task :tarball => ["pkg/sup-#{SUP_VERSION}.tgz"]
task :travis => [:test, :gem]
diff --git a/lib/sup.rb b/lib/sup.rb
@@ -44,8 +44,6 @@ class Module
end
module Redwood
- VERSION = "git"
-
BASE_DIR = ENV["SUP_BASE"] || File.join(ENV["HOME"], ".sup")
CONFIG_FN = File.join(BASE_DIR, "config.yaml")
COLOR_FN = File.join(BASE_DIR, "colors.yaml")
@@ -336,6 +334,7 @@ EOS
:load_config, :managers
end
+require 'sup/version'
require "sup/util"
require "sup/hook"
require "sup/time"
diff --git a/lib/sup/version.rb b/lib/sup/version.rb
@@ -0,0 +1,3 @@
+module Redwood
+ VERSION = "git"
+end
diff --git a/protocol.md b/protocol.md
@@ -1,168 +0,0 @@
-Redwood Protocol
-================
-
-The server begins by sending a line of the form `Redwood <ver> <encodings>
-<extensions>`, where `ver` is the major protocol version (1), encodings is a
-comma-separated list of supported message encodings (e.g. `json,bert,marshal`),
-and `extensions` is a comma-separated list of protocol extensions. The server
-must advertise at least one encoding. A zero-length list of extensions is
-represented by `none`. The client replies in the same format, with the
-restrictions that the protocol version must match, `encodings` and `extensions`
-must be subsets of what the server advertised, and there must be exactly 1
-encoding specified.
-
-Requests and responses are represented as `[type, params]`, where `type`
-is a lowercase string corresponding to one of the message types specified
-below and `params` is a dictionary with string keys.
-
-Requests
---------
-
-There may be zero or more replies to a request. Multiple requests may be
-issued concurrently. There is an implicit, optional, opaque `tag` parameter to
-every request which will be returned in all replies to the request to
-aid clients in keeping multiple requests in flight. `tag` may be an
-arbitrary datastructure and for the purposes of Cancel defaults to nil.
-
-### Query
-Send a Message response for each hit on `query` starting at `offset`
-and sending a maximum of `limit` Messages responses. `raw` controls
-whether the raw message text is included in the response.
-
-#### Parameters
-* `query`: Query
-* `offset`: int
-* `limit`: int
-* `raw`: boolean
-
-#### Responses
-* multiple Message
-* one Done after all Messages
-
-
-### Count
-Send a count reply with the number of hits for `query`.
-
-#### Parameters
-* `query`: Query
-
-#### Responses
-* one Count
-
-
-### Label
-Modify the labels on all messages matching `query`. First removes the
-labels in `remove` then adds those in `add`.
-
-#### Parameters
-* `query`: Query
-* `add`: string list
-* `remove`: string list
-
-#### Responses
-* one Done
-
-
-### Add
-Add a message to the database. `raw` is the normal RFC 2822 message text.
-
-#### Parameters
-* `raw`: string
-* `labels`: string list
-
-#### Responses
-* one Done
-
-
-### Stream
-Sends a Message response whenever a new message that matches `query` is
-added with the Add request. This request will not terminate until a
-corresponding Cancel request is sent.
-
-#### Parameters
-* `query`: Query
-
-#### Responses
-multiple Message
-
-
-### Cancel
-Cancels all active requests with tag `target`. This is only required to
-be implemented for the Stream request.
-
-#### Parameters
-* `target`: string
-
-#### Responses
-one Done
-
-
-
-Responses
----------
-
-### Done
-Signifies that a request has completed successfully.
-
-
-### Message
-Represents a query result. If `raw` is present it is the raw message
-text that was previously a parameter to the Add request.
-
-#### Parameters
-* `summary`: Summary
-* `raw`: optional string
-
-
-### Count
-`count` is the number of messages matched.
-
-#### Parameters
-* `count`: int
-
-
-### Error
-
-#### Parameters
-* `type`: string
-* `message`: string
-
-
-
-Datatypes
----------
-
-### Query
-Recursive prefix-notation datastructure describing a boolean condition.
-Where `a` and `b` are Queries and `field` and `value` are strings, a
-Query can be any of the following:
-
-* `[:and, a, b, ...]`
-* `[:or, a, b, ...]`
-* `[:not, a, b]`
-* `[:term, field, value]`
-
-
-### Summary
-* `message_id`: string
-* `date`: time
-* `from`: Person
-* `to`, `cc`, `bcc`: Person list
-* `subject`: string
-* `refs`: string list
-* `replytos`: string list
-* `labels`: string list
-
-
-### Person
-* `name`: string
-* `email`: string
-
-
-TODO
-----
-
-* Protocol negotiation
- - Version
- - Compression (none, gzip, ...)
-* Specify string encodings
diff --git a/sup-files.rb b/sup-files.rb
@@ -1,11 +0,0 @@
-SUP_LIB_DIRS = %w(lib lib/sup lib/sup/modes)
-SUP_EXECUTABLES = %w(sup sup-add sup-config sup-dump sup-import-dump sup-recover-sources sup-sync sup-sync-back sup-tweak-labels)
-SUP_EXTRA_FILES = %w(CONTRIBUTORS README.txt LICENSE History.txt ReleaseNotes)
-SUP_FILES =
- SUP_EXTRA_FILES +
- SUP_EXECUTABLES.map { |f| "bin/#{f}" } +
- SUP_LIB_DIRS.map { |d| Dir["#{d}/*.rb"] }.flatten
-
-if $0 == __FILE__ # if executed from commandline
- puts SUP_FILES
-end
diff --git a/sup-version.rb b/sup-version.rb
@@ -1,15 +0,0 @@
-## allow people who use development versions by running "rake gem"
-## and installing the resulting gem it to be able to do this. (gem
-## versions must be in dotted-digit notation only and can be passed
-## with the REL environment variable to "rake gem").
-SUP_VERSION = if ENV['REL']
- ENV['REL']
-else
- $:.unshift 'lib' # force loading from ./lib/ if it exists
- require 'sup'
- if Redwood::VERSION == "git"
- "999"
- else
- Redwood::VERSION
- end
-end
diff --git a/sup.gemspec b/sup.gemspec
@@ -0,0 +1,50 @@
+lib = File.expand_path("../lib", __FILE__)
+$:.unshift(lib) unless $:.include?(lib)
+
+require 'sup/version'
+
+# Files
+SUP_EXECUTABLES = %w(sup sup-add sup-config sup-dump sup-import-dump
+ sup-recover-sources sup-sync sup-sync-back sup-tweak-labels)
+SUP_EXTRA_FILES = %w(CONTRIBUTORS README.txt LICENSE History.txt ReleaseNotes)
+SUP_FILES =
+ SUP_EXTRA_FILES +
+ SUP_EXECUTABLES.map { |f| "bin/#{f}" } +
+ Dir["lib/**/*.rb"]
+
+
+module Redwood
+ Gemspec = Gem::Specification.new do |s|
+ s.name = "sup"
+ s.version = ENV["REL"] || (::Redwood::VERSION == "git" ? "999" : ::Redwood::VERSION)
+ s.date = Time.now.strftime "%Y-%m-%d"
+ s.authors = ["William Morgan", "Gaute Hope", "Hamish Downer", "Matthieu Rakotojaona"]
+ s.email = "sup-talk@rubyforge.org"
+ s.summary = "A console-based email client with the best features of GMail, mutt and Emacs"
+ s.homepage = "https://github.com/sup-heliotrope/sup/wiki"
+ s.description = <<-DESC
+ Sup is a console-based email client for people with a lot of email.
+
+ - Handling mail from multiple mbox and Maildir sources
+ - GMail-like archiving and tagging
+ - Blazing fast full-text search with a rich query language
+ - Multiple accounts - pick the right one when sending mail
+ - Ruby-programmable hooks
+ - Automatically tracking recent contacts
+DESC
+ s.files = SUP_FILES
+ s.executables = SUP_EXECUTABLES
+
+ s.add_dependency "xapian-full-alaveteli", "~> 1.2"
+ s.add_dependency "ncursesw-sup", "~> 1.3", ">= 1.3.1"
+ s.add_dependency "rmail", ">= 0.17"
+ s.add_dependency "highline"
+ s.add_dependency "trollop", ">= 1.12"
+ s.add_dependency "lockfile"
+ s.add_dependency "mime-types", "~> 1"
+ s.add_dependency "gettext"
+
+ s.add_development_dependency "bundler", "~> 1.3"
+ s.add_development_dependency "rake"
+ end
+end
diff --git a/www/index.html b/www/index.html
@@ -1,223 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>Sup</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" href="main.css" type="text/css" />
- </head>
-
- <body>
- <h1>Sup</h1>
-
- <blockquote>
- “Finally a mail client that does what we want, how we want it.”
- </blockquote>
-
- <blockquote>
- “Every other client we've tried is intolerable.”
- </blockquote>
-
- <blockquote>
- “It's just what I wanted, but I hadn't realized what I wanted until I saw it.”
- </blockquote>
-
- <blockquote>
- “Sup is almost to the point where I could jump ship from mutt.”
- </blockquote>
-
- <blockquote>
- “I was previously intrigued by a gmail-styled
- mutt-killer written in Ruby, but having actually spent a few
- hours reading the docs, and trying out all the keys, and
- reading the docs again, and trying the keys out again, and then
- actually engaging in a bunch of practice usage runs, I now
- officially can't fucking wait for the future of this thing; it
- has my full attention.”
- </blockquote>
-
- <p>
- Sup is a console-based email client for people with a lot of email.
- It supports tagging, very fast full-text search, automatic contact-
- list management, custom code insertion via a hook system, and more.
- If you're the type of person who treats email as an extension of your
- long-term memory, Sup is for you.
- </p>
-
- <p>
- Sup makes it easy to:
- </p>
-
- <ul>
- <li>
- Handle massive amounts of email.
- </li>
-
- <li>
- Mix email from different sources: mbox files and maildirs.
- For remote sources (IMAP, IMAPS, ssh+file), use another
- tool (offlineimap, fetchmail, rsync) to grab local copies.
- </li>
-
- <li>
- Instantaneously search over your entire email collection.
- Search over body text, or use a query language to combine
- search predicates in any way.
- </li>
-
- <li>
- Handle multiple accounts. Replying to email sent to a
- particular account will use the correct SMTP server, signature,
- and from address.
- </li>
-
- <li>
- Add custom code to handle certain types of messages or to
- handle certain types of text within messages.
- </li>
-
- <li>
- Organize email with user-defined labels, automatically track
- recent contacts, and much more!
- </li>
- </ul>
-
- <p>
- The goal of Sup is to become the email client of choice for nerds
- everywhere.
- </p>
-
- <h2>Screenshots</h2>
-
- <ul id="screenshots">
- <li><a href="ss1.png"><img src="ss1-small.png" alt="Sup screenshot 1" /></a></li>
- <li><a href="ss2.png"><img src="ss2-small.png" alt="Sup screenshot 2" /></a></li>
- <li><a href="ss3.png"><img src="ss3-small.png" alt="Sup screenshot 3" /></a></li>
- <li><a href="ss4.png"><img src="ss4-small.png" alt="Sup screenshot 4" /></a></li>
- <li><a href="ss5.png"><img src="ss5-small.png" alt="Sup screenshot 5" /></a></li>
- <li><a href="ss6.png"><img src="ss6-small.png" alt="Sup screenshot 6" /></a></li>
- </ul>
-
- <h2>Documentation</h2>
-
- <p>
- Please read the <a href="README.txt">README</a>, the <a
- href="FAQ.txt">FAQ</a>, the <a href="NewUserGuide.txt">new user guide</a>
- and the <a href="Philosophy.txt">philosophical statement</a>.
- </p>
-
- <p> Please also read and contribute to the <a href="http://www.foobacca.co.uk/sup/">Sup wiki</a>. </p>
-
- <h2>Status</h2>
-
- <p>
- The current version of Sup is 0.12.1, released 2011-01-23. This is a
- beta release. It supports mbox and Maildir mailstores.
- </p>
-
- <p>To be notified by email of Sup releases, subscribe to the
- <a href="http://rubyforge.org/mailman/listinfo/sup-announce">sup-announce mailing list</a>. One email per release.
- </p>
-
- <!-- <p>Issue and release status is available on the <a href="ditz/">Sup ditz page</a>.</p> -->
- <p>Sup news can often be see on <a href="http://all-thing.net/label/sup/">William's blog</a>.</p>
-
- <h2>Bug reports</h2>
- <p>Find a problem with Sup? Or have a feature you'd like to see? <a href="https://github.com/sup-heliotrope/sup/issues/new">Submit
- it</a> to the <a href="https://github.com/sup-heliotrope/sup/issues">official Sup issue tracker</a>.
-
- <h2>Getting it</h2>
-
- <p>
- You can download Sup releases from the <a
- href="http://rubyforge.org/projects/sup/">Sup RubyForge page</a>.
- If you have RubyGems installed, simply command your computer to "gem
- install sup".
- </p>
-
- <p>
- If you're interested in development, you can clone the git repository like so: <code>git clone git://github.com/sup-heliotrope/sup.git</code>. You can also browse the <a
- href="http://github.com/sup-heliotrope/sup">Sup GitHub
- repository</a>. You may consider subscribing to the sup-devel list (below).
- </p>
-
- <h2>Make some new friends</h2>
-
- <p> If you'd like to meet hot single Sup users in your area, try the <a
- href="http://rubyforge.org/mailman/listinfo/sup-talk">sup-talk mailing list</a> (<a href="http://rubyforge.org/pipermail/sup-talk/">archives</a>).
- </p>
-
- <p> If you'd like to meet some grumpy old programmers to talk about Sup internals with, try the <a
- href="http://rubyforge.org/mailman/listinfo/sup-devel">sup-devel mailing list</a> (<a href="http://rubyforge.org/pipermail/sup-devel/">archives</a>).
-
-
- <h2>Credit</h2>
-
- <p>
- Sup is brought to you by <a href="http://masanjin.net/">William Morgan</a> and the following honorable contributors:
- <ul>
- <li> William Morgan </li>
- <li> Rich Lane </li>
- <li> Ismo Puustinen </li>
- <li> Nicolas Pouillard </li>
- <li> Eric Sherman </li>
- <li> Michael Stapelberg </li>
- <li> Ben Walton </li>
- <li> Mike Stipicevic </li>
- <li> Marcus Williams </li>
- <li> Lionel Ott </li>
- <li> Tero Tilus </li>
- <li> Ingmar Vanhassel </li>
- <li> Mark Alexander </li>
- <li> Gaute Hope </li>
- <li> Christopher Warrington </li>
- <li> W. Trevor King </li>
- <li> Gaudenz Steinlin </li>
- <li> Richard Brown </li>
- <li> Marc Hartstein </li>
- <li> Sascha Silbe </li>
- <li> Israel Herraiz </li>
- <li> Anthony Martinez </li>
- <li> Hamish Downer </li>
- <li> Bo Borgerson </li>
- <li> William Erik Baxter </li>
- <li> Michael Hamann </li>
- <li> Grant Hollingworth </li>
- <li> Adeodato Simó </li>
- <li> Daniel Schoepe </li>
- <li> Jason Petsod </li>
- <li> Steve Goldman </li>
- <li> Edward Z. Yang </li>
- <li> Decklin Foster </li>
- <li> Cameron Matheson </li>
- <li> Carl Worth </li>
- <li> Jeff Balogh </li>
- <li> Andrew Pimlott </li>
- <li> Alex Vandiver </li>
- <li> Peter Harkins </li>
- <li> Kornilios Kourtis </li>
- <li> Giorgio Lando </li>
- <li> Damien Leone </li>
- <li> Benoît PIERRE </li>
- <li> Alvaro Herrera </li>
- <li> Jonah </li>
- <li> Adam Lloyd </li>
- <li> Todd Eisenberger </li>
- <li> ian </li>
- <li> Steven Walter </li>
- <li> ian </li>
- <li> Jon M. Dugan </li>
- <li> Gregor Hoffleit </li>
- <li> Stefan Lundström </li>
- <li> Kirill Smelkov </li>
- </ul>
- </p>
-
- <p>
- Sup is made possible by the <a href="http://xapian.org">Xapian</a> search engine,
- and by <a href="http://www.lickey.com/">Matt Armstrong</a> and his
- tragically abandoned <a href="http://www.rfc20.org/rubymail/">RubyMail</a>
- package.
- </p>
- </body>
-</html>
diff --git a/www/main.css b/www/main.css
@@ -1,36 +0,0 @@
-body
-{
- background: white;
- color: #404040;
- margin-bottom: 2em;
- margin-left: auto;
- margin-right: auto;
- width: 90%;
-}
-
-a, a:visited
-{
- border-bottom: 1px dotted #03c;
- background: inherit;
- color: #03c;
- text-decoration: none;
-}
-
-#screenshots
-{
- margin: 0;
- padding: 0;
-}
-#screenshots li
-{
- display: inline;
- list-style: none;
-}
-#screenshots a
-{
- border-bottom: none;
-}
-#screenshots img
-{
- border: 0;
-}
diff --git a/www/ss1.png b/www/ss1.png
Binary files differ.
diff --git a/www/ss2.png b/www/ss2.png
Binary files differ.
diff --git a/www/ss3.png b/www/ss3.png
Binary files differ.
diff --git a/www/ss4.png b/www/ss4.png
Binary files differ.
diff --git a/www/ss5.png b/www/ss5.png
Binary files differ.
diff --git a/www/ss6.png b/www/ss6.png
Binary files differ.