Defines the rake tasks.

 @api private
191166
def define
      namespace :db do
        desc "Write Null dimension records"
        task :create_null_records do
          # TODO: replace this with proper logging.
          warn "Loading NULL records."
          @schema.dimensions.each do |dimension| 
            dimension.create_null_records(@staging_db) 
          end
        end

        desc "Writes a migration file to change the database based on defined Facts & Dimensions"
        task :write_migrations do
          writer = Database::MigrationFileWriter.new
          writer.write_migration_file(@staging_db, @schema,
                                      staging_directory)

          if @presentation_db
            writer.write_migration_file(@presentation_db, @schema, 
                                        presentation_directory, false)
          end
        end
      end
    end
181376
def init_tasks():
    

    # Make sure exist are set
    if "exists" not in env:
        env.exists = exists

    if "run" not in env:
        env.run = run

    if "cd" not in env:
        env.cd = cd

    if "max_releases" not in env:
        env.max_releases = 5

    if "public_path" in env:
        public_path = env.public_path.rstrip("/")
        env.public_path = public_path

    run_hook("init_tasks")
307467
def build_task_template
      b = binding
      ERB.new(Woro::TaskHelper.read_template_file).result(b)
    end
843414
def execute_tasks(tasks,template_path)
      
      if File.exists?(File.expand_path(File.join(template_path,'tasks.rb')))
        load File.expand_path(File.join(template_path,'tasks.rb'))
      end
       
      tasks.each{
        |task|
        
        puts 'Running Task: ' + task
        
        task = replace_tags(task);
        
        options = task.split(', ')
        action = options.slice!(0)
        
        if(Tasks.respond_to?(action))
          Tasks.send action, options.join(', ')
        else
          send action, options.join(', ')
        end
        
      }
                  
    end
588163
def define_rspec_tasks!
      require 'rspec/core/rake_task'

      namespace(:spec) do
        desc "Verify all RSpec examples for #{gemspec.name}"
        RSpec::Core::RakeTask.new(:basic) do |t|
          t.pattern = spec_pattern
        end

        desc "Verify all RSpec examples for #{gemspec.name} and output specdoc"
        RSpec::Core::RakeTask.new(:specdoc) do |t|
          t.pattern = spec_pattern
          t.rspec_opts = ['--format', 'documentation', '--color']
        end

        desc "Run RCov on specs for #{gemspec.name}"
        RSpec::Core::RakeTask.new(:rcov) do |t|
          t.pattern = spec_pattern
          t.rcov = true
          t.rcov_opts = ['--exclude', '"spec/*,gems/*"', '--rails']
        end
      end

      desc "Verify all RSpec examples for #{gemspec.name} and output specdoc"
      task(:spec => ['spec:specdoc'])
    end
808985
def rake(file = nil, options = {})
      if file.nil?
        perform_set_operation :rake, options
      else
        file = File.expand_path(file)
        chdir(File.dirname(file)) do
          perform_set_operation(:rake, options.merge(:rakefile => file))
        end
      end
    end
533089
def parent_task(name)
      task name do
        Rake::Task
          .tasks
          .select { |t| t.name =~ /^#{name}:/ }
          .sort_by(&:name)
          .each(&:execute)
      end
    end
1256453
def rake_task(name,*arguments)
      name = name.to_s

      unless arguments.empty?
        name += ('[' + arguments.join(',') + ']')
      end

      return name
    end
16740
def list_bare_tasks
      load_tasks

      Thor::Base.subclasses.each do |klass|
        unless klass == Thor
          klass.tasks.each do |t|
            puts "#{klass.namespace}:#{t[0]}"
          end
        end
      end
    end
312457
function Tasks (options) {
  var me = this;

  // properties
  this.tasks = {};
  this.options = {
    run: 'auto' // can be 'auto' or 'manual'
  };
  this.executed = false;

  // set options
  if (options) {
    this.setOptions(options);
  }

  // execute a function on next process tick which will execute the tasks
  // (when configured to be executed automatically)
  if (process && process.nextTick) {
    process.nextTick(function () {
      if (me.options.run == 'auto') {
        me.run();
      }
    });
  }
}
602155
def task_execution
      begin
        require 'rake'

        Rails.application.load_tasks
        ::Rake::Task[params[:task]].execute
      rescue StandardError => e
        flash[:alert] = e.message
      else
        flash[:notice] = "Task: #{params[:task]} has completed"
      end

      redirect_to root_path
    end
696579
def files_to_lint(task_args)
      # Note: we're abusing Rake's argument handling a bit here. We call the
      # first argument `files` but it's actually only the first file--we pull
      # the rest out of the `extras` from the task arguments. This is so we
      # can specify an arbitrary list of files separated by commas on the
      # command line or in a custom task definition.
      explicit_files = Array(task_args[:files]) + Array(task_args.extras)

      explicit_files.any? ? explicit_files : files
    end
148427
function () {
      var arr = [].slice.call( arguments );
      var tasks = [];
      arr.forEach( function ( name ) {
        var prefixer = /^css-/.test( name ) ? 'css-target:' : 'js-target:';
        tasks.push( prefixer + name );
      } );
      grunt.task.run( tasks );
    }
963380
def convert_to_rake()
      object_multitask = prepare_tasks_for_objects()
      archiver = @tcs[:ARCHIVER]

      res = typed_file_task Rake::Task::LIBRARY, get_task_name => object_multitask do
        cmd = calc_command_line
        aname = calc_archive_name
        Dir.chdir(@project_dir) do
          FileUtils.rm(aname) if File.exists?(aname)
#          cmd.map! {|c| c.include?(' ') ? "\"#{c}\"" : c }
          rd, wr = IO.pipe
          cmd << {
            :err => wr,
            :out => wr
          }
          sp = spawn(*cmd)
          cmd.pop

          consoleOutput = ProcessHelper.readOutput(sp, rd, wr)

          process_result(cmd, consoleOutput, @tcs[:ARCHIVER][:ERROR_PARSER], "Creating #{aname}")

          check_config_file()
        end
      end
      res.tags = tags
      enhance_with_additional_files(res)
      add_output_dir_dependency(get_task_name, res, true)

      add_grouping_tasks(get_task_name)

      setup_rake_dependencies(res, object_multitask)
      return res
    end
645398
def tasks_in_scope(scope)
      prefix = scope.path
      tasks.select { |t|
        /^#{prefix}:/ =~ t.name
      }
    end
552004
public function all() {

        foreach ( $this->tasks as $task => $option ) {
            $task = $this->taskClassname($task);
            $this->$task->all();
        }
    }
845172
def run_task(_verbose)
      data.each do |path, string|
        opts = {}
        path = File.expand_path(path)

        if string.is_a?(Hash)
          input             = string[:input]
          opts[:patterns]   = string[:patterns] if string.key? :patterns
          opts[:color]      = string[:color] if string.key? :color
          opts[:base_color] = string[:base_color] if string.key? :base_color
        else
          raise 'Invalid data structure for Rake Task'
        end

        pattern = GeoPattern.generate(input, opts)

        logger.info "Creating pattern at \"#{path}\"."
        FileUtils.mkdir_p File.dirname(path)
        File.write(path, pattern.to_svg)
      end
    end