Sha256: 1b0468d2d50620f1403996fe8dcb7ca2013f5e66f1e372d9433f8e1db1697d97

Contents?: true

Size: 1.14 KB

Versions: 1

Compression:

Stored size: 1.14 KB

Contents

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

module TennpipesTasks
  def self.init(init=false)
    $LOAD_PATH.unshift(File.expand_path("lib"))
    Tennpipes::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 && !TennpipesTasks.tasks.include?(task)
      warn <<-WARNING
Loading #{task} tasks automatically.
This functionality will be disabled in future versions. Please put

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

and remove

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

in you Rakefile instead.
      WARNING
    end

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

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tennpipes-base-3.6.6 lib/tennpipes-base/cli/rake.rb