Permalink
Browse files

Switch to Jeweler for generating the gem

  • Loading branch information...
1 parent 09c3d42 commit 90618b51e2f020a25d9b96df07e2734945c2cd8e @bkeepers bkeepers committed Jul 16, 2009
Showing with 217 additions and 17 deletions.
  1. +74 −17 Rakefile
  2. +1 −0 VERSION
  3. +142 −0 graticule.gemspec
View
@@ -1,23 +1,79 @@
-require 'rubygems'
-require 'active_support'
-require 'hoe'
-require File.join(File.dirname(__FILE__), 'lib', 'graticule', 'version.rb')
-
-Hoe.new("graticule", Graticule::Version::STRING) do |p|
- p.rubyforge_name = "graticule"
- p.author = 'Brandon Keepers'
- p.email = 'brandon@opensoul.org'
- p.summary = "API for using all the popular geocoding services."
- p.description = 'Graticule is a geocoding API that provides a common interface to all the popular services, including Google, Yahoo, Geocoder.us, and MetaCarta.'
- p.url = 'http://graticule.rubyforge.org'
- p.need_tar = true
- p.need_zip = true
- p.test_globs = ['test/**/*_test.rb']
- p.changes = p.paragraphs_of('CHANGELOG.txt', 0..1).join("\n\n")
- p.extra_deps << ['activesupport']
+begin
+ require 'jeweler'
+rescue LoadError
+ puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
+ exit 1
+end
+require 'rake/testtask'
+require 'rake/rdoctask'
+require 'rcov/rcovtask'
+
+Jeweler::Tasks.new do |s|
+ s.name = "graticule"
+ s.rubyforge_project = "graticule"
+ s.author = 'Brandon Keepers'
+ s.email = 'brandon@opensoul.org'
+ s.summary = "API for using all the popular geocoding services."
+ s.description = 'Graticule is a geocoding API that provides a common interface to all the popular services, including Google, Yahoo, Geocoder.us, and MetaCarta.'
+ s.homepage = "http://github.com/collectiveidea/graticule"
+ s.add_dependency "activesupport"
+ s.has_rdoc = true
+ s.extra_rdoc_files = ["README.txt"]
+ s.rdoc_options = ["--main", "README.rdoc", "--inline-source", "--line-numbers"]
+ s.test_files = Dir['test/**/*.{yml,rb}']
end
+desc 'Default: run unit tests.'
+task :default => :test
+
+desc 'Run the unit tests'
+Rake::TestTask.new(:test) do |t|
+ t.libs << 'lib'
+ t.pattern = 'test/**/*_test.rb'
+ t.verbose = true
+end
+desc 'Generate documentatio'
+Rake::RDocTask.new(:rdoc) do |rdoc|
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = 'Graticule'
+ rdoc.options << '--line-numbers' << '--inline-source'
+ rdoc.rdoc_files.include('README.txt')
+ rdoc.rdoc_files.include('lib/**/*.rb')
+end
+
+namespace :test do
+ desc "just rcov minus html output"
+ Rcov::RcovTask.new(:coverage) do |t|
+ # t.libs << 'test'
+ t.test_files = FileList['test/**/*_test.rb']
+ t.output_dir = 'coverage'
+ t.verbose = true
+ t.rcov_opts = %w(--exclude test,/usr/lib/ruby,/Library/Ruby,lib/awesome_nested_set/named_scope.rb --sort coverage)
+ end
+end
+
+require 'rake/contrib/sshpublisher'
+namespace :rubyforge do
+
+ desc "Release gem and RDoc documentation to RubyForge"
+ task :release => ["rubyforge:release:gem", "rubyforge:release:docs"]
+
+ namespace :release do
+ desc "Publish RDoc to RubyForge."
+ task :docs => [:rdoc] do
+ config = YAML.load(
+ File.read(File.expand_path('~/.rubyforge/user-config.yml'))
+ )
+
+ host = "#{config['username']}@rubyforge.org"
+ remote_dir = "/var/www/gforge-projects/the-perfect-gem/"
+ local_dir = 'rdoc'
+
+ Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
+ end
+ end
+end
namespace :test do
namespace :cache do
@@ -57,6 +113,7 @@ namespace :test do
end
end
+require 'active_support'
require 'net/http'
require 'uri'
RESPONSES_PATH = File.dirname(__FILE__) + '/test/fixtures/responses'
View
@@ -0,0 +1 @@
+0.2.10
View
@@ -0,0 +1,142 @@
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = %q{graticule}
+ s.version = "0.2.10"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Brandon Keepers"]
+ s.date = %q{2009-07-15}
+ s.default_executable = %q{geocode}
+ s.description = %q{Graticule is a geocoding API that provides a common interface to all the popular services, including Google, Yahoo, Geocoder.us, and MetaCarta.}
+ s.email = %q{brandon@opensoul.org}
+ s.executables = ["geocode"]
+ s.extra_rdoc_files = [
+ "README.txt"
+ ]
+ s.files = [
+ ".gitignore",
+ "CHANGELOG.txt",
+ "LICENSE.txt",
+ "Manifest.txt",
+ "README.txt",
+ "Rakefile",
+ "bin/geocode",
+ "init.rb",
+ "lib/graticule.rb",
+ "lib/graticule/cli.rb",
+ "lib/graticule/core_ext.rb",
+ "lib/graticule/distance.rb",
+ "lib/graticule/distance/haversine.rb",
+ "lib/graticule/distance/spherical.rb",
+ "lib/graticule/distance/vincenty.rb",
+ "lib/graticule/geocoder.rb",
+ "lib/graticule/geocoder/base.rb",
+ "lib/graticule/geocoder/bogus.rb",
+ "lib/graticule/geocoder/geocoder_ca.rb",
+ "lib/graticule/geocoder/geocoder_us.rb",
+ "lib/graticule/geocoder/google.rb",
+ "lib/graticule/geocoder/host_ip.rb",
+ "lib/graticule/geocoder/local_search_maps.rb",
+ "lib/graticule/geocoder/mapquest.rb",
+ "lib/graticule/geocoder/meta_carta.rb",
+ "lib/graticule/geocoder/multi.rb",
+ "lib/graticule/geocoder/multimap.rb",
+ "lib/graticule/geocoder/postcode_anywhere.rb",
+ "lib/graticule/geocoder/rest.rb",
+ "lib/graticule/geocoder/yahoo.rb",
+ "lib/graticule/location.rb",
+ "lib/graticule/version.rb",
+ "site/index.html",
+ "site/plugin.html",
+ "site/stylesheets/style.css",
+ "test/config.yml.default",
+ "test/fixtures/responses/geocoder_us/success.xml",
+ "test/fixtures/responses/geocoder_us/unknown.xml",
+ "test/fixtures/responses/google/badkey.xml",
+ "test/fixtures/responses/google/limit.xml",
+ "test/fixtures/responses/google/missing_address.xml",
+ "test/fixtures/responses/google/only_coordinates.xml",
+ "test/fixtures/responses/google/partial.xml",
+ "test/fixtures/responses/google/server_error.xml",
+ "test/fixtures/responses/google/success.xml",
+ "test/fixtures/responses/google/success_multiple_results.xml",
+ "test/fixtures/responses/google/unavailable.xml",
+ "test/fixtures/responses/google/unknown_address.xml",
+ "test/fixtures/responses/host_ip/private.txt",
+ "test/fixtures/responses/host_ip/success.txt",
+ "test/fixtures/responses/host_ip/unknown.txt",
+ "test/fixtures/responses/local_search_maps/empty.txt",
+ "test/fixtures/responses/local_search_maps/not_found.txt",
+ "test/fixtures/responses/local_search_maps/success.txt",
+ "test/fixtures/responses/mapquest/multi_result.xml",
+ "test/fixtures/responses/mapquest/success.xml",
+ "test/fixtures/responses/meta_carta/bad_address.xml",
+ "test/fixtures/responses/meta_carta/multiple.xml",
+ "test/fixtures/responses/meta_carta/success.xml",
+ "test/fixtures/responses/multimap/missing_params.xml",
+ "test/fixtures/responses/multimap/no_matches.xml",
+ "test/fixtures/responses/multimap/success.xml",
+ "test/fixtures/responses/postcode_anywhere/badkey.xml",
+ "test/fixtures/responses/postcode_anywhere/canada.xml",
+ "test/fixtures/responses/postcode_anywhere/empty.xml",
+ "test/fixtures/responses/postcode_anywhere/success.xml",
+ "test/fixtures/responses/postcode_anywhere/uk.xml",
+ "test/fixtures/responses/yahoo/success.xml",
+ "test/fixtures/responses/yahoo/unknown_address.xml",
+ "test/mocks/uri.rb",
+ "test/test_helper.rb",
+ "test/unit/graticule/distance_test.rb",
+ "test/unit/graticule/geocoder/geocoder_us_test.rb",
+ "test/unit/graticule/geocoder/geocoders.rb",
+ "test/unit/graticule/geocoder/google_test.rb",
+ "test/unit/graticule/geocoder/host_ip_test.rb",
+ "test/unit/graticule/geocoder/local_search_maps_test.rb",
+ "test/unit/graticule/geocoder/mapquest_test.rb",
+ "test/unit/graticule/geocoder/meta_carta_test.rb",
+ "test/unit/graticule/geocoder/multi_test.rb",
+ "test/unit/graticule/geocoder/multimap_test.rb",
+ "test/unit/graticule/geocoder/postcode_anywhere_test.rb",
+ "test/unit/graticule/geocoder/yahoo_test.rb",
+ "test/unit/graticule/geocoder_test.rb",
+ "test/unit/graticule/location_test.rb"
+ ]
+ s.homepage = %q{http://github.com/collectiveidea/graticule}
+ s.rdoc_options = ["--main", "README.rdoc", "--inline-source", "--line-numbers"]
+ s.require_paths = ["lib"]
+ s.rubyforge_project = %q{graticule}
+ s.rubygems_version = %q{1.3.3}
+ s.summary = %q{API for using all the popular geocoding services.}
+ s.test_files = [
+ "test/config.yml",
+ "test/mocks/uri.rb",
+ "test/test_helper.rb",
+ "test/unit/graticule/distance_test.rb",
+ "test/unit/graticule/geocoder/geocoder_us_test.rb",
+ "test/unit/graticule/geocoder/geocoders.rb",
+ "test/unit/graticule/geocoder/google_test.rb",
+ "test/unit/graticule/geocoder/host_ip_test.rb",
+ "test/unit/graticule/geocoder/local_search_maps_test.rb",
+ "test/unit/graticule/geocoder/mapquest_test.rb",
+ "test/unit/graticule/geocoder/meta_carta_test.rb",
+ "test/unit/graticule/geocoder/multi_test.rb",
+ "test/unit/graticule/geocoder/multimap_test.rb",
+ "test/unit/graticule/geocoder/postcode_anywhere_test.rb",
+ "test/unit/graticule/geocoder/yahoo_test.rb",
+ "test/unit/graticule/geocoder_test.rb",
+ "test/unit/graticule/location_test.rb"
+ ]
+
+ if s.respond_to? :specification_version then
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<activesupport>, [">= 0"])
+ else
+ s.add_dependency(%q<activesupport>, [">= 0"])
+ end
+ else
+ s.add_dependency(%q<activesupport>, [">= 0"])
+ end
+end

0 comments on commit 90618b5

Please sign in to comment.