Sha256: 926f1bedf9289c4e089aa512544541f7b54585f4451ee12a45abb7d607f99f98

Contents?: true

Size: 1.16 KB

Versions: 132

Compression:

Stored size: 1.16 KB

Contents

require 'rake/ext/core'
require 'rake/task'
require 'rake/file_task'
require 'rake/file_creation_task'
require 'rake/application'
require 'rake/task_manager'

######################################################################
# Rake extensions to Module.
#
class Module

  # Rename the original handler to make it available.
  alias :rake_original_const_missing :const_missing

  # Check for deprecated uses of top level (i.e. in Object) uses of
  # Rake class names.  If someone tries to reference the constant
  # name, display a warning and return the proper object.  Using the
  # --classic-namespace command line option will define these
  # constants in Object and avoid this handler.
  def const_missing(const_name)
    case const_name
    when :Task
      Rake.application.const_warning(const_name)
      Rake::Task
    when :FileTask
      Rake.application.const_warning(const_name)
      Rake::FileTask
    when :FileCreationTask
      Rake.application.const_warning(const_name)
      Rake::FileCreationTask
    when :RakeApp
      Rake.application.const_warning(const_name)
      Rake::Application
    else
      rake_original_const_missing(const_name)
    end
  end
end

Version data entries

132 entries across 105 versions & 24 rubygems

Version Path
gss-0.0.7 vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/ext/module.rb
gss-0.0.6 vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/ext/module.rb
gss-0.0.5 vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/ext/module.rb
candlepin-api-0.4.0 bundle/ruby/1.8/gems/rake-0.9.2.2/lib/rake/ext/module.rb
candlepin-api-0.4.0 bundle/ruby/gems/rake-0.9.2.2/lib/rake/ext/module.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/ext/module.rb
simple-client-0.0.3 vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/ext/module.rb
dirty_history-0.7.3 dirty_history/ruby/1.9.1/gems/rake-0.9.2/lib/rake/ext/module.rb
dirty_history-0.7.2 dirty_history/ruby/1.9.1/gems/rake-0.9.2/lib/rake/ext/module.rb
dirty_history-0.7.1 dirty_history/ruby/1.9.1/gems/rake-0.9.2/lib/rake/ext/module.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.0.pre/vendor/bundle/gems/rake-0.9.2.2/lib/rake/ext/module.rb
challah-rolls-0.2.0 vendor/bundle/gems/challah-0.8.3/vendor/bundle/gems/rake-0.9.2.2/lib/rake/ext/module.rb
challah-rolls-0.2.0 vendor/bundle/gems/rake-0.9.2.2/lib/rake/ext/module.rb
challah-0.8.3 vendor/bundle/gems/rake-0.9.2.2/lib/rake/ext/module.rb
dirty_history-0.7.0 dirty_history/ruby/1.9.1/gems/rake-0.9.2/lib/rake/ext/module.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/rake/ext/module.rb
dirty_history-0.6.7 dirty_history/ruby/1.9.1/gems/rake-0.9.2/lib/rake/ext/module.rb
dirty_history-0.6.6 dirty_history/ruby/1.9.1/gems/rake-0.9.2/lib/rake/ext/module.rb
dirty_history-0.6.5 dirty_history/ruby/1.9.1/gems/rake-0.9.2/lib/rake/ext/module.rb
challah-0.8.1 vendor/bundle/gems/rake-0.9.2.2/lib/rake/ext/module.rb