script/txt2html in newgem-0.29.0 vs script/txt2html in newgem-1.0.0
- old
+ new
@@ -1,28 +1,17 @@
#!/usr/bin/env ruby
-GEM_NAME = 'newgem' # what ppl will type to install your gem
-RUBYFORGE_PROJECT = 'newgem'
-
-require 'rubygems'
-begin
- require 'newgem'
- require 'rubyforge'
-rescue LoadError
- puts "\n\nGenerating the website requires the newgem RubyGem"
- puts "Install: gem install newgem\n\n"
- exit(1)
-end
+load File.dirname(__FILE__) + "/../Rakefile"
+require 'rubyforge'
require 'redcloth'
require 'syntax/convertors/html'
require 'erb'
-require File.dirname(__FILE__) + "/../lib/#{GEM_NAME}/version.rb"
-version = Newgem::VERSION::STRING
-download = "http://rubyforge.org/projects/#{RUBYFORGE_PROJECT}"
+download = "http://rubyforge.org/projects/#{$hoe.rubyforge_name}"
+version = $hoe.version
def rubyforge_project_id
- RubyForge.new.configure.autoconfig["group_ids"][RUBYFORGE_PROJECT]
+ RubyForge.new.configure.autoconfig["group_ids"][$hoe.rubyforge_name]
end
class Fixnum
def ordinal
# teens