Permalink
Browse files

merged hoe.rb back into Rakefile (only 29 lines now)

  • Loading branch information...
1 parent 59cd431 commit b7ef46e5879290fcf31d3e0dab92118da4069e26 @drnic committed Oct 20, 2008
Showing with 27 additions and 51 deletions.
  1. +23 −3 Rakefile
  2. +0 −36 config/hoe.rb
  3. +4 −3 lib/newgem.rb
  4. +0 −9 lib/newgem/version.rb
View
26 Rakefile
@@ -2,9 +2,29 @@ require 'rubygems'
require 'rake'
require 'rake/clean'
require 'fileutils'
-include FileUtils
-$:.unshift 'lib'
-require 'config/hoe' # setup Hoe + all gem configuration
+require 'hoe'
+require File.dirname(__FILE__) + '/lib/newgem'
+
+# Generate all the Rake tasks
+# Run 'rake -T' to see list of generated tasks (from gem root directory)
+$hoe = Hoe.new("newgem", Newgem::VERSION) do |p|
+ p.developer("Dr Nic Williams", "drnicwilliams@gmail.com")
+ p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
+ p.post_install_message = 'PostInstall.txt'
+ p.extra_deps = [
+ ['RedCloth','>=4.0.0'],
+ ['syntax','>=1.0.0'],
+ ['activesupport','>=2.0.2'],
+ ['rubigen','>=1.3.3'],
+ ['hoe', '>=1.8.0']
+ ]
+ p.spec_extras['rdoc_options'] = ['--main', Dir['README*'].first] # hopefully fixed in future hoe > 1.8
+ p.clean_globs |= %w[**/.DS_Store tmp *.log]
+ path = (p.rubyforge_name == p.name) ? p.rubyforge_name : "\#{p.rubyforge_name}/\#{p.name}"
+ p.remote_rdoc_dir = File.join(path.gsub(/^#{p.rubyforge_name}\/?/,''), 'rdoc')
+ p.rsync_args = '-av --delete --ignore-errors'
+end
+
require 'newgem/tasks' # load /tasks/*.rake
View
36 config/hoe.rb
@@ -1,36 +0,0 @@
-require 'hoe'
-require 'newgem/version'
-require 'newgem/support/tasks'
-
-DESCRIPTION = "Make your own gems at home"
-GEM_NAME = "newgem" # what ppl will type to install your gem
-RUBYFORGE_PROJECT = "newgem"
-HOMEPATH = "http://#{RUBYFORGE_PROJECT}.rubyforge.org"
-DOWNLOAD_PATH = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
-RUBYFORGE_USERNAME = ENV['RUBYFORGE_USERNAME'] || 'unknown'
-
-# Generate all the Rake tasks
-# Run 'rake -T' to see list of generated tasks (from gem root directory)
-$hoe = Hoe.new(GEM_NAME, VERS = Newgem::VERSION::STRING) do |p|
- p.developer("Dr Nic Williams", "drnicwilliams@gmail.com")
- p.description = DESCRIPTION
- p.summary = DESCRIPTION
- p.url = HOMEPATH
- p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
- p.test_globs = ["test/**/test*.rb"]
- p.post_install_message = 'PostInstall.txt'
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
- p.extra_deps = [
- ['RedCloth','>=4.0.0'],
- ['syntax','>=1.0.0'],
- ['activesupport','>=2.0.2'],
- ['rubigen','>=1.3.3'],
- ['hoe', '>=1.8.0']
- ]
- p.spec_extras['rdoc_options'] = ['--main', Dir['README*'].first]
- p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store', 'tmp', '*.log']
-end
-
-PATH = (RUBYFORGE_PROJECT == GEM_NAME) ? RUBYFORGE_PROJECT : "\#{RUBYFORGE_PROJECT}/\#{GEM_NAME}"
-$hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc')
-$hoe.rsync_args = '-av --delete --ignore-errors'
View
7 lib/newgem.rb
@@ -1,6 +1,7 @@
-$:.unshift File.dirname(__FILE__)
+$:.unshift(File.dirname(__FILE__)) unless
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
-module Newgem #:nodoc:
+module Newgem
+ VERSION = '0.30.0'
end
-
View
9 lib/newgem/version.rb
@@ -1,9 +0,0 @@
-module Newgem
- module VERSION #:nodoc:
- MAJOR = 0
- MINOR = 29
- TINY = 0
-
- STRING = [MAJOR, MINOR, TINY].join('.')
- end
-end

0 comments on commit b7ef46e

Please sign in to comment.