sup

A curses threads-with-tags style email client

sup.git

git clone https://supmua.dev/git/sup/
commit fb1e53bb68d8d2b97517a9438db2496212a09b84
parent f35288a57d7d38658be90dd4414f662cc0363a43
Author: Wael M. Nasreddine <wael.nasreddine@gmail.com>
Date:   Thu,  1 May 2014 20:14:04 -0700

sup.gemspec: Standarise the Gemspec

Diffstat:
M Rakefile | 9 +--------
M sup.gemspec | 110 +++++++++++++++++++++++++++++++++++--------------------------------------------
2 files changed, 50 insertions(+), 69 deletions(-)
diff --git a/Rakefile b/Rakefile
@@ -1,5 +1,6 @@
 require 'rubygems'
 require 'rake/testtask'
+require "bundler/gem_tasks"
 
 Rake::TestTask.new(:test) do |test|
   test.libs << 'test'
@@ -8,12 +9,4 @@ Rake::TestTask.new(:test) do |test|
 end
 task :default => :test
 
-require 'rubygems/package_task'
-# For those who don't have `rubygems-bundler` installed
-load 'sup.gemspec' unless defined? Redwood::Gemspec
-
-Gem::PackageTask.new(Redwood::Gemspec) do |pkg|
-  pkg.need_tar = true
-end
-
 task :travis => [:test, :gem]
diff --git a/sup.gemspec b/sup.gemspec
@@ -1,67 +1,55 @@
-lib = File.expand_path("../lib", __FILE__)
-$:.unshift(lib) unless $:.include?(lib)
+$:.push File.expand_path("../lib", __FILE__)
 
 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-maildir sup-tweak-labels
-  sup-psych-ify-config-files)
-SUP_EXTRA_FILES = %w(CONTRIBUTORS README.md 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 = "http://supmua.org"
-    s.description = <<-DESC
-      Sup is a console-based email client for people with a lot of email.
-
-      * GMail-like thread-centered archiving, tagging and muting
-      * Handling mail from multiple mbox and Maildir sources
-      * 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
+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 = "http://supmua.org"
+  s.license = 'GPL-2'
+  s.description = <<-DESC
+    Sup is a console-based email client for people with a lot of email.
+
+    * GMail-like thread-centered archiving, tagging and muting
+    * Handling mail from multiple mbox and Maildir sources
+    * 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.license = 'GPL-2'
-    # TODO: might want to add index migrating script here, too
-    s.post_install_message = <<-EOF
+  s.post_install_message = <<-EOF
 SUP: If you are upgrading Sup from before version 0.14.0: Please
-     run `sup-psych-ify-config-files` to migrate from 0.13.
-
-     Check https://github.com/sup-heliotrope/sup/wiki/Migration-0.13-to-0.14
-     for more detailed and up-to-date instructions.
-    EOF
-    s.files = SUP_FILES
-    s.executables = SUP_EXECUTABLES
-
-    s.required_ruby_version = '>= 1.9.3'
-
-    s.add_runtime_dependency "xapian-ruby", "~> 1.2.15"
-    s.add_runtime_dependency "ncursesw", "~> 1.4.0"
-    s.add_runtime_dependency "rmail-sup", "~> 1.0.1"
-    s.add_runtime_dependency "highline"
-    s.add_runtime_dependency "trollop", ">= 1.12"
-    s.add_runtime_dependency "lockfile"
-    s.add_runtime_dependency "mime-types", "~> 1.0"
-    s.add_runtime_dependency "locale", "~> 2.0"
-    s.add_runtime_dependency "chronic", "~> 0.9.1"
-    s.add_runtime_dependency "unicode", "~> 0.4.4"
-
-    s.add_development_dependency "bundler", "~> 1.3"
-    s.add_development_dependency "rake"
-    s.add_development_dependency "minitest", "~> 4.7"
-    s.add_development_dependency "rr", "~> 1.0.5"
-    s.add_development_dependency "gpgme", ">= 2.0.2"
-  end
+   run `sup-psych-ify-config-files` to migrate from 0.13.
+
+   Check https://github.com/sup-heliotrope/sup/wiki/Migration-0.13-to-0.14
+   for more detailed and up-to-date instructions.
+  EOF
+
+  s.files         = `git ls-files -z`.split("\x0")
+  s.executables   = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
+  s.test_files    = s.files.grep(%r{^(test|spec|features)/})
+  s.require_paths = ["lib"]
+
+  s.required_ruby_version = '>= 1.9.3'
+
+  s.add_runtime_dependency "xapian-ruby", "~> 1.2.15"
+  s.add_runtime_dependency "ncursesw", "~> 1.4.0"
+  s.add_runtime_dependency "rmail-sup", "~> 1.0.1"
+  s.add_runtime_dependency "highline"
+  s.add_runtime_dependency "trollop", ">= 1.12"
+  s.add_runtime_dependency "lockfile"
+  s.add_runtime_dependency "mime-types", "~> 1.0"
+  s.add_runtime_dependency "locale", "~> 2.0"
+  s.add_runtime_dependency "chronic", "~> 0.9.1"
+  s.add_runtime_dependency "unicode", "~> 0.4.4"
+
+  s.add_development_dependency "bundler", "~> 1.3"
+  s.add_development_dependency "rake"
+  s.add_development_dependency "minitest", "~> 4.7"
+  s.add_development_dependency "rr", "~> 1.0.5"
+  s.add_development_dependency "gpgme", ">= 2.0.2"
 end