Permalink
Browse files

Convert to Bones as the project management system

  • Loading branch information...
1 parent ca0f4d3 commit 454dbfadcb3106567b08a371228ccd8c9b4ff522 @copiousfreetime committed May 14, 2011
Showing with 64 additions and 514 deletions.
  1. +1 −0 .gitignore
  2. +8 −2 HISTORY.rdoc
  3. +1 −2 README.rdoc
  4. +47 −54 Rakefile
  5. +0 −54 gemspec.rb
  6. +7 −8 spec/spec_helper.rb
  7. +0 −43 tasks/announce.rake
  8. +0 −99 tasks/config.rb
  9. +0 −45 tasks/distribution.rake
  10. +0 −32 tasks/documentation.rake
  11. +0 −15 tasks/gemcutter.rake
  12. +0 −29 tasks/rspec.rake
  13. +0 −51 tasks/rubyforge.rake
  14. +0 −80 tasks/utils.rb
View
@@ -4,3 +4,4 @@ doc/
coverage/
pkg/
email.txt
+announcement.txt
View
@@ -1,9 +1,15 @@
= Changelog
-== Version 1.6.1 2011-05-08
+== Version 1.7.0 2011-05-14
-* update to rufus-tokyo 1.0.7
* force an FFI dependency that for some reason does not resolve in rufus-tokyo [GH #8]
* fix documentation of 'process-status' [GH #9]
+* switch to Bones for project management tasks
+* update dependencies to latest versions
+** rufus-tokyo 1.0.7
+** rspec 2.6.0
+** loquacious 1.7.1
+** logging 1.5.0
+** main 4.4.0
== Version 1.6.0 2010-06-17
View
@@ -1,7 +1,6 @@
== Tyrant Manager
-* Homepage[http://copiousfreetime.rubyforge.org/tyrantmanager]
-* {Rubyforge project}[http://rubyforge.org/projects/copiousfreetime/]
+* Homepage[http://copiousfreetime.org/projects/tyrantmanager]
* email jeremy at copiousfreetime dot org
* github[http://github.com/copiousfreetime/tyrantmanager]
* git clone git://github.com/copiousfreetime/tyrantmanager.git
View
@@ -1,60 +1,53 @@
#--
-# Copyright (c) 2009 Jeremy Hinegardner
+# Copyright (c) 2009, 2010, 2011 Jeremy Hinegardner
# All rights reserved. See LICENSE and/or COPYING for details.
#++
-#-------------------------------------------------------------------------------
-# make sure our project's top level directory and the lib directory are added to
-# the ruby search path.
-#-------------------------------------------------------------------------------
-$:.unshift File.expand_path(File.join(File.dirname(__FILE__),"lib"))
-$:.unshift File.expand_path(File.dirname(__FILE__))
-
-
-#-------------------------------------------------------------------------------
-# load the global project configuration and add in the top level clean and
-# clobber tasks so that other tasks can utilize those constants if necessary
-# This loads up the defaults for the whole project configuration
-#-------------------------------------------------------------------------------
-require 'rubygems'
-require 'tasks/config.rb'
-require 'rake/clean'
-
-#-------------------------------------------------------------------------------
-# Main configuration for the project, these overwrite the items that are in
-# tasks/config.rb
-#-------------------------------------------------------------------------------
-require 'tyrant_manager'
-Configuration.for("project") {
- name "tyrantmanager"
- version TyrantManager::VERSION
- author "Jeremy Hinegardner"
- email "jeremy@copiousfreetime.org"
- homepage "http://copiousfreetime.rubyforge.org/tyrantmanager"
-}
-
-#-------------------------------------------------------------------------------
-# load up all the project tasks and setup the default task to be the
-# test:default task.
-#-------------------------------------------------------------------------------
-Configuration.for("packaging").files.tasks.each do |tasklib|
- import tasklib
-end
-task :default => 'test:default'
-
-#-------------------------------------------------------------------------------
-# Finalize the loading of all pending imports and update the top level clobber
-# task to depend on all possible sub-level tasks that have a name like
-# ':clobber' in other namespaces. This allows us to say:
-#
-# rake clobber
-#
-# and it will get everything.
-#-------------------------------------------------------------------------------
-Rake.application.load_imports
-Rake.application.tasks.each do |t|
- if t.name =~ /:clobber/ then
- task :clobber => [t.name]
- end
+begin
+ require 'bones'
+rescue LoadError
+ abort '### Please install the "bones" gem ###'
end
+task :default => 'spec:run'
+task 'gem:release' => 'spec:run'
+
+$:.unshift( "lib" )
+require 'tyrant_manager/version'
+
+Bones {
+ name "tyrant_manager"
+ author "Jeremy Hinegardner"
+ email "jeremy@copiousfreetime.org"
+ url "http://www.copiousfreetime.org/projects/tyrant_manager"
+ version TyrantManager::VERSION
+
+ ruby_opts %w[ -W0 -rubygems ]
+ readme_file "README.rdoc"
+ ignore_file ".gitignore"
+ history_file "HISTORY.rdoc"
+
+ rdoc.include << "README.rdoc" << "HISTORY.rdoc" << "LICENSE"
+
+ summary 'A command line tool for managing Tokyo Tyrant instances.'
+ description <<_
+A command line tool for managing Tokyo Tyrant instances. It allows for the
+creation, starting, stopping, listing, stating of many tokyo tyrant instances
+all on the same machine. The commands can be applied to a single or multiple
+instances.
+_
+
+ depend_on "loquacious" ,"~> 1.7.1"
+ depend_on "rufus-tokyo" ,"~> 1.0.7"
+ depend_on "logging" ,"~> 1.5.0"
+ depend_on "main" ,"~> 4.4.0"
+ depend_on "ffi" ,"~> 1.0.7" #unsure why this doesn't get resolved with rufus-tokyo
+
+
+ depend_on "bones" , "~> 3.6.5", :development
+ depend_on "bones-extras", "~> 1.3.0", :development
+ depend_on "rspec" , "~> 2.6.0", :development
+
+ spec.opts << "--colour" << "--format documentation"
+}
+
View
@@ -1,54 +0,0 @@
-require 'rubygems'
-require 'tyrant_manager/version'
-require 'tasks/config'
-
-TyrantManager::GEM_SPEC = Gem::Specification.new do |spec|
- proj = Configuration.for('project')
- spec.name = proj.name
- spec.version = TyrantManager::VERSION
-
- spec.author = proj.author
- spec.email = proj.email
- spec.homepage = proj.homepage
- spec.summary = proj.summary
- spec.description = proj.description
- spec.platform = Gem::Platform::RUBY
-
-
- pkg = Configuration.for('packaging')
- spec.files = pkg.files.all
- spec.executables = pkg.files.bin.collect { |b| File.basename(b) }
-
- # add dependencies here
- spec.add_dependency( "loquacious", "~> 1.6.4")
- spec.add_dependency( "rufus-tokyo", "~> 1.0.7")
- spec.add_dependency( "logging", "~> 1.4.3" )
- spec.add_dependency( "main", "~> 4.2.0" )
- spec.add_dependency( 'ffi', "~> 1.0.7" ) # unsure why this doesn't get resolved with rufus-tokyo
-
- # development dependencies
- spec.add_development_dependency("configuration", "~> 1.1.0")
- spec.add_development_dependency( "rake", "~> 0.8.3")
-
- if ext_conf = Configuration.for_if_exist?("extension") then
- spec.extensions << ext_conf.configs
- spec.extensions.flatten!
- end
-
- if rdoc = Configuration.for_if_exist?('rdoc') then
- spec.has_rdoc = true
- spec.extra_rdoc_files = pkg.files.rdoc
- spec.rdoc_options = rdoc.options + [ "--main" , rdoc.main_page ]
- else
- spec.has_rdoc = false
- end
-
- if test = Configuration.for_if_exist?('testing') then
- spec.test_files = test.files
- end
-
- if rf = Configuration.for_if_exist?('rubyforge') then
- spec.rubyforge_project = rf.project
- end
-
-end
View
@@ -1,13 +1,12 @@
-require 'rubygems'
-require 'spec'
+require 'rspec'
require 'logging'
$:.unshift File.expand_path( File.join( File.dirname( __FILE__ ),"..","lib"))
Logging::Logger['TyrantManager'].level = :all
-module Spec
+module RSpec
module Log
def self.io
@io ||= StringIO.new
@@ -43,16 +42,16 @@ def spec_log
end
end
-Spec::Runner.configure do |config|
+RSpec.configure do |config|
config.include Spec::Helpers
config.before do
- Spec::Log.io.rewind
- Spec::Log.io.truncate( 0 )
+ RSpec::Log.io.rewind
+ RSpec::Log.io.truncate( 0 )
end
config.after do
- Spec::Log.io.rewind
- Spec::Log.io.truncate( 0 )
+ RSpec::Log.io.rewind
+ RSpec::Log.io.truncate( 0 )
end
end
View
@@ -1,43 +0,0 @@
-require 'tasks/config'
-#-------------------------------------------------------------------------------
-# announcement methods
-#-------------------------------------------------------------------------------
-
-proj_config = Configuration.for('project')
-namespace :announce do
- desc "create email for ruby-talk"
- task :email do
- info = Utils.announcement
-
- File.open("email.txt", "w") do |mail|
- mail.puts "From: #{proj_config.author} <#{proj_config.email}>"
- mail.puts "To: ruby-talk@ruby-lang.org"
- mail.puts "Date: #{Time.now.rfc2822}"
- mail.puts "Subject: [ANN] #{info[:subject]}"
- mail.puts
- mail.puts info[:title]
- mail.puts
- mail.puts "{{ Release notes for Version #{TyrantManager::VERSION} }}"
- mail.puts
- mail.puts info[:release_notes]
- mail.puts
- mail.puts " #{info[:urls]}"
- mail.puts
- mail.puts "=== Installation"
- mail.puts
- mail.puts " gem install #{TyrantManager::GEM_SPEC.name}"
- mail.puts
- mail.puts "=== Description"
- mail.puts
- mail.puts info[:description]
- mail.puts
- end
- puts "Created the following as email.txt:"
- puts "-" * 72
- puts File.read("email.txt")
- puts "-" * 72
- end
-
- CLOBBER << "email.txt"
-end
-
View
@@ -1,99 +0,0 @@
-require 'configuration'
-
-require 'rake'
-require 'tasks/utils'
-
-#-----------------------------------------------------------------------
-# General project configuration
-#-----------------------------------------------------------------------
-Configuration.for('project') {
- name "tyrantmanager"
- version TyrantManager::VERSION
- author "Jeremy Hinegardner"
- email "jeremy@copiousfreetime.org"
- homepage "http://copiousfreetime.rubyforge.org/tyrantmanager/"
- description Utils.section_of("README.rdoc", "description")
- summary description.split(".").first
- history "HISTORY.rdoc"
- license FileList["LICENSE"]
- readme "README.rdoc"
-}
-
-#-----------------------------------------------------------------------
-# Packaging
-#-----------------------------------------------------------------------
-Configuration.for('packaging') {
- # files in the project
- proj_conf = Configuration.for('project')
- files {
- bin FileList["bin/*"]
- ext FileList["ext/*.{c,h,rb}"]
- lib FileList["lib/**/*.rb"]
- test FileList["spec/**/*.rb", "test/**/*.rb"]
- data FileList["data/**/*"]
- tasks FileList["tasks/**/*.r{ake,b}"]
- rdoc FileList[proj_conf.readme, proj_conf.history,
- proj_conf.license] + lib
- all bin + ext + lib + test + data + rdoc + tasks
- }
-
- # ways to package the results
- formats {
- tgz true
- zip true
- rubygem Configuration::Table.has_key?('rubygem')
- }
-}
-
-#-----------------------------------------------------------------------
-# Gem packaging
-#-----------------------------------------------------------------------
-Configuration.for("rubygem") {
- spec "gemspec.rb"
- Configuration.for('packaging').files.all << spec
-}
-
-#-----------------------------------------------------------------------
-# Testing
-# - change mode to 'testunit' to use unit testing
-#-----------------------------------------------------------------------
-Configuration.for('test') {
- mode "spec"
- files Configuration.for("packaging").files.test
- options %w[ --format specdoc --color ]
- ruby_opts %w[ ]
-}
-
-#-----------------------------------------------------------------------
-# Rcov
-#-----------------------------------------------------------------------
-Configuration.for('rcov') {
- output_dir "coverage"
- libs %w[ lib ]
- rcov_opts %w[ --html ]
- ruby_opts %w[ ]
- test_files Configuration.for('packaging').files.test
-}
-
-#-----------------------------------------------------------------------
-# Rdoc
-#-----------------------------------------------------------------------
-Configuration.for('rdoc') {
- files Configuration.for('packaging').files.rdoc
- main_page files.first
- title Configuration.for('project').name
- options %w[ ]
- output_dir "doc"
-}
-
-#-----------------------------------------------------------------------
-# Rubyforge
-#-----------------------------------------------------------------------
-Configuration.for('rubyforge') {
- project "copiousfreetime"
- user "jjh"
- host "rubyforge.org"
- rdoc_location "#{user}@#{host}:/var/www/gforge-projects/#{project}/tyrantmanager/"
-}
-
-
Oops, something went wrong.

0 comments on commit 454dbfa

Please sign in to comment.