Permalink
Browse files

Switch to jeweler from hoe

  • Loading branch information...
binarylogic committed Jun 28, 2009
1 parent ce2b50a commit 3195b47a490dfd1dc533f9910d8d751009c81a36
View
File renamed without changes.
View
@@ -1,11 +0,0 @@
-CHANGELOG.rdoc
-MIT-LICENSE
-Manifest.txt
-README.rdoc
-Rakefile
-init.rb
-lib/addresslogic.rb
-lib/addresslogic/version.rb
-rails/init.rb
-test/test_addresslogic.rb
-test/test_helper.rb
View
@@ -1,20 +1,48 @@
-ENV['RDOCOPT'] = "-S -f html -T hanna"
+require 'rubygems'
+require 'rake'
-require "rubygems"
-require "hoe"
-require File.dirname(__FILE__) << "/lib/addresslogic/version"
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gem|
+ gem.name = "addresslogic"
+ gem.summary = "Creates a meaningful array of address parts for easy displaying."
+ gem.email = "bjohnson@binarylogic.com"
+ gem.homepage = "http://github.com/binarylogic/addresslogic"
+ gem.authors = ["Ben Johnson of Binary Logic"]
+ gem.rubyforge_project = "addresslogic"
+ end
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
+end
-Hoe.new("Addresslogic", Addresslogic::Version::STRING) do |p|
- p.name = "addresslogic"
- p.rubyforge_name = "addresslogic"
- p.author = "Ben Johnson of Binary Logic"
- p.email = 'bjohnson@binarylogic.com'
- p.summary = "Easily display addresses."
- p.description = "Easily display addresses."
- p.url = "http://github.com/binarylogic/addresslogic"
- p.history_file = "CHANGELOG.rdoc"
- p.readme_file = "README.rdoc"
- p.extra_rdoc_files = ["CHANGELOG.rdoc", "README.rdoc"]
- p.remote_rdoc_dir = ''
- p.test_globs = ["test/*/test_*.rb", "test/*_test.rb", "test/*/*_test.rb"]
-end
+require 'rake/testtask'
+Rake::TestTask.new(:test) do |test|
+ test.libs << 'lib' << 'test'
+ test.pattern = 'test/**/*_test.rb'
+ test.verbose = true
+end
+
+begin
+ require 'rcov/rcovtask'
+ Rcov::RcovTask.new do |test|
+ test.libs << 'test'
+ test.pattern = 'test/**/*_test.rb'
+ test.verbose = true
+ end
+rescue LoadError
+ task :rcov do
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
+ end
+end
+
+task :default => :test
+
+begin
+ require 'rake/contrib/sshpublisher'
+ namespace :rubyforge do
+ desc "Release gem to RubyForge"
+ task :release => ["rubyforge:release:gem"]
+ end
+rescue LoadError
+ puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
+end
@@ -1,56 +0,0 @@
-module Addresslogic
- # = Version
- #
- # A class for describing the current version of a library. The version
- # consists of three parts: the +major+ number, the +minor+ number, and the
- # +tiny+ (or +patch+) number.
- class Version
-
- include Comparable
-
- # A convenience method for instantiating a new Version instance with the
- # given +major+, +minor+, and +tiny+ components.
- def self.[](major, minor, tiny)
- new(major, minor, tiny)
- end
-
- attr_reader :major, :minor, :tiny
-
- # Create a new Version object with the given components.
- def initialize(major, minor, tiny)
- @major, @minor, @tiny = major, minor, tiny
- end
-
- # Compare this version to the given +version+ object.
- def <=>(version)
- to_i <=> version.to_i
- end
-
- # Converts this version object to a string, where each of the three
- # version components are joined by the '.' character. E.g., 2.0.0.
- def to_s
- @to_s ||= [@major, @minor, @tiny].join(".")
- end
-
- # Converts this version to a canonical integer that may be compared
- # against other version objects.
- def to_i
- @to_i ||= @major * 1_000_000 + @minor * 1_000 + @tiny
- end
-
- def to_a
- [@major, @minor, @tiny]
- end
-
- MAJOR = 1
- MINOR = 1
- TINY = 2
-
- # The current version as a Version instance
- CURRENT = new(MAJOR, MINOR, TINY)
- # The current version as a String
- STRING = CURRENT.to_s
-
- end
-
-end
View
@@ -1,2 +1 @@
-require "addresslogic/version"
require "addresslogic"
File renamed without changes.

0 comments on commit 3195b47

Please sign in to comment.