Skip to content

Commit

Permalink
Fix reported Rails problem with rake rails:update [#170 state:resolved]
Browse files Browse the repository at this point in the history
  • Loading branch information
jgarber committed Mar 1, 2010
1 parent 1a898e0 commit 0a481fb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
@@ -1,5 +1,6 @@
=== Edge

* Fix uninitialized constant Gem::Specification::PLATFORM_CROSS_TARGETS in Rails [Jason Garber]
* Allow uppercase letters in ID attribute even though it's invalid [Jason Garber]
* Fix compatibility with newer Echoe, by using full-name for Platform [Flameeyes]
* Fixes for PPC/PPC64 [Flameeyes]
Expand Down
23 changes: 14 additions & 9 deletions lib/tasks/pureruby.rake
@@ -1,12 +1,17 @@
Gem::Specification::PLATFORM_CROSS_TARGETS << "pureruby"
# Apparently this file gets loaded by Rails. Only want to define the pureruby
# task in the context of RedCloth compilation (echoe loaded).

task 'pureruby' do
reset_target 'pureruby'
end
if Gem::Specification.const_defined?(:PLATFORM_CROSS_TARGETS)
Gem::Specification::PLATFORM_CROSS_TARGETS << "pureruby"

if target = ARGV.detect do |arg|
# Hack to get the platform set before the Rakefile evaluates
Gem::Specification::PLATFORM_CROSS_TARGETS.include? arg
task 'pureruby' do
reset_target 'pureruby'
end
reset_target target
end

if target = ARGV.detect do |arg|
# Hack to get the platform set before the Rakefile evaluates
Gem::Specification::PLATFORM_CROSS_TARGETS.include? arg
end
reset_target target
end
end

0 comments on commit 0a481fb

Please sign in to comment.