Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

converting to hoe

git-svn-id: svn://rubyforge.org/var/svn/namecase/trunk@40 917ac306-ed13-0410-8fcf-ecc17ec2e4de
  • Loading branch information...
commit f34df110102ff2bfb74a2be901cb61f9056708bb 1 parent 0f0395a
aaronp authored
View
1  CHANGELOG → CHANGELOG.txt
@@ -4,6 +4,7 @@
* Updating NameCase to work with the new Edge Rails ActiveSupport::Multibye
class. Thanks Dan Kubb (dan.kubb@autopilotmarketing.com)
+* Converted to Hoe.
== 1.0.0
View
0  LICENSE → LICENSE.txt
File renamed without changes
View
5 Manifest.txt
@@ -0,0 +1,5 @@
+README.txt
+CHANGELOG.txt
+LICENSE.txt
+lib/namecase.rb
+lib/version.rb
View
12 README → README.txt
@@ -1,14 +1,18 @@
-== NameCase
+= NameCase
+
+ http://namecase.rubyforge.org/
Version 1.0.2 - 2006/10/24
-Original version by Mark Summerfield <http://search.cpan.org/~summer/>
-Ruby port by Aaron Patterson <aaronp@rubyforge.org>
+== DESCRIPTION
NameCase is a Ruby implementation of Lingua::EN::NameCase, a library for
-converting strings to be properly cased. This is good for converting
+converting strings to be properly cased. This is good for converting
denormalized data to human friendly data.
+Original version by Mark Summerfield <http://search.cpan.org/~summer/>
+Ruby port by Aaron Patterson <aaronp@rubyforge.org>
+
* Example Usage
NameCase is a subclass of Ruby's +String+, and can be used similarly:
View
89 Rakefile
@@ -1,87 +1,16 @@
require 'rubygems'
-require 'rake'
-require 'rake/testtask'
-require 'rake/gempackagetask'
-require 'rake/rdoctask'
-require 'rake/contrib/sshpublisher'
-
-def announce(msg='')
- STDERR.puts msg
-end
+require 'hoe'
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
PKG_NAME = 'namecase'
PKG_VERSION = '1.0.2' + PKG_BUILD
-PKG_FILES = FileList["{doc,lib,test}/**/*"].exclude("rdoc").to_a
-spec = Gem::Specification.new do |s|
- s.name = PKG_NAME
- s.version = PKG_VERSION
- s.author = "Aaron Patterson"
- s.email = "aaronp@rubyforge.org"
- s.homepage = "#{PKG_NAME}.rubyforge.org"
- s.platform = Gem::Platform::RUBY
- s.summary = "NameCase is a Ruby implementation of Lingua::EN::NameCase, a library for converting strings to be properly cased."
- s.files = Dir.glob("{bin,test,lib,doc}/**/*").delete_if {|item| item.include?(".svn") }
- s.require_path = "lib"
- s.has_rdoc = true
- s.extra_rdoc_files = ["README", "CHANGELOG", "LICENSE"]
- s.rdoc_options << "--main" << 'README' << "--title" << "'NameCase RDoc'"
- s.rubyforge_project = PKG_NAME
+Hoe.new(PKG_NAME, PKG_VERSION) do |p|
+ p.rubyforge_name = PKG_NAME
+ p.author = 'Aaron Patterson'
+ p.email = 'aaronp@rubyforge.org'
+ p.summary = "NameCase is a Ruby implementation of Lingua::EN::NameCase, a library for converting strings to be properly cased."
+ p.description = p.paragraphs_of('README.txt', 4).join("\n\n")
+ p.url = p.paragraphs_of('README.txt', 1).first.strip
+ p.changes = p.paragraphs_of('CHANGELOG.txt', 0..2).join("\n\n")
end
-
-Rake::GemPackageTask.new(spec) do |p|
- p.gem_spec = spec
- p.need_tar = true
- p.need_zip = true
-end
-
-Rake::RDocTask.new do |p|
- p.main = "README"
- p.rdoc_dir = "doc"
- p.rdoc_files.include("README", "CHANGELOG", "LICENSE", "lib/**/*.rb")
- p.options << "--main" << 'README' << "--title" << "NameCase RDoc"
-end
-
-desc "Publish the API documentation"
-task :pubrdoc => [ :rdoc ] do
- Rake::SshDirPublisher.new(
- "#{ENV['USER']}@rubyforge.org",
- "/var/www/gforge-projects/#{PKG_NAME}/",
- "doc" ).upload
-end
-
-task :update_version do
- announce "Updating Mechanize Version to #{PKG_VERSION}"
- File.open("lib/version.rb", "w") do |f|
- f.puts "# DO NOT EDIT"
- f.puts "# This file is auto-generated by build scripts"
- f.puts "class NameCase < String"
- f.puts " Version = '#{PKG_VERSION}'"
- f.puts "end"
- end
- sh 'svn commit -m"updating version" lib/version.rb'
-end
-
-desc "Create a new release"
-task :release => [ :clobber, :update_version, :package, :tag ] do
- announce
- announce "**************************************************************"
- announce "* Release #{PKG_VERSION} Complete."
- announce "* Packages ready to upload."
- announce "**************************************************************"
- announce
-end
-
-desc "Tag code"
-Rake::Task.define_task("tag") do |p|
- baseurl = "svn+ssh://#{ENV['USER']}@rubyforge.org//var/svn/#{PKG_NAME}"
- sh "svn cp -m 'tagged #{ PKG_VERSION }' . #{ baseurl }/tags/REL-#{ PKG_VERSION }"
-end
-
-desc "Branch code"
-Rake::Task.define_task("branch") do |p|
- baseurl = "svn+ssh://#{ENV['USER']}@rubyforge.org/var/svn/#{PKG_NAME}"
- sh "svn cp -m 'branched #{ PKG_VERSION }' #{baseurl}/trunk #{ baseurl }/branches/RB-#{ PKG_VERSION }"
-end
-
View
2  test/test_all.rb
@@ -0,0 +1,2 @@
+require 'test/unit'
+require 'test_namecase'
Please sign in to comment.
Something went wrong with that request. Please try again.