diff --git a/README.rdoc b/README.rdoc index c8d06f4..8334452 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,6 +1,6 @@ == Sender -http://rubygems.org/gems/core-source +http://rubygems.org/gems/core_source == DESCRIPTION: @@ -10,7 +10,7 @@ core source. This fork was created because the existing ruby_core_source takes over the build definition, preventing definition of CFLAGS and other settings -that mkmf requires be defined by an enclosing block. +that mkmf requires be defined by an enclosing block. == INSTALL: diff --git a/core-source-0.2.6.gem b/core-source-0.2.6.gem deleted file mode 100644 index 5155a70..0000000 Binary files a/core-source-0.2.6.gem and /dev/null differ diff --git a/core-source.gemspec b/core_source.gemspec similarity index 77% rename from core-source.gemspec rename to core_source.gemspec index 972abf4..75444f1 100644 --- a/core-source.gemspec +++ b/core_source.gemspec @@ -2,16 +2,15 @@ require 'date' Gem::Specification.new do |spec| - spec.name = 'core-source' - spec.rubyforge_project = 'core-source' - spec.version = '0.2.7' + spec.name = 'core_source' + spec.version = '0.2.9' spec.summary = "Fork of ruby_core_source modified to support CFLAGS and permit use of whichever build system (mkmf, rpmkmf, or other modules) while utilizing core source." spec.description = "Fork of ruby_core_source modified to support CFLAGS and permit use of whichever build system (mkmf, rpmkmf, or other modules) while utilizing core source. This fork was created because the existing ruby_core_source takes over the build definition, preventing definition of CFLAGS and other settings that mkmf requires be defined by an enclosing block." - spec.authors = [ 'Asher' ] - spec.email = 'asher@ridiculouspower.com' - spec.homepage = 'http://rubygems.org/gems/core-source' + spec.authors = [ 'Jarod Reid' ] + spec.email = 'jarod@solidalchemy.com' + spec.homepage = 'http://github.com/fugufish/core-source' spec.add_dependency 'minitar' diff --git a/lib/core-source.rb b/lib/core_source.rb similarity index 80% rename from lib/core-source.rb rename to lib/core_source.rb index 6581ab5..7823b9a 100644 --- a/lib/core-source.rb +++ b/lib/core_source.rb @@ -1,3 +1,9 @@ +if RUBY_VERSION.to_f < 1.9 + def require_relative(file) + require File.expand_path('../' + file, __FILE__) + end +end + require_relative 'contrib/uri_ext.rb' require_relative 'contrib/progressbar.rb' @@ -32,10 +38,15 @@ def ensure_core_headers( headers ) ruby_dir = "ruby-" + RUBY_VERSION.to_s + "-p" + RUBY_PATCHLEVEL.to_s end + version_path = '1.8' if RUBY_VERSION.to_f >= 1.8 + version_path = '1.9' if RUBY_VERSION.to_f >= 1.9 + version_path = '2.0' if RUBY_VERSION.to_f >= 2.0 + + # # Download the headers # - uri_path = "http://ftp.ruby-lang.org/pub/ruby/1.9/" + ruby_dir + ".tar.gz" + uri_path = "http://ftp.ruby-lang.org/pub/ruby/#{version_path}/" + ruby_dir + ".tar.gz" Tempfile.open("ruby-src") { |temp| temp.binmode