Permalink
Browse files

Hoe really does put some ugly constraints on stuff. For example, why …

…insist on a string VERSION= whe the gemspec already contains the same? Reading every file looking for it is seriously problematic under 1.9 because of encoding issues
  • Loading branch information...
1 parent 033f6ab commit 264f6946375262f48597e17274075eb88a7f2a35 @pragdave committed Nov 3, 2009
Showing with 18 additions and 21 deletions.
  1. +4 −0 Rakefile
  2. +1 −1 bin/codex
  3. +8 −13 config/hoe.rb
  4. +5 −7 lib/codex/version.rb
View
@@ -1,5 +1,9 @@
$:.unshift File.join(File.dirname(__FILE__), 'lib')
+# Hoe insists on reading every damn file looking for a version string.
+# This can't work, because we don't know what the encoding is
+Encoding.default_external = 'binary' if defined?(Encoding)
+
require 'config/requirements'
require 'config/hoe' # setup Hoe + all gem configuration
View
@@ -5,7 +5,7 @@ require 'rubigen'
if %w(-v --version).include? ARGV.first
require 'codex/version'
- puts "#{File.basename($0)} #{Codex::VERSION::STRING}"
+ puts "#{File.basename($0)} #{Codex::VERSION}"
exit(0)
end
View
@@ -34,10 +34,6 @@ def rubyforge_username
end
-REV = nil
-# UNCOMMENT IF REQUIRED:
-# REV = YAML.load(`svn info`)['Revision']
-VERS = Codex::VERSION::STRING + (REV ? ".#{REV}" : "")
RDOC_OPTS = ['--quiet', '--title', 'codex documentation',
"--opname", "index.html",
"--line-numbers",
@@ -54,17 +50,16 @@ def extra_deps
# Generate all the Rake tasks
# Run 'rake -T' to see list of generated tasks (from gem root directory)
$hoe = Hoe.spec(GEM_NAME) do |p|
- p.version = VERS
- p.developer(AUTHOR, EMAIL)
- p.description = DESCRIPTION
- p.summary = DESCRIPTION
- p.url = HOMEPATH
- p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
- p.test_globs = ["test/**/test_*.rb"]
- p.clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
+ developer(AUTHOR, EMAIL)
+ description = DESCRIPTION
+ summary = DESCRIPTION
+ url = HOMEPATH
+ rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
+ test_globs = ["test/**/test_*.rb"]
+ clean_globs |= ['**/.*.sw?', '*.gem', '.config', '**/.DS_Store'] #An array of file patterns to delete on clean.
# == Optional
- p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
+ changes = paragraphs_of("History.txt", 0..1).join("\n\n")
#p.extra_deps = EXTRA_DEPENDENCIES
#p.spec_extras = {} # A hash of extra values to set in the gemspec.
View
@@ -1,9 +1,7 @@
module Codex #:nodoc:
- module VERSION #:nodoc:
- MAJOR = 1
- MINOR = 1
- TINY = 0
+ # Thanks, Hoe
+ VERSION = "1.1.1"
+end
+
+
- STRING = [MAJOR, MINOR, TINY].join('.')
- end
-end

2 comments on commit 264f694

Contributor

bkeepers replied Nov 4, 2009

This may be a good reason to just switch to jeweler

I use echoe... it's supposed to be like hoe, minus problems like this.

Please sign in to comment.