Sha256: 417dc4b055fffaba089c08e8cbba08a13e0ad96850732bde1653f587e76e0aef

Contents?: true

Size: 1.13 KB

Versions: 16

Compression:

Stored size: 1.13 KB

Contents

require File.expand_path('../../tasks', __FILE__)
require 'rake'
require 'rake/dsl_definition'
require 'thor'
require 'securerandom' unless defined?(SecureRandom)
begin
  require 'padrino-gen'
rescue LoadError
end

module PadrinoTasks
  def self.init(init=false)
    $LOAD_PATH.unshift(File.expand_path("lib"))
    Padrino::Tasks.files.flatten.uniq.each { |rakefile| Rake.application.add_import(rakefile) rescue puts "<= Failed load #{ext}" }
    load(File.expand_path('../rake_tasks.rb', __FILE__))
    Rake.application.load_imports
  end

  def self.use(task)
    tasks << task
  end

  def self.tasks
    @tasks ||= []
  end

  def self.load?(task, constant_present)
    if constant_present && !PadrinoTasks.tasks.include?(task)
      warn <<-WARNING
Loading #{task} tasks automatically.
This functionality will be disabled in future versions. Please put

  PadrinoTasks.use(#{task.inspect})
  PadrinoTasks.init

and remove

  require File.expand_path('../config/boot.rb', __FILE__)

in you Rakefile instead.
      WARNING
    end

    constant_present || PadrinoTasks.tasks.include?(task)
  end
end

def shell
  @_shell ||= Thor::Base.shell.new
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
padrino-core-0.12.9 lib/padrino-core/cli/rake.rb
padrino-core-0.12.8.1 lib/padrino-core/cli/rake.rb
padrino-core-0.12.8 lib/padrino-core/cli/rake.rb
padrino-core-0.12.7 lib/padrino-core/cli/rake.rb
padrino-core-0.12.6 lib/padrino-core/cli/rake.rb
padrino-core-0.13.1 lib/padrino-core/cli/rake.rb
padrino-core-0.13.1.beta1 lib/padrino-core/cli/rake.rb
padrino-core-0.13.0 lib/padrino-core/cli/rake.rb
padrino-core-0.13.0.beta3 lib/padrino-core/cli/rake.rb
padrino-core-0.13.0.beta2 lib/padrino-core/cli/rake.rb
padrino-core-0.12.5 lib/padrino-core/cli/rake.rb
padrino-core-0.13.0.beta1 lib/padrino-core/cli/rake.rb
padrino-core-0.12.4 lib/padrino-core/cli/rake.rb
padrino-core-0.12.3 lib/padrino-core/cli/rake.rb
padrino-core-0.12.2 lib/padrino-core/cli/rake.rb
padrino-core-0.12.1 lib/padrino-core/cli/rake.rb